DPDK patches and discussions
 help / color / mirror / Atom feed
From: Geetha Anandakrishnan <a.geetha@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] Qn on vlan filtering for promiscuous ports VMXNET3 driver
Date: Tue, 1 Oct 2019 11:43:37 -0700	[thread overview]
Message-ID: <CAJNW8upmrVDiYUFOMwK6RLtO2vK8h-HMczYg-uDeEZnM8s3JMQ@mail.gmail.com> (raw)

Hi All,

I am experimenting  DPDK with VMXNET3. I see that the vmxnet3 driver code
does not set vlan filtering if port is in promiscuous mode.
I modified the vmxnet3 code to skip the check for promiscuous port, code
below. But it does not seem like filtering works with this change, when
port is in prom. mode.

Does the firmware not look at the vlan table if port is in promiscuous
mode.

Any help is appreciated.

Thanks!!

/* Enable/disable filter on vlan */
static int
vmxnet3_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vid, int on)
{
        struct vmxnet3_hw *hw = dev->data->dev_private;
        struct Vmxnet3_RxFilterConf *rxConf =
&hw->shared->devRead.rxFilterConf;
        uint32_t *vf_table = rxConf->vfTable;

        /* save state for restore */
        if (on)
                VMXNET3_SET_VFTABLE_ENTRY(hw->shadow_vfta, vid);
        else
                VMXNET3_CLEAR_VFTABLE_ENTRY(hw->shadow_vfta, vid);

*#if 0*
*        /* don't change active filter if in promiscuous mode */*
*        if (rxConf->rxMode & VMXNET3_RXM_PROMISC)*
*                return 0;*
*#endif*

        /* set in hardware */
        if (on)
                VMXNET3_SET_VFTABLE_ENTRY(vf_table, vid);
        else
                VMXNET3_CLEAR_VFTABLE_ENTRY(vf_table, vid);

        VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
                               VMXNET3_CMD_UPDATE_VLAN_FILTERS);
        return 0;
}
-- 
A.Geetha

"Everything is Possible. The impossible only takes a little longer"

             reply	other threads:[~2019-10-01 18:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 18:43 Geetha Anandakrishnan [this message]
2019-10-01 23:30 ` Stephen Hemminger

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=CAJNW8upmrVDiYUFOMwK6RLtO2vK8h-HMczYg-uDeEZnM8s3JMQ@mail.gmail.com \
    --to=a.geetha@gmail.com \
    --cc=dev@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).