From: Pablo Neira Ayuso Date: Wed, 31 Mar 2021 14:14:03 +0000 (+0200) Subject: parser_bison: simplify flowtable offload flag parser X-Git-Tag: v0.9.9~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08a032bc8352f86a4d496331ac7eb1b09620cc78;p=thirdparty%2Fnftables.git parser_bison: simplify flowtable offload flag parser Remove ft_flags_spec rule. Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/parser_bison.y b/src/parser_bison.y index abe11781..cc477e65 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -1996,7 +1996,6 @@ flowtable_block_alloc : /* empty */ flowtable_block : /* empty */ { $$ = $-1; } | flowtable_block common_block | flowtable_block stmt_separator - | flowtable_block ft_flags_spec stmt_separator | flowtable_block HOOK STRING prio_spec stmt_separator { $$->hook.loc = @3; @@ -2019,6 +2018,10 @@ flowtable_block : /* empty */ { $$ = $-1; } { $$->flags |= NFT_FLOWTABLE_COUNTER; } + | flowtable_block FLAGS OFFLOAD stmt_separator + { + $$->flags |= FLOWTABLE_F_HW_OFFLOAD; + } ; flowtable_expr : '{' flowtable_list_expr '}' @@ -2379,12 +2382,6 @@ flags_spec : FLAGS OFFLOAD } ; -ft_flags_spec : FLAGS OFFLOAD - { - $0->flags |= FLOWTABLE_F_HW_OFFLOAD; - } - ; - policy_spec : POLICY policy_expr { if ($0->policy) {