]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mlxsw: Rename virtual router flex key element
authorAmit Cohen <amcohen@nvidia.com>
Thu, 6 Jan 2022 16:06:45 +0000 (18:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Jan 2022 04:00:44 +0000 (20:00 -0800)
In Spectrum-4, the size of the virtual router ACL key element increased
from 11 bits to 12 bits.

In order to reuse the existing virtual router ACL key element
enumerators for Spectrum-4, rename 'VIRT_ROUTER_8_10' and
'VIRT_ROUTER_0_7' to 'VIRT_ROUTER_MSB' and 'VIRT_ROUTER_LSB',
respectively.

No functional changes intended.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h
drivers/net/ethernet/mellanox/mlxsw/spectrum2_mr_tcam.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.c

index f1b09c2f9eda480aa77f3a44ea82756dc090f912..bd1a51a0a54085c6e6db59203fbb3318208caabd 100644 (file)
@@ -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_8_10, 0x18, 17, 3),
-       MLXSW_AFK_ELEMENT_INFO_U32(VIRT_ROUTER_0_7, 0x18, 20, 8),
+       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_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),
index a47a17c04c623d1a6c20582026d33cdea44a80e3..3a037fe47211ddf44214be0bf146ff87a03f7342 100644 (file)
@@ -33,8 +33,8 @@ enum mlxsw_afk_element {
        MLXSW_AFK_ELEMENT_IP_TTL_,
        MLXSW_AFK_ELEMENT_IP_ECN,
        MLXSW_AFK_ELEMENT_IP_DSCP,
-       MLXSW_AFK_ELEMENT_VIRT_ROUTER_8_10,
-       MLXSW_AFK_ELEMENT_VIRT_ROUTER_0_7,
+       MLXSW_AFK_ELEMENT_VIRT_ROUTER_MSB,
+       MLXSW_AFK_ELEMENT_VIRT_ROUTER_LSB,
        MLXSW_AFK_ELEMENT_MAX,
 };
 
index a11d911302f1373c2489f46031d4931b2a9eb6ed..e4f4cded2b6f9f0aa3a91f2805479e01406f9153 100644 (file)
@@ -45,8 +45,8 @@ static int mlxsw_sp2_mr_tcam_bind_group(struct mlxsw_sp *mlxsw_sp,
 }
 
 static const enum mlxsw_afk_element mlxsw_sp2_mr_tcam_usage_ipv4[] = {
-               MLXSW_AFK_ELEMENT_VIRT_ROUTER_8_10,
-               MLXSW_AFK_ELEMENT_VIRT_ROUTER_0_7,
+               MLXSW_AFK_ELEMENT_VIRT_ROUTER_MSB,
+               MLXSW_AFK_ELEMENT_VIRT_ROUTER_LSB,
                MLXSW_AFK_ELEMENT_SRC_IP_0_31,
                MLXSW_AFK_ELEMENT_DST_IP_0_31,
 };
@@ -89,8 +89,8 @@ static void mlxsw_sp2_mr_tcam_ipv4_fini(struct mlxsw_sp2_mr_tcam *mr_tcam)
 }
 
 static const enum mlxsw_afk_element mlxsw_sp2_mr_tcam_usage_ipv6[] = {
-               MLXSW_AFK_ELEMENT_VIRT_ROUTER_8_10,
-               MLXSW_AFK_ELEMENT_VIRT_ROUTER_0_7,
+               MLXSW_AFK_ELEMENT_VIRT_ROUTER_MSB,
+               MLXSW_AFK_ELEMENT_VIRT_ROUTER_LSB,
                MLXSW_AFK_ELEMENT_SRC_IP_96_127,
                MLXSW_AFK_ELEMENT_SRC_IP_64_95,
                MLXSW_AFK_ELEMENT_SRC_IP_32_63,
@@ -189,10 +189,10 @@ mlxsw_sp2_mr_tcam_rule_parse(struct mlxsw_sp_acl_rule *rule,
 
        rulei = mlxsw_sp_acl_rule_rulei(rule);
        rulei->priority = priority;
-       mlxsw_sp_acl_rulei_keymask_u32(rulei, MLXSW_AFK_ELEMENT_VIRT_ROUTER_0_7,
+       mlxsw_sp_acl_rulei_keymask_u32(rulei, MLXSW_AFK_ELEMENT_VIRT_ROUTER_LSB,
                                       key->vrid, GENMASK(7, 0));
        mlxsw_sp_acl_rulei_keymask_u32(rulei,
-                                      MLXSW_AFK_ELEMENT_VIRT_ROUTER_8_10,
+                                      MLXSW_AFK_ELEMENT_VIRT_ROUTER_MSB,
                                       key->vrid >> 8, GENMASK(2, 0));
        switch (key->proto) {
        case MLXSW_SP_L3_PROTO_IPV4:
index 279c241f76f0254dd6d7aa91bf0b17a4515e2af0..fa66316234c4480e205e543e88ec728fc9c4c7d8 100644 (file)
@@ -168,8 +168,8 @@ 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_0_7, 0x04, 24, 8),
-       MLXSW_AFK_ELEMENT_INST_U32(VIRT_ROUTER_8_10, 0x00, 0, 3),
+       MLXSW_AFK_ELEMENT_INST_U32(VIRT_ROUTER_LSB, 0x04, 24, 8),
+       MLXSW_AFK_ELEMENT_INST_U32(VIRT_ROUTER_MSB, 0x00, 0, 3),
 };
 
 static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_0[] = {