From: Scott Feldman <scofeldm@cisco.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Rose, Gregory V" <gregory.v.rose@intel.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"chrisw@redhat.com" <chrisw@redhat.com>,
"Williams, Mitch A" <mitch.a.williams@intel.com>
Subject: Re: [net-next-2.6 PATCH 1/2] Add ndo_set_vf_port_profile
Date: Tue, 27 Apr 2010 13:57:16 -0700 [thread overview]
Message-ID: <C7FC9DBC.2C218%scofeldm@cisco.com> (raw)
In-Reply-To: <201004271435.25480.arnd@arndb.de>
On 4/27/10 5:35 AM, "Arnd Bergmann" <arnd@arndb.de> wrote:
> On Tuesday 27 April 2010, Scott Feldman wrote:
>>> Yes, I believe that's there today:
>>>
>>> NLA_PUT_U32(skb, IFLA_NUM_VF, dev_num_vf(dev->dev.parent));
>>>
>>> The number of VFs is returned in RTM_GETLINK. But, it's only returned if:
>>>
>>> if (dev->netdev_ops->ndo_get_vf_config && dev->dev.parent)
>>>
>>> For my proposal, I'll need to return IFLA_NUM_VF unconditionally so callers
>>> can get num VFs.
>>
>> Hmmm...seems IFLA_NUM_VF assumes a PCI device supporting SR-IOV when it uses
>> dev_num_vf(). I think a better option would have been to query the device
>> for the number of VFs, without assuming SR-IOV or even PCI.
>>
>> I see a ndo_get_num_vf() coming...
>
> Shouldn't the number of registered port profiles be totally independent of
> the number of virtual functions?
>
> Any of the VFs could multiplex multiple guests using macvlan, which means you
> need to register each guest separately, not each VF.
>
> Anything that ties port profiles to VFs seems fundamentally flawed AFAICT,
> at least when we want to extend this to adapters that don't do it in firmware.
Ya, I tend I agree. Let's just make port-profile a setting of any netdev,
an eth, macvtap, eth.x, bond, etc. That's probably what I should have done
in the first place. Something like:
ip link set DEVICE [ { up | down } ]
[ arp { on | off } ]
<...clip...>
[ alias NAME ]
[ vf NUM [ mac LLADDR ]
[ vlan VLANID [ qos VLAN-QOS ] ]
[ rate TXRATE ] ]
[ port_profile [ PORT-PROFILE
[ mac LLADDR ]
[ host_uuid HOST_UUID ]
[ client_uuid CLIENT_UUID ]
[ client_name CLIENT_NAME ] ] ] ]
ip link show [ DEVICE ]
I think I was trying to be too accommodating for models with VFs, but it
doesn't matter like you point out.
This way, I can get the RTM_GETLINK to return the port-profile in use.
New patches coming soon...
-scott
next prev parent reply other threads:[~2010-04-27 20:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-24 0:35 [net-next-2.6 PATCH 1/2] Add ndo_set_vf_port_profile (was iovnl) Scott Feldman
2010-04-24 0:35 ` [net-next-2.6 PATCH 2/2] add enic ndo_vf_set_port_profile op support for dynamic vnics Scott Feldman
2010-04-24 2:21 ` Chris Wright
2010-04-24 14:30 ` Scott Feldman
2010-04-24 2:22 ` [net-next-2.6 PATCH 1/2] Add ndo_set_vf_port_profile (was iovnl) Chris Wright
2010-04-24 14:37 ` Scott Feldman
2010-04-24 7:19 ` [net-next-2.6 PATCH 1/2] Add ndo_set_vf_port_profile David Miller
2010-04-26 19:27 ` Scott Feldman
2010-04-26 19:57 ` Scott Feldman
2010-04-26 20:25 ` David Miller
2010-04-26 22:38 ` Rose, Gregory V
2010-04-26 23:21 ` Scott Feldman
2010-04-27 0:03 ` Scott Feldman
2010-04-27 0:15 ` Chris Wright
2010-04-27 12:35 ` Arnd Bergmann
2010-04-27 17:33 ` Anirban Chakraborty
2010-04-27 19:38 ` Arnd Bergmann
2010-04-27 20:57 ` Scott Feldman [this message]
2010-04-26 20:24 ` David Miller
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=C7FC9DBC.2C218%scofeldm@cisco.com \
--to=scofeldm@cisco.com \
--cc=arnd@arndb.de \
--cc=chrisw@redhat.com \
--cc=davem@davemloft.net \
--cc=gregory.v.rose@intel.com \
--cc=mitch.a.williams@intel.com \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.