Skip to content

Commit 2d408c0

Browse files
vittyvkdavem330
authored andcommitted
xen-netfront: fix queue name setting
Commit f599c64 ("xen-netfront: Fix race between device setup and open") changed the initialization order: xennet_create_queues() now happens before we do register_netdev() so using netdev->name in xennet_init_queue() is incorrect, we end up with the following in /proc/interrupts: 60: 139 0 xen-dyn -event eth%d-q0-tx 61: 265 0 xen-dyn -event eth%d-q0-rx 62: 234 0 xen-dyn -event eth%d-q1-tx 63: 1 0 xen-dyn -event eth%d-q1-rx and this looks ugly. Actually, using early netdev name (even when it's already set) is also not ideal: nowadays we tend to rename eth devices and queue name may end up not corresponding to the netdev name. Use nodename from xenbus device for queue naming: this can't change in VM's lifetime. Now /proc/interrupts looks like 62: 202 0 xen-dyn -event device/vif/0-q0-tx 63: 317 0 xen-dyn -event device/vif/0-q0-rx 64: 262 0 xen-dyn -event device/vif/0-q1-tx 65: 17 0 xen-dyn -event device/vif/0-q1-rx Fixes: f599c64 ("xen-netfront: Fix race between device setup and open") Signed-off-by: Vitaly Kuznetsov <[email protected]> Reviewed-by: Ross Lagerwall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent be5a8ff commit 2d408c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/xen-netfront.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ static int xennet_init_queue(struct netfront_queue *queue)
16051605
timer_setup(&queue->rx_refill_timer, rx_refill_timeout, 0);
16061606

16071607
snprintf(queue->name, sizeof(queue->name), "%s-q%u",
1608-
queue->info->netdev->name, queue->id);
1608+
queue->info->xbdev->nodename, queue->id);
16091609

16101610
/* Initialise tx_skbs as a free chain containing every entry. */
16111611
queue->tx_skb_freelist = 0;

0 commit comments

Comments
 (0)