Commit 5d80b3e1 authored by Daode Huang's avatar Daode Huang Committed by Doug Ledford

net: hns: delete redundant broadcast packet filter process

The broadcast packets is filtered in the hardware now, so this process
is no need in the driver, just delete it.
Signed-off-by: default avatarDaode Huang <huangdaode@hisilicon.com>
Reviewed-by: default avatarYisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 2162a4a1
...@@ -574,7 +574,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data, ...@@ -574,7 +574,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
struct sk_buff *skb; struct sk_buff *skb;
struct hnae_desc *desc; struct hnae_desc *desc;
struct hnae_desc_cb *desc_cb; struct hnae_desc_cb *desc_cb;
struct ethhdr *eh;
unsigned char *va; unsigned char *va;
int bnum, length, i; int bnum, length, i;
int pull_len; int pull_len;
...@@ -600,7 +599,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data, ...@@ -600,7 +599,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
ring->stats.sw_err_cnt++; ring->stats.sw_err_cnt++;
return -ENOMEM; return -ENOMEM;
} }
skb_reset_mac_header(skb);
prefetchw(skb->data); prefetchw(skb->data);
length = le16_to_cpu(desc->rx.pkt_len); length = le16_to_cpu(desc->rx.pkt_len);
...@@ -682,14 +680,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data, ...@@ -682,14 +680,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
return -EFAULT; return -EFAULT;
} }
/* filter out multicast pkt with the same src mac as this port */
eh = eth_hdr(skb);
if (unlikely(is_multicast_ether_addr(eh->h_dest) &&
ether_addr_equal(ndev->dev_addr, eh->h_source))) {
dev_kfree_skb_any(skb);
return -EFAULT;
}
ring->stats.rx_pkts++; ring->stats.rx_pkts++;
ring->stats.rx_bytes += skb->len; ring->stats.rx_bytes += skb->len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment