Merge branch 'nf-hw-offload'
Pablo Neira Ayuso says: ==================== netfilter: add hardware offload infrastructure This patchset adds support for Netfilter hardware offloads. This patchset reuses the existing block infrastructure, the netdev_ops->ndo_setup_tc() interface, TC_SETUP_CLSFLOWER classifier and the flow rule API. Patch #1 adds flow_block_cb_setup_simple(), most drivers do the same thing to set up flow blocks, to reduce the number of changes, consolidate codebase. Use _simple() postfix as requested by Jakub Kicinski. This new function resides in net/core/flow_offload.c Patch #2 renames TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND. Patch #3 renames TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*. Patch #4 adds flow_block_cb_alloc() and flow_block_cb_free() helper functions, this is the first patch of the flow block API. Patch #5 adds the helper to deal with list operations in the flow block API. This includes flow_block_cb_lookup(), flow_block_cb_add() and flow_block_cb_remove(). Patch #6 adds flow_block_cb_priv(), flow_block_cb_incref() and flow_block_cb_decref() which completes the flow block API. Patch #7 updates the cls_api to use the flow block API from the new tcf_block_setup(). This infrastructure transports these objects via list (through the tc_block_offload object) back to the core for registration. CLS_API DRIVER TC_SETUP_BLOCK ----------> setup flow_block_cb object & it adds object to flow_block_offload->cb_list | CLS_API <-----------------------' registers list with flow blocks flow_block_cb & travels back to calls ->reoffload the core for registration drivers allocate and sets up (configure the blocks), then registration happens from the core (cls_api and netfilter). Patch #8 updates drivers to use the flow block API. Patch #9 removes the tcf block callback API, which is replaced by the flow block API. Patch #10 adds the flow_block_cb_is_busy() helper to check if the block is already used by a subsystem. This helper is invoked from drivers. Once drivers are updated to support for multiple subsystems, they can remove this check. Patch #11 rename tc structure and definitions for the block bind/unbind path. Patch #12 introduces basic netfilter hardware offload infrastructure for the ingress chain. This includes 5-tuple exact matching and accept / drop rule actions. Only basechains are supported at this stage, no .reoffload callback is implemented either. Default policy to "accept" is only supported for now. table netdev filter { chain ingress { type filter hook ingress device eth0 priority 0; flags offload; ip daddr 192.168.0.10 tcp dport 22 drop } } This patchset reuses the existing tcf block callback API and it places it in the flow block callback API in net/core/flow_offload.c. This series aims to address Jakub and Jiri's feedback, please see specific patches in this batch for changelog in this v4. ==================== Signed-off-by:David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/broadcom/bnxt/bnxt.c 7 additions, 20 deletionsdrivers/net/ethernet/broadcom/bnxt/bnxt.c
- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c 9 additions, 9 deletionsdrivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h 2 additions, 2 deletionsdrivers/net/ethernet/broadcom/bnxt/bnxt_tc.h
- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c 7 additions, 22 deletionsdrivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c
- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 11 additions, 24 deletionsdrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c 11 additions, 11 deletionsdrivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h 3 additions, 3 deletionsdrivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h
- drivers/net/ethernet/intel/i40e/i40e_main.c 18 additions, 31 deletionsdrivers/net/ethernet/intel/i40e/i40e_main.c
- drivers/net/ethernet/intel/iavf/iavf_main.c 18 additions, 40 deletionsdrivers/net/ethernet/intel/iavf/iavf_main.c
- drivers/net/ethernet/intel/igb/igb_main.c 15 additions, 28 deletionsdrivers/net/ethernet/intel/igb/igb_main.c
- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 8 additions, 22 deletionsdrivers/net/ethernet/intel/ixgbe/ixgbe_main.c
- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c 3 additions, 3 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h 4 additions, 4 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h
- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c 9 additions, 9 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c
- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c 2 additions, 2 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c
- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c 5 additions, 5 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c
- drivers/net/ethernet/mellanox/mlx5/core/en_main.c 12 additions, 26 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_main.c
- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c 50 additions, 44 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_rep.c
- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 17 additions, 17 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_tc.c
- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h 3 additions, 3 deletionsdrivers/net/ethernet/mellanox/mlx5/core/en_tc.h
Loading
Please register or sign in to comment