Skip to content

Commit d0d8697

Browse files
jasowangdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 09c3248 commit d0d8697

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/vhost/net.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct vhost_net_ubuf_ref {
9494
struct vhost_virtqueue *vq;
9595
};
9696

97-
#define VHOST_RX_BATCH 64
97+
#define VHOST_NET_BATCH 64
9898
struct vhost_net_buf {
9999
void **queue;
100100
int tail;
@@ -168,7 +168,7 @@ static int vhost_net_buf_produce(struct vhost_net_virtqueue *nvq)
168168

169169
rxq->head = 0;
170170
rxq->tail = ptr_ring_consume_batched(nvq->rx_ring, rxq->queue,
171-
VHOST_RX_BATCH);
171+
VHOST_NET_BATCH);
172172
return rxq->tail;
173173
}
174174

@@ -1007,7 +1007,7 @@ static void handle_rx(struct vhost_net *net)
10071007
goto out;
10081008
}
10091009
nvq->done_idx += headcount;
1010-
if (nvq->done_idx > VHOST_RX_BATCH)
1010+
if (nvq->done_idx > VHOST_NET_BATCH)
10111011
vhost_net_signal_used(nvq);
10121012
if (unlikely(vq_log))
10131013
vhost_log_write(vq, vq_log, log, vhost_len);
@@ -1075,7 +1075,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
10751075
return -ENOMEM;
10761076
}
10771077

1078-
queue = kmalloc_array(VHOST_RX_BATCH, sizeof(void *),
1078+
queue = kmalloc_array(VHOST_NET_BATCH, sizeof(void *),
10791079
GFP_KERNEL);
10801080
if (!queue) {
10811081
kfree(vqs);

0 commit comments

Comments
 (0)