Lines Matching full:switch
5 This document describes the **Distributed Switch Architecture (DSA)** subsystem
13 The Distributed Switch Architecture is a subsystem which was primarily designed
19 they configured/queried a switch port network device or a regular network
22 An Ethernet switch is typically comprised of multiple front-panel ports, and one
25 receiving Ethernet frames from the switch. This is a very common setup for all
34 of multiple switches connected to each other is called a "switch tree".
41 The ideal case for using DSA is when an Ethernet switch supports a "switch tag"
42 which is a hardware feature making the switch insert a specific tag for each
57 - the "cpu" port is the Ethernet switch facing side of the management
65 Switch tagging protocols
93 Ethernet switch.
100 switch specific tagging protocol. DSA accomplishes this by registering a
129 -> invoke switch tag specific protocol handler in 'net/dsa/tag_*.c'
133 - inspect and strip switch tag protocol to determine originating port
146 controlling and data-flowing end-point for each front-panel port of the switch.
149 - insert/remove the switch tag protocol (if it exists) when sending traffic
150 to/from specific switch ports
151 - query the switch for ethtool operations: statistics, link state,
157 stack/ethtool, and the switch driver implementation.
160 switch tagging protocol is currently registered with these network devices, and
162 switch tag in the Ethernet frames.
165 ``ndo_start_xmit()`` function, since they contain the appropriate switch tag, the
166 Ethernet switch will be able to process these incoming frames from the
167 management interface and delivers these frames to the physical switch port.
179 | <tag added by switch |
184 | Switch driver |
196 In order to be able to read to/from a switch PHY built into it, DSA creates a
197 slave MDIO bus which allows a specific switch driver to divert and intercept
200 to return standard MII registers from the switch builtin PHYs, allowing the PHY
206 internal or external MDIO devices this switch might be connected to: internal
215 - ``dsa_chip_data``: platform data configuration for a given switch device,
216 this structure describes a switch device's parent device, its address, as
222 the master network device this switch tree is attached to needs to be
227 the tagging protocol supported by the switch tree, and which receive/transmit
229 switch is also provided: CPU port. Finally, a collection of dsa_switch are
232 - ``dsa_switch``: structure describing a switch device in the tree, referencing
246 (``DSA_MAX_SWITCHES``), and the number of ports per switch to 12 (``DSA_MAX_PORTS``).
256 - inability to fetch switch CPU port statistics counters using ethtool, which
257 can make it harder to debug MDIO switch connected using xMII interfaces
269 non-NULL), and the switch behind it expects a tagging protocol, this network
272 will not make us go through the switch tagging protocol transmit function, so
273 the Ethernet switch on the other end, expecting a tag will typically drop this
296 - internal PHY devices, built into the Ethernet switch hardware
314 - finally, if the PHY is built into the switch, as is very common with
315 standalone switch packages, the PHY is probed using the slave MII bus created
327 checks whether the operation is supported by the DSA switch driver, and a commit
344 DSA switch drivers need to implement a dsa_switch_ops structure which will
353 Switch configuration
360 registration to test for the presence/absence of a switch device. For MDIO
362 the switch pseudo-PHY and return whether this is a supported device. For other
365 - ``setup``: setup function for the switch, this function is responsible for setting
368 configure the switch to separate all network interfaces from each other, that
369 is, they should be isolated by the switch hardware itself, typically by creating
372 platform should be disabled. Past this function, the switch is expected to be
374 to issue a software reset of the switch during this setup function in order to
383 on its own (e.g.: coming from switch memory mapped registers), this function
384 should return a 32-bits bitmask of "flags", that is private between the switch
388 the switch port MDIO registers. If unavailable, return 0xffff for each read.
389 For builtin switch Ethernet PHYs, this function should allow reading the link
393 to the switch port MDIO registers. If unavailable return a negative error
398 configuring the switch port link parameters: speed, duplex, pause based on
402 the fixed PHY driver asking the switch driver for link parameters that could
416 RX/TX counters from the network device, with switch driver specific statistics
428 - ``set_eee``: ethtool function which is used to configure a switch port EEE (Green
430 PHY level if relevant. This function should enable EEE at the switch port MAC
433 - ``get_eee``: ethtool function which is used to query a switch port EEE settings,
434 this function should return the EEE state of the switch port MAC controller
438 - ``get_eeprom_len``: ethtool function returning for a given switch the EEPROM
441 - ``get_eeprom``: ethtool function returning for a given switch the EEPROM contents
443 - ``set_eeprom``: ethtool function writing specified data to a given switch EEPROM
446 switch
448 - ``get_regs``: ethtool function returning the Ethernet switch internal register
456 suspend, should quiesce all Ethernet switch activities, but keep ports
461 should resume all Ethernet switch activities and re-configure the switch to be
466 fully enabling a given switch port. DSA takes care of marking the port with
472 fully disabling a given switch port. DSA takes care of marking the port with
479 - ``port_bridge_join``: bridge layer function invoked when a given switch port is
480 added to a bridge, this function should be doing the necessary at the switch
484 - ``port_bridge_leave``: bridge layer function invoked when a given switch port is
486 switch level to deny the leaving port from ingress/egress traffic from the
488 out at the switch hardware for the switch to (re) learn MAC addresses behind
491 - ``port_stp_state_set``: bridge layer function invoked when a given switch port STP
492 state is computed by the bridge layer and should be propagated to switch
493 hardware to forward/block/learn traffic. The switch driver is responsible for
505 VLAN ID map/rules. If there is no PVID programmed into the switch port,
506 untagged frames must be rejected as well. When turned off the switch must
517 (tagged or untagged) for the given switch port
520 given switch port
527 Forwarding Database entry, the switch hardware should be programmed with the
537 Forwarding Database entry, the switch hardware should be programmed to delete
552 a multicast database entry, the switch hardware should be programmed with the
560 multicast database entry, the switch hardware should be programmed to delete
575 capable hardware, but does not enforce a strict switch device driver model. On
577 of the switch specific. At some point we should envision a merger between these