virtio-net: use netif_tx_napi_add for tx napi
authorWillem de Bruijn <willemb@google.com>
Fri, 28 Apr 2017 00:37:58 +0000 (20:37 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 May 2017 02:33:04 +0000 (22:33 -0400)
Avoid hashing the tx napi struct into napi_hash[], which is used for
busy polling receive queues.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c

index 82f1c3a73345a8958a8f3097768344c72f07456a..7877551fe4e03c89013ccd4f08362b481894a3dc 100644 (file)
@@ -2228,8 +2228,8 @@ static int virtnet_alloc_queues(struct virtnet_info *vi)
                vi->rq[i].pages = NULL;
                netif_napi_add(vi->dev, &vi->rq[i].napi, virtnet_poll,
                               napi_weight);
-               netif_napi_add(vi->dev, &vi->sq[i].napi, virtnet_poll_tx,
-                              napi_tx ? napi_weight : 0);
+               netif_tx_napi_add(vi->dev, &vi->sq[i].napi, virtnet_poll_tx,
+                                 napi_tx ? napi_weight : 0);
 
                sg_init_table(vi->rq[i].sg, ARRAY_SIZE(vi->rq[i].sg));
                ewma_pkt_len_init(&vi->rq[i].mrg_avg_pkt_len);