Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Li RongQing <lirongqing@baidu.com>, netdev@vger.kernel.org
Subject: Re: [PATCH][net-next] netlink: avoid to allocate full skb when sending to many devices
Date: Tue, 18 Sep 2018 07:08:04 -0700	[thread overview]
Message-ID: <3f01dd84-32c5-f674-75ac-a93a90f32bf7@gmail.com> (raw)
In-Reply-To: <1537248415-15534-1-git-send-email-lirongqing@baidu.com>



On 09/17/2018 10:26 PM, Li RongQing wrote:
> if skb->head is vmalloc address, when this skb is delivered, full
> allocation for this skb is required, if there are many devices,
> the full allocation will be called for every devices
> 
> now using the first time allocated skb when iterate other devices
> to send, reduce full allocation and speedup deliver.
> 
> Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> ---
>  net/netlink/af_netlink.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
>

This looks very broken to me.

Only the original skb (given as an argument to __netlink_deliver_tap()) is guaranteed to not
disappear while the loop is performed.

(There is no skb_clone() after the first netlink_to_full_skb())

  reply	other threads:[~2018-09-18 19:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  5:26 [PATCH][net-next] netlink: avoid to allocate full skb when sending to many devices Li RongQing
2018-09-18 14:08 ` Eric Dumazet [this message]
2018-09-19  1:19   ` 答复: " Li,Rongqing

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=3f01dd84-32c5-f674-75ac-a93a90f32bf7@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=lirongqing@baidu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox