[dpdk-dev] [PATCH] netvsc: support multicast/promiscuous settings on VF

Stephen Hemminger stephen at networkplumber.org
Tue Sep 25 10:49:17 CEST 2018


On Mon, 24 Sep 2018 16:49:24 +0100
Ferruh Yigit <ferruh.yigit at intel.com> wrote:

> On 9/21/2018 5:54 PM, Stephen Hemminger wrote:
> > Provide API's to enable allmulticast and promiscuous in Netvsc PMD
> > with VF. This keeps the VF and PV path in sync.  
> 
> VF and PF?
> 
> > 
> > Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>
> > ---
> > Patch against dpdk-net-next
> > 
> >  drivers/net/netvsc/hn_ethdev.c | 14 +++++++++++++
> >  drivers/net/netvsc/hn_var.h    |  9 +++++++++
> >  drivers/net/netvsc/hn_vf.c     | 37 ++++++++++++++++++++++++++++++++++
> >  3 files changed, 60 insertions(+)
> > 
> > diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
> > index b67cce1ba8f5..3092066ada36 100644
> > --- a/drivers/net/netvsc/hn_ethdev.c
> > +++ b/drivers/net/netvsc/hn_ethdev.c
> > @@ -255,6 +255,7 @@ hn_dev_promiscuous_enable(struct rte_eth_dev *dev)
> >  	struct hn_data *hv = dev->data->dev_private;
> >  
> >  	hn_rndis_set_rxfilter(hv, NDIS_PACKET_TYPE_PROMISCUOUS);
> > +	hn_vf_promiscuous_enable(dev);  
> 
> This VF approach is confusing to me, is this calling a underlay device a VF device?

Yes. This driver supports the Hyper-V/Azure accelerated networking model where the
synthetic para-virtual device has a associated SR-IOV VF device. It is a less general
version of what failsafe supports. The choice of hn_vf_XXX naming is to identify those
functions which do operations on the underlying device.

> 
> > +static int
> > +hn_dev_mc_addr_list(struct rte_eth_dev *dev,
> > +		     struct ether_addr *mc_addr_set,
> > +		     uint32_t nb_mc_addr)  
> 
> Just to double check, this dev_ops to add MAC multicast filters, to add MAC
> filters it is mac_addr_set, mac_addr_add, mac_addr_remove. Many HW seems can set
> the multicast MAC filters via "mac_addr_add" too.
> 
> If this is the intention please enable "Multicast MAC filter" in netvsc.ini

Maybe, the para-virtual device doesn't do MC filtering, only the VF device does.
The RNDIS API to host does not support filtering, only the VF path does.

I am unsure. Perhaps best not to advertise MC address filtering. It doesn't matter
for Azure (it does not support real Multicast); only for local Hyper-V.


More information about the dev mailing list