All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] be2net: Increase skb headroom size to 256 bytes
@ 2016-12-20 15:14 Suresh Reddy
  2016-12-20 19:30 ` David Miller
  2016-12-21 18:23 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Suresh Reddy @ 2016-12-20 15:14 UTC (permalink / raw)
  To: netdev, kalesh-anakkur.purayil

From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>

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.

Signed-off-by: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
---
 drivers/net/ethernet/emulex/benet/be.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 6cfa63a..4c30c44 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -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
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] be2net: Increase skb headroom size to 256 bytes
  2016-12-20 15:14 [PATCH net] be2net: Increase skb headroom size to 256 bytes Suresh Reddy
@ 2016-12-20 19:30 ` David Miller
  2016-12-21  8:13   ` Sriharsha Basavapatna
  2016-12-21 18:23 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2016-12-20 19:30 UTC (permalink / raw)
  To: suresh.reddy; +Cc: netdev, kalesh-anakkur.purayil

From: Suresh Reddy <suresh.reddy@broadcom.com>
Date: Tue, 20 Dec 2016 10:14:30 -0500

> From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
> 
> 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.
> 
> Signed-off-by: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
> Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>

Adding 128 bytes of headroom just for geneve seems excessive.

Do you really need to add that much?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] be2net: Increase skb headroom size to 256 bytes
  2016-12-20 19:30 ` David Miller
@ 2016-12-21  8:13   ` Sriharsha Basavapatna
  0 siblings, 0 replies; 4+ messages in thread
From: Sriharsha Basavapatna @ 2016-12-21  8:13 UTC (permalink / raw)
  To: David Miller; +Cc: Suresh Kumar Reddy Reddygari, netdev, Kalesh Anakkur Purayil

On Wed, Dec 21, 2016 at 1:00 AM, David Miller <davem@davemloft.net> wrote:
>
> From: Suresh Reddy <suresh.reddy@broadcom.com>
> Date: Tue, 20 Dec 2016 10:14:30 -0500
>
> > From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
> >
> > 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.
> >
> > Signed-off-by: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
> > Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
>
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] be2net: Increase skb headroom size to 256 bytes
  2016-12-20 15:14 [PATCH net] be2net: Increase skb headroom size to 256 bytes Suresh Reddy
  2016-12-20 19:30 ` David Miller
@ 2016-12-21 18:23 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2016-12-21 18:23 UTC (permalink / raw)
  To: suresh.reddy; +Cc: netdev, kalesh-anakkur.purayil

From: Suresh Reddy <suresh.reddy@broadcom.com>
Date: Tue, 20 Dec 2016 10:14:30 -0500

> From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
> 
> 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.
> 
> Signed-off-by: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
> Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-21 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20 15:14 [PATCH net] be2net: Increase skb headroom size to 256 bytes Suresh Reddy
2016-12-20 19:30 ` David Miller
2016-12-21  8:13   ` Sriharsha Basavapatna
2016-12-21 18:23 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.