xen-netback: Factor queue-specific data into queue struct
authorWei Liu <wei.liu2@citrix.com>
Wed, 4 Jun 2014 09:30:42 +0000 (10:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Jun 2014 21:48:16 +0000 (14:48 -0700)
commite9ce7cb6b107407e4798e8905b18ad8b642766f6
treedd99d31fa4f2bae0e836c99a811e5de4e1202567
parenta55d9766cecf2b1b9af4fcf93b2d41b71e599c76
xen-netback: Factor queue-specific data into queue struct

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@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/common.h
drivers/net/xen-netback/interface.c
drivers/net/xen-netback/netback.c
drivers/net/xen-netback/xenbus.c