mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 01:15:38 +07:00
f465261aa1
When rules are inserted into the A-TCAM they are associated with a mask, which is part of the lookup key: { masked key, mask ID, region ID }. These masks are called rule patterns (RP) and the aggregation of several masks into one (to be introduced in follow-up patch sets) is called an extended RP (eRP). When a packet undergoes a lookup in an ACL region it is masked by the current set of eRPs used by the region, looking for an exact match. Eventually, the rule with the highest priority is picked. These eRPs are stored in several global banks to allow for lookup to occur using several eRPs simultaneously. At first, an ACL region will only require a single mask - upon the insertion of the first rule. In this case, the region can use the "master RP" which is composed by OR-ing all the masks used by the region. This mask is a property of the region and thus there is no need to use the above mentioned banks. At some point, a second mask will be needed. In this case, the region will need to allocate an eRP table from the above mentioned banks and insert its masks there. >From now on, upon lookup, the eRP table used by the region will be fetched from the eRP banks - using {eRP bank, Index within the bank} - and the eRPs present in the table will be used to mask the packet. Note that masks with consecutive indexes are inserted into consecutive banks. When rules are deleted and a region only needs a single mask once again it can free its eRP table and use the master RP. The above logic is implemented in the eRP core and represented using the following state machine: +------------+ create mask - as master RP +---------------+ | +--------------------------------> | | no masks | | single mask | | <--------------------------------+ | +------------+ delete mask +-----+--^------+ | | | | create mask - | | delete mask - create mask transition to use eRP | | transition to +--------+ table | | use master RP | | | | | | | | +----v--------+----+ create mask +----v--+-----+ | <-------------------------------+ | | multiple masks | | two masks | | +-------------------------------> | +------------------+ delete mask - if two +-------------+ remaining The code that actually configures rules in the A-TCAM will interface with the eRP core by getting or putting an eRP based on the required mask used by the rule. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
110 lines
3.2 KiB
Plaintext
110 lines
3.2 KiB
Plaintext
#
|
|
# Mellanox switch drivers configuration
|
|
#
|
|
|
|
config MLXSW_CORE
|
|
tristate "Mellanox Technologies Switch ASICs support"
|
|
depends on MAY_USE_DEVLINK
|
|
---help---
|
|
This driver supports Mellanox Technologies Switch ASICs family.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_core.
|
|
|
|
config MLXSW_CORE_HWMON
|
|
bool "HWMON support for Mellanox Technologies Switch ASICs"
|
|
depends on MLXSW_CORE && HWMON
|
|
depends on !(MLXSW_CORE=y && HWMON=m)
|
|
default y
|
|
---help---
|
|
Say Y here if you want to expose HWMON interface on mlxsw devices.
|
|
|
|
config MLXSW_CORE_THERMAL
|
|
bool "Thermal zone support for Mellanox Technologies Switch ASICs"
|
|
depends on MLXSW_CORE && THERMAL
|
|
depends on !(MLXSW_CORE=y && THERMAL=m)
|
|
default y
|
|
---help---
|
|
Say Y here if you want to automatically control fans speed according
|
|
ambient temperature reported by ASIC.
|
|
|
|
config MLXSW_PCI
|
|
tristate "PCI bus implementation for Mellanox Technologies Switch ASICs"
|
|
depends on PCI && HAS_IOMEM && MLXSW_CORE
|
|
default m
|
|
---help---
|
|
This is PCI bus implementation for Mellanox Technologies Switch ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_pci.
|
|
|
|
config MLXSW_I2C
|
|
tristate "I2C bus implementation for Mellanox Technologies Switch ASICs"
|
|
depends on I2C && MLXSW_CORE
|
|
default m
|
|
---help---
|
|
This is I2C bus implementation for Mellanox Technologies Switch ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_i2c.
|
|
|
|
config MLXSW_SWITCHIB
|
|
tristate "Mellanox Technologies SwitchIB and SwitchIB-2 support"
|
|
depends on MLXSW_CORE && MLXSW_PCI && NET_SWITCHDEV
|
|
default m
|
|
---help---
|
|
This driver supports Mellanox Technologies SwitchIB and SwitchIB-2
|
|
Infiniband Switch ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_switchib.
|
|
|
|
config MLXSW_SWITCHX2
|
|
tristate "Mellanox Technologies SwitchX-2 support"
|
|
depends on MLXSW_CORE && MLXSW_PCI && NET_SWITCHDEV
|
|
default m
|
|
---help---
|
|
This driver supports Mellanox Technologies SwitchX-2 Ethernet
|
|
Switch ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_switchx2.
|
|
|
|
config MLXSW_SPECTRUM
|
|
tristate "Mellanox Technologies Spectrum support"
|
|
depends on MLXSW_CORE && MLXSW_PCI && NET_SWITCHDEV && VLAN_8021Q
|
|
depends on PSAMPLE || PSAMPLE=n
|
|
depends on BRIDGE || BRIDGE=n
|
|
depends on IPV6 || IPV6=n
|
|
depends on NET_IPGRE || NET_IPGRE=n
|
|
depends on IPV6_GRE || IPV6_GRE=n
|
|
select GENERIC_ALLOCATOR
|
|
select PARMAN
|
|
select MLXFW
|
|
default m
|
|
---help---
|
|
This driver supports Mellanox Technologies Spectrum Ethernet
|
|
Switch ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_spectrum.
|
|
|
|
config MLXSW_SPECTRUM_DCB
|
|
bool "Data Center Bridging (DCB) support"
|
|
depends on MLXSW_SPECTRUM && DCB
|
|
default y
|
|
---help---
|
|
Say Y here if you want to use Data Center Bridging (DCB) in the
|
|
driver.
|
|
|
|
config MLXSW_MINIMAL
|
|
tristate "Mellanox Technologies minimal I2C support"
|
|
depends on MLXSW_CORE && MLXSW_I2C
|
|
default m
|
|
---help---
|
|
This driver supports I2C access for Mellanox Technologies Switch
|
|
ASICs.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called mlxsw_minimal.
|