From: Beilei Xing Date: Thu, 18 May 2017 09:06:12 +0000 (+0800) Subject: app/testpmd: add TCP flags in flow rules X-Git-Tag: spdx-start~3183 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=18872f511c17a0a3591d4bfa5d56eefa5b85339c;p=dpdk.git app/testpmd: add TCP flags in flow rules This commit adds TCP flags support in flow API as some drivers have SYN filter. Signed-off-by: Beilei Xing Tested-by: Wei Zhao Acked-by: Adrien Mazarguil --- diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 0fd69f90cf..3e5803a667 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -152,6 +152,7 @@ enum index { ITEM_TCP, ITEM_TCP_SRC, ITEM_TCP_DST, + ITEM_TCP_FLAGS, ITEM_SCTP, ITEM_SCTP_SRC, ITEM_SCTP_DST, @@ -531,6 +532,7 @@ static const enum index item_udp[] = { static const enum index item_tcp[] = { ITEM_TCP_SRC, ITEM_TCP_DST, + ITEM_TCP_FLAGS, ITEM_NEXT, ZERO, }; @@ -1267,6 +1269,13 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp, hdr.dst_port)), }, + [ITEM_TCP_FLAGS] = { + .name = "flags", + .help = "TCP flags", + .next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp, + hdr.tcp_flags)), + }, [ITEM_SCTP] = { .name = "sctp", .help = "match SCTP header",