From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next-2.6] ip_gre: lockless xmit
Date: Wed, 29 Sep 2010 10:10:19 +0200 [thread overview]
Message-ID: <4CA2F46B.1070607@6wind.com> (raw)
In-Reply-To: <1285664747.2607.48.camel@edumazet-laptop>
NETIF_F_LLTX is marked as deprecated:
include/linux/netdevice.h:
#define NETIF_F_LLTX 4096 /* LockLess TX - deprecated.
Please */
/* do not use LLTX in new
drivers */
Is it right to use it?
Regards,
Nicolas
Eric Dumazet wrote:
> GRE tunnels can benefit from lockless xmits, using NETIF_F_LLTX
>
> Note: If tunnels are created with the "oseq" option, LLTX is not
> enabled :
>
> Even using an atomic_t o_seq, we would increase chance for packets being
> out of order at receiver.
>
> Bench on a 16 cpus machine (dual E5540 cpus), 16 threads sending
> 10000000 UDP frames via one gre tunnel (size:200 bytes per frame)
>
> Before patch :
> real 3m0.094s
> user 0m9.365s
> sys 47m50.103s
>
> After patch:
> real 0m29.756s
> user 0m11.097s
> sys 7m33.012s
>
> Last problem to solve is the contention on dst :
>
>
> 38660.00 21.4% __ip_route_output_key vmlinux
> 20786.00 11.5% dst_release vmlinux
> 14191.00 7.8% __xfrm_lookup vmlinux
> 12410.00 6.9% ip_finish_output vmlinux
> 4540.00 2.5% ip_push_pending_frames vmlinux
> 4427.00 2.4% ip_append_data vmlinux
> 4265.00 2.4% __alloc_skb vmlinux
> 4140.00 2.3% __ip_local_out vmlinux
> 3991.00 2.2% dev_queue_xmit vmlinux
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
> net/ipv4/ip_gre.c | 4 ++++
> 1 files changed, 4 insertions(+)
>
> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> index a1b5d5e..035db63 100644
> --- a/net/ipv4/ip_gre.c
> +++ b/net/ipv4/ip_gre.c
> @@ -1557,6 +1557,10 @@ static int ipgre_newlink(struct net *src_net, struct net_device *dev, struct nla
> if (!tb[IFLA_MTU])
> dev->mtu = mtu;
>
> + /* Can use a lockless transmit, unless we generate output sequences */
> + if (!(nt->parms.o_flags & GRE_SEQ))
> + dev->features |= NETIF_F_LLTX;
> +
> err = register_netdevice(dev);
> if (err)
> goto out;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-09-29 8:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 9:05 [PATCH net-next-2.6] ip_gre: lockless xmit Eric Dumazet
2010-09-29 8:10 ` Nicolas Dichtel [this message]
2010-09-29 8:18 ` Eric Dumazet
2010-09-29 8:21 ` David Miller
2010-09-29 17:33 ` Jesse Gross
2010-09-29 18:43 ` Eric Dumazet
2010-09-29 19:04 ` [PATCH net-next-2.6] net: add a recursion limit in xmit path Eric Dumazet
2010-09-29 20:23 ` David Miller
2010-09-29 19:24 ` [PATCH net-next-2.6] ip_gre: lockless xmit Jesse Gross
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=4CA2F46B.1070607@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.