From: Salil Mehta <salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
xavier.huwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
Daode Huang <huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
Subject: [PATCH for-next 8/8] net: hns: delete redundant broadcast packet filter process
Date: Sat, 10 Sep 2016 05:09:30 +0100 [thread overview]
Message-ID: <20160910040930.25988-9-salil.mehta@huawei.com> (raw)
In-Reply-To: <20160910040930.25988-1-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
From: Daode Huang <huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
The broadcast packets is filtered in the hardware now, so this process
is no need in the driver, just delete it.
Signed-off-by: Daode Huang <huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
Reviewed-by: Yisen Zhuang <yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Signed-off-by: Salil Mehta <salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 4105df8..d56dfca 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -574,7 +574,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
struct sk_buff *skb;
struct hnae_desc *desc;
struct hnae_desc_cb *desc_cb;
- struct ethhdr *eh;
unsigned char *va;
int bnum, length, i;
int pull_len;
@@ -600,7 +599,6 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
ring->stats.sw_err_cnt++;
return -ENOMEM;
}
- skb_reset_mac_header(skb);
prefetchw(skb->data);
length = le16_to_cpu(desc->rx.pkt_len);
@@ -682,14 +680,6 @@ out_bnum_err:
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_bytes += skb->len;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-09-10 4:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-10 4:09 [PATCH for-next 0/8] Bug Fixes and Code Improvement in HNS driver Salil Mehta
2016-09-10 4:09 ` [PATCH for-next 1/8] net: hns: fix port unavailable after hnae_reserve_buffer_map fail Salil Mehta
2016-09-10 4:09 ` [PATCH for-next 2/8] net: hns: bug fix about setting coalsecs-usecs to 0 Salil Mehta
2016-09-10 4:09 ` [PATCH for-next 3/8] net: hns: add fini_process for v2 napi process Salil Mehta
[not found] ` <20160910040930.25988-1-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-09-10 4:09 ` [PATCH for-next 4/8] net: hns: delete repeat read fbd num after while Salil Mehta
2016-09-10 4:09 ` Salil Mehta [this message]
2016-09-28 14:57 ` [PATCH for-next 0/8] Bug Fixes and Code Improvement in HNS driver Doug Ledford
[not found] ` <57EBDA43.3010708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-28 16:06 ` Salil Mehta
2016-09-29 17:16 ` Salil Mehta
2016-09-10 4:09 ` [PATCH for-next 5/8] net: hns: fix port not available after testing loopback Salil Mehta
2016-09-10 4:09 ` [PATCH for-next 6/8] net: hns: fix the bug of forwarding table Salil Mehta
2016-09-10 4:09 ` [PATCH for-next 7/8] net: hns: bug fix about broadcast/multicast packets Salil Mehta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160910040930.25988-9-salil.mehta@huawei.com \
--to=salil.mehta-hv44wf8li93qt0dzr+alfa@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=xavier.huwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox