From: Shrikrishna Khare <skhare@shri-linux.eng.vmware.com>
To: "Charles (Chas) Williams" <ciwillia@brocade.com>
Cc: <dev@dpdk.org>, <skhare@vmware.com>, <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/vmxnet3: restore correct filtering
Date: Tue, 1 Aug 2017 16:41:22 -0700 [thread overview]
Message-ID: <alpine.DEB.2.10.1708011634040.5989@shri-linux.eng.vmware.com> (raw)
In-Reply-To: <1500906162-18009-1-git-send-email-ciwillia@brocade.com>
On Mon, 24 Jul 2017, Charles (Chas) Williams wrote:
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chas Williams <ciwillia@brocade.com>
> ---
> drivers/net/vmxnet3/vmxnet3_ethdev.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> index ab5a824..3910991 100644
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> @@ -1219,7 +1219,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);
>From the device emulation standpoint, vf_table array set to all 1s means
that rx filtering is enabled but all vlan ID are allowed, while vf_table
array set to all 0s means that no vlan ID filtering is done.
So, it is better to go with all 0s rather than all 1s, it is also more
efficient for the emulation.
This is an existing problem in vmxnet3_dev_vlan_offload_set as well.
> vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_PROMISC, 0);
> VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
> VMXNET3_CMD_UPDATE_VLAN_FILTERS);
> --
> 2.1.4
>
>
next prev parent reply other threads:[~2017-08-01 23:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 14:22 Charles (Chas) Williams
2017-07-30 21:38 ` Thomas Monjalon
2017-08-01 14:02 ` Shrikrishna Khare
2017-08-01 23:41 ` Shrikrishna Khare [this message]
2017-08-01 23:47 ` Charles (Chas) Williams
2017-08-02 1:23 ` Shrikrishna Khare
2017-08-02 1:36 ` Shrikrishna Khare
2017-08-03 20:14 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1708011634040.5989@shri-linux.eng.vmware.com \
--to=skhare@shri-linux.eng.vmware.com \
--cc=ciwillia@brocade.com \
--cc=dev@dpdk.org \
--cc=skhare@vmware.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).