[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1466481399-70080-4-git-send-email-Yisen.Zhuang@huawei.com>
Date: Tue, 21 Jun 2016 11:56:23 +0800
From: Yisen Zhuang <Yisen.Zhuang@...wei.com>
To: <davem@...emloft.net>, <yisen.zhuang@...wei.com>,
<salil.mehta@...wei.com>, <yankejian@...wei.com>
CC: <liguozhu@...wei.com>, <huangdaode@...ilicon.com>, <arnd@...db.de>,
<andriy.shevchenko@...ux.intel.com>, <andrew@...n.ch>,
<geliangtang@....com>, <ivecera@...hat.com>,
<fengguang.wu@...el.com>, <charles.chenxin@...wei.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <linuxarm@...wei.com>
Subject: [PATCH net-next 03/19] net: hns: add skb_reset_mac_header() after skb being alloc
From: Kejian Yan <yankejian@...wei.com>
HNS receives a packet without doing anything, but it should call
skb_reset_mac_header() to initialize the header before using
eth_hdr().
Fixes: 0d6b425a3773c3445b0f51b2f333821beaacb619
Signed-off-by: Kejian Yan <yankejian@...wei.com>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@...wei.com>
---
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index ad742a6..15200e4 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -600,6 +600,7 @@ 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);
--
1.9.1
Powered by blists - more mailing lists