New upstream version 16.11.3
[deb_dpdk.git] / drivers / net / vmxnet3 / vmxnet3_ethdev.c
index 8bb13e5..aedac6c 100644 (file)
@@ -771,7 +771,7 @@ vmxnet3_dev_link_update(struct rte_eth_dev *dev,
                        __rte_unused int wait_to_complete)
 {
        struct vmxnet3_hw *hw = dev->data->dev_private;
-       struct rte_eth_link old, link;
+       struct rte_eth_link old = { 0 }, link;
        uint32_t ret;
 
        /* Link status doesn't change for stopped dev */
@@ -831,7 +831,10 @@ vmxnet3_dev_promiscuous_disable(struct rte_eth_dev *dev)
        struct vmxnet3_hw *hw = dev->data->dev_private;
        uint32_t *vf_table = hw->shared->devRead.rxFilterConf.vfTable;
 
-       memcpy(vf_table, hw->shadow_vfta, VMXNET3_VFT_TABLE_SIZE);
+       if (dev->data->dev_conf.rxmode.hw_vlan_filter)
+               memcpy(vf_table, hw->shadow_vfta, VMXNET3_VFT_TABLE_SIZE);
+       else
+               memset(vf_table, 0xff, VMXNET3_VFT_TABLE_SIZE);
        vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_PROMISC, 0);
        VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
                               VMXNET3_CMD_UPDATE_VLAN_FILTERS);