diff options
author | Florian Westphal <fw@strlen.de> | 2021-06-16 18:25:28 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2021-06-21 14:44:58 +0200 |
commit | 3486127e52426d1861a78b44f10e5997c3a69ff2 (patch) | |
tree | 58ee3ab39d323435b2153f7b3df187526a21ad15 /src/statement.c | |
parent | 52f61f87b3891b60ca5efec125bc2e5f6522a6c1 (diff) |
parser: new queue flag input format
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/statement.c')
-rw-r--r-- | src/statement.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/statement.c b/src/statement.c index a713952c..9eb49339 100644 --- a/src/statement.c +++ b/src/statement.c @@ -493,20 +493,25 @@ struct stmt *limit_stmt_alloc(const struct location *loc) static void queue_stmt_print(const struct stmt *stmt, struct output_ctx *octx) { - const char *delim = " "; + struct expr *e = stmt->queue.queue; + const char *delim = " flags "; nft_print(octx, "queue"); - if (stmt->queue.queue != NULL) { - nft_print(octx, " num "); - expr_print(stmt->queue.queue, octx); - } + if (stmt->queue.flags & NFT_QUEUE_FLAG_BYPASS) { nft_print(octx, "%sbypass", delim); delim = ","; } + if (stmt->queue.flags & NFT_QUEUE_FLAG_CPU_FANOUT) nft_print(octx, "%sfanout", delim); + if (e) { + nft_print(octx, " num "); + expr_print(stmt->queue.queue, octx); + } else { + nft_print(octx, " num 0"); + } } static void queue_stmt_destroy(struct stmt *stmt) |