i40e/base: avoid unwanted Tx traffic mirroring
[dpdk.git] / drivers / net / i40e / base / i40e_common.c
index 2383153..a4cf5cf 100644 (file)
@@ -2225,12 +2225,19 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
        i40e_fill_default_direct_cmd_desc(&desc,
                                        i40e_aqc_opc_set_vsi_promiscuous_modes);
 
-       if (set)
+       if (set) {
                flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST;
+               if (((hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver >= 5)) ||
+                    (hw->aq.api_maj_ver > 1))
+                       flags |= I40E_AQC_SET_VSI_PROMISC_TX;
+       }
 
        cmd->promiscuous_flags = CPU_TO_LE16(flags);
 
        cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST);
+       if (((hw->aq.api_maj_ver >= 1) && (hw->aq.api_min_ver >= 5)) ||
+            (hw->aq.api_maj_ver > 1))
+               cmd->valid_flags |= CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_TX);
 
        cmd->seid = CPU_TO_LE16(seid);
        status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);