-
Notifications
You must be signed in to change notification settings - Fork 8
Devlink
The Linux devlink subsystem provides a flexible and easy to use subsystem for exposing a list of frames that can be trapped by the device, as well as a special list of frames that will be dropped.
devlink
is a device configuration utility, that consists of a list of sub-applications. The Prestera driver utilizes only some of devlink's functionality.
Device-specific configuration and information:
-
List all registered devices in the devlink subsystem:
devlink dev show
-
List all the device information (such as bus/id, driver that controls the device, versions, firmware version that is currently loaded):
devlink dev info
Port-specific configuration and information:
- List all the device ports that are registered in the devlink subsystem:
devlink port show
Information about devlink traps and drops that are configured by the device:
-
List all traps that are registered within the system:
devlink trap show
-
List all trap groups that are registered within the system:
devlink trap group show
The Prestera driver registers a set of traps that show what frames the device can trap to the CPU (trap action), as well as a special set of frames that are dropped (drop action). The traps are assembled into different groups, which makes it easier to view per-group traps, or per-groups statistics.
The Prestera driver registers the following groups (traps within these groups):
Trap name | Descripton | Type | Action on init |
---|---|---|---|
local_port | Packets dropped due to FDB decision to bridge packet back to the incoming port/trunk | Drop | Drop |
invalid_sa | Frame with invalid source address | Drop | Drop |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
illegal_ip_addr | Packet with illegal IPV4 address | Drop | Drop |
illegal_ip_hdr | Packet with invalid IPV4 header | Drop | Drop |
ip_uc_dip_da_mismatch | Packet with destination MAC unicast, and destination IPV4 address multicast | Drop | Drop |
ip_uc_dip_da_mismatch | Packet with zero source IPV4 address | Drop | Drop |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
mtu_error | Packet with too big MTU | Exception | Trap |
ttl_error | Packet with zero TTL | Exception | Trap |
ttl_error | Packet with invalid IPV4 header options field | Exception | Trap |
ipv4_icmp_redirect | IPV4 ICMP redirect packet | Exception | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
arp_bc | ARP broadcast frames | Control | Trap |
arp_response | ARP response frames | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
acl_code_0 | Frames trapped due to ACL configuration, hw TC #0 | Control | Trap |
acl_code_1 | Frames trapped due to ACL configuration, hw TC #1 | Control | Trap |
acl_code_2 | Frames trapped due to ACL configuration, hw TC #2 | Control | Trap |
acl_code_3 | Frames trapped due to ACL configuration, hw TC #3 | Control | Trap |
acl_code_4 | Frames trapped due to ACL configuration, hw TC #4 | Control | Trap |
acl_code_5 | Frames trapped due to ACL configuration, hw TC #5 | Control | Trap |
acl_code_6 | Frames trapped due to ACL configuration, hw TC #6 | Control | Trap |
acl_code_7 | Frames trapped due to ACL configuration, hw TC #7 | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
ospf | OSPF frames | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
stp | STP frames | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
lacp | LACP frames | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
lldp | LLDP frames | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
vrrp | VRRP frames | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
dhcp | DHCP frames | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
bgp | BGP frames | Control | Trap |
Trap name | Descripton | Type | Action on init |
---|---|---|---|
is_is | IS-IS frames | Control | Trap |
ip_bc_mac | IPV4 packets with broadcast destination address | Control | Trap |
router_mc | IPV4 packets with all router multicast (224.0.0.2) destination address | Control | Trap |
mac_to_me | Frame with destination MAC address that is the switchport MAC address | Control | Trap |
ip_default_route | IPV4 packets with destination address that is not the address of the switchport interface, and there is no forwarding prefix | Control | Trap |
local_route | IPV4 packets with destination address being switchport's IP address | Control | Trap |
ssh | SSH packets | Control | Trap |
telnet | Telnet packets | Control | Trap |
ICMP | ICMP packets | Control | Trap |
NOTE: prestera driver does not support changing action of traps either upon init or at rutime.
Network Configurations
- Switch Port
- Layer 2
- Layer 3
- Dynamic SCT
- Quality of Service (QoS)
- Access Control Lists (ACL)
- Network Address Translation (NAT)
- Debugging Tools and and Methods
- Resources and Releases
- Marvell® Switchdev Slim (Single-CPU) mode guide