Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'act_police-continue-offload-fix'

Vlad Buslov says:

====================
net: Fix police 'continue' action offload

TC act_police with 'continue' action had been supported by mlx5 matchall
classifier offload implementation for some time. However, 'continue' was
assumed implicitly and recently got broken in multiple places. Fix it in
both TC hardware offload validation code and mlx5 driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+8 -8
+6 -7
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
··· 4529 4529 return -EOPNOTSUPP; 4530 4530 } 4531 4531 4532 - if (act->police.notexceed.act_id != FLOW_ACTION_PIPE && 4533 - act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) { 4534 - NL_SET_ERR_MSG_MOD(extack, 4535 - "Offload not supported when conform action is not pipe or ok"); 4536 - return -EOPNOTSUPP; 4537 - } 4538 - 4539 4532 if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT && 4540 4533 !flow_action_is_last_entry(action, act)) { 4541 4534 NL_SET_ERR_MSG_MOD(extack, ··· 4579 4586 flow_action_for_each(i, act, flow_action) { 4580 4587 switch (act->id) { 4581 4588 case FLOW_ACTION_POLICE: 4589 + if (act->police.notexceed.act_id != FLOW_ACTION_CONTINUE) { 4590 + NL_SET_ERR_MSG_MOD(extack, 4591 + "Offload not supported when conform action is not continue"); 4592 + return -EOPNOTSUPP; 4593 + } 4594 + 4582 4595 err = mlx5e_policer_validate(flow_action, act, extack); 4583 4596 if (err) 4584 4597 return err;
+1
include/net/flow_offload.h
··· 152 152 FLOW_ACTION_PIPE, 153 153 FLOW_ACTION_VLAN_PUSH_ETH, 154 154 FLOW_ACTION_VLAN_POP_ETH, 155 + FLOW_ACTION_CONTINUE, 155 156 NUM_FLOW_ACTIONS, 156 157 }; 157 158
+1 -1
net/sched/act_police.c
··· 442 442 act_id = FLOW_ACTION_JUMP; 443 443 *extval = tc_act & TC_ACT_EXT_VAL_MASK; 444 444 } else if (tc_act == TC_ACT_UNSPEC) { 445 - NL_SET_ERR_MSG_MOD(extack, "Offload not supported when conform/exceed action is \"continue\""); 445 + act_id = FLOW_ACTION_CONTINUE; 446 446 } else { 447 447 NL_SET_ERR_MSG_MOD(extack, "Unsupported conform/exceed action offload"); 448 448 }