Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Pieter <vtpieter@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Russell King <linux@armlinux.org.uk>,
	Pieter Van Trappen <pieter.van.trappen@cern.ch>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: dsa: microchip: add KSZ8 change_tag_protocol support
Date: Mon, 19 Aug 2024 17:35:24 +0300	[thread overview]
Message-ID: <20240819143524.wjuevpejxgqh3hws@skbuf> (raw)
In-Reply-To: <CAHvy4AqRbsjvU4mtRXHuu6dvPCgGfvZUUiDc3OPbk_PtdNBpPg@mail.gmail.com>

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,

You don't have to "assume" it works. You can test and verify that it works.
We have a selftest for receiving all kinds of packets on standalone and
bridged interfaces.
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/tree/tools/testing/selftests/net/forwarding/local_termination.sh

> how to tell all user space programs to use br0 instead of eth0?

Question does not compute, sorry. Is this answer what you're looking for?
"Just like you tell them to use eth0, just that instead of eth0 you type br0".
Or just like Andrew says. You don't explicitly bind IP sockets to
interfaces, you let the routing layer pick the interface based on the
routing table and the IP addresses on each interface. Ergo, for IP
sockets you just need to put your IP address on the bridge interface.

> Both interfaces are up and I can't do `ifdown eth0` without losing
> all connectivity. I'm using busybox's ifup BTW and it says:
> $ ifup br0
> ifup: ignoring unknown interface br0

busybox ifupdown reads the /etc/network/interfaces, it's saying that
interface isn't there. Which it really isn't, maybe? I haven't really
used busybox ifupdown and I don't know what it can do with bridges.

The basic command to bring a network interface up is "ip link set dev $NAME up".
This has no state/configuration file and just constructs netlink
messages to pass through the rtnetlink socket to the kernel.

  parent reply	other threads:[~2024-08-19 14:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 10:12 [PATCH net-next 1/2] dt-bindings: net: dsa: add none to dsa-tag-protocol enum vtpieter
2024-08-19 10:12 ` [PATCH net-next 2/2] net: dsa: microchip: add KSZ8 change_tag_protocol support vtpieter
2024-08-19 10:41   ` Vladimir Oltean
2024-08-19 12:05     ` Pieter
2024-08-19 13:05       ` Andrew Lunn
2024-08-19 13:21         ` Pieter
2024-08-19 13:27           ` Andrew Lunn
2024-08-19 13:43             ` Pieter
2024-08-19 14:05               ` Vladimir Oltean
2024-08-19 14:16                 ` Florian Fainelli
2024-08-19 14:20                 ` Pieter
2024-08-19 14:28                   ` Andrew Lunn
2024-08-19 14:41                     ` Pieter
2024-08-19 14:44                       ` Vladimir Oltean
2024-08-19 14:59                         ` Pieter
2024-08-19 14:35                   ` Vladimir Oltean [this message]
2024-08-19 14:13               ` Andrew Lunn
2024-08-19 10:58 ` [PATCH net-next 1/2] dt-bindings: net: dsa: add none to dsa-tag-protocol enum Krzysztof Kozlowski

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=20240819143524.wjuevpejxgqh3hws@skbuf \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pieter.van.trappen@cern.ch \
    --cc=vtpieter@gmail.com \
    --cc=woojung.huh@microchip.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