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 3/4] xen-netfront: Factor queue-specific data into queue struct.
Date: Thu, 16 Jan 2014 10:08:43 +0000 [thread overview]
Message-ID: <52D7AFAB.50404@citrix.com> (raw)
In-Reply-To: <20140116002500.GI5331@zion.uk.xensource.com>
On 16/01/14 00:25, Wei Liu wrote:
> On Wed, Jan 15, 2014 at 04:23:23PM +0000, Andrew J. Bennieston wrote:
> [...]
>> +
>> +struct netfront_queue {
>> + unsigned int number; /* Queue number, 0-based */
>> + char name[IFNAMSIZ+4]; /* DEVNAME-qN */
>> + struct netfront_info *info;
>>
>> struct napi_struct napi;
>>
>> @@ -93,10 +96,8 @@ struct netfront_info {
>> unsigned int tx_evtchn, rx_evtchn;
>> unsigned int tx_irq, rx_irq;
>> /* Only used when split event channels support is enabled */
>> - char tx_irq_name[IFNAMSIZ+4]; /* DEVNAME-tx */
>> - char rx_irq_name[IFNAMSIZ+4]; /* DEVNAME-rx */
>> -
>> - struct xenbus_device *xbdev;
>> + char tx_irq_name[IFNAMSIZ+7]; /* DEVNAME-qN-tx */
>> + char rx_irq_name[IFNAMSIZ+7]; /* DEVNAME-qN-rx */
>
> Basically you're anticipating the maximum number of queues is below 10
> here. I think leaving one more byte here won't hurt, just in case you
> will have more than 10 queues. The same goes to netback as well.
>
> In your next patch you have max_queue as 16 by default, which has
> already broken your assumption here already. :-)
>
Yes, this should be fixed. I wouldn't expect more than 100 queues, so
adding another byte here should be sufficient. In any case, I don't
think the names are used for anything other than human readable output,
so there won't be any functional impact to truncating them.
>>
>> spinlock_t tx_lock;
>> struct xen_netif_tx_front_ring tx;
>> @@ -139,6 +140,17 @@ struct netfront_info {
>> unsigned long rx_pfn_array[NET_RX_RING_SIZE];
>> struct multicall_entry rx_mcl[NET_RX_RING_SIZE+1];
>> struct mmu_update rx_mmu[NET_RX_RING_SIZE];
>> +};
>> +
> [...]
>> static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
>> {
>> unsigned short id;
>> @@ -555,6 +575,15 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
>> unsigned int offset = offset_in_page(data);
>> unsigned int len = skb_headlen(skb);
>> unsigned long flags;
>> + struct netfront_queue *queue = NULL;
>> + u16 queue_index;
>> +
>> + /* Drop the packet if no queues are set up */
>> + if (np->num_queues < 1 || np->queues == NULL)
>
> Same as the comment in netback, you won't need both.
Agreed. I will switch to if (np->num_queues < 1) for the same reason I
gave in the netback mail.
Andrew.
>
> And the rest of the patch is basically replacing np with queue and
> putting things in loops. So I stopped here...
>
> Wei.
>
next prev parent reply other threads:[~2014-01-16 10:08 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 [this message]
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
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=52D7AFAB.50404@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.