From: Matthieu Baerts <matttbe@kernel.org>
To: Tariq Toukan <tariqt@nvidia.com>, Dragos Tatulea <dtatulea@nvidia.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>, Mark Bloch <mbloch@nvidia.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
Gal Pressman <gal@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>,
Amery Hung <ameryhung@gmail.com>, Nimrod Oren <noren@nvidia.com>,
Mark Brown <broonie@kernel.org>,
linux-next@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net 4/5] net/mlx5e: RX, Fix XDP multi-buf frag counting for striding RQ: manual merge
Date: Mon, 9 Mar 2026 13:52:11 +0100 [thread overview]
Message-ID: <9f5282ed-ddda-4d7c-b033-5b6d544d6cf4@kernel.org> (raw)
In-Reply-To: <20260305142634.1813208-5-tariqt@nvidia.com>
Hi Tariq, Dragos,
+cc: linux-next
On 05/03/2026 15:26, Tariq Toukan wrote:
> From: Dragos Tatulea <dtatulea@nvidia.com>
>
> XDP multi-buf programs can modify the layout of the XDP buffer when the
> program calls bpf_xdp_pull_data() or bpf_xdp_adjust_tail(). The
> referenced commit in the fixes tag corrected the assumption in the mlx5
> driver that the XDP buffer layout doesn't change during a program
> execution. However, this fix introduced another issue: the dropped
> fragments still need to be counted on the driver side to avoid page
> fragment reference counting issues.
FYI, we got a small conflict when merging 'net' in 'net-next' in the
MPTCP tree due to this patch applied in 'net':
db25c42c2e1f ("net/mlx5e: RX, Fix XDP multi-buf frag counting for striding RQ")
and this one from 'net-next':
dff1c3164a69 ("net/mlx5e: SHAMPO, Always calculate page size")
----- Generic Message -----
The best is to avoid conflicts between 'net' and 'net-next' trees but if
they cannot be avoided when preparing patches, a note about how to fix
them is much appreciated.
The conflict has been resolved on our side [1] and the resolution we
suggest is attached to this email. Please report any issues linked to
this conflict resolution as it might be used by others. If you worked on
the mentioned patches, don't hesitate to ACK this conflict resolution.
---------------------------
Rerere cache is available in [2].
[1] https://github.com/multipath-tcp/mptcp_net-next/commit/9cbb5f8a4a18
[2] https://github.com/multipath-tcp/mptcp-upstream-rr-cache/commit/0bbafdd
(...)
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> index efcfcddab376..40e53a612989 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
(...)
> @@ -1975,13 +1974,12 @@ mlx5e_skb_from_cqe_mpwrq_nonlinear(struct mlx5e_rq *rq, struct mlx5e_mpw_info *w
> return NULL; /* page/packet was consumed by XDP */
> }
>
> - nr_frags_free = old_nr_frags - sinfo->nr_frags;
> - if (unlikely(nr_frags_free)) {
> - frag_page -= nr_frags_free;
> + new_nr_frags = sinfo->nr_frags;
> + nr_frags_free = old_nr_frags - new_nr_frags;
> + if (unlikely(nr_frags_free))
> truesize -= (nr_frags_free - 1) * PAGE_SIZE +
The conflict is in the context: this line above has been modified on
'net-next' (s/PAGE_SIZE/page_size/), while the ones above it have been
modified on 'net'.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
---
diff --cc drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 8fb57a4f36dd,268e20884757..f5c0e2a0ada9
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@@ -1977,13 -1971,12 +1973,12 @@@ mlx5e_skb_from_cqe_mpwrq_nonlinear(stru
return NULL; /* page/packet was consumed by XDP */
}
- nr_frags_free = old_nr_frags - sinfo->nr_frags;
- if (unlikely(nr_frags_free)) {
- frag_page -= nr_frags_free;
+ new_nr_frags = sinfo->nr_frags;
+ nr_frags_free = old_nr_frags - new_nr_frags;
+ if (unlikely(nr_frags_free))
- truesize -= (nr_frags_free - 1) * PAGE_SIZE +
+ truesize -= (nr_frags_free - 1) * page_size +
ALIGN(pg_consumed_bytes,
BIT(rq->mpwqe.log_stride_sz));
- }
len = mxbuf->xdp.data_end - mxbuf->xdp.data;
next prev parent reply other threads:[~2026-03-09 12:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 14:26 [PATCH net 0/5] mlx5 misc fixes 2026-03-05 Tariq Toukan
2026-03-05 14:26 ` [PATCH net 1/5] net/mlx5: Fix crash when moving to switchdev mode Tariq Toukan
2026-03-05 14:26 ` [PATCH net 2/5] net/mlx5: Fix peer miss rules host disabled checks Tariq Toukan
2026-03-05 14:26 ` [PATCH net 3/5] net/mlx5e: Fix DMA FIFO desync on error CQE SQ recovery Tariq Toukan
2026-03-05 14:26 ` [PATCH net 4/5] net/mlx5e: RX, Fix XDP multi-buf frag counting for striding RQ Tariq Toukan
2026-03-09 12:52 ` Matthieu Baerts [this message]
2026-03-09 13:04 ` [PATCH net 4/5] net/mlx5e: RX, Fix XDP multi-buf frag counting for striding RQ: manual merge Dragos Tatulea
2026-03-05 14:26 ` [PATCH net 5/5] net/mlx5e: RX, Fix XDP multi-buf frag counting for legacy RQ Tariq Toukan
2026-03-06 18:46 ` Amery Hung
2026-03-07 1:30 ` [PATCH net 0/5] mlx5 misc fixes 2026-03-05 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=9f5282ed-ddda-4d7c-b033-5b6d544d6cf4@kernel.org \
--to=matttbe@kernel.org \
--cc=ameryhung@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=broonie@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=noren@nvidia.com \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.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