mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
mlxsw: spectrum_qdisc: Offload RED qevent mark
The RED "mark" qevent can be offloaded under similar conditions as the RED "early_drop" qevent. Therefore recognize its binding type in the TC_SETUP_BLOCK handler and translate to the right SPAN trigger, with the right set of supported actions. Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
099bf89d6a
commit
9c18eaf288
@ -1035,6 +1035,8 @@ static int mlxsw_sp_setup_tc_block(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
return mlxsw_sp_setup_tc_block_clsact(mlxsw_sp_port, f, false);
|
||||
case FLOW_BLOCK_BINDER_TYPE_RED_EARLY_DROP:
|
||||
return mlxsw_sp_setup_tc_block_qevent_early_drop(mlxsw_sp_port, f);
|
||||
case FLOW_BLOCK_BINDER_TYPE_RED_MARK:
|
||||
return mlxsw_sp_setup_tc_block_qevent_mark(mlxsw_sp_port, f);
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -1195,6 +1195,8 @@ int mlxsw_sp_setup_tc_fifo(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
struct tc_fifo_qopt_offload *p);
|
||||
int mlxsw_sp_setup_tc_block_qevent_early_drop(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
struct flow_block_offload *f);
|
||||
int mlxsw_sp_setup_tc_block_qevent_mark(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
struct flow_block_offload *f);
|
||||
|
||||
/* spectrum_fid.c */
|
||||
bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index);
|
||||
|
@ -2024,6 +2024,16 @@ int mlxsw_sp_setup_tc_block_qevent_early_drop(struct mlxsw_sp_port *mlxsw_sp_por
|
||||
action_mask);
|
||||
}
|
||||
|
||||
int mlxsw_sp_setup_tc_block_qevent_mark(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
struct flow_block_offload *f)
|
||||
{
|
||||
unsigned int action_mask = BIT(MLXSW_SP_MALL_ACTION_TYPE_MIRROR);
|
||||
|
||||
return mlxsw_sp_setup_tc_block_qevent(mlxsw_sp_port, f,
|
||||
MLXSW_SP_SPAN_TRIGGER_ECN,
|
||||
action_mask);
|
||||
}
|
||||
|
||||
int mlxsw_sp_tc_qdisc_init(struct mlxsw_sp_port *mlxsw_sp_port)
|
||||
{
|
||||
struct mlxsw_sp_qdisc_state *qdisc_state;
|
||||
|
Loading…
Reference in New Issue
Block a user