From: sashiko-bot@kernel.org
To: "Simon Schippers" <simon.schippers@tu-dortmund.de>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH net-next v13 1/5] tun/tap: add IFF_BACKPRESSURE flag
Date: Fri, 31 Jul 2026 21:40:33 +0000 [thread overview]
Message-ID: <20260731214033.A42B71F00AC4@smtp.kernel.org> (raw)
In-Reply-To: <20260730213639.726381-2-simon.schippers@tu-dortmund.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Premature UAPI exposure of `IFF_BACKPRESSURE` flag breaks feature detection.
--
--- Patch [1]: [PATCH net-next v13 1/5] tun/tap: add IFF_BACKPRESSURE flag ---
commit 43e4cc9000a7c476758fd2aa10db82e86b3c41ca
Author: Simon Schippers <simon.schippers@tu-dortmund.de>
tun/tap: add IFF_BACKPRESSURE flag
This commit adds the IFF_BACKPRESSURE flag to the tun/tap UAPI headers and
enables it in TUN_FEATURES. The flag is intended to gate qdisc backpressure
logic added in subsequent patches.
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
[ ... ]
> @@ -98,7 +98,8 @@ static void tun_default_link_ksettings(struct net_device *dev,
> #define TUN_FASYNC IFF_ATTACH_QUEUE
>
> #define TUN_FEATURES (IFF_NO_PI | IFF_ONE_QUEUE | IFF_VNET_HDR | \
> - IFF_MULTI_QUEUE | IFF_NAPI | IFF_NAPI_FRAGS)
> + IFF_MULTI_QUEUE | IFF_NAPI | IFF_NAPI_FRAGS | \
> + IFF_BACKPRESSURE)
[Severity: Medium]
Does adding this flag to TUN_FEATURES before the implementation is present
break userspace feature detection during a git bisect?
If userspace calls ioctl(TUNGETFEATURES) at this specific commit, it will
see IFF_BACKPRESSURE as supported and might set it via TUNSETIFF. However,
because the actual backpressure logic is delegated to later patches in the
series, the kernel will silently drop packets instead of exerting
backpressure.
Would it be safer to introduce the UAPI flag definitions early in the
series, but wait to add IFF_BACKPRESSURE to TUN_FEATURES until the final
patch when the implementation is fully in place?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730213639.726381-1-simon.schippers@tu-dortmund.de?part=1
next prev parent reply other threads:[~2026-07-31 21:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 21:36 [PATCH net-next v13 0/5] tun/tap & vhost-net: apply qdisc backpressure on full ptr_ring to reduce TX drops Simon Schippers
2026-07-30 21:36 ` [PATCH net-next v13 1/5] tun/tap: add IFF_BACKPRESSURE flag Simon Schippers
2026-07-31 21:40 ` sashiko-bot [this message]
2026-07-30 21:36 ` [PATCH net-next v13 2/5] tun/tap: add ptr_ring consume helper with netdev queue wakeup Simon Schippers
2026-07-31 21:40 ` sashiko-bot
2026-07-30 21:36 ` [PATCH net-next v13 3/5] vhost-net: wake queue of tun/tap after ptr_ring consume Simon Schippers
2026-07-30 21:36 ` [PATCH net-next v13 4/5] ptr_ring: move free-space check into separate helper Simon Schippers
2026-07-30 21:36 ` [PATCH net-next v13 5/5] tun/tap & vhost-net: stop tail-drop when IFF_BACKPRESSURE is set Simon Schippers
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=20260731214033.A42B71F00AC4@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=simon.schippers@tu-dortmund.de \
/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.