xen-netback: stop netif TX queue on guest queuing failure
On a failure to queue an TX skb to the guest's RX io_ring, we return
NETDEV_TX_BUSY without stopping the netif-queue. If the guest's io_ring
is full, this can lead to unbounded retry.
This fix stops the queue when hit this condition and restarts it once
the guest creates space in its RX io_ring. This also hardens against
malicious guests where the guest netfront can cause DoS on the host by
just not putting responses on the RX io_ring.
The guest can send an rx_interrupt even before the vif is fully
provisioned, so do this only after the vif moves to VIF_STATE_CONNECTED.
Fixes: fb9041f4f7f6 ("xen-netback: copy buffer on xenvif_start_xmit")
(cherry picked from commit
c655018645c32745041e5a3d03cbfbf6f0d820ee)
Orabug:
30028200
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>