DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Qn on vlan filtering for promiscuous ports VMXNET3 driver
@ 2019-10-01 18:43 Geetha Anandakrishnan
  2019-10-01 23:30 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Geetha Anandakrishnan @ 2019-10-01 18:43 UTC (permalink / raw)
  To: dev

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"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] Qn on vlan filtering for promiscuous ports VMXNET3 driver
  2019-10-01 18:43 [dpdk-dev] Qn on vlan filtering for promiscuous ports VMXNET3 driver Geetha Anandakrishnan
@ 2019-10-01 23:30 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2019-10-01 23:30 UTC (permalink / raw)
  To: Geetha Anandakrishnan; +Cc: dev

On Tue, 1 Oct 2019 11:43:37 -0700
Geetha Anandakrishnan <a.geetha@gmail.com> wrote:

> 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!!

The idea behind promiscious mode is to get all packets.
It doesn't make sense to do vlan filtering in HW then.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-01 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 18:43 [dpdk-dev] Qn on vlan filtering for promiscuous ports VMXNET3 driver Geetha Anandakrishnan
2019-10-01 23:30 ` Stephen Hemminger

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).