diff options
author | Jason Wang <jasowang@redhat.com> | 2018-07-20 02:15:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-22 18:43:31 +0200 |
commit | d0d869718754da534719be32f2c28b1210c3955d (patch) | |
tree | 21a2ca5ca59444eedc091c0c8e46ade4ebabb725 /drivers/vhost | |
parent | vhost_net: rename vhost_rx_signal_used() to vhost_net_signal_used() (diff) | |
download | linux-d0d869718754da534719be32f2c28b1210c3955d.tar.xz linux-d0d869718754da534719be32f2c28b1210c3955d.zip |
vhost_net: rename VHOST_RX_BATCH to VHOST_NET_BATCH
A more generic name which could be used for TX as well.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/vhost')
-rw-r--r-- | drivers/vhost/net.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 53d305b368b1..2fd2f0e3d0f4 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -94,7 +94,7 @@ struct vhost_net_ubuf_ref { struct vhost_virtqueue *vq; }; -#define VHOST_RX_BATCH 64 +#define VHOST_NET_BATCH 64 struct vhost_net_buf { void **queue; int tail; @@ -168,7 +168,7 @@ static int vhost_net_buf_produce(struct vhost_net_virtqueue *nvq) rxq->head = 0; rxq->tail = ptr_ring_consume_batched(nvq->rx_ring, rxq->queue, - VHOST_RX_BATCH); + VHOST_NET_BATCH); return rxq->tail; } @@ -1007,7 +1007,7 @@ static void handle_rx(struct vhost_net *net) goto out; } nvq->done_idx += headcount; - if (nvq->done_idx > VHOST_RX_BATCH) + if (nvq->done_idx > VHOST_NET_BATCH) vhost_net_signal_used(nvq); if (unlikely(vq_log)) vhost_log_write(vq, vq_log, log, vhost_len); @@ -1075,7 +1075,7 @@ static int vhost_net_open(struct inode *inode, struct file *f) return -ENOMEM; } - queue = kmalloc_array(VHOST_RX_BATCH, sizeof(void *), + queue = kmalloc_array(VHOST_NET_BATCH, sizeof(void *), GFP_KERNEL); if (!queue) { kfree(vqs); |