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

From: Andrew Lunn
Date: Mon Aug 19 2024 - 10:29:19 EST


On Mon, Aug 19, 2024 at 04:20:31PM +0200, Pieter wrote:
> Hi Vladimir,
>
> > 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.

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