net/bnxt: fix freeing filters on flow creation failure
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 9 Jul 2020 09:38:32 +0000 (15:08 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sat, 11 Jul 2020 04:18:54 +0000 (06:18 +0200)
commit87520e59fb84c3ba5dbeee10d57a534fa3a70ad2
tree3f35949d8cdaebdbae8b09153403e39e1a750f17
parent87aefef133e3d670be365efdaa620f36d97ee4bd
net/bnxt: fix freeing filters on flow creation failure

This patch does following things:
1. Added a wrapper function bnxt_clear_one_vnic_filter()
   for destroying the filters in hw. This will avoid duplicate
   code in many places.
2. When flow create fails due to an already existing mark id
   for the new flow id created, fixed to destroy the hw
   filter created.
3. Re-arranged code to move a log and list update to right place.

Fixes: 9db66782bd06 ("net/bnxt: fix supporting zero mark ID with RSS action")
Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_flow.c
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h