mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Salil Mehta <salil.mehta@huawei.com>
To: <dledford@redhat.com>
Cc: <salil.mehta@huawei.com>, <xavier.huwei@huawei.com>,
	<oulijun@huawei.com>, <yisen.zhuang@huawei.com>,
	<mehta.salil.lnk@gmail.com>, <linux-rdma@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>,
	Daode Huang <huangdaode@hisilicon.com>
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@huawei.com>

From: Daode Huang <huangdaode@hisilicon.com>

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@hisilicon.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
 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

  parent reply	other threads:[~2016-09-10  4:11 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
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 ` [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
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
2016-09-28 16:06   ` Salil Mehta
2016-09-29 17:16   ` 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@huawei.com \
    --cc=dledford@redhat.com \
    --cc=huangdaode@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mehta.salil.lnk@gmail.com \
    --cc=oulijun@huawei.com \
    --cc=xavier.huwei@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /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

all inboxes | Powered by JetHome®