All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.r.fastabend@intel.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
	or.gerlitz@gmail.com, davem@davemloft.net, roland@kernel.org,
	netdev@vger.kernel.org, ali@mellanox.com, sean.hefty@intel.com,
	shlomop@mellanox.com, "Ronciak, John" <john.ronciak@intel.com>
Subject: Re: [RFC PATCH] net: Add support for virtual machine device queues (VMDQ)
Date: Fri, 20 Jul 2012 13:58:20 -0700	[thread overview]
Message-ID: <5009C66C.80701@intel.com> (raw)
In-Reply-To: <1342807280.2678.33.camel@bwh-desktop.uk.solarflarecom.com>

On 7/20/2012 11:01 AM, Ben Hutchings wrote:
> On Fri, 2012-07-20 at 09:30 -0700, John Fastabend wrote:
>> On 7/18/2012 11:42 PM, Jiri Pirko wrote:
>>> Thu, Jul 19, 2012 at 12:05:44AM CEST, john.r.fastabend@intel.com wrote:
>>>> This adds support to allow virtual net devices to be created. These
>>>> devices can be managed independtly of the physical function but
>>>> use the same physical link.
>>
>> [...]
>>
>>>> +
>>>> +size_t vmdq_getpriv_size(struct net *src_net, struct nlattr *tb[])
>>>> +{
>>>> +	struct net_device *lowerdev;
>>>> +
>>>> +	if (!tb[IFLA_LINK])
>>>> +		return -EINVAL;
>>>> +
>>>> +	lowerdev = __dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK]));
>>>> +	if (!lowerdev)
>>>> +		return -ENODEV;
>>>> +
>>>> +	return sizeof(netdev_priv(lowerdev));
>>>> +}
>>>
>>> Why exactly do you need to have the priv of same size as lowerdev? I do
>>> not see you use that anywhere...
>>>
>>
>> When we add a child device the hardware/sw may have some private data
>> it needs to manage this device.
>>
>> I made an assumption here that the priv space for child devices is the
>> same as the lowerdev but this might be a bad assumption.
>
> The code assumes that it is the size of a single pointer...
>
> Ben.
>

Right I'll fix it. Worked for me because my local unfinished
driver implementation only stored a single pointer. Thanks Ben.

  reply	other threads:[~2012-07-20 20:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 22:05 [RFC PATCH] net: Add support for virtual machine device queues (VMDQ) John Fastabend
2012-07-19  6:42 ` Jiri Pirko
2012-07-20 16:30   ` John Fastabend
2012-07-20 18:01     ` Ben Hutchings
2012-07-20 20:58       ` John Fastabend [this message]
2012-07-20 18:09 ` Ben Hutchings
2012-08-26 13:11 ` Or Gerlitz
2012-08-26 19:09   ` John Fastabend
2012-08-27  9:47     ` Or Gerlitz
2012-08-27 17:21       ` John Fastabend
2012-08-27 21:39         ` Or Gerlitz

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=5009C66C.80701@intel.com \
    --to=john.r.fastabend@intel.com \
    --cc=ali@mellanox.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=jiri@resnulli.us \
    --cc=john.ronciak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=or.gerlitz@gmail.com \
    --cc=roland@kernel.org \
    --cc=sean.hefty@intel.com \
    --cc=shlomop@mellanox.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.