diff options
author | Volodymyr Mytnyk <vmytnyk@marvell.com> | 2022-02-14 11:20:06 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-14 17:11:43 +0300 |
commit | fa5d824ce5dd8306c66f45c34fd78536e6ce2488 (patch) | |
tree | 7b223b2842a3a45296658cd0c3aa3b3cfca99ee3 /drivers/net/ethernet/marvell/prestera/prestera_flow.c | |
parent | e81f1e0de816bf16756ffa269fb7bce8383c13c2 (diff) | |
download | linux-fa5d824ce5dd8306c66f45c34fd78536e6ce2488.tar.xz |
net: prestera: acl: add multi-chain support offload
Add support of rule offloading added to the non-zero index chain,
which was previously forbidden. Also, goto action is offloaded
allowing to jump for processing of desired chain.
Note that only implicit chain 0 is bound to the device port(s) for
processing. The rest of chains have to be jumped by actions.
Signed-off-by: Volodymyr Mytnyk <vmytnyk@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/prestera/prestera_flow.c')
-rw-r--r-- | drivers/net/ethernet/marvell/prestera/prestera_flow.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_flow.c b/drivers/net/ethernet/marvell/prestera/prestera_flow.c index d849f046ece7..05c3ad98eba9 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_flow.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_flow.c @@ -29,9 +29,6 @@ static int prestera_flow_block_mall_cb(struct prestera_flow_block *block, static int prestera_flow_block_flower_cb(struct prestera_flow_block *block, struct flow_cls_offload *f) { - if (f->common.chain_index != 0) - return -EOPNOTSUPP; - switch (f->command) { case FLOW_CLS_REPLACE: return prestera_flower_replace(block, f); @@ -71,6 +68,7 @@ static void prestera_flow_block_destroy(void *cb_priv) prestera_flower_template_cleanup(block); + WARN_ON(!list_empty(&block->template_list)); WARN_ON(!list_empty(&block->binding_list)); kfree(block); @@ -86,6 +84,7 @@ prestera_flow_block_create(struct prestera_switch *sw, struct net *net) return NULL; INIT_LIST_HEAD(&block->binding_list); + INIT_LIST_HEAD(&block->template_list); block->net = net; block->sw = sw; |