From: "Neeli, Srinivas" <srneeli@amd.com>
To: netdev-bot+sashiko@kernel.org, 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, neelisrinivas18@gmail.com,
git@amd.com
Subject: Re: [PATCH net-next v3 8/8] net: xilinx: tsn: deliver endpoint RX frames to DSA user ports
Date: Wed, 11 Nov 2026 13:03:09 +0530 [thread overview]
Message-ID: <fdf30c76-f78d-430b-9ca0-8377990a6b22@amd.com> (raw)
In-Reply-To: <179249750444.3135.1692275587478159303@kernel.org>
Hi,
On 10/20/2026 5:28 PM, netdev-bot+sashiko@kernel.org wrote:
> 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 new RX demux in ep_dma_rx_cb()
> (drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c) relies on a DSA…
>
> --
>
> net: xilinx: tsn: deliver endpoint RX frames to DSA user ports
>
> At probe time this commit allocates one METADATA_HW_PORT_MUX metadata dst
> for each of the two MAC ports. In ep_dma_rx_cb() it then attaches the
> matching dst to each RX frame based on its TUSER port_id, gated on
> netdev_uses_dsa(), so DSA can deliver the frame to its swpN user port.
>
>> diff --git a/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c b/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c
>> index bd8cd504cefb4..5103a3b4b018a 100644
>> --- a/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c
>> +++ b/drivers/net/ethernet/xilinx/tsn/xilinx_tsn_ep.c
> [ ... ]
>
>> @@ -302,6 +311,10 @@ static void ep_dma_rx_cb(void *data, const struct dmaengine_result *result)
>> }
>>
>> skb_put(skb, rx_len);
>> + if (netdev_uses_dsa(ndev)) {
>> + dst_hold(&ep->port_md[port_id]->dst);
>> + skb_dst_set(skb, &ep->port_md[port_id]->dst);
>> + }
> [Severity: Low]
> Can this branch be reached at all with the tree as submitted?
>
> As far as I can tell, nothing under drivers/net/dsa/ binds
> "xlnx,tsn-switch", and net/dsa/ has no TSN tagger. The only references
> are the binding in xlnx,tsn-endpoint-ethernet-mac.yaml and this Kconfig
> help text:
>
> The three-port switch is supported by the companion DSA driver.
>
> Without that driver, nothing sets dsa_ptr on this netdev, so
> netdev_uses_dsa() is always false here. That leaves three pieces of dead
> code for now: this branch, the port_md[] allocation in
> xlnx_tsn_ep_probe(), and ep_free_port_md(). It also means RX delivery to
> swp1/swp2 can't be tested from this tree.
>
> Will the companion DSA driver be posted along with this series?
>
> The commit message also says:
>
> guarded by netdev_uses_dsa() so it runs only while a switch is bound
> as the conduit.
>
> netdev_uses_dsa() checks a bit more than that:
>
> include/net/dsa.h:netdev_uses_dsa() {
> ...
> return dev->dsa_ptr && dev->dsa_ptr->rcv;
> ...
> }
>
> dsa_port_set_tag_protocol() copies cpu_dp->rcv directly from the
> tagger's ops.
>
> Every frame accepted here carries a METADATA_HW_PORT_MUX dst, so
> dsa_switch_rcv() always takes the md_dst branch and never calls
> cpu_dp->rcv. The tagger still has to provide a non-NULL .rcv, though,
> or this code never runs.
>
> With a tagger that has no .rcv, such as none_ops in net/dsa/tag_none.c,
> every frame would quietly stay on the conduit eth%d. tag_none.c warns
> against using it for new switches, so this mainly applies to whatever
> tagger the companion driver adds.
>
> Could the commit message, or a comment here, say that the tagger must
> provide an .rcv callback, even though it won't be called for these
> frames?
>
The v1 posting carried both the endpoint and the DSA switch driver.
Following the v1 review, we split them into two independent series.
This series adds only the endpoint, as the conduit driver, and the DSA
switch driver and its tag protocol will follow as a separate series,
as noted in the cover letter.
Thanks,
Srinivas Neeli
prev parent reply other threads:[~2026-11-11 7:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 9:31 [PATCH net-next v3 0/8] Add Xilinx TSN Endpoint Ethernet MAC driver Srinivas Neeli
2026-10-16 9:32 ` [PATCH net-next v3 1/8] dt-bindings: net: add Xilinx TSN Endpoint Ethernet MAC Srinivas Neeli
2026-10-20 11:58 ` netdev-bot+sashiko
2026-10-21 3:16 ` Rob Herring
2026-11-03 12:40 ` Neeli, Srinivas
2026-10-16 9:32 ` [PATCH net-next v3 2/8] net: xilinx: tsn: add TSN endpoint wrapper driver Srinivas Neeli
2026-10-20 11:58 ` netdev-bot+sashiko
2026-10-16 9:32 ` [PATCH net-next v3 3/8] net: xilinx: tsn: add endpoint MAC driver skeleton Srinivas Neeli
2026-10-20 11:58 ` netdev-bot+sashiko
2026-10-16 9:32 ` [PATCH net-next v3 4/8] net: xilinx: tsn: parse endpoint DMA channel configuration Srinivas Neeli
2026-10-20 11:58 ` netdev-bot+sashiko
2026-10-16 9:32 ` [PATCH net-next v3 5/8] net: xilinx: tsn: bring up the endpoint MCDMA channels Srinivas Neeli
2026-10-20 11:58 ` netdev-bot+sashiko
2026-11-03 13:55 ` Neeli, Srinivas
2026-10-16 9:32 ` [PATCH net-next v3 6/8] net: xilinx: tsn: add the endpoint RX data path Srinivas Neeli
2026-10-17 9:34 ` sashiko-bot
2026-11-11 7:36 ` Neeli, Srinivas
2026-10-20 11:58 ` netdev-bot+sashiko
2026-10-16 9:32 ` [PATCH net-next v3 7/8] net: xilinx: tsn: add the endpoint TX " Srinivas Neeli
2026-10-17 9:34 ` sashiko-bot
2026-10-20 11:58 ` netdev-bot+sashiko
2026-10-16 9:32 ` [PATCH net-next v3 8/8] net: xilinx: tsn: deliver endpoint RX frames to DSA user ports Srinivas Neeli
2026-10-20 11:58 ` netdev-bot+sashiko
2026-11-11 7:33 ` Neeli, Srinivas [this message]
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=fdf30c76-f78d-430b-9ca0-8377990a6b22@amd.com \
--to=srneeli@amd.com \
--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-bot+sashiko@kernel.org \
--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
all inboxes | Powered by JetHome®