Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
buffers: remove unused code
[vpp.git]
/
src
/
vnet
/
devices
/
virtio
/
vhost_user_input.c
diff --git
a/src/vnet/devices/virtio/vhost_user_input.c
b/src/vnet/devices/virtio/vhost_user_input.c
index
720119d
..
812f9d3
100644
(file)
--- a/
src/vnet/devices/virtio/vhost_user_input.c
+++ b/
src/vnet/devices/virtio/vhost_user_input.c
@@
-215,7
+215,7
@@
vhost_user_rx_discard_packet (vlib_main_t * vm,
out:
txvq->last_avail_idx = last_avail_idx;
txvq->last_used_idx = last_used_idx;
out:
txvq->last_avail_idx = last_avail_idx;
txvq->last_used_idx = last_used_idx;
- CLIB_MEMORY_BARRIER ();
+ CLIB_MEMORY_
STORE_
BARRIER ();
txvq->used->idx = txvq->last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);
return discarded_packets;
txvq->used->idx = txvq->last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);
return discarded_packets;
@@
-224,7
+224,7
@@
out:
/*
* In case of overflow, we need to rewind the array of allocated buffers.
*/
/*
* In case of overflow, we need to rewind the array of allocated buffers.
*/
-static
__clib_unused
void
+static
_always_inline
void
vhost_user_input_rewind_buffers (vlib_main_t * vm,
vhost_cpu_t * cpu, vlib_buffer_t * b_head)
{
vhost_user_input_rewind_buffers (vlib_main_t * vm,
vhost_cpu_t * cpu, vlib_buffer_t * b_head)
{
@@
-243,7
+243,7
@@
vhost_user_input_rewind_buffers (vlib_main_t * vm,
cpu->rx_buffers_len++;
}
cpu->rx_buffers_len++;
}
-static
__clib_unused
u32
+static
_always_inline
u32
vhost_user_if_input (vlib_main_t * vm,
vhost_user_main_t * vum,
vhost_user_intf_t * vui,
vhost_user_if_input (vlib_main_t * vm,
vhost_user_main_t * vum,
vhost_user_intf_t * vui,
@@
-349,9
+349,8
@@
vhost_user_if_input (vlib_main_t * vm,
{
u32 curr_len = cpu->rx_buffers_len;
cpu->rx_buffers_len +=
{
u32 curr_len = cpu->rx_buffers_len;
cpu->rx_buffers_len +=
- vlib_buffer_alloc_from_free_list (vm, cpu->rx_buffers + curr_len,
- VHOST_USER_RX_BUFFERS_N - curr_len,
- VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
+ vlib_buffer_alloc (vm, cpu->rx_buffers + curr_len,
+ VHOST_USER_RX_BUFFERS_N - curr_len);
if (PREDICT_FALSE
(cpu->rx_buffers_len < VHOST_USER_RX_BUFFER_STARVATION))
if (PREDICT_FALSE
(cpu->rx_buffers_len < VHOST_USER_RX_BUFFER_STARVATION))
@@
-589,7
+588,7
@@
vhost_user_if_input (vlib_main_t * vm,
copy_len = 0;
/* give buffers back to driver */
copy_len = 0;
/* give buffers back to driver */
- CLIB_MEMORY_BARRIER ();
+ CLIB_MEMORY_
STORE_
BARRIER ();
txvq->used->idx = last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);
}
txvq->used->idx = last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);
}
@@
-609,7
+608,7
@@
stop:
}
/* give buffers back to driver */
}
/* give buffers back to driver */
- CLIB_MEMORY_BARRIER ();
+ CLIB_MEMORY_
STORE_
BARRIER ();
txvq->used->idx = txvq->last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);
txvq->used->idx = txvq->last_used_idx;
vhost_user_log_dirty_ring (vui, txvq, idx);