From: Ajit Khaparde Date: Tue, 25 Jul 2017 03:32:23 +0000 (-0500) Subject: net/bnxt: fix setting VLAN anti spoof with same value X-Git-Tag: spdx-start~2306 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=980543f754be9d87b93392c8e814ba35b26482e5;p=dpdk.git net/bnxt: fix setting VLAN anti spoof with same value If the current VLAN anti spoof setting is same as the new value, the firmware can return an error. Call the HWRM command to update the new setting if it is different from the current value. Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof") Signed-off-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index c1876f8816..dd7e5b85c6 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -321,6 +321,9 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on) if (vf >= dev_info.max_vfs) return -EINVAL; + if (on == bp->pf.vf_info[vf].vlan_spoof_en) + return 0; + rc = bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(bp, vf, on); if (!rc) { bp->pf.vf_info[vf].vlan_spoof_en = on;