summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2021-11-05 16:13:57 +0000
committerMohsin Kazmi <sykazmi@cisco.com>2021-11-05 16:13:57 +0000
commit6259406668cee37d39ef3eb0b17ee5dc94ff02fe (patch)
tree29e6243186323ea6ffd69ace996e3700f7c04981
parentd4ba0d1883d24cc03f5435fe71368d49e01761cb (diff)
virtio: fix the initialization
Type: fix Fixes: d96b28ac0917 ("virtio: improve input node performance") vlib_buffer_t is defined on stack to be used for input feature arc lookup once per frame call for performance reasons. The definition is missing the initialization to avoid the assignment of garbage value. Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: Ie7930186bbd8240c44d257808ebd31e06e854b29
-rw-r--r--src/vnet/devices/virtio/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c
index c36c0807de0..ab5702184c2 100644
--- a/src/vnet/devices/virtio/node.c
+++ b/src/vnet/devices/virtio/node.c
@@ -237,7 +237,7 @@ virtio_device_input_gso_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
u16 mask = vring->size - 1;
u16 last = vring->last_used_idx;
u16 n_left = virtio_n_left_to_process (vring, packed);
- vlib_buffer_t bt;
+ vlib_buffer_t bt = {};
if (n_left == 0)
return 0;