sfc: validate MAE action order
authorEdward Cree <ecree.xilinx@gmail.com>
Mon, 14 Nov 2022 13:16:00 +0000 (13:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2022 09:07:03 +0000 (09:07 +0000)
commit83a187a4eb3a8d7b747e7cfd48228dbc4dbb5c92
tree7f4fe96dc8023b5aa2ad821c8c5161f51d746c54
parent2e0f1eb05692b489bb9fdd30617b52022a93b2e3
sfc: validate MAE action order

Currently the only actions supported are COUNT and DELIVER, which can only
 happen in the right order; but when more actions are added, it will be
 necessary to check that they are only used in the same order in which the
 hardware performs them (since the hardware API takes an action *set* in
 which the order is implicit).  For instance, a VLAN pop must not follow a
 VLAN push.  Most practical use-cases should be unaffected by these
 restrictions.
Add a function efx_tc_flower_action_order_ok() that checks whether it is
 appropriate to add a specified action to the existing action-set.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/tc.c