netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Mahesh Bandewar <maheshb@google.com>,
	Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH v3 net 7/9] ipvlan: remove skb_share_check from xmit path
Date: Tue, 11 Feb 2020 10:50:46 -0800	[thread overview]
Message-ID: <9c36a95d-aed7-0b63-ccda-8cd49ad97d8f@gmail.com> (raw)
In-Reply-To: <CAHmME9o07Ugxet7sKHc9GYU5DkgyDEYsx36+KyAt7PAVtQRiag@mail.gmail.com>



On 2/11/20 9:44 AM, Jason A. Donenfeld wrote:
> On Tue, Feb 11, 2020 at 6:39 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> Yes, maybe, but can you elaborate in this changelog ?
>>
>> AFAIK net/core/pktgen.c can definitely provide shared skbs.
>>
>>      refcount_inc(&pkt_dev->skb->users);
>>      ret = dev_queue_xmit(pkt_dev->skb);
>>
>> We might have to change pktgen to make sure we do not make skb shared
>> just because it was convenient.
>>
>> Please do not give a link to some web page that might disappear in the future.
>>
>> Having to follow an old thread to understand the reasoning is not appealing
>> for us having to fix bugs in the following years.
> 
> Well, I don't know really.
> 
> Florian said I should remove skb_share_check() from a function I was
> adding, because according to him, the ndo_start_xmit path cannot
> contain shared skbs. (See the 0/9 cover letter.) If this claim is
> true, then this series is correct. If this claim is not true, then the
> series needs to be adjusted.

The claim might be true for a particular driver, but not others.

ipvlan has a way to forward packets from TX to RX, and RX to TX,
I would rather not touch it unless you really can make good arguments,
and possibly some tests :)

I am worried about a missing skb_share_check() if for some
reason pskb_expand_head() has to be called later

      BUG_ON(skb_shared(skb));

> 
> I tried to trace these and couldn't totally make up my mind, hence the
> ALL CAPS mention in the 0/9.
> 
> Do you know if this is a safe presumption to make? It sounds like your
> opinion is "no" in light of pktgen.c? Should that simply be adjusted
> instead?

The key here is IFF_TX_SKB_SHARING, but really this is the intent.
I am not sure if all paths have been correctly audited/tested.

I am not saying your patch is wrong, I am unsure about it.

  reply	other threads:[~2020-02-11 18:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 14:14 [PATCH v2 net 0/5] icmp: account for NAT when sending icmps from ndo layer Jason A. Donenfeld
2020-02-10 14:14 ` [PATCH v2 net 1/5] icmp: introduce helper for NAT'd source address in network device context Jason A. Donenfeld
2020-02-10 19:48   ` Jason A. Donenfeld
2020-02-10 21:32     ` Florian Westphal
2020-02-10 21:59       ` Jason A. Donenfeld
2020-02-10 22:26         ` Florian Westphal
2020-02-11  9:59           ` Jason A. Donenfeld
2020-02-11 12:25       ` Jason A. Donenfeld
2020-02-11 15:00   ` [PATCH v3 net 0/9] icmp: account for NAT when sending icmps from ndo layer Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 1/9] icmp: introduce helper for nat'd source address in network device context Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 2/9] gtp: use icmp_ndo_send helper Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 3/9] sunvnet: " Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 4/9] xfrm: interface: " Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 5/9] wireguard: device: use icmp_ndo_send helper and remove skb_share_check Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 6/9] firewire: remove skb_share_check from xmit path Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 7/9] ipvlan: " Jason A. Donenfeld
2020-02-11 17:39       ` Eric Dumazet
2020-02-11 17:44         ` Jason A. Donenfeld
2020-02-11 18:50           ` Eric Dumazet [this message]
2020-02-11 18:54             ` Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 8/9] fm10k: " Jason A. Donenfeld
2020-02-11 15:00     ` [PATCH v3 net 9/9] benet: " Jason A. Donenfeld
2020-02-10 14:14 ` [PATCH v2 net 2/5] gtp: use icmp_ndo_send helper Jason A. Donenfeld
2020-02-10 14:14 ` [PATCH v2 net 3/5] sunvnet: " Jason A. Donenfeld
2020-02-10 14:14 ` [PATCH v2 net 4/5] wireguard: " Jason A. Donenfeld
2020-02-10 14:14 ` [PATCH v2 net 5/5] xfrm: interface: " Jason A. Donenfeld
2020-02-10 19:30 ` [PATCH v2 net 6/5] wireguard: selftests: ensure that icmp src address is correct with NAT Jason A. Donenfeld

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=9c36a95d-aed7-0b63-ccda-8cd49ad97d8f@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=maheshb@google.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;
as well as URLs for NNTP newsgroup(s).