Re: [PATCH net-next v2 12/14] net: ethernet: qualcomm: Initialize PPE L2 bridge settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 1/13/2025 9:37 PM, Andrew Lunn wrote:
Why is learning needed on physical ports? In general, switches forward
unknown destination addresses to the CPU. Which is what you want when
the ports are isolated from each other. Everything goes to the
CPU. But maybe this switch does not work like this?


L2 forwarding can be disabled in PPE in two ways:

1.) Keep the learning enabled (which is the default HW setting) and
configure the FDB-miss-action to redirect to CPU.

This works because even if FDB learning is enabled, we need to represent
the bridge and the physical ports using their 'virtual switch instance'
(VSI) in the PPE HW, and create the 'port membership' for the bridge VSI
(the list of slave ports), before FDB based forwarding can take place. Since
we do not yet support switchdev, these VSI are not created and packets are
always forwarded to CPU due to FDB miss.

(or)

2.) Explicitly disable learning either globally or on the ports.

With method 1 we can achieve packet forwarding to CPU without explicitly
disabling learning. When switchdev is enabled later, L2 forwarding can be
enabled as a natural extension on top of this configuration. So we have
chosen the first approach.

How does ageing work in this setup? Will a cable unplug/plug flush all
the learned entries? Is ageing set to some reasonable default in case
a MAC address moves?


I would like to clarify that representing the bridge and its slave ports
inside PPE (using a VSI - virtual switch instance) is a pre-requisite before learning can take place on a port. At this point, since switchdev is not enabled, VSI is not created for port/bridge and hence FDB learning does not take place. Later when we enable switchdev and represent the bridge/slave-ports in PPE, FDB learning will automatically occur on top of this initial configuration. I will add this note in the comments and commit message to make it clear.

Regarding FDB entry ageing (when switchdev is enabled later), MAC address move can be automatically detected and old entry flushed by the PPE. However for link change events on a port, PPE will rely on software to flush FDB entries for the port.

	Andrew





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux