sfc: check recirc_id match caps before MAE offload
authorEdward Cree <ecree.xilinx@gmail.com>
Thu, 3 Nov 2022 15:27:27 +0000 (15:27 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 5 Nov 2022 02:54:23 +0000 (19:54 -0700)
commitf0b59ad11e29fa45beab7a14370f530f90aa764c
treee43dde7fd499ca2c5652a7c17ac3d912d9c98a60
parent8e0aa1ff44ca30b0b9df95dfa72003522d9a088d
sfc: check recirc_id match caps before MAE offload

Offloaded TC rules always match on recirc_id in the MAE, so we should
 check that the MAE reported support for this match before attempting
 to insert the rule.
These checks allow us to fail early, avoiding the PCIe round-trip to
 firmware for an MC_CMD_MAE_ACTION_RULE_INSERT that will only fail,
 and more importantly providing a more informative error message that
 identifies which match field is unsupported.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/sfc/mae.c