From: Andrew Bennieston <andrew.bennieston@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: xen-devel@lists.xenproject.org, paul.durrant@citrix.com,
ian.campbell@citrix.com
Subject: Re: [PATCH RFC 4/4] xen-netfront: Add support for multiple queues
Date: Thu, 16 Jan 2014 10:24:57 +0000 [thread overview]
Message-ID: <52D7B379.201@citrix.com> (raw)
In-Reply-To: <20140116002706.GJ5331@zion.uk.xensource.com>
On 16/01/14 00:27, Wei Liu wrote:
> On Wed, Jan 15, 2014 at 04:23:24PM +0000, Andrew J. Bennieston wrote:
> [...]
>> +/* Module parameters */
>> +unsigned int xennet_max_queues = 16;
>> +module_param(xennet_max_queues, uint, 0644);
>> +
>
> This looks quite arbitrary as well.
Arbitrary, but less arbitrary than the netback parameter. I wanted to
pick a value that was large enough to accommodate most sensible
backend-provided limits, but not so large that it wasted resources. It
is necessary only because I have to call alloc_etherdev_mq() long before
I can read the maximum number of queues from XenStore. This value gets
used there, so I wanted it to be at least as big as anything sensible
that a backend might provide.
>> static const struct ethtool_ops xennet_ethtool_ops;
>>
> [...]
>> +static int write_queue_xenstore_keys(struct netfront_queue *queue,
>> + struct xenbus_transaction *xbt, int write_hierarchical)
>> +{
>> + /* Write the queue-specific keys into XenStore in the traditional
>> + * way for a single queue, or in a queue subkeys for multiple
>> + * queues.
>> + */
>> + struct xenbus_device *dev = queue->info->xbdev;
>> + int err;
>> + const char *message;
>> + char *path;
>> + size_t pathsize;
>> +
>> + /* Choose the correct place to write the keys */
>> + if (write_hierarchical) {
>> + pathsize = strlen(dev->nodename) + 10;
>> + path = kzalloc(pathsize, GFP_KERNEL);
>> + if (!path) {
>> + err = -ENOMEM;
>> + message = "writing ring references";
>
> This error message doesn't sound right.
>
I'll reword it.
>> + goto error;
>> + }
>> + snprintf(path, pathsize, "%s/queue-%u",
>> + dev->nodename, queue->number);
>> + }
>> + else
>> + path = (char *)dev->nodename;
>
> Coding style. Should be surounded by {};
>
OK.
>> +
> [...]
>> @@ -1740,10 +1838,17 @@ static int talk_to_netback(struct xenbus_device *dev,
>> int err;
>> unsigned int feature_split_evtchn;
>> unsigned int i = 0;
>> + unsigned int max_queues = 0;
>> struct netfront_queue *queue = NULL;
>>
>> info->netdev->irq = 0;
>>
>> + /* Check if backend supports multiple queues */
>> + err = xenbus_scanf(XBT_NIL, info->xbdev->otherend,
>> + "multi-queue-max-queues", "%u", &max_queues);
>> + if (err < 0)
>> + max_queues = 1;
>> +
>
> Need to check if backend provide too big a number for frontend.
Yes, I'll add that check.
Andrew.
>
> Wei.
>
next prev parent reply other threads:[~2014-01-16 10:25 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 16:23 [PATCH RFC 0/4]: xen-net{back, front}: Multiple transmit and receive queues Andrew J. Bennieston
2014-01-15 16:23 ` [PATCH RFC 1/4] xen-netback: Factor queue-specific data into queue struct Andrew J. Bennieston
2014-01-16 0:17 ` Wei Liu
2014-01-16 9:54 ` Andrew Bennieston
2014-01-16 11:33 ` Wei Liu
2014-01-16 11:55 ` Andrew Bennieston
2014-01-16 10:23 ` Paul Durrant
2014-01-16 10:38 ` Andrew Bennieston
2014-01-16 11:03 ` Paul Durrant
2014-01-16 11:06 ` Andrew Bennieston
2014-01-15 16:23 ` [PATCH RFC 2/4] xen-netback: Add support for multiple queues Andrew J. Bennieston
2014-01-16 0:18 ` Wei Liu
2014-01-16 10:04 ` Andrew Bennieston
2014-01-16 10:28 ` Paul Durrant
2014-01-16 10:40 ` Andrew Bennieston
2014-01-15 16:23 ` [PATCH RFC 3/4] xen-netfront: Factor queue-specific data into queue struct Andrew J. Bennieston
2014-01-16 0:25 ` Wei Liu
2014-01-16 10:08 ` Andrew Bennieston
2014-01-15 16:23 ` [PATCH RFC 4/4] xen-netfront: Add support for multiple queues Andrew J. Bennieston
2014-01-16 0:27 ` Wei Liu
2014-01-16 10:24 ` Andrew Bennieston [this message]
2014-01-16 10:39 ` David Vrabel
2014-01-16 10:41 ` Andrew Bennieston
2014-01-16 11:04 ` David Vrabel
2014-01-16 11:44 ` Wei Liu
2014-01-24 18:05 ` Konrad Rzeszutek Wilk
2014-01-27 10:26 ` Andrew Bennieston
2014-01-16 0:13 ` [PATCH RFC 0/4]: xen-net{back, front}: Multiple transmit and receive queues Wei Liu
2014-01-16 9:36 ` Andrew Bennieston
2014-01-16 10:04 ` Paul Durrant
2014-01-16 10:27 ` Andrew Bennieston
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=52D7B379.201@citrix.com \
--to=andrew.bennieston@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=paul.durrant@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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.