From 1017a1d360cc1c38e2aee4b5f19ff1f2869a8cd9 Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Fri, 25 Sep 2020 15:36:19 +0200 Subject: virtio: fix the gro enable/disable on tx-vrings Type: fix Change-Id: I96c30baaf34fe7b0cd899966a507501e58cde934 Signed-off-by: Mohsin Kazmi --- src/vnet/gso/gro.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/vnet/gso') diff --git a/src/vnet/gso/gro.h b/src/vnet/gso/gro.h index bfa592041e5..b2d6c285888 100644 --- a/src/vnet/gso/gro.h +++ b/src/vnet/gso/gro.h @@ -164,16 +164,7 @@ static_always_inline void gro_flow_table_set_is_enable (gro_flow_table_t * flow_table, u8 is_enable) { if (flow_table) - { - if (is_enable) - { - flow_table->is_enable = 1; - } - else - { - flow_table->is_enable = 0; - } - } + flow_table->is_enable = is_enable; } static_always_inline void @@ -264,12 +255,24 @@ static_always_inline u8 * gro_flow_table_format (u8 * s, va_list * args) { gro_flow_table_t *flow_table = va_arg (*args, gro_flow_table_t *); + u32 indent; + + if (!flow_table) + return s; + + indent = format_get_indent (s); + if (flow_table->is_enable) + s = format (s, "packet-coalesce: enable\n"); + else + s = format (s, "packet-coalesce: disable\n"); + + indent += 2; s = format (s, - "flow-table: size %u gro-total-vectors %lu gro-n-vectors %u", - flow_table->flow_table_size, flow_table->total_vectors, - flow_table->n_vectors); + "%Uflow-table: size %u gro-total-vectors %lu gro-n-vectors %u", + format_white_space, indent, flow_table->flow_table_size, + flow_table->total_vectors, flow_table->n_vectors); if (flow_table->n_vectors) { double average_rate = -- cgit 1.2.3-korg