]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mlxsw: spectrum: Add a new type of KVD linear record
authorIdo Schimmel <idosch@mellanox.com>
Thu, 11 Oct 2018 07:47:55 +0000 (07:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2018 17:08:22 +0000 (10:08 -0700)
When the device needs to flood an overlay packet to remote VTEPs it
retrieves a pointer to the head of a linked-list of records that store
the IP addresses of these VTEPs.

These records are stored in the KVD linear memory and configured via the
Tunneling NVE Underlay Multicast Table (TNUMT) register.

Add a new KVD linear entry type for these records, so that we will be
able to allocate and free them.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum2_kvdl.c

index 534a8be6a6dbe471abd69473f3bbc713cc410567..1f68ac2a20f43e3dc07ae85ff94c2e023f838341 100644 (file)
@@ -438,6 +438,7 @@ enum mlxsw_sp_kvdl_entry_type {
        MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET,
        MLXSW_SP_KVDL_ENTRY_TYPE_PBS,
        MLXSW_SP_KVDL_ENTRY_TYPE_MCRIGR,
+       MLXSW_SP_KVDL_ENTRY_TYPE_TNUMT,
 };
 
 static inline unsigned int
@@ -448,6 +449,7 @@ mlxsw_sp_kvdl_entry_size(enum mlxsw_sp_kvdl_entry_type type)
        case MLXSW_SP_KVDL_ENTRY_TYPE_ACTSET: /* fall through */
        case MLXSW_SP_KVDL_ENTRY_TYPE_PBS: /* fall through */
        case MLXSW_SP_KVDL_ENTRY_TYPE_MCRIGR: /* fall through */
+       case MLXSW_SP_KVDL_ENTRY_TYPE_TNUMT: /* fall through */
        default:
                return 1;
        }
index 68c8b148bef20e4b69ecb5d08566d01021150080..8d14770766b475a633b42ae395fbd19e45f28e42 100644 (file)
@@ -35,6 +35,7 @@ static const struct mlxsw_sp2_kvdl_part_info mlxsw_sp2_kvdl_parts_info[] = {
                                 MAX_KVD_ACTION_SETS),
        MLXSW_SP2_KVDL_PART_INFO(PBS, 0x24, KVD_SIZE, KVD_SIZE),
        MLXSW_SP2_KVDL_PART_INFO(MCRIGR, 0x26, KVD_SIZE, KVD_SIZE),
+       MLXSW_SP2_KVDL_PART_INFO(TNUMT, 0x29, KVD_SIZE, KVD_SIZE),
 };
 
 #define MLXSW_SP2_KVDL_PARTS_INFO_LEN ARRAY_SIZE(mlxsw_sp2_kvdl_parts_info)