Skip to contentSkip to conversation

bnx2x: properly update skb when mtu > 1500

PATCH Applied Dmitry Kravkov 3 participants 3 messages Dec 13, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnx2x: properly update skb when mtu > 1500

Since commit e52fcb2462ac484e6dd6e68869536609f0216938 newly allocated skb for small packets are not updated properly and dropped by stack.

---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +11 -11
index 477bc97..64f5cf5 100644
@@ -731,22 +731,22 @@ reuse_rx:
 				bnx2x_reuse_rx_data(fp, bd_cons, bd_prod);
 				goto next_rx;
 			}
+		}
 
-			skb_put(skb, len);
-			skb->protocol = eth_type_trans(skb, bp->dev);
+		skb_put(skb, len);
+		skb->protocol = eth_type_trans(skb, bp->dev);
 
-			/* Set Toeplitz hash for a none-LRO skb */
-			skb->rxhash = bnx2x_get_rxhash(bp, cqe_fp);
+		/* Set Toeplitz hash for a none-LRO skb */
+		skb->rxhash = bnx2x_get_rxhash(bp, cqe_fp);
 
-			skb_checksum_none_assert(skb);
+		skb_checksum_none_assert(skb);
 
-			if (bp->dev->features & NETIF_F_RXCSUM) {
+		if (bp->dev->features & NETIF_F_RXCSUM) {
 
-				if (likely(BNX2X_RX_CSUM_OK(cqe)))
-					skb->ip_summed = CHECKSUM_UNNECESSARY;
-				else
-					fp->eth_q_stats.hw_csum_err++;
-			}
+			if (likely(BNX2X_RX_CSUM_OK(cqe)))
+				skb->ip_summed = CHECKSUM_UNNECESSARY;
+			else
+				fp->eth_q_stats.hw_csum_err++;
 		}
 
 		skb_record_rx_queue(skb, fp->rx_queue);
Signature · 1 line
1.7.7.2
Acked-by on v1 1/1
#1 lore raw
Quoted 38 lines · Dmitry Kravkov

Since commit e52fcb2462ac484e6dd6e68869536609f0216938 newly allocated skb for small packets are not updated properly and dropped by stack.

---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +7 -8
index 477bc97..64f5cf5 100644
@@ -731,22 +731,22 @@ reuse_rx:
 				bnx2x_reuse_rx_data(fp, bd_cons, bd_prod);
 				goto next_rx;
 			}
+		}
 
-			skb_put(skb, len);
-			skb->protocol = eth_type_trans(skb, bp->dev);
+		skb_put(skb, len);
+		skb->protocol = eth_type_trans(skb, bp->dev);
 
-			/* Set Toeplitz hash for a none-LRO skb */
-			skb->rxhash = bnx2x_get_rxhash(bp, cqe_fp);
+		/* Set Toeplitz hash for a none-LRO skb */
+		skb->rxhash = bnx2x_get_rxhash(bp, cqe_fp);
 
-			skb_checksum_none_assert(skb);
+		skb_checksum_none_assert(skb);
 
-			if (bp->dev->features & NETIF_F_RXCSUM) {
+		if (bp->dev->features & NETIF_F_RXCSUM) {
 
-				if (likely(BNX2X_RX_CSUM_OK(cqe)))
-					skb->ip_summed = CHECKSUM_UNNECESSARY;

drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c reuse_rx: · line 752

Quoted 10 lines
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +4 -3
-				else
-					fp->eth_q_stats.hw_csum_err++;
-			}
+			if (likely(BNX2X_RX_CSUM_OK(cqe)))
+				skb->ip_summed = CHECKSUM_UNNECESSARY;
+			else
+				fp->eth_q_stats.hw_csum_err++;
 		}
 
 		skb_record_rx_queue(skb, fp->rx_queue);

Ah, sorry for this, thanks for fixing it !

maintainer Applied
#2 lore raw

From: Eric Dumazet <[email protected]>
Date: Tue, 13 Dec 2011 10:56:17 +0100

Quoted 6 lines · Dmitry Kravkov
Quoted 5 lines

Since commit e52fcb2462ac484e6dd6e68869536609f0216938 newly allocated skb for small packets are not updated properly and dropped by stack.

...

Quoted 3 lines

Ah, sorry for this, thanks for fixing it !

Applied.