All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Scott Feldman <scofeldm@cisco.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, chrisw@redhat.com,
	arnd@arndb.de
Subject: Re: [net-next-2.6 V6 PATCH 1/2] Add netlink support for virtual port management (was iovnl)
Date: Fri, 14 May 2010 12:47:59 +0200	[thread overview]
Message-ID: <4BED2A5F.3050008@trash.net> (raw)
In-Reply-To: <C811BD6D.312C4%scofeldm@cisco.com>

Scott Feldman wrote:
> On 5/13/10 1:40 PM, "Patrick McHardy" <kaber@trash.net> wrote:
> 
>>> +  if (vf_port[IFLA_VF_PORT_VF])
>>> +   vf = nla_get_u32(vf_port[IFLA_VF_PORT_VF]);
>>> +  err = -EOPNOTSUPP;
>>> +  if (ops->ndo_set_vf_port)
>>> +   err = ops->ndo_set_vf_port(dev, vf, vf_port);
>> This appears to be addressing a single VF to issue commands.
>> I already explained this during the last set of VF patches,
>> messages are supposed to by symetrical, since you're dumping
>> state for all existing VFs, you also need to accept configuration
>> for multiple VFs. Basically, the kernel must be able to receive
>> a message it created during a dump and fully recreate the state.
> 
> This was modeled same as existing IFLA_VF_ cmd where single VF is addressed
> on set, but all VFs for PF are dumped on get.

Yes, that one should have been done differently as well,
unfortunately my comments were ignored. So far rtnetlink
had two properties that are now broken:

- messages sent by the kernel could be sent back to the
  kernel to re-create an object in the same state

- the same parsing functions could be used in userspace for
  messages sent by the kernel and netlink error messages,
  which contain the original userspace message

I know at least one program I've written a few years ago which
relies on the second property. Anyways, this is easily fixable
by encapsulating all top-level VF attributes in a list and
invoking the ndo_set_vf_port() callback for each VF configuration.

  reply	other threads:[~2010-05-14 10:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13 20:17 [net-next-2.6 V6 PATCH 0/2] Add virtual port netlink support Scott Feldman
2010-05-13 20:17 ` [net-next-2.6 V6 PATCH 1/2] Add netlink support for virtual port management (was iovnl) Scott Feldman
2010-05-13 20:28   ` Chris Wright
2010-05-13 20:40   ` Patrick McHardy
2010-05-13 20:46     ` Chris Wright
2010-05-13 20:49       ` Patrick McHardy
2010-05-13 21:08         ` Chris Wright
2010-05-13 21:11           ` Patrick McHardy
2010-05-13 21:18             ` Chris Wright
2010-05-13 21:23               ` Patrick McHardy
2010-05-14  7:17             ` Arnd Bergmann
2010-05-13 21:30     ` Scott Feldman
2010-05-14 10:47       ` Patrick McHardy [this message]
2010-05-13 20:17 ` [net-next-2.6 V6 PATCH 2/2] Add ndo_{set|get}_vf_port support for enic dynamic vnics Scott Feldman

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=4BED2A5F.3050008@trash.net \
    --to=kaber@trash.net \
    --cc=arnd@arndb.de \
    --cc=chrisw@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=scofeldm@cisco.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 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.