|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V4 net-next 1/5] xen-netback: Factor queue-specific data into queue struct.
On 21/02/14 12:08, Paul Durrant wrote: -----Original Message----- From: Andrew J. Bennieston [mailto:andrew.bennieston@xxxxxxxxxx] Sent: 17 February 2014 17:58 To: xen-devel@xxxxxxxxxxxxxxxxxxxx Cc: Ian Campbell; Wei Liu; Paul Durrant; netdev@xxxxxxxxxxxxxxx; David Vrabel; Andrew Bennieston Subject: [PATCH V4 net-next 1/5] xen-netback: Factor queue-specific data into queue struct. From: "Andrew J. Bennieston" <andrew.bennieston@xxxxxxxxxx> In preparation for multi-queue support in xen-netback, move the queue-specific data from struct xenvif into struct xenvif_queue, and update the rest of the code to use this. Also adds loops over queues where appropriate, even though only one is configured at this point, and uses alloc_netdev_mq() and the corresponding multi-queue netif wake/start/stop functions in preparation for multiple active queues. Finally, implements a trivial queue selection function suitable for ndo_select_queue, which simply returns 0 for a single queue and uses skb_get_hash() to compute the queue index otherwise. Signed-off-by: Andrew J. Bennieston <andrew.bennieston@xxxxxxxxxx> --- drivers/net/xen-netback/common.h | 81 ++++-- drivers/net/xen-netback/interface.c | 314 ++++++++++++++------- drivers/net/xen-netback/netback.c | 528 ++++++++++++++++++------------ ----- drivers/net/xen-netback/xenbus.c | 87 ++++-- 4 files changed, 593 insertions(+), 417 deletions(-) diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen- netback/common.h index ae413a2..2550867 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h @@ -108,17 +108,36 @@ struct xenvif_rx_meta { */ #define MAX_GRANT_COPY_OPS (MAX_SKB_FRAGS * XEN_NETIF_RX_RING_SIZE) -struct xenvif { - /* Unique identifier for this interface. */ - domid_t domid; - unsigned int handle; +/* Queue name is interface name with "-qNNN" appended */ +#define QUEUE_NAME_SIZE (IFNAMSIZ + 6) +'-qNNN' is only 5 chars. Are you accounting for a NUL terminator too? Almost certainly... +/* IRQ name is queue name with "-tx" or "-rx" appended */ +#define IRQ_NAME_SIZE (QUEUE_NAME_SIZE + 4) +If yes, then you appear to have doubly accounted for it here. ... yup, looks that way. I'll fix this. The expectation was that it wouldn't be used very often, so an atomic op. here wouldn't hurt. I can move it to xenvif_stats if you'd prefer, though. I think the use of an atomic pre-dated the xenvif_stats struct, so maybe it makes sense to move it there now. Andrew. Paul _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |