From: Kalesh AP Date: Fri, 28 Aug 2020 05:01:11 +0000 (+0530) Subject: net/bnxt: fix L2 filter allocation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c92f053d4e2d3a2f42d1ad97fc596e8b3b86346a;p=dpdk.git net/bnxt: fix L2 filter allocation DPDK does not support RoCE and XDP. The driver should set the bit 5:4 of the flag to 1 and set bit 6 of the flag in the HWRM_CFA_L2_FILTER_ALLOC command to disable RoCE and XDP features. This change will greatly reduce the CFA resource consumption. Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Venkat Duvvuru Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index f326f842b6..b26952646b 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -530,6 +530,9 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp, HWRM_PREP(&req, HWRM_CFA_L2_FILTER_ALLOC, BNXT_USE_CHIMP_MB); + /* PMD does not support XDP and RoCE */ + filter->flags |= HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_XDP_DISABLE | + HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_L2; req.flags = rte_cpu_to_le_32(filter->flags); enables = filter->enables |