Re: [PATCH 3.16 047/328] xen-netfront: fix queue name setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Hutchings <ben@xxxxxxxxxxxxxxx> writes:

> 3.16.62-rc1 review patch.  If anyone has any objections, please let me know.
>
> ------------------
>
> From: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
>
> commit 2d408c0d4574b01b9ed45e02516888bf925e11a9 upstream.
>
> Commit f599c64fdf7d ("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: f599c64fdf7d ("xen-netfront: Fix race between device setup and open")
> Signed-off-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
> Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
> Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
> ---
>  drivers/net/xen-netfront.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -1646,7 +1646,7 @@ static int xennet_init_queue(struct netf
>  	queue->rx_refill_timer.function = rx_refill_timeout;
>  
>  	snprintf(queue->name, sizeof(queue->name), "%s-q%u",
> -		 queue->info->netdev->name, queue->id);
> +		 queue->info->xbdev->nodename, queue->id);
>  
>  	/* Initialise tx_skbs as a free chain containing every entry. */
>  	queue->tx_skb_freelist = 0;
>

We should also take 

commit 21f2706b20100bb3db378461ab9b8e2035309b5b
Author: Xiao Liang <xiliang@xxxxxxxxxx>
Date:   Tue Aug 14 23:21:28 2018 +0800

    xen-netfront: fix warn message as irq device name has '/'

as it fixes an issue introduced by the commit in question. Sorry if this
is already in your series but I wasn't CCed on it.

-- 
Vitaly



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux