Re: [PATCH net-next] net/sched: act_sample: reset truncation settings on action replace
From: Paolo Abeni
Date: Thu Aug 27 2026 - 04:12:14 EST
On 8/25/26 6:01 PM, 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().
>
> Fixes: 5c56784d852a ("net/sched: act_sample: add support for packet truncation")
> Signed-off-by: Khawar Ahemad <ahemadkhawar123@xxxxxxxxx>
## Form letter - net-next-closed
net-next pull request for v7.3 has already been merged, and therefore
the net-next tree is closed for new drivers, features, code refactoring
and optimizations. We are currently accepting bug fixes only.
Please repost when net-next reopens after Aug 31st.
RFC patches sent for review only are obviously welcome at any time.
See:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
--
pw-bot: defer
pv-bot: closed