Re: [PATCH net-next 2/2] net: dsa: microchip: add KSZ8 change_tag_protocol support

From: Pieter
Date: Mon Aug 19 2024 - 10:42:57 EST


> > > On Mon, Aug 19, 2024 at 03:43:42PM +0200, Pieter wrote:
> > > > Right so I'm managing it but I don't care from which port the packets
> > > > originate, so I could disable the tagging in my case.
> > > >
> > > > My problem is that with tagging enabled, I cannot use the DSA conduit
> > > > interface as a regular one to open sockets etc.
> > >
> > > Open the socket on the bridge interface then?
> >
> > Assuming this works, how to tell all user space programs to use br0 instead
> > of eth0?
>
> How did you tell userspace to use eth0?
>
> In general, you don't tell userspace anything about interfaces. You
> open a client socket to a destination IP address, and the kernel
> routing tables are used to determine the egress interface. In general,
> it will use a public scope IP address from that interface as the
> source address.

Hi Andrew, Vladimir,
thanks for your explanation and patience!

It works as you said, I will have to do some changes to userspace to
ensure the DHCP client uses br0 instead of eth0 but that's it.
I just tried and br0 obtains the IP address and all is good, with
DSA tagging enabled.

This patch can be dropped, sorry for the hassle.

> The conduit interface should not have an IP address, its just
> plumbing, but not otherwise used. Your IP address is on br0, so by
> default the kernel will use the IP address from it.
>
> Andrew
>