From: netdev-bot+sashiko@kernel.org
To: srinivas.neeli@amd.com
Cc: nagadheeraj.rottela@amd.com, andrew+netdev@lunn.ch,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
richardcochran@gmail.com, michal.simek@amd.com,
bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org,
edumazet@kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rt-devel@lists.linux.dev, git@amd.com,
neelisrinivas18@gmail.com
Subject: Re: [PATCH net-next v4 4/8] net: xilinx: tsn: parse endpoint DMA channel configuration
Date: Tue, 17 Nov 2026 13:14:44 +0000 [thread overview]
Message-ID: <179492128482.3136.14229628808606591959@kernel.org> (raw)
In-Reply-To: <20261113-patches_v2_external-v4-4-56bb26f042a4@amd.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The driver requires the number of tx_chanN entries in "dma-names"
to equal "xlnx,num-priorities", but the DT binding does not encode or…
--
net: xilinx: tsn: parse endpoint DMA channel configuration
This patch counts the tx_chanN and rx_chanN entries in dma-names and
allocates the conduit netdev with that many TX and RX queues. It parses
the tx-queues-config child node to map each logical TX queue to a TX DMA
channel. Probe also requires the TX channel count to equal
xlnx,num-priorities on the parent IP node.
> diff --git a/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c b/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c
> index b6458bb0ba0fd..9458db38255d4 100644
> --- a/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c
> +++ b/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c
[ ... ]
> @@ -69,15 +88,180 @@ static const struct ethtool_ops ep_ethtool_ops = {
[ ... ]
> static int xlnx_tsn_ep_probe(struct platform_device *pdev)
> {
[ ... ]
> + ret = of_property_read_u32(ip_np, "xlnx,num-priorities", &num_prio);
> + of_node_put(ip_np);
> + if (ret)
> + return dev_err_probe(dev, ret, "missing xlnx,num-priorities\n");
> +
> + if (num_prio < TSN_MIN_PRIORITIES || num_prio > TSN_MAX_TX_QUEUE)
> + return dev_err_probe(dev, -EINVAL,
> + "invalid xlnx,num-priorities %u\n",
> + num_prio);
>
> - ndev = alloc_etherdev(sizeof(*ep));
> + if (num_tx_dma_channels != num_prio)
> + return dev_err_probe(dev, -EINVAL,
> + "TX channel count %u must equal num-priorities %u\n",
> + num_tx_dma_channels, num_prio);
[Severity: Low]
Is this equality check stricter than what the binding in
xlnx,tsn-endpoint-ethernet-mac.yaml allows?
The binding says the following and nothing more:
- each dma-names item matches "^(tx|rx)_chan[0-7]$"
- there are 2..16 items, with at least one TX and one RX entry
- each queueN under tx-queues-config maps to a distinct TX channel
listed in dma-names
Taken together, these rules only require the TX channel count to be at
least xlnx,num-priorities. They don't require it to be equal.
For example, this DT looks valid against the schema:
xlnx,num-priorities = <2>;
...
dma-names = "tx_chan0", "tx_chan1", "tx_chan2", "rx_chan0";
tx-queues-config {
queue0 { xlnx,dma-channel-num = <0>; };
queue1 { xlnx,dma-channel-num = <1>; };
};
But xlnx_tsn_ep_probe()->ep_count_dma_channels() counts three TX
channels, and probe then fails with:
TX channel count 3 must equal num-priorities 2
The commit message says equality is the intended rule. Should the binding
state or enforce that in the xlnx,num-priorities or dma-names
descriptions? Or should the driver accept extra TX channels that no queue
uses?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113-patches_v2_external-v4-0-56bb26f042a4%40amd.com
next prev parent reply other threads:[~2026-11-17 13:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 18:46 [PATCH net-next v4 0/8] Add Xilinx TSN Endpoint Ethernet MAC driver Srinivas Neeli
2026-11-12 18:46 ` [PATCH net-next v4 1/8] dt-bindings: net: add Xilinx TSN Endpoint Ethernet MAC Srinivas Neeli
2026-11-13 13:20 ` Andrew Lunn
2026-11-13 14:56 ` Neeli, Srinivas
2026-11-14 21:43 ` Andrew Lunn
2026-11-13 13:23 ` Andrew Lunn
2026-11-17 13:14 ` netdev-bot+sashiko
2026-11-12 18:46 ` [PATCH net-next v4 2/8] net: xilinx: tsn: add TSN endpoint wrapper driver Srinivas Neeli
2026-11-17 13:14 ` netdev-bot+sashiko
2026-11-12 18:46 ` [PATCH net-next v4 3/8] net: xilinx: tsn: add endpoint MAC driver skeleton Srinivas Neeli
2026-11-12 18:46 ` [PATCH net-next v4 4/8] net: xilinx: tsn: parse endpoint DMA channel configuration Srinivas Neeli
2026-11-17 13:14 ` netdev-bot+sashiko [this message]
2026-11-12 18:46 ` [PATCH net-next v4 5/8] net: xilinx: tsn: bring up the endpoint MCDMA channels Srinivas Neeli
2026-11-12 18:46 ` [PATCH net-next v4 6/8] net: xilinx: tsn: add the endpoint RX data path Srinivas Neeli
2026-11-17 13:14 ` netdev-bot+sashiko
2026-11-12 18:46 ` [PATCH net-next v4 7/8] net: xilinx: tsn: add the endpoint TX " Srinivas Neeli
2026-11-17 13:14 ` netdev-bot+sashiko
2026-11-12 18:46 ` [PATCH net-next v4 8/8] net: xilinx: tsn: deliver endpoint RX frames to DSA user ports Srinivas Neeli
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=179492128482.3136.14229628808606591959@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=git@amd.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=michal.simek@amd.com \
--cc=nagadheeraj.rottela@amd.com \
--cc=neelisrinivas18@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=rostedt@goodmis.org \
--cc=srinivas.neeli@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox