Thread (29 messages) flat view 29 messages, 4 authors, 2016-06-23

[PATCH net-next 16/19] net: hns: fix bug that alloc skb fail lead to port unavailable

From: Sergei Shtylyov <hidden>
Date: 2016-06-21 13:25:25
Also in: lkml, netdev

Hello.

On 6/21/2016 6:56 AM, Yisen Zhuang wrote:
quoted hunk ↗ jump to hunk
From: Jun He <redacted>

When hns_nic_poll_rx_skb alloc skb fail, it will break receive cycle and
read new fbd_num to start new receive cycle. It recomputes cycle num is
fbd_num minus clean_count, actually this cycle num is too big because
it drop out receive cycle. It brings about the port unavailable.

So we will goto out when alloc skb fail to fix this bug.

Signed-off-by: Jun He <redacted>
Signed-off-by: Ding Tianhong <redacted>
Signed-off-by: Yisen Zhuang <redacted>
---
 drivers/net/ethernet/hisilicon/hns/hns_enet.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index f49246d..c0ce37b 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -768,10 +768,10 @@ recv:
 			clean_count = 0;
 		}

-		/* poll one pkg*/
+		/* poll one pkt*/
    How about adding a space before */?

[...]

MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help