kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.r.fastabend@intel.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Roopa Prabhu <roprabhu@cisco.com>,
	netdev@vger.kernel.org, davem@davemloft.net, chrisw@redhat.com,
	sri@us.ibm.com, dragos.tatulea@gmail.com, kvm@vger.kernel.org,
	arnd@arndb.de, gregory.v.rose@intel.com, mchan@broadcom.com,
	dwang2@cisco.com, shemminger@vyatta.com, eric.dumazet@gmail.com,
	kaber@trash.net, benve@cisco.com
Subject: Re: [net-next-2.6 PATCH 0/6 v4] macvlan: MAC Address filtering support for passthru mode
Date: Thu, 02 Feb 2012 13:18:33 -0800	[thread overview]
Message-ID: <4F2AFDA9.6070807@intel.com> (raw)
In-Reply-To: <1328215109.2541.69.camel@bwh-desktop>

On 2/2/2012 12:38 PM, Ben Hutchings wrote:
> On Thu, 2012-02-02 at 00:46 -0800, John Fastabend wrote:
> [...]
>> OK finally got to read through this. And its not clear to me why we need
>> these per VF/PF filter netdevice ops and netlink extensions if we can
>> get the stacking correct. (Adding filters to the macvlan seems reasonable
>> to me)
>>
>> In the cases I saw listed above I see a few enumerations:
>>
>> PF <--> MACVLAN  <---> Guest <--- [...]
>>
>> VF <--> MACVLAN  <---> Guest <--- [...]       
>>
>>                     VF|Guest <--- [...]       direct assigned VF
>>
>>                     PF|Guest <--- [...]       direct assigned PF
>>
>>
>> I used '[...]' to represent whatever additional stacking is done in the
>> guest unknown to the host. In the direct assign VF case (Greg Rose
>> correct me if I am wrong) the normal uc and mc addr lists should suffice
>> along with the netdev op ndo_set_rx_mode(). Here the guest adds MAC
>> addresses and/or VLANS as normal and then the VF<->PF back channel
>> should handle this if needed. This should work for Linux guests and other
>> OS's should do something similar.
>>
>> In the direct assign PF case the hardware is owned by the guest so
>> no problems here.
>>
>> This leaves the two MACVLAN cases which can be handled the same. If
>> the MACVLAN driver and netlink interface is extended to add filters
>> to the MACVLAN then the addresses can be pushed to the lower device
>> using the normal dev_uc_{add|del}() and dev_mc_{add|del}() routines.
> [...]
> 
> There is another case: hybrid acceleration.  Without a bridge in the
> NIC, you need a software bridge for multicast/broadcast replication,
> traffic between guests, and traffic between guest and host.  A guest
> driver can then send and receive to remote addresses through a VF while
> retaining fallback to the software bridge.
> 
> In order to do this, the guest driver needs to know which addresses are
> local.  The net driver for the PF can tell it about the addresses
> assigned to each function, but if there are other devices included in
> the bridge then it will not know about them.

Off the top of my head another approach would be to add a flag to the
PF maybe NETIF_F_FDB_OFFLOADED and have the bridge push the fdb updates
down to the PF which could propagate them into the VFs. Then you don't
need any new netdevice ops or netlink extensions.

This also would allow any 'learned' addresses to be pushed into the
VF and your daemon wouldn't have to monitor the bridges FDB and send
updates down.

> 
> In Solarflare's current out-of-tree implementation this is dealt with in
> an extension to libvirt that writes the additional 'local' MAC addresses
> to a driver-specific sysfs file, but that is obviously not likely to be
> acceptable in-tree!  So I was interested in this proposal to extend MAC
> filtering, but wanted to get the semantics clear.

Agreed. Intel devices needs something similar to handle the bridge cases
where the MAC addresses of the virtual devices are not getting programmed
into the hardware forwarding table.

So we need something its just finding the right semantics and mechanism.

> 
> Ben.
> 


      reply	other threads:[~2012-02-02 21:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  7:55 [net-next-2.6 PATCH 0/6 v4] macvlan: MAC Address filtering support for passthru mode Roopa Prabhu
2011-11-09  7:55 ` [net-next-2.6 PATCH 1/6 v4] rtnetlink: Netlink interface for setting MAC and VLAN filters Roopa Prabhu
2011-11-18  0:17   ` Ben Hutchings
2011-11-09  7:55 ` [net-next-2.6 PATCH 2/6 v4] net: Add netdev_ops to set and get MAC/VLAN rx filters Roopa Prabhu
2011-11-09  7:55 ` [net-next-2.6 PATCH 3/6 v4] rtnetlink: Add support to set MAC/VLAN filters Roopa Prabhu
2011-11-09  7:55 ` [net-next-2.6 PATCH 4/6 v4] rtnetlink: Add support to get " Roopa Prabhu
2011-11-09  7:56 ` [net-next-2.6 PATCH 5/6 v4] macvlan: Add support to for netdev ops to set " Roopa Prabhu
2011-11-09  7:56 ` [net-next-2.6 PATCH 6/6 v4] macvlan: Add support to get MAC/VLAN filter netdev ops Roopa Prabhu
2011-11-18  0:15 ` [net-next-2.6 PATCH 0/6 v4] macvlan: MAC Address filtering support for passthru mode Ben Hutchings
2011-11-18  0:32   ` Greg Rose
2011-11-18  0:44     ` Ben Hutchings
2011-11-18 16:58       ` Greg Rose
2011-11-18 17:40         ` Ben Hutchings
2011-11-21 17:41           ` Greg Rose
2011-11-29 16:35             ` Ben Hutchings
2011-11-29 17:19               ` Ben Hutchings
2011-11-30 17:34                 ` Greg Rose
2011-11-30 18:48                   ` Ben Hutchings
2011-11-30 21:04                     ` Chris Wright
2011-11-30 21:34                       ` Ben Hutchings
2011-11-30 23:00                         ` Chris Wright
2011-11-30 23:19                           ` Rose, Gregory V
2011-11-30 23:30                           ` Sridhar Samudrala
2011-11-30 23:39                             ` Chris Wright
2011-11-20 16:30   ` Roopa Prabhu
2012-02-02  7:24     ` Michael S. Tsirkin
2012-02-02  8:46       ` John Fastabend
2012-02-02  8:50         ` Michael S. Tsirkin
2012-02-02  9:04           ` John Fastabend
2012-02-02 18:07         ` Roopa Prabhu
2012-02-02 18:58           ` John Fastabend
2012-02-03 15:32             ` Roopa Prabhu
2012-02-05 16:54               ` Roopa Prabhu
2012-02-09  2:03                 ` John Fastabend
2012-02-02 20:38         ` Ben Hutchings
2012-02-02 21:18           ` John Fastabend [this message]

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=4F2AFDA9.6070807@intel.com \
    --to=john.r.fastabend@intel.com \
    --cc=arnd@arndb.de \
    --cc=benve@cisco.com \
    --cc=bhutchings@solarflare.com \
    --cc=chrisw@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dragos.tatulea@gmail.com \
    --cc=dwang2@cisco.com \
    --cc=eric.dumazet@gmail.com \
    --cc=gregory.v.rose@intel.com \
    --cc=kaber@trash.net \
    --cc=kvm@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=roprabhu@cisco.com \
    --cc=shemminger@vyatta.com \
    --cc=sri@us.ibm.com \
    /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).