public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat•com>
To: netdev@vger•kernel.org
Cc: "David S. Miller" <davem@davemloft•net>,
	Stephen Hemminger <stephen@networkplumber•org>,
	Pravin Shelar <pshelar@nicira•com>,
	Jesse Gross <jesse@kernel•org>, Flavio Leitner <fbl@sysclose•org>,
	Hannes Frederic Sowa <hannes@stressinduktion•org>
Subject: Re: [PATCH net-next 4/5] net/tun: implement ndo_set_rx_headroom
Date: Thu, 25 Feb 2016 11:49:42 +0100	[thread overview]
Message-ID: <1456397382.5100.32.camel@redhat.com> (raw)
In-Reply-To: <38c29993e36ee3446f29a635c2d218e7777f55fe.1456163137.git.pabeni@redhat.com>

On Tue, 2016-02-23 at 13:53 +0100, Paolo Abeni wrote:
> ndo_set_rx_headroom controls the align value used by tun devices to
> allocate skbs on frame reception.
> When the xmit device adds a large encapsulation, this avoids an skb
> head reallocation on forwarding.
> 
> The measured improvement when forwarding towards a vxlan dev with
> frame size below the egress device MTU is around 6% when tunneling over
> ipv6.
> 
> In case of ipv4 tunnels there is no improvement, since the tun
> device default alignment provides enough headroom to avoid the skb
> head reallocation, at least on hosts with 64 bytes cacheline.
> 
> Signed-off-by: Paolo Abeni <pabeni@redhat•com>
> ---
>  drivers/net/tun.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 88bb8cc..5812693 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -187,6 +187,7 @@ struct tun_struct {
>  #define TUN_USER_FEATURES (NETIF_F_HW_CSUM|NETIF_F_TSO_ECN|NETIF_F_TSO| \
>  			  NETIF_F_TSO6|NETIF_F_UFO)
>  
> +	int			align;

This needs to be initialized to NET_SKB_PAD, to preserved the current
behavior.

I'll fix it in v2.

Paolo

  reply	other threads:[~2016-02-25 10:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 12:53 [PATCH net-next 0/5] bridge/ovs: avoid skb head copy on frame forwarding Paolo Abeni
2016-02-23 12:53 ` [PATCH net-next 1/5] netdev: introduce ndo_set_rx_headroom Paolo Abeni
2016-02-23 19:20   ` pravin shelar
2016-02-24  8:37     ` Paolo Abeni
2016-02-23 12:53 ` [PATCH net-next 2/5] bridge: notify ensabled devices of headroom changes Paolo Abeni
2016-02-23 19:20   ` pravin shelar
2016-02-24  8:43     ` Paolo Abeni
2016-02-23 12:53 ` [PATCH net-next 3/5] ovs: propagate per dp max headroom to all vports Paolo Abeni
2016-02-23 19:20   ` pravin shelar
2016-02-24  8:59     ` Paolo Abeni
2016-02-23 12:53 ` [PATCH net-next 4/5] net/tun: implement ndo_set_rx_headroom Paolo Abeni
2016-02-25 10:49   ` Paolo Abeni [this message]
2016-02-23 12:53 ` [PATCH net-next 5/5] veth: " Paolo Abeni
2016-02-23 19:21   ` pravin shelar
2016-02-24  9:17     ` Paolo Abeni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456397382.5100.32.camel@redhat.com \
    --to=pabeni@redhat$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=fbl@sysclose$(echo .)org \
    --cc=hannes@stressinduktion$(echo .)org \
    --cc=jesse@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pshelar@nicira$(echo .)com \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox