From: Ido Schimmel <idosch@nvidia.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: zhilin zou <zhilinz@nebusec.ai>, Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, dsahern@kernel.org, davem@davemloft.net,
edumazet@google.com, horms@kernel.org, tom@herbertland.com,
vega@nebusec.ai
Subject: Re: [PATCH net 1/1] ip6_tunnel: use skb_cow_head() in ip6_tnl_xmit()
Date: Sun, 9 Aug 2026 10:57:56 +0300 [thread overview]
Message-ID: <20260809075756.GA2304632@shredder> (raw)
In-Reply-To: <4dfd3009-efa3-4cc8-9d67-a9e845fa2d1c@redhat.com>
On Fri, Aug 07, 2026 at 10:31:29AM +0200, Paolo Abeni wrote:
> My my concern is against possible regressions. At this late stage of the
> release cycle we want to avoid them, even if there are already similar
> pre-existing bugs.
>
> AFAICS pktgen sets the per pkt_gen device F_SHARED flag unconditionally
> and push shared skbs when F_SHARED is set regardless the NIC priv_flags.
>
> What about addressing both issues in the same series? Something like
> the following (completely untested) would do:
I don't have time to look into pktgen right now. I disagree with
conditioning the merging of this fix - which makes IPv6 tunnels
consistent with existing ones - on fixing a benchmarking / testing
module that is not available to unprivileged users.
> ---
> diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> index ee64f3012321..a7126d639586 100644
> --- a/net/core/pktgen.c
> +++ b/net/core/pktgen.c
> @@ -1385,6 +1385,9 @@ static ssize_t pktgen_if_write(struct file *file,
> return -EINVAL;
> pkt_dev->flags &= ~flag;
> } else {
> + if (!(pkt_dev->odev->priv_flags &
> + IFF_TX_SKB_SHARING))
> + return -EINVAL;
> pkt_dev->flags |= flag;
Doesn't this reject the enablement of any flag (not just "SHARED") on a
device that doesn't advertise IFF_TX_SKB_SHARING?
> }
>
> @@ -3868,13 +3871,15 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
> pkt_dev->svlan_id = 0xffff;
> pkt_dev->burst = 1;
> pkt_dev->node = NUMA_NO_NODE;
> - pkt_dev->flags = F_SHARED; /* SKB shared by default */
> + pkt_dev->flags = 0;
>
> err = pktgen_setup_dev(t->net, pkt_dev, ifname);
> if (err)
> goto out1;
> - if (pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)
> + if (pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING) {
> pkt_dev->clone_skb = pg_clone_skb_d;
> + pkt_dev->flags |= F_SHARED;
> + }
>
> pkt_dev->entry = proc_create_data(ifname, 0600, t->net->proc_dir,
> &pktgen_if_proc_ops, pkt_dev);
> ---
>
> /P
>
prev parent reply other threads:[~2026-08-09 7:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 5:34 [PATCH net 0/1] ip6_tunnel: use skb_cow_head() in ip6_tnl_xmit() Zhiling Zou
2026-08-03 5:34 ` [PATCH net 1/1] " Zhiling Zou
2026-08-05 9:07 ` Ido Schimmel
2026-08-06 0:29 ` Jakub Kicinski
2026-08-06 8:52 ` Ido Schimmel
2026-08-06 9:06 ` zhilin zou
2026-08-06 16:28 ` Paolo Abeni
2026-08-06 18:19 ` Ido Schimmel
2026-08-07 8:31 ` Paolo Abeni
2026-08-09 7:57 ` Ido Schimmel [this message]
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=20260809075756.GA2304632@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tom@herbertland.com \
--cc=vega@nebusec.ai \
--cc=zhilinz@nebusec.ai \
/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