Re: [PATCH RESEND net-next] net: xilinx: axienet: Derive RX frame length from residue in dmaengine path
From: Simon Horman
Date: Mon Nov 23 2026 - 09:03:29 EST
On Tue, Nov 17, 2026 at 11:37:57AM +0530, Srinivas Neeli wrote:
> The dmaengine RX path derived the received frame length from the descriptor
> APP metadata. That only works when the optional AXI4-Stream status/control
> interface is present, because the hardware populates the APP fields solely
> when that interface is enabled. On designs without it the length read back
> is invalid.
>
> The AXI DMA engine already reports how many bytes it wrote into the buffer
> through the standard dmaengine residue mechanism. Compute the RX frame
> length as the posted buffer length minus result->residue, which is
> independent of the status/control interface and correct across all designs,
> including multi-descriptor frames where the residue is summed over the
> chain.
>
> Drop the descriptor metadata lookup, which was only used for this purpose.
> Detect a failed transfer from dmaengine_result.result instead of the
> metadata pointer return value, and remove the now unused LEN_APP macro.
>
> The transmit path is unaffected. It still passes APP metadata for checksum
> offload and derives its length from the skb.
>
> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
> Signed-off-by: Srinivas Neeli <srinivas.neeli@xxxxxxx>
> ---
> This patch was originally posted as part of the MCDMA series:
> https://lore.kernel.org/lkml/20260818174151.1608971-4-srinivas.neeli@xxxxxxx
>
> It is independent of the other patches in that series and uses
> existing AXI DMA residue reporting to calculate the RX frame length.
> Since it only modifies the AXI Ethernet driver, it is being submitted
> separately to net-next.
>
> The previous standalone submission is available at:
> https://lore.kernel.org/lkml/20260929081316.803997-1-srinivas.neeli@xxxxxxx/
>
> I responded to the netdev bot feedback, but accidentally included
> the "pw-bot: cr" tag in my reply, marking the patch as Changes
> Requested. I am resending the patch for maintainer review.
> No code changes since the previous submission.
Hi Srinivas,
Unfortunately CI could not not apply this cleanly to net-next when submitted
using git am. And CI stopped at that point.
Please rebase and resubmit.
--
pw-bot: cr