* Re: [PATCH net 4/5] net/mlx5e: RX, Fix XDP multi-buf frag counting for striding RQ: manual merge
[not found] ` <20260305142634.1813208-5-tariqt@nvidia.com>
@ 2026-03-09 12:52 ` Matthieu Baerts
2026-03-09 13:04 ` Dragos Tatulea
0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Baerts @ 2026-03-09 12:52 UTC (permalink / raw)
To: Tariq Toukan, Dragos Tatulea
Cc: Saeed Mahameed, Leon Romanovsky, Mark Bloch, Alexei Starovoitov,
Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend, netdev,
linux-rdma, linux-kernel, bpf, Gal Pressman, Moshe Shemesh,
Amery Hung, Nimrod Oren, Mark Brown, linux-next, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andrew Lunn, David S. Miller
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net 4/5] net/mlx5e: RX, Fix XDP multi-buf frag counting for striding RQ: manual merge
2026-03-09 12:52 ` [PATCH net 4/5] net/mlx5e: RX, Fix XDP multi-buf frag counting for striding RQ: manual merge Matthieu Baerts
@ 2026-03-09 13:04 ` Dragos Tatulea
0 siblings, 0 replies; 2+ messages in thread
From: Dragos Tatulea @ 2026-03-09 13:04 UTC (permalink / raw)
To: Matthieu Baerts, Tariq Toukan
Cc: Saeed Mahameed, Leon Romanovsky, Mark Bloch, Alexei Starovoitov,
Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend, netdev,
linux-rdma, linux-kernel, bpf, Gal Pressman, Moshe Shemesh,
Amery Hung, Nimrod Oren, Mark Brown, linux-next, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andrew Lunn, David S. Miller
Hi Matthieu,
On 09.03.26 13:52, Matthieu Baerts wrote:
> 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.
>
Apologies for this. Will take note next time.
> 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
Conflict resolution from [1] seems good.
Acked-by: Dragos Tatulea <dtatulea@nvidia.com>
Thanks,
Dragos
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-09 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260305142634.1813208-1-tariqt@nvidia.com>
[not found] ` <20260305142634.1813208-5-tariqt@nvidia.com>
2026-03-09 12:52 ` [PATCH net 4/5] net/mlx5e: RX, Fix XDP multi-buf frag counting for striding RQ: manual merge Matthieu Baerts
2026-03-09 13:04 ` Dragos Tatulea
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox