mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
mlxsw: Add fields for mlxsw's meta header for adjacency table
This patch adds field for mlxsw's meta header which will be used to describe the match/action behavior of the adjacency table. The fields are: 1. Adj_index - The global index of the nexthop group in the adjacency table. 2. Adj_hash_index - Local index offset which is based on packets hash mod the nexthop group size. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
be2336ebfd
commit
c0859d697c
1 changed files with 12 additions and 0 deletions
|
@ -43,6 +43,8 @@ enum mlxsw_sp_field_metadata_id {
|
|||
MLXSW_SP_DPIPE_FIELD_METADATA_ERIF_PORT,
|
||||
MLXSW_SP_DPIPE_FIELD_METADATA_L3_FORWARD,
|
||||
MLXSW_SP_DPIPE_FIELD_METADATA_L3_DROP,
|
||||
MLXSW_SP_DPIPE_FIELD_METADATA_ADJ_INDEX,
|
||||
MLXSW_SP_DPIPE_FIELD_METADATA_ADJ_HASH_INDEX,
|
||||
};
|
||||
|
||||
static struct devlink_dpipe_field mlxsw_sp_dpipe_fields_metadata[] = {
|
||||
|
@ -62,6 +64,16 @@ static struct devlink_dpipe_field mlxsw_sp_dpipe_fields_metadata[] = {
|
|||
.id = MLXSW_SP_DPIPE_FIELD_METADATA_L3_DROP,
|
||||
.bitwidth = 1,
|
||||
},
|
||||
{
|
||||
.name = "adj_index",
|
||||
.id = MLXSW_SP_DPIPE_FIELD_METADATA_ADJ_INDEX,
|
||||
.bitwidth = 32,
|
||||
},
|
||||
{
|
||||
.name = "adj_hash_index",
|
||||
.id = MLXSW_SP_DPIPE_FIELD_METADATA_ADJ_HASH_INDEX,
|
||||
.bitwidth = 32,
|
||||
},
|
||||
};
|
||||
|
||||
enum mlxsw_sp_dpipe_header_id {
|
||||
|
|
Loading…
Reference in a new issue