Skip to contentSkip to conversation

be2net: Increase skb headroom size to 256 bytes

PATCH Applied Suresh Reddy 3 participants 4 messages Dec 20, 2016 – Dec 21, 2016

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

PATCH 1/1 be2net: Increase skb headroom size to 256 bytes

From: Kalesh A P <[email protected]>

The driver currently allocates 128 bytes of skb headroom. This was found to be insufficient with some configurations like Geneve tunnels, which resulted in skb head reallocations.

Increase the headroom to 256 bytes to fix this.

---
 drivers/net/ethernet/emulex/benet/be.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/emulex/benet/be.h +1 -1
index 6cfa63a..4c30c44 100644
@@ -65,7 +65,7 @@
 /* Number of bytes of an RX frame that are copied to skb->data */
 #define BE_HDR_LEN		((u16) 64)
 /* allocate extra space to allow tunneling decapsulation without head reallocation */
-#define BE_RX_SKB_ALLOC_SIZE (BE_HDR_LEN + 64)
+#define BE_RX_SKB_ALLOC_SIZE	256
 
 #define BE_MAX_JUMBO_FRAME_SIZE	9018
 #define BE_MIN_MTU		256
Signature · 1 line
2.10.1
maintainer
#1 lore raw

From: Suresh Reddy <[email protected]>
Date: Tue, 20 Dec 2016 10:14:30 -0500

Quoted 10 lines

From: Kalesh A P <[email protected]>

The driver currently allocates 128 bytes of skb headroom. This was found to be insufficient with some configurations like Geneve tunnels, which resulted in skb head reallocations.

Increase the headroom to 256 bytes to fix this.

Adding 128 bytes of headroom just for geneve seems excessive.

Do you really need to add that much?

#2 lore raw
Quoted 10 lines · David Miller

From: Suresh Reddy <[email protected]>
Date: Tue, 20 Dec 2016 10:14:30 -0500

Quoted 6 lines

From: Kalesh A P <[email protected]>

The driver currently allocates 128 bytes of skb headroom. This was found to be insufficient with some configurations like Geneve tunnels, which resulted in skb head reallocations.

Quoted 8 lines
Quoted 4 lines

Increase the headroom to 256 bytes to fix this.

Adding 128 bytes of headroom just for geneve seems excessive.

Do you really need to add that much?

Hi David,

With geneve, there's a fixed 8 byte header followed by a variable options header of max length 256 bytes. And with vlan+ipv6 combination we could run out of 128 bytes headroom even with just the fixed geveve header (+ outer and inner eth/ipv6/transport headers).

Thanks,
-Harsha

maintainer Applied
#3 lore raw
In reply to Suresh Reddy

From: Suresh Reddy <[email protected]>
Date: Tue, 20 Dec 2016 10:14:30 -0500

Quoted 10 lines

From: Kalesh A P <[email protected]>

The driver currently allocates 128 bytes of skb headroom. This was found to be insufficient with some configurations like Geneve tunnels, which resulted in skb head reallocations.

Increase the headroom to 256 bytes to fix this.

Applied.