From: Victor Nogueira <victor@mojatatu.com>
To: Khawar Ahemad <ahemadkhawar123@gmail.com>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, jhs@mojatatu.com, jiri@resnulli.us,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org
Subject: Re: [PATCH net-next] net/sched: act_sample: reset truncation settings on action replace
Date: Tue, 25 Aug 2026 14:03:23 -0300 [thread overview]
Message-ID: <e6b875b8-4c90-47b8-b967-e42f3700362f@mojatatu.com> (raw)
In-Reply-To: <20260825160143.86866-1-ahemadkhawar123@gmail.com>
On 25/08/2026 13:01, Khawar Ahemad wrote:
> When replacing an existing sample action, if TCA_SAMPLE_TRUNC_SIZE is not
> passed in the netlink request, s->truncate and s->trunc_size retain their
> previous values from the prior configuration.
>
> As a result, a user cannot disable packet truncation when replacing a
> sample action unless the action is fully deleted and recreated. In
> addition, the hardware offload state and netlink dump continue to report
> truncation as active.
>
> Fix this by explicitly resetting s->truncate to false and s->trunc_size
> to 0 when TCA_SAMPLE_TRUNC_SIZE is omitted during tcf_sample_init().
This would be a behavioural regression. Users are not expecting that
a replace omitting truncation parameters will silently overwrite their
previous truncation settings. Can you instead create a new netlink
attribute? Something like "TCA_SAMPLE_FLAGS" which might have a
flag telling the action to unset this parameter?
Other option is to interpret 0 as "unset", but that might break
some setups.
Your fixes commit doesn't seem to exist and, since this is a fix,
you should target net and not net-next.
Also remember to wait 24 hours before posting a v2.
cheers,
Victor
next prev parent reply other threads:[~2026-08-25 17:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 16:01 Khawar Ahemad
2026-08-25 17:03 ` Victor Nogueira [this message]
2026-08-27 8:11 ` Paolo Abeni
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=e6b875b8-4c90-47b8-b967-e42f3700362f@mojatatu.com \
--to=victor@mojatatu.com \
--cc=ahemadkhawar123@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®