]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
flow_offload: reject offload for all drivers with invalid police parameters
authorJianbo Liu <jianbol@nvidia.com>
Thu, 24 Feb 2022 10:29:08 +0000 (10:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Feb 2022 11:12:20 +0000 (11:12 +0000)
commitd97b4b105ce71f9f907f1511986cc1d224126772
tree6e766f71cb5507c5bb725442a6f858daa5730a0f
parentb8cd5831c61cadee4493248babef8386f836f31c
flow_offload: reject offload for all drivers with invalid police parameters

As more police parameters are passed to flow_offload, driver can check
them to make sure hardware handles packets in the way indicated by tc.
The conform-exceed control should be drop/pipe or drop/ok. Besides,
for drop/ok, the police should be the last action. As hardware can't
configure peakrate/avrate/overhead, offload should not be supported if
any of them is configured.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 files changed:
drivers/net/dsa/sja1105/sja1105_flower.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.c
drivers/net/ethernet/freescale/enetc/enetc_qos.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
drivers/net/ethernet/mscc/ocelot_flower.c
drivers/net/ethernet/mscc/ocelot_net.c
drivers/net/ethernet/mscc/ocelot_police.c
drivers/net/ethernet/mscc/ocelot_police.h
drivers/net/ethernet/netronome/nfp/flower/qos_conf.c
include/net/flow_offload.h