mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 23:54:04 +08:00
Merge branch 'mlxsw-fixes-for-spectrum-4'
Petr Machata says: ==================== mlxsw: Fixes for Spectrum-4 This patchset contains an assortment of fixes for mlxsw Spectrum-4 support. ==================== Link: https://lore.kernel.org/r/cover.1692268427.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
cfceccca01
@ -32,8 +32,8 @@ static const struct mlxsw_afk_element_info mlxsw_afk_element_infos[] = {
|
||||
MLXSW_AFK_ELEMENT_INFO_U32(IP_TTL_, 0x18, 0, 8),
|
||||
MLXSW_AFK_ELEMENT_INFO_U32(IP_ECN, 0x18, 9, 2),
|
||||
MLXSW_AFK_ELEMENT_INFO_U32(IP_DSCP, 0x18, 11, 6),
|
||||
MLXSW_AFK_ELEMENT_INFO_U32(VIRT_ROUTER_MSB, 0x18, 17, 3),
|
||||
MLXSW_AFK_ELEMENT_INFO_U32(VIRT_ROUTER_LSB, 0x18, 20, 8),
|
||||
MLXSW_AFK_ELEMENT_INFO_U32(VIRT_ROUTER_MSB, 0x18, 17, 4),
|
||||
MLXSW_AFK_ELEMENT_INFO_U32(VIRT_ROUTER_LSB, 0x18, 21, 8),
|
||||
MLXSW_AFK_ELEMENT_INFO_BUF(SRC_IP_96_127, 0x20, 4),
|
||||
MLXSW_AFK_ELEMENT_INFO_BUF(SRC_IP_64_95, 0x24, 4),
|
||||
MLXSW_AFK_ELEMENT_INFO_BUF(SRC_IP_32_63, 0x28, 4),
|
||||
|
@ -517,11 +517,15 @@ static void mlxsw_pci_skb_cb_ts_set(struct mlxsw_pci *mlxsw_pci,
|
||||
struct sk_buff *skb,
|
||||
enum mlxsw_pci_cqe_v cqe_v, char *cqe)
|
||||
{
|
||||
u8 ts_type;
|
||||
|
||||
if (cqe_v != MLXSW_PCI_CQE_V2)
|
||||
return;
|
||||
|
||||
if (mlxsw_pci_cqe2_time_stamp_type_get(cqe) !=
|
||||
MLXSW_PCI_CQE_TIME_STAMP_TYPE_UTC)
|
||||
ts_type = mlxsw_pci_cqe2_time_stamp_type_get(cqe);
|
||||
|
||||
if (ts_type != MLXSW_PCI_CQE_TIME_STAMP_TYPE_UTC &&
|
||||
ts_type != MLXSW_PCI_CQE_TIME_STAMP_TYPE_MIRROR_UTC)
|
||||
return;
|
||||
|
||||
mlxsw_skb_cb(skb)->cqe_ts.sec = mlxsw_pci_cqe2_time_stamp_sec_get(cqe);
|
||||
|
@ -97,14 +97,6 @@ MLXSW_ITEM32(reg, sspr, m, 0x00, 31, 1);
|
||||
*/
|
||||
MLXSW_ITEM32_LP(reg, sspr, 0x00, 16, 0x00, 12);
|
||||
|
||||
/* reg_sspr_sub_port
|
||||
* Virtual port within the physical port.
|
||||
* Should be set to 0 when virtual ports are not enabled on the port.
|
||||
*
|
||||
* Access: RW
|
||||
*/
|
||||
MLXSW_ITEM32(reg, sspr, sub_port, 0x00, 8, 8);
|
||||
|
||||
/* reg_sspr_system_port
|
||||
* Unique identifier within the stacking domain that represents all the ports
|
||||
* that are available in the system (external ports).
|
||||
@ -120,7 +112,6 @@ static inline void mlxsw_reg_sspr_pack(char *payload, u16 local_port)
|
||||
MLXSW_REG_ZERO(sspr, payload);
|
||||
mlxsw_reg_sspr_m_set(payload, 1);
|
||||
mlxsw_reg_sspr_local_port_set(payload, local_port);
|
||||
mlxsw_reg_sspr_sub_port_set(payload, 0);
|
||||
mlxsw_reg_sspr_system_port_set(payload, local_port);
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ mlxsw_sp2_mr_tcam_rule_parse(struct mlxsw_sp_acl_rule *rule,
|
||||
key->vrid, GENMASK(7, 0));
|
||||
mlxsw_sp_acl_rulei_keymask_u32(rulei,
|
||||
MLXSW_AFK_ELEMENT_VIRT_ROUTER_MSB,
|
||||
key->vrid >> 8, GENMASK(2, 0));
|
||||
key->vrid >> 8, GENMASK(3, 0));
|
||||
switch (key->proto) {
|
||||
case MLXSW_SP_L3_PROTO_IPV4:
|
||||
return mlxsw_sp2_mr_tcam_rule_parse4(rulei, key);
|
||||
|
@ -171,7 +171,7 @@ static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_2[] = {
|
||||
|
||||
static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_4[] = {
|
||||
MLXSW_AFK_ELEMENT_INST_U32(VIRT_ROUTER_LSB, 0x04, 24, 8),
|
||||
MLXSW_AFK_ELEMENT_INST_U32(VIRT_ROUTER_MSB, 0x00, 0, 3),
|
||||
MLXSW_AFK_ELEMENT_INST_EXT_U32(VIRT_ROUTER_MSB, 0x00, 0, 3, 0, true),
|
||||
};
|
||||
|
||||
static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_0[] = {
|
||||
@ -321,7 +321,7 @@ static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_mac_5b[] = {
|
||||
|
||||
static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_4b[] = {
|
||||
MLXSW_AFK_ELEMENT_INST_U32(VIRT_ROUTER_LSB, 0x04, 13, 8),
|
||||
MLXSW_AFK_ELEMENT_INST_EXT_U32(VIRT_ROUTER_MSB, 0x04, 21, 4, 0, true),
|
||||
MLXSW_AFK_ELEMENT_INST_U32(VIRT_ROUTER_MSB, 0x04, 21, 4),
|
||||
};
|
||||
|
||||
static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_2b[] = {
|
||||
|
@ -98,12 +98,12 @@ sb_occ_etc_check()
|
||||
|
||||
port_pool_test()
|
||||
{
|
||||
local exp_max_occ=288
|
||||
local exp_max_occ=$(devlink_cell_size_get)
|
||||
local max_occ
|
||||
|
||||
devlink sb occupancy clearmax $DEVLINK_DEV
|
||||
|
||||
$MZ $h1 -c 1 -p 160 -a $h1mac -b $h2mac -A 192.0.1.1 -B 192.0.1.2 \
|
||||
$MZ $h1 -c 1 -p 10 -a $h1mac -b $h2mac -A 192.0.1.1 -B 192.0.1.2 \
|
||||
-t ip -q
|
||||
|
||||
devlink sb occupancy snapshot $DEVLINK_DEV
|
||||
@ -126,12 +126,12 @@ port_pool_test()
|
||||
|
||||
port_tc_ip_test()
|
||||
{
|
||||
local exp_max_occ=288
|
||||
local exp_max_occ=$(devlink_cell_size_get)
|
||||
local max_occ
|
||||
|
||||
devlink sb occupancy clearmax $DEVLINK_DEV
|
||||
|
||||
$MZ $h1 -c 1 -p 160 -a $h1mac -b $h2mac -A 192.0.1.1 -B 192.0.1.2 \
|
||||
$MZ $h1 -c 1 -p 10 -a $h1mac -b $h2mac -A 192.0.1.1 -B 192.0.1.2 \
|
||||
-t ip -q
|
||||
|
||||
devlink sb occupancy snapshot $DEVLINK_DEV
|
||||
@ -154,16 +154,12 @@ port_tc_ip_test()
|
||||
|
||||
port_tc_arp_test()
|
||||
{
|
||||
local exp_max_occ=96
|
||||
local exp_max_occ=$(devlink_cell_size_get)
|
||||
local max_occ
|
||||
|
||||
if [[ $MLXSW_CHIP != "mlxsw_spectrum" ]]; then
|
||||
exp_max_occ=144
|
||||
fi
|
||||
|
||||
devlink sb occupancy clearmax $DEVLINK_DEV
|
||||
|
||||
$MZ $h1 -c 1 -p 160 -a $h1mac -A 192.0.1.1 -t arp -q
|
||||
$MZ $h1 -c 1 -p 10 -a $h1mac -A 192.0.1.1 -t arp -q
|
||||
|
||||
devlink sb occupancy snapshot $DEVLINK_DEV
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user