summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChas Williams <ciwillia@brocade.com>2017-07-24 10:22:42 -0400
committerYuanhan Liu <yliu@fridaylinux.org>2017-08-29 14:55:38 +0800
commitec241f29549496c6e6ae8c641aba472044fb0fa2 (patch)
treea83324ab58317b8fb9cf3f44e65f60474dc3c8f7
parent10dd6220817348302903c29b3614a14a539d74c9 (diff)
downloaddpdk-stable-ec241f29549496c6e6ae8c641aba472044fb0fa2.zip
dpdk-stable-ec241f29549496c6e6ae8c641aba472044fb0fa2.tar.gz
dpdk-stable-ec241f29549496c6e6ae8c641aba472044fb0fa2.tar.xz
net/vmxnet3: fix filtering on promiscuous disabling
[ upstream commit c1f7b53c83f37dcaf373b58e281ef16dc804bc14 ] We should only restore shadow_vfta when hw_vlan_filter is active. Otherwise, we should restore the previous filtering behavior. Fixes: f003fc383487 ("vmxnet3: enable vlan filtering") Signed-off-by: Chas Williams <ciwillia@brocade.com> Acked-by: Shrikrishna Khare <skhare@vmware.com>
-rw-r--r--drivers/net/vmxnet3/vmxnet3_ethdev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 2b8092d..723a336 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -995,7 +995,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);