All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Suraj Gupta" <suraj.gupta2@amd.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v5 4/6] net: xilinx: axienet: Add 10G/25G (XXV) ethernet support
Date: Sun, 15 Nov 2026 18:31:37 +0000	[thread overview]
Message-ID: <sashiko-outbox-215723@kernel.org> (raw)
In-Reply-To: <20261114182947.2908628-5-suraj.gupta2@amd.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] net: xilinx: axienet: XXV RX path reads length from unpopulated
  DMA metadata
--

commit 24a43162ada4308aadc24cc61461a6b384478cc3
Author: Suraj Gupta <suraj.gupta2@amd.com>

net: xilinx: axienet: Add 10G/25G (XXV) ethernet support

This commit adds support for the Xilinx 10G/25G (XXV) Ethernet MAC and
PCS/PMA to the AXI Ethernet driver via a new axienet_10g25g_config.

> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_xxv.c b/drivers/net/ethernet/xilinx/xilinx_axienet_xxv.c
> new file mode 100644
> index 0000000000000..3c204dbbf6aec
> --- /dev/null
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_xxv.c

[ ... ]

> +const struct axienet_config axienet_10g25g_config = {
> +	.jumbo = true,
> +	.sw_padding = true,
> +	.internal_pcs = true,
> +	.regs_n = XXV_REGS_N,
> +	.options = xxvenet_options,
> +	.clk_init = axienet_10g25g_clk_init,
> +	.probe_init = axienet_xxv_probe_init,
> +	.gt_reset = axienet_xxv_gt_reset,
> +	.mac_init = axienet_xxv_mac_init,
> +	.get_regs = axienet_xxv_get_regs,
> +	.phylink_set_caps = axienet_xxv_phylink_set_capabilities,
> +	.pcs_ops = &axienet_xxv_pcs_ops,
> +};

[Severity: High]
How does the XXV RX path determine the received frame length on the
dmaengine path?

axienet_10g25g_config leaves .non_dmaengine false, so XXV always uses
axienet_dma_rx_cb(), which gets the frame length from DMA metadata word
LEN_APP (APP word 4):

drivers/net/ethernet/xilinx/xilinx_axienet_main.c:axienet_dma_rx_cb() {
	...
	app_metadata = dmaengine_desc_get_metadata_ptr(skbuf_dma->desc, &meta_len,
						       &meta_max_len);
	...
	if (IS_ERR(app_metadata)) {
		...
		dev_kfree_skb_any(skb);
		lp->ndev->stats.rx_dropped++;
		goto rx_submit;
	}

	/* TODO: Derive app word index programmatically */
	rx_len = (app_metadata[LEN_APP] & 0xFFFF);
	skb_put(skb, rx_len);
	...
}

Unlike the 1G AXI Ethernet IP, the XXV Ethernet IP has no AXI4-Stream
status/control stream to populate APP word 4.  Without
xlnx,axistream-connected on the DMA node,
dmaengine_desc_get_metadata_ptr() returns ERR_PTR(-ENOTSUPP) and every
received frame is dropped; even if that property is set, APP word 4 is
never written by the XXV MAC, so skb_put() uses 0 or stale descriptor data
instead of the actual transfer length (such as lp->max_frm_size -
result->residue from dmaengine_tx_status()).

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261114182947.2908628-1-suraj.gupta2@amd.com?part=4

  reply	other threads:[~2026-11-15 18:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 18:29 [PATCH net-next v5 0/6] net: xilinx: axienet: Add 10G/25G (XXV) ethernet support Suraj Gupta
2026-11-14 18:29 ` [PATCH net-next v5 1/6] net: xilinx: axienet: Introduce axienet_config for MAC-specific ops Suraj Gupta
2026-11-15 18:31   ` sashiko-bot
2026-11-16  4:12   ` netdev-bot+sashiko
2026-11-14 18:29 ` [PATCH net-next v5 2/6] dt-bindings: net: xlnx,xxv-ethernet: Add Xilinx XXV 10G/25G Ethernet Suraj Gupta
2026-11-16  4:12   ` netdev-bot+sashiko
2026-11-14 18:29 ` [PATCH net-next v5 3/6] net: xilinx: axienet: Propagate device reset failure from ndo_open Suraj Gupta
2026-11-15 18:31   ` sashiko-bot
2026-11-16  4:12   ` netdev-bot+sashiko
2026-11-14 18:29 ` [PATCH net-next v5 4/6] net: xilinx: axienet: Add 10G/25G (XXV) ethernet support Suraj Gupta
2026-11-15 18:31   ` sashiko-bot [this message]
2026-11-16  4:12   ` netdev-bot+sashiko
2026-11-14 18:29 ` [PATCH net-next v5 5/6] net: xilinx: axienet: Dispatch statistics through axienet_config ops Suraj Gupta
2026-11-14 18:29 ` [PATCH net-next v5 6/6] net: xilinx: axienet: Add statistics support for XXV ethernet Suraj Gupta
2026-11-15 18:31   ` sashiko-bot
2026-11-16  4:12   ` netdev-bot+sashiko

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=sashiko-outbox-215723@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=suraj.gupta2@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.