🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by jiabin deng Wed, 21 Oct 2026 05:19
Re: mlx5e:zero-prefix corruption during TCP DMA-BUF RX - help requested
#5875
Author: jiabin deng
Date: Wed, 21 Oct 2026 05:19
105 lines
16201 bytes
Hi Dragos,

I applied your suggested change to `rq_end_pad_mode()` on the receiver
and reran the standalone GPU-memory reproducer I sent previously. With
MTU set to 1500, the single-direction test covered eight message
sizes, with 50 transfers per size, for a total of 400 transfers.

All 400 transfers completed successfully. Full payload comparisons
found zero failing cases, zero incorrect bytes, and zero corrupted
intervals. The zero-prefix corruption observed in the earlier tests
did not recur in this patched run.

Thank you for continuing to investigate this issue and for suggesting
the fix. I also greatly appreciate the time and effort you and the
other maintainers dedicate to the open-source community. As a student,
I am excited to have the opportunity to contribute to the community
and to learn from this process.

I would be happy to help prepare a formal patch with the test results.
Would you prefer to submit the fix yourself, or would it be helpful
for me to prepare and submit it based on your suggested change?

Please also keep me copied on any further discussion or developments
related to this issue.

Best regards,

Jiabin

On Tue, Oct 20, 2026 at 6:56 PM Dragos Tatulea <dtatulea@nvidia.com> wrote:
>
> Hi Jiabin,
>
> On Thu, Oct 08, 2026 at 02:48:53PM +0800, jiabin deng wrote:
> > Hi Dragos,
> >
> > Thank you for following up and suggesting the CPU-buffer comparison. We have
> > now completed both ordinary CPU TCP and CPU-backed DMA-BUF receive controls,
> > with no payload corruption in either 400-iteration run.
> >
> > Please find attached a standalone GPU-memory reproducer with a README covering
> > the required environment, build instructions, two-host execution, and result
> > collection. It includes a Python TCP sender, a C++ receiver using the CUDA
> > Driver API and Linux device-memory TCP interfaces, and scripts for SHAMPO
> > header tracing and offline byte comparisons.
> >
> Thank you for the reproducer. Unfortunately I didn't get the right HW to
> reproduce this.
>
> Pasting from your previous email:
> > One possible lead is an interaction between SHAMPO end eadding and
> > Relaxed Ordering writes. In this version, rq_end_pad_mode() disables
> > end padding only when LRO is enabled and write RO is supported.
> > SHAMPO therefore selects ALIGN; at the same time, write RO is enabled
> > on the payload MKey when the device advertises write RO support.
> >
> > Commit e2351e517068 ("net/mlx5e: RX, Avoid possible data corruption
> > when relaxed ordering and LRO combined") describes a related issue
> > with consecutively placed LRO payloads. We would like to understand
> > whether SHAMPO might also need to account for a similar situation.
> > We do not yet have results from padding/RO diagnostic experiments.
> Initially I dismissed this commit because it seemed unrelated. But now
> I see that you analysis was probably spot on.
>
> So disabling alignment padding mode is definetly a very useful experiment.
> It would go in the lines of:
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
> index 70a855c6d19c..794d8be88f0c 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
> @@ -911,10 +911,11 @@ static void mlx5e_build_rx_cq_param(struct mlx5_core_dev *mdev,
>
>  static u8 rq_end_pad_mode(struct mlx5_core_dev *mdev, struct mlx5e_params *params)
>  {
> -       bool lro_en = params->packet_merge.type == MLX5E_PACKET_MERGE_LRO;
> +       bool no_pad = params->packet_merge.type == MLX5E_PACKET_MERGE_LRO ||
> +                     params->packet_merge.type == MLX5E_PACKET_MERGE_SHAMPO;
>         bool ro = MLX5_CAP_GEN(mdev, relaxed_ordering_write);
>
> -       return ro && lro_en ?
> +       return ro && no_pad ?
>                 MLX5_WQ_END_PAD_MODE_NONE : MLX5_WQ_END_PAD_MODE_ALIGN;
>  }
>
> Could you try this please and let us know if you still encounter the
> issue? In the meantime I am checking about this with other people.
>
> Thanks,
> Dragos
Re: mlx5e:zero-prefix corruption during TCP DMA-BUF RX - help requested
#12090
Author: jiabin deng
Date: Fri, 06 Nov 2026 08:49
55 lines
13977 bytes
Hi Dragos,

Thank you for the confirmation. I have now submitted the fix to netdev
and copied you on the patch.

Subject: [PATCH net] net/mlx5e: SHAMPO, Disable end padding when
relaxed ordering is supported

Message-ID:
<20261106083719.22798-1-dengjiabin2023@gmail.com>

The patch is available in the netdev archive:
https://lore.kernel.org/netdev/20261106083719.22798-1-dengjiabin2023@gmail.com/

Thank you again for your help with the investigation and for suggesting
the fix.

Best regards,
Jiabin Deng

On Thu, Nov 5, 2026 at 10:14 PM Dragos Tatulea <dtatulea@nvidia.com> wrote:
>
> On 23.10.26 15:14, Dragos Tatulea wrote:
> > On 21.10.26 07:19, jiabin deng wrote:
> >> Hi Dragos,
> >>
> >> [...]
> >> Thank you for continuing to investigate this issue and for suggesting
> >> the fix. I also greatly appreciate the time and effort you and the
> >> other maintainers dedicate to the open-source community. As a student,
> >> I am excited to have the opportunity to contribute to the community
> >> and to learn from this process.
> >>
> > Thank you for your good analysis and fast response!
> >
> >> I would be happy to help prepare a formal patch with the test results.
> >> Would you prefer to submit the fix yourself, or would it be helpful
> >> for me to prepare and submit it based on your suggested change?
> >>
> > I am still waiting for input from the HW folks to understand if this
> > change is needed for all SHAMPO cases or only specific P2P DMA
> > cases.
> >
> > I think you should submit the fix as you did most of the work. Just
> > give me some time to check the above. I'll ping you hopefully next
> > week.
> >
> I got my answers. Feel free to go ahead send a fix. If you won't get
> to, let me know so that we do it.
>
> Thanks,
> Dragos
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads