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

Re: [Xen-devel] [PATCH net-next] xen-netback: stop vif thread spinning if frontend is unresponsive



From: Paul Durrant <paul.durrant@xxxxxxxxxx>
Date: Tue, 7 Jan 2014 16:25:29 +0000

> @@ -477,6 +477,7 @@ static void xenvif_rx_action(struct xenvif *vif)
>       unsigned long offset;
>       struct skb_cb_overlay *sco;
>       int need_to_notify = 0;
> +     int ring_full = 0;

Please use bool, false, and true.

>  
> -     if (!npo.copy_prod)
> +     if (!npo.copy_prod) {
> +             if (ring_full)
> +                     vif->rx_queue_stopped = true;
>               goto done;
> +     }
> +
> +     vif->rx_queue_stopped = false;

And then you can code this as:

        vif->rx_queue_stopped = (!npo.copy_prod && ring_full);
        if (!npo.copy_prod)
                goto done;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.