Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5ed2feb authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller
Browse files

switchdev: documentation: fix longer-than-80-char lines

parent 9d1dabfb
Loading
Loading
Loading
Loading
+18 −18
Original line number Original line Diff line number Diff line
@@ -114,11 +114,11 @@ would be sub-port 0 on port 1 on switch 1.
Switch ID
Switch ID
^^^^^^^^^
^^^^^^^^^


The switchdev driver must implement the switchdev op switchdev_port_attr_get for
The switchdev driver must implement the switchdev op switchdev_port_attr_get
SWITCHDEV_ATTR_PORT_PARENT_ID for each port netdev, returning the same physical ID
for SWITCHDEV_ATTR_PORT_PARENT_ID for each port netdev, returning the same
for each port of a switch.  The ID must be unique between switches on the same
physical ID for each port of a switch.  The ID must be unique between switches
system.  The ID does not need to be unique between switches on different
on the same system.  The ID does not need to be unique between switches on
systems.
different systems.


The switch ID is used to locate ports on a switch and to know if aggregated
The switch ID is used to locate ports on a switch and to know if aggregated
ports belong to the same switch.
ports belong to the same switch.
@@ -194,11 +194,11 @@ in turn, will notify the bridge driver using the switchdev notifier call:


	err = call_switchdev_notifiers(val, dev, info);
	err = call_switchdev_notifiers(val, dev, info);


Where val is SWITCHDEV_FDB_ADD when learning and SWITCHDEV_FDB_DEL when forgetting, and
Where val is SWITCHDEV_FDB_ADD when learning and SWITCHDEV_FDB_DEL when
info points to a struct switchdev_notifier_fdb_info.  On SWITCHDEV_FDB_ADD, the bridge
forgetting, and info points to a struct switchdev_notifier_fdb_info.  On
driver will install the FDB entry into the bridge's FDB and mark the entry as
SWITCHDEV_FDB_ADD, the bridge driver will install the FDB entry into the
NTF_EXT_LEARNED.  The iproute2 bridge command will label these entries
bridge's FDB and mark the entry as NTF_EXT_LEARNED.  The iproute2 bridge
"offload":
command will label these entries "offload":


	$ bridge fdb
	$ bridge fdb
	52:54:00:12:35:01 dev sw1p1 master br0 permanent
	52:54:00:12:35:01 dev sw1p1 master br0 permanent
@@ -229,18 +229,18 @@ the bridge's FDB. It's possible, but not optimal, to enable learning on the
device port and on the bridge port, and disable learning_sync.
device port and on the bridge port, and disable learning_sync.


To support learning and learning_sync port attributes, the driver implements
To support learning and learning_sync port attributes, the driver implements
switchdev op switchdev_port_attr_get/set for SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS.  The driver
switchdev op switchdev_port_attr_get/set for SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS.
should initialize the attributes to the hardware defaults.
The driver should initialize the attributes to the hardware defaults.


FDB Ageing
FDB Ageing
^^^^^^^^^^
^^^^^^^^^^


There are two FDB ageing models supported: 1) ageing by the device, and 2)
There are two FDB ageing models supported: 1) ageing by the device, and 2)
ageing by the kernel.  Ageing by the device is preferred if many FDB entries
ageing by the kernel.  Ageing by the device is preferred if many FDB entries
are supported.  The driver calls call_switchdev_notifiers(SWITCHDEV_FDB_DEL, ...) to
are supported.  The driver calls call_switchdev_notifiers(SWITCHDEV_FDB_DEL,
age out the FDB entry.  In this model, ageing by the kernel should be turned
...) to age out the FDB entry.  In this model, ageing by the kernel should be
off.  XXX: how to turn off ageing in kernel on a per-port basis or otherwise
turned off.  XXX: how to turn off ageing in kernel on a per-port basis or
prevent the kernel from ageing out the FDB entry?
otherwise prevent the kernel from ageing out the FDB entry?


In the kernel ageing model, the standard bridge ageing mechanism is used to age
In the kernel ageing model, the standard bridge ageing mechanism is used to age
out stale FDB entries.  To keep an FDB entry "alive", the driver should refresh
out stale FDB entries.  To keep an FDB entry "alive", the driver should refresh
@@ -262,8 +262,8 @@ STP State Change on Port


Internally or with a third-party STP protocol implementation (e.g. mstpd), the
Internally or with a third-party STP protocol implementation (e.g. mstpd), the
bridge driver maintains the STP state for ports, and will notify the switch
bridge driver maintains the STP state for ports, and will notify the switch
driver of STP state change on a port using the switchdev op switchdev_attr_port_set for
driver of STP state change on a port using the switchdev op
SWITCHDEV_ATTR_PORT_STP_UPDATE.
switchdev_attr_port_set for SWITCHDEV_ATTR_PORT_STP_UPDATE.


State is one of BR_STATE_*.  The switch driver can use STP state updates to
State is one of BR_STATE_*.  The switch driver can use STP state updates to
update ingress packet filter list for the port.  For example, if port is
update ingress packet filter list for the port.  For example, if port is