From: Stanislav Fomichev <stfomichev@gmail.com>
To: Mina Almasry <almasrymina@google.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
willemb@google.com, sdf@fomichev.me, asml.silence@gmail.com
Subject: Re: [PATCH net v1] net: netmem: fix skb_ensure_writable with unreadable skbs
Date: Mon, 16 Jun 2025 10:23:25 -0700 [thread overview]
Message-ID: <aFBTDZPj97PAe-EI@mini-arch> (raw)
In-Reply-To: <CAHS8izMgmSQPPqu4xo1To=4vFvJi+cxP72KewhMJ+BqDbka0hQ@mail.gmail.com>
On 06/16, Mina Almasry wrote:
> On Mon, Jun 16, 2025 at 7:38 AM Stanislav Fomichev <stfomichev@gmail.com> wrote:
> >
> > On 06/15, Mina Almasry wrote:
> > > skb_ensure_writable should succeed when it's trying to write to the
> > > header of the unreadable skbs, so it doesn't need an unconditional
> > > skb_frags_readable check. The preceding pskb_may_pull() call will
> > > succeed if write_len is within the head and fail if we're trying to
> > > write to the unreadable payload, so we don't need an additional check.
> > >
> > > Removing this check restores DSCP functionality with unreadable skbs as
> > > it's called from dscp_tg.
> >
> > Can you share more info on which use-case (or which call sites) you're
> > trying to fix?
>
> Hi Stan,
>
> It's the use case of setting a DSCP header, and the call site is
> dscp_tg() -> skb_ensure_writable.
>
> Repro steps should roughly be:
>
> # Set DSCP header
> sudo iptables -tmangle -A POSTROUTING -p tcp -m comment --comment
> "foo" -j DSCP --set-dscp 0x08
>
> # then run some unreadable netmem workload.
>
> Before this change you should see 0 throughput, after this change the
> unreadable netmem workload should work as expected.
Ah, so this is basically all netfilter, makes sense, thanks!
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
next prev parent reply other threads:[~2025-06-16 17:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-15 20:07 [PATCH net v1] net: netmem: fix skb_ensure_writable with unreadable skbs Mina Almasry
2025-06-16 14:37 ` Stanislav Fomichev
2025-06-16 16:50 ` Mina Almasry
2025-06-16 17:23 ` Stanislav Fomichev [this message]
2025-06-17 23:00 ` patchwork-bot+netdevbpf
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=aFBTDZPj97PAe-EI@mini-arch \
--to=stfomichev@gmail.com \
--cc=almasrymina@google.com \
--cc=asml.silence@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=willemb@google.com \
/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.