[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54CD3FF4.1030007@cogentembedded.com>
Date: Sat, 31 Jan 2015 23:49:56 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Vladislav Yasevich <vyasevich@...il.com>, netdev@...r.kernel.org
CC: herbert@...dor.apana.org.au, hannes@...essinduktion.org,
Vladislav Yasevich <vyasevic@...hat.com>
Subject: Re: [PATCH net-next 5/6] udpv6: Add lockless sendmsg() support
Hello.
On 1/31/2015 6:40 PM, Vladislav Yasevich wrote:
> This commit adds the same functionaliy to IPv6 that
> commit 903ab86d195cca295379699299c5fc10beba31c7
> Author: Herbert Xu <herbert@...dor.apana.org.au>
> Date: Tue Mar 1 02:36:48 2011 +0000
> udp: Add lockless transmit path
> added to IPv4.
> UDP transmit path can now run without a socket lock,
> thus allowing multiple threads to send to a single socket
> more efficiently.
> This is only used when corking/MSG_MORE is not used.
> Signed-off-by: Vladislav Yasevich <vyasevic@...hat.com>
> ---
> net/ipv6/udp.c | 24 ++++++++++++++++++++----
> 1 file changed, 20 insertions(+), 4 deletions(-)
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index 67a3d70..d048d46 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
[...]
> @@ -1307,6 +1308,20 @@ do_udp_sendmsg:
> goto do_confirm;
> back_from_confirm:
>
> + /* Lockless fast path for the non-corking case */
> + if (!corkreq) {
> + struct sk_buff *skb;
> +
> + skb = ip6_make_skb(sk, getfrag, msg, ulen,
> + sizeof(struct udphdr), hlimit, tclass, opt,
> + &fl6, (struct rt6_info *)dst,
> + msg->msg_flags, dontfrag);
> + err = PTR_ERR(skb);
You should use PTR_ERR_OR_ZERO() here, I think.
[...]
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists