* DSA to switchdev (TI CPSW) ethernet ports
@ 2024-11-28 14:01 Jesse Van Gavere
2024-11-28 14:19 ` Vladimir Oltean
0 siblings, 1 reply; 4+ messages in thread
From: Jesse Van Gavere @ 2024-11-28 14:01 UTC (permalink / raw)
To: netdev@vger.kernel.org, woojung.huh@microchip.com,
UNGLinuxDriver@microchip.com
Cc: andrew@lunn.ch, olteanv@gmail.com
Hello,
I have a question in regards to connecting switchdev ports (TI AM62 CPSW in my case) to a switch configured in the DSA framework.
My setup is two KSZ9896Cs connected, one to each port of the AM62x.
Using something like cpsw_port1/2 as the ethernet for the conduit port fails I presume in of_find_net_device_by_node(ethernet) as both eth seem to be under cpsw3g which is the actual ethernet.
So when changing the ethernet for the conduit port to cpsw3g I can actually get switch working, and I see it registers under eth0 of the ethernet, however when the second switch tries to come up it fails because it tries to register a dsa folder under eth0 again.
I'm kind of at a loss what the correct solution here would be, or if this is currently even supported to connect e.g. a cpsw port to a conduit port, if that would not be the case, what is the suggested work I'd best be doing to actually get this working?
Kind regards,
Jesse Van Gavere
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DSA to switchdev (TI CPSW) ethernet ports
2024-11-28 14:01 DSA to switchdev (TI CPSW) ethernet ports Jesse Van Gavere
@ 2024-11-28 14:19 ` Vladimir Oltean
2024-11-28 15:42 ` Jesse Van Gavere
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Oltean @ 2024-11-28 14:19 UTC (permalink / raw)
To: Jesse Van Gavere
Cc: netdev@vger.kernel.org, woojung.huh@microchip.com,
UNGLinuxDriver@microchip.com, andrew@lunn.ch
On Thu, Nov 28, 2024 at 02:01:23PM +0000, Jesse Van Gavere wrote:
> Hello,
>
> I have a question in regards to connecting switchdev ports (TI AM62 CPSW in my case) to a switch configured in the DSA framework.
> My setup is two KSZ9896Cs connected, one to each port of the AM62x.
> Using something like cpsw_port1/2 as the ethernet for the conduit port fails I presume in of_find_net_device_by_node(ethernet) as both eth seem to be under cpsw3g which is the actual ethernet.
>
> So when changing the ethernet for the conduit port to cpsw3g I can actually get switch working, and I see it registers under eth0 of the ethernet, however when the second switch tries to come up it fails because it tries to register a dsa folder under eth0 again.
>
> I'm kind of at a loss what the correct solution here would be, or if this is currently even supported to connect e.g. a cpsw port to a conduit port, if that would not be the case, what is the suggested work I'd best be doing to actually get this working?
>
> Kind regards,
> Jesse Van Gavere
Having ethernet = <&cpsw_port1> or ethernet = <&cpsw_port2> is what
should have worked. What is the actual failure?
What do you mean "cpsw3g (...) is the actual ethernet"? How many netdevs
does cpsw3g register? 2 (for the ports) or 3?
Your setup should not be a problem in general, the switchdev model is
compatible with usage as a DSA conduit. Could you print with %pOF what
is the ndev->dev.of_node of the 2 cpsw ports?
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: DSA to switchdev (TI CPSW) ethernet ports
2024-11-28 14:19 ` Vladimir Oltean
@ 2024-11-28 15:42 ` Jesse Van Gavere
2024-11-28 15:46 ` Vladimir Oltean
0 siblings, 1 reply; 4+ messages in thread
From: Jesse Van Gavere @ 2024-11-28 15:42 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev@vger.kernel.org, woojung.huh@microchip.com,
UNGLinuxDriver@microchip.com, andrew@lunn.ch
Hello Vladimir,
>Caution! This message was sent from outside your organization.
>
>On Thu, Nov 28, 2024 at 02:01:23PM +0000, Jesse Van Gavere wrote:
>> Hello,
>>
>> I have a question in regards to connecting switchdev ports (TI AM62 CPSW in my case) to a switch configured in the DSA framework.
>> My setup is two KSZ9896Cs connected, one to each port of the AM62x.
>> Using something like cpsw_port1/2 as the ethernet for the conduit port fails I presume in of_find_net_device_by_node(ethernet) as both eth seem to be under cpsw3g which is the actual ethernet.
>>
>> So when changing the ethernet for the conduit port to cpsw3g I can actually get switch working, and I see it registers under eth0 of the ethernet, however when the second switch tries to come up it fails because it tries to register a dsa folder under eth0 again.
>>
>> I'm kind of at a loss what the correct solution here would be, or if this is currently even supported to connect e.g. a cpsw port to a conduit port, if that would not be the case, what is the suggested work I'd best be doing to actually get this working?
>>
>> Kind regards,
>> Jesse Van Gavere
>
>Having ethernet = <&cpsw_port1> or ethernet = <&cpsw_port2> is what should have worked. What is the actual failure?
>
>What do you mean "cpsw3g (...) is the actual ethernet"? How many netdevs does cpsw3g register? 2 (for the ports) or 3?
>
>Your setup should not be a problem in general, the switchdev model is compatible with usage as a DSA conduit. Could you print with %pOF what is the ndev->dev.of_node of the 2 cpsw ports?
Thank you very much for this information.
It immediately pointed me in the right direction and I could see this was Addressed by Jacub Kicinski in commit 29c71bf2a05a11f0d139590d37d92547477d5eb2
The netdev of_node simply wasn't being populated yet in the branch I'm working on, everything is working as expected now!
Thanks a lot!
Best regards,
Jesse
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DSA to switchdev (TI CPSW) ethernet ports
2024-11-28 15:42 ` Jesse Van Gavere
@ 2024-11-28 15:46 ` Vladimir Oltean
0 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2024-11-28 15:46 UTC (permalink / raw)
To: Jesse Van Gavere
Cc: netdev@vger.kernel.org, woojung.huh@microchip.com,
UNGLinuxDriver@microchip.com, andrew@lunn.ch
On Thu, Nov 28, 2024 at 03:42:18PM +0000, Jesse Van Gavere wrote:
> Thank you very much for this information.
> It immediately pointed me in the right direction and I could see this was Addressed by Jacub Kicinski in commit 29c71bf2a05a11f0d139590d37d92547477d5eb2
> The netdev of_node simply wasn't being populated yet in the branch I'm working on, everything is working as expected now!
Happy to know it's resolved. Just want to point out that the patch was
authored by Alexander Sverdlin. Jakub Kicinski is the maintainer who
applied it, and provided the last sign off in doing so.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-28 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-28 14:01 DSA to switchdev (TI CPSW) ethernet ports Jesse Van Gavere
2024-11-28 14:19 ` Vladimir Oltean
2024-11-28 15:42 ` Jesse Van Gavere
2024-11-28 15:46 ` Vladimir Oltean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox