summaryrefslogtreecommitdiffstats
path: root/src/vnet/gso
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-09-25 15:36:19 +0200
committerBeno�t Ganne <bganne@cisco.com>2020-09-28 12:32:16 +0000
commit1017a1d360cc1c38e2aee4b5f19ff1f2869a8cd9 (patch)
treec1e962d553c993afd0ddf582ff838f7ed9be0371 /src/vnet/gso
parent2fca85b3a171db19e0517a7a43c8029f5d24e6fa (diff)
virtio: fix the gro enable/disable on tx-vrings
Type: fix Change-Id: I96c30baaf34fe7b0cd899966a507501e58cde934 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/gso')
-rw-r--r--src/vnet/gso/gro.h29
1 files changed, 16 insertions, 13 deletions
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 =