mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-29 14:55:12 +00:00
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>
This commit is contained in:
parent
09c3248938
commit
d0d8697187
@ -94,7 +94,7 @@ struct vhost_net_ubuf_ref {
|
|||||||
struct vhost_virtqueue *vq;
|
struct vhost_virtqueue *vq;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VHOST_RX_BATCH 64
|
#define VHOST_NET_BATCH 64
|
||||||
struct vhost_net_buf {
|
struct vhost_net_buf {
|
||||||
void **queue;
|
void **queue;
|
||||||
int tail;
|
int tail;
|
||||||
@ -168,7 +168,7 @@ static int vhost_net_buf_produce(struct vhost_net_virtqueue *nvq)
|
|||||||
|
|
||||||
rxq->head = 0;
|
rxq->head = 0;
|
||||||
rxq->tail = ptr_ring_consume_batched(nvq->rx_ring, rxq->queue,
|
rxq->tail = ptr_ring_consume_batched(nvq->rx_ring, rxq->queue,
|
||||||
VHOST_RX_BATCH);
|
VHOST_NET_BATCH);
|
||||||
return rxq->tail;
|
return rxq->tail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1007,7 +1007,7 @@ static void handle_rx(struct vhost_net *net)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
nvq->done_idx += headcount;
|
nvq->done_idx += headcount;
|
||||||
if (nvq->done_idx > VHOST_RX_BATCH)
|
if (nvq->done_idx > VHOST_NET_BATCH)
|
||||||
vhost_net_signal_used(nvq);
|
vhost_net_signal_used(nvq);
|
||||||
if (unlikely(vq_log))
|
if (unlikely(vq_log))
|
||||||
vhost_log_write(vq, vq_log, log, vhost_len);
|
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;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
queue = kmalloc_array(VHOST_RX_BATCH, sizeof(void *),
|
queue = kmalloc_array(VHOST_NET_BATCH, sizeof(void *),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!queue) {
|
if (!queue) {
|
||||||
kfree(vqs);
|
kfree(vqs);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user