[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100423194455.GA3843@x200.localdomain>
Date: Fri, 23 Apr 2010 12:44:55 -0700
From: Chris Wright <chrisw@...hat.com>
To: Anirban Chakraborty <anirban.chakraborty@...gic.com>
Cc: Chris Wright <chrisw@...hat.com>,
Scott Feldman <scofeldm@...co.com>,
David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Ameen Rahman <ameen.rahman@...gic.com>,
Amit Salecha <amit.salecha@...gic.com>,
Rajesh Borundia <rajesh.borundia@...gic.com>,
shemminger@...tta.com
Subject: Re: eSwitch management
* Anirban Chakraborty (anirban.chakraborty@...gic.com) wrote:
> On Apr 23, 2010, at 9:23 AM, Chris Wright wrote:
> > * Anirban Chakraborty (anirban.chakraborty@...gic.com) wrote:
> >> It looks like ifla_vf_info does contain most of the data set. But if I use it, what NETLINK protocol family should I use in my driver to receive netlink messages? Do I need to create a private protocol family?
> >
> > No, you don't need to use netlink in your driver. You just need to fill
> > in the relevant net_device_ops in your driver init. Specifically:
> >
> > * SR-IOV management functions.
> > * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
> > * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos);
> > * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate);
> > * int (*ndo_get_vf_config)(struct net_device *dev,
> > * int vf, struct ifla_vf_info *ivf);
> >
> > These are all operating on a VF indexed internally w/in the driver, so it's
> > a little cumbersome to use from userspace.
>
> These are all intended for VFs and are configureable from PF.
Yes, and while the set of callbacks can change, they are always tied to
some net_device (typically the PF) that knows how to make hardware
settings on behalf of a VF.
> However, in our case, there are multiple physical NIC function on a
> port which are configureable by the eswitch.
Is there a PCI function that represents the switch? Or a special PCI
NIC function that has VEB mgmt plane access? And do you have examples
of configuration that you'll do here?
> So, what we are setting
> is essentially switch ports, rather than configuring any setting on the
> physical functions. If netlink doesn't fly, is sysfs going to work?
Before we go to implementation specifics (i.e. netlink vs. sysfs, and my
guess is sysfs isn't going to be the right fit), let's step back and
look at what needs setting.
> If
> we allocate a buffer and fill it up with user space tools that the driver
> grabs it and does the configuration itself?
One idea that has been discussed in the past is to create essentially
a pluggable set of bridge_ops. The first step would be purely internal
shuffling, to make the existing sw bridge code go through the bridge_ops.
The second step would be making your driver for whichever PCI function
you have that supports managing the bridge create a net_device which is
a bridge during driver init. And now normal brctl can call into your
VEB via the bridge_ops callbacks. </handwave>
But this too starts w/ looking at what the management requirements are
for your bridge. Can you enumerate those?
thanks,
-chris
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists