get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/898/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 898,
    "url": "https://patches.dpdk.org/api/patches/898/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1413939687-11177-7-git-send-email-jingjing.wu@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1413939687-11177-7-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1413939687-11177-7-git-send-email-jingjing.wu@intel.com",
    "date": "2014-10-22T01:01:12",
    "name": "[dpdk-dev,v4,06/21] testpmd: add test commands to add/delete flow director filter",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "2c7ce3d6d0751c245f37d5f5eb8b5e860f6da9e0",
    "submitter": {
        "id": 47,
        "url": "https://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1413939687-11177-7-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/898/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/898/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id A73057EDF;\n\tWed, 22 Oct 2014 02:54:12 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 7C3207EBB\n\tfor <dev@dpdk.org>; Wed, 22 Oct 2014 02:54:01 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP; 21 Oct 2014 18:02:05 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 21 Oct 2014 18:02:04 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id s9M122vh030373;\n\tWed, 22 Oct 2014 09:02:02 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid s9M120PS011254; Wed, 22 Oct 2014 09:02:02 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s9M11xY8011250; \n\tWed, 22 Oct 2014 09:01:59 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,766,1406617200\"; d=\"scan'208\";a=\"593421686\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed, 22 Oct 2014 09:01:12 +0800",
        "Message-Id": "<1413939687-11177-7-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1413939687-11177-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1411711418-12881-1-git-send-email-jingjing.wu@intel.com>\n\t<1413939687-11177-1-git-send-email-jingjing.wu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 06/21] testpmd: add test commands to\n\tadd/delete flow director filter",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "add commands which can be used to test adding or deleting 8 flow\ntypes of the flow director filters: ipv4, tcpv4, udpv4, sctpv4,\nipv6, tcpv6, udpv6, sctpv6\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n app/test-pmd/cmdline.c | 447 +++++++++++++++++++++++++++++++++++++++++++++++++\n app/test-pmd/testpmd.h |   3 +\n 2 files changed, 450 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 0b972f9..5705b65 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -660,6 +660,28 @@ static void cmd_help_long_parsed(void *parsed_result,\n \n \t\t\t\"get_flex_filter (port_id) index (idx)\\n\"\n \t\t\t\"    get info of a flex filter.\\n\\n\"\n+\n+\t\t\t\"flow_director_filter (port_id) (add|del|update)\"\n+\t\t\t\" flow (ip4|ip6) src (src_ip_address) dst (dst_ip_address)\"\n+\t\t\t\" flexwords (flexwords_value)\"\n+\t\t\t\" (drop|fwd) queue (queue_id) fd_id (fd_id_value)\\n\"\n+\t\t\t\"    Add/Del a IP type flow director filter.\\n\\n\"\n+\n+\t\t\t\"flow_director_filter (port_id) (add|del|update)\"\n+\t\t\t\" flow (udp4|tcp4|udp6|tcp6)\"\n+\t\t\t\" src (src_ip_address) (src_port)\"\n+\t\t\t\" dst (dst_ip_address) (dst_port)\"\n+\t\t\t\" flexwords (flexwords_value)\"\n+\t\t\t\" (drop|fwd) queue (queue_id) fd_id (fd_id_value)\\n\"\n+\t\t\t\"    Add/Del a UDP/TCP type flow director filter.\\n\\n\"\n+\n+\t\t\t\"flow_director_filter (port_id) (add|del|update)\"\n+\t\t\t\" flow (sctp4|sctp6)\"\n+\t\t\t\" src (src_ip_address) dst (dst_ip_address)\"\n+\t\t\t\" tag (verification_tag)\"\n+\t\t\t\" flexwords (flexwords_value) (drop|fwd)\"\n+\t\t\t\" queue (queue_id) fd_id (fd_id_value)\\n\"\n+\t\t\t\"    Add/Del a SCTP type flow director filter.\\n\\n\"\n \t\t);\n \t}\n }\n@@ -7415,6 +7437,428 @@ cmdline_parse_inst_t cmd_get_flex_filter = {\n \t},\n };\n \n+/* *** Filters Control *** */\n+\n+/* *** deal with flow director filter *** */\n+struct cmd_flow_director_result {\n+\tcmdline_fixed_string_t flow_director_filter;\n+\tuint8_t port_id;\n+\tcmdline_fixed_string_t ops;\n+\tcmdline_fixed_string_t flow;\n+\tcmdline_fixed_string_t flow_type;\n+\tcmdline_fixed_string_t src;\n+\tcmdline_ipaddr_t ip_src;\n+\tuint16_t port_src;\n+\tcmdline_fixed_string_t dst;\n+\tcmdline_ipaddr_t ip_dst;\n+\tuint16_t port_dst;\n+\tcmdline_fixed_string_t verify_tag;\n+\tuint32_t verify_tag_value;\n+\tcmdline_fixed_string_t flexwords;\n+\tcmdline_fixed_string_t flexwords_value;\n+\tcmdline_fixed_string_t drop;\n+\tcmdline_fixed_string_t queue;\n+\tuint16_t  queue_id;\n+\tcmdline_fixed_string_t fd_id;\n+\tuint32_t  fd_id_value;\n+};\n+\n+static inline int\n+parse_flexwords(const char *q_arg, uint16_t *flexwords)\n+{\n+#define MAX_NUM_WORD 8\n+\tchar s[256];\n+\tconst char *p, *p0 = q_arg;\n+\tchar *end;\n+\tunsigned long int_fld[MAX_NUM_WORD];\n+\tchar *str_fld[MAX_NUM_WORD];\n+\tint i;\n+\tunsigned size;\n+\tint num_words = -1;\n+\n+\tp = strchr(p0, '(');\n+\tif (p == NULL)\n+\t\treturn -1;\n+\t++p;\n+\tp0 = strchr(p, ')');\n+\tif (p0 == NULL)\n+\t\treturn -1;\n+\n+\tsize = p0 - p;\n+\tif (size >= sizeof(s))\n+\t\treturn -1;\n+\n+\tsnprintf(s, sizeof(s), \"%.*s\", size, p);\n+\tnum_words = rte_strsplit(s, sizeof(s), str_fld, MAX_NUM_WORD, ',');\n+\tif (num_words < 0 || num_words > MAX_NUM_WORD)\n+\t\treturn -1;\n+\tfor (i = 0; i < num_words; i++) {\n+\t\terrno = 0;\n+\t\tint_fld[i] = strtoul(str_fld[i], &end, 0);\n+\t\tif (errno != 0 || end == str_fld[i] || int_fld[i] > UINT16_MAX)\n+\t\t\treturn -1;\n+\t\tflexwords[i] = rte_cpu_to_be_16((uint16_t)int_fld[i]);\n+\t}\n+\treturn num_words;\n+}\n+\n+static void\n+cmd_flow_director_filter_parsed(void *parsed_result,\n+\t\t\t  __attribute__((unused)) struct cmdline *cl,\n+\t\t\t  __attribute__((unused)) void *data)\n+{\n+\tstruct cmd_flow_director_result *res = parsed_result;\n+\tstruct rte_eth_fdir_filter entry;\n+\tuint16_t flexwords[8];\n+\tint num_flexwords;\n+\tint ret = 0;\n+\n+\tret = rte_eth_dev_filter_supported(res->port_id, RTE_ETH_FILTER_FDIR);\n+\tif (ret < 0) {\n+\t\tprintf(\"flow director is not supported on port %u.\\n\",\n+\t\t\tres->port_id);\n+\t\treturn;\n+\t}\n+\tmemset(flexwords, 0, sizeof(flexwords));\n+\tmemset(&entry, 0, sizeof(struct rte_eth_fdir_filter));\n+\tnum_flexwords = parse_flexwords(res->flexwords_value, flexwords);\n+\tif (num_flexwords < 0) {\n+\t\tprintf(\"error: Cannot parse flexwords input.\\n\");\n+\t\treturn;\n+\t}\n+\n+\tif (!strcmp(res->flow_type, \"ip4\")) {\n+\t\t/* no need to convert, already big endian. */\n+\t\tif (res->ip_dst.family == AF_INET)\n+\t\t\tentry.input.flow.ip4_flow.dst_ip =\n+\t\t\t\tres->ip_dst.addr.ipv4.s_addr;\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tif (res->ip_src.family == AF_INET)\n+\t\t\tentry.input.flow.ip4_flow.src_ip =\n+\t\t\t\tres->ip_src.addr.ipv4.s_addr;\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tentry.input.flow_type = RTE_ETH_FLOW_TYPE_IPV4_OTHER;\n+\t} else if (!strcmp(res->flow_type, \"udp4\")) {\n+\t\t/* no need to convert, already big endian. */\n+\t\tif (res->ip_dst.family == AF_INET)\n+\t\t\tentry.input.flow.udp4_flow.dst_ip =\n+\t\t\t\tres->ip_dst.addr.ipv4.s_addr;\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tif (res->ip_src.family == AF_INET)\n+\t\t\tentry.input.flow.udp4_flow.src_ip =\n+\t\t\t\tres->ip_src.addr.ipv4.s_addr;\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\t/* need convert to big endian. */\n+\t\tentry.input.flow.udp4_flow.dst_port =\n+\t\t\t\trte_cpu_to_be_16(res->port_dst);\n+\t\tentry.input.flow.udp4_flow.src_port =\n+\t\t\t\trte_cpu_to_be_16(res->port_src);\n+\t\tentry.input.flow_type = RTE_ETH_FLOW_TYPE_UDPV4;\n+\t} else if (!strcmp(res->flow_type, \"tcp4\")) {\n+\t\tif (res->ip_dst.family == AF_INET)\n+\t\t\tentry.input.flow.tcp4_flow.dst_ip =\n+\t\t\t\tres->ip_dst.addr.ipv4.s_addr;\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tif (res->ip_src.family == AF_INET)\n+\t\t\tentry.input.flow.tcp4_flow.src_ip =\n+\t\t\t\tres->ip_src.addr.ipv4.s_addr;\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\t/* need convert to big endian. */\n+\t\tentry.input.flow.tcp4_flow.dst_port =\n+\t\t\t\trte_cpu_to_be_16(res->port_dst);\n+\t\tentry.input.flow.tcp4_flow.src_port =\n+\t\t\t\trte_cpu_to_be_16(res->port_src);\n+\t\tentry.input.flow_type = RTE_ETH_FLOW_TYPE_TCPV4;\n+\t} else if (!strcmp(res->flow_type, \"sctp4\")) {\n+\t\tif (res->ip_dst.family == AF_INET)\n+\t\t\tentry.input.flow.sctp4_flow.dst_ip =\n+\t\t\t\tres->ip_dst.addr.ipv4.s_addr;\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tif (res->ip_src.family == AF_INET)\n+\t\t\tentry.input.flow.sctp4_flow.src_ip =\n+\t\t\t\tres->ip_src.addr.ipv4.s_addr;\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\t/* need convert to big endian. */\n+\t\tentry.input.flow.sctp4_flow.verify_tag =\n+\t\t\t\trte_cpu_to_be_32(res->verify_tag_value);\n+\t\tentry.input.flow_type = RTE_ETH_FLOW_TYPE_SCTPV4;\n+\t} else if (!strcmp(res->flow_type, \"ip6\")) {\n+\t\tif (res->ip_src.family == AF_INET6)\n+\t\t\t(void)rte_memcpy(&(entry.input.flow.ip6_flow.src_ip),\n+\t\t\t\t\t &(res->ip_src.addr.ipv6),\n+\t\t\t\t\t sizeof(struct in6_addr));\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tif (res->ip_dst.family == AF_INET6)\n+\t\t\t(void)rte_memcpy(&(entry.input.flow.ip6_flow.dst_ip),\n+\t\t\t\t\t &(res->ip_dst.addr.ipv6),\n+\t\t\t\t\t sizeof(struct in6_addr));\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tentry.input.flow_type = RTE_ETH_FLOW_TYPE_IPV6_OTHER;\n+\t} else if (!strcmp(res->flow_type, \"udp6\")) {\n+\t\tif (res->ip_src.family == AF_INET6)\n+\t\t\t(void)rte_memcpy(&(entry.input.flow.udp6_flow.src_ip),\n+\t\t\t\t\t &(res->ip_src.addr.ipv6),\n+\t\t\t\t\t sizeof(struct in6_addr));\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tif (res->ip_dst.family == AF_INET6)\n+\t\t\t(void)rte_memcpy(&(entry.input.flow.udp6_flow.dst_ip),\n+\t\t\t\t\t &(res->ip_dst.addr.ipv6),\n+\t\t\t\t\t sizeof(struct in6_addr));\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tentry.input.flow.udp6_flow.dst_port =\n+\t\t\t\trte_cpu_to_be_16(res->port_dst);\n+\t\tentry.input.flow.udp6_flow.src_port =\n+\t\t\t\trte_cpu_to_be_16(res->port_src);\n+\t\tentry.input.flow_type = RTE_ETH_FLOW_TYPE_UDPV6;\n+\t} else if (!strcmp(res->flow_type, \"tcp6\")) {\n+\t\tif (res->ip_src.family == AF_INET6)\n+\t\t\t(void)rte_memcpy(&(entry.input.flow.tcp6_flow.src_ip),\n+\t\t\t\t\t &(res->ip_src.addr.ipv6),\n+\t\t\t\t\t sizeof(struct in6_addr));\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tif (res->ip_dst.family == AF_INET6)\n+\t\t\t(void)rte_memcpy(&(entry.input.flow.tcp6_flow.dst_ip),\n+\t\t\t\t\t &(res->ip_dst.addr.ipv6),\n+\t\t\t\t\t sizeof(struct in6_addr));\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tentry.input.flow.tcp6_flow.dst_port =\n+\t\t\t\trte_cpu_to_be_16(res->port_dst);\n+\t\tentry.input.flow.tcp6_flow.src_port =\n+\t\t\t\trte_cpu_to_be_16(res->port_src);\n+\t\tentry.input.flow_type = RTE_ETH_FLOW_TYPE_TCPV6;\n+\t} else if (!strcmp(res->flow_type, \"sctp6\")) {\n+\t\tif (res->ip_src.family == AF_INET6)\n+\t\t\t(void)rte_memcpy(&(entry.input.flow.sctp6_flow.src_ip),\n+\t\t\t\t\t &(res->ip_src.addr.ipv6),\n+\t\t\t\t\t sizeof(struct in6_addr));\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tif (res->ip_dst.family == AF_INET6)\n+\t\t\t(void)rte_memcpy(&(entry.input.flow.sctp6_flow.dst_ip),\n+\t\t\t\t\t &(res->ip_dst.addr.ipv6),\n+\t\t\t\t\t sizeof(struct in6_addr));\n+\t\telse {\n+\t\t\tprintf(\"error paramters.\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t\tentry.input.flow.sctp6_flow.verify_tag =\n+\t\t\trte_cpu_to_be_32(res->verify_tag_value);\n+\t\tentry.input.flow_type = RTE_ETH_FLOW_TYPE_SCTPV6;\n+\t}\n+\n+\tentry.input.flow_ext.num_flexwords = num_flexwords;\n+\trte_memcpy(entry.input.flow_ext.flexwords,\n+\t\t   flexwords,\n+\t\t   BYTES_PER_WORD * num_flexwords);\n+\n+\tentry.input.flow_ext.dest_id = 0; /* if set to 0, will use main vsi by default */\n+\tentry.action.flex_off = 0;  /*use 0 by default */\n+\tif (!strcmp(res->drop, \"drop\"))\n+\t\tentry.action.drop = 1;\n+\telse\n+\t\tentry.action.drop = 0;\n+\t/* set to report FD ID by default */\n+\tentry.action.report_status = RTE_ETH_FDIR_REPORT_FD_ID;\n+\tentry.action.rx_queue = res->queue_id;\n+\t/* use 0 by default, will set it to fdir counter per dev */\n+\tentry.action.cnt_idx = 0;\n+\tentry.soft_id = res->fd_id_value;\n+\tif (!strcmp(res->ops, \"add\"))\n+\t\tret = rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_FDIR,\n+\t\t\t\t\t     RTE_ETH_FILTER_ADD, &entry);\n+\telse\n+\t\tret = rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_FDIR,\n+\t\t\t\t\t     RTE_ETH_FILTER_DELETE, &entry);\n+\tif (ret < 0)\n+\t\tprintf(\"flow director programming error: (%s)\\n\",\n+\t\t\tstrerror(-ret));\n+}\n+\n+cmdline_parse_token_string_t cmd_flow_director_filter =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t flow_director_filter, \"flow_director_filter\");\n+cmdline_parse_token_num_t cmd_flow_director_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t      port_id, UINT8);\n+cmdline_parse_token_string_t cmd_flow_director_ops =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t ops, \"add#del#update\");\n+cmdline_parse_token_string_t cmd_flow_director_flow =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t flow, \"flow\");\n+cmdline_parse_token_string_t cmd_flow_director_flow_type =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t flow_type,\n+\t\t\t\t \"ip4#tcp4#udp4#sctp4#ip6#tcp6#udp6#sctp6\");\n+cmdline_parse_token_string_t cmd_flow_director_src =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t src, \"src\");\n+cmdline_parse_token_ipaddr_t cmd_flow_director_ip_src =\n+\tTOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t ip_src);\n+cmdline_parse_token_num_t cmd_flow_director_port_src =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t      port_src, UINT16);\n+cmdline_parse_token_string_t cmd_flow_director_dst =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t dst, \"dst\");\n+cmdline_parse_token_ipaddr_t cmd_flow_director_ip_dst =\n+\tTOKEN_IPADDR_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t ip_dst);\n+cmdline_parse_token_num_t cmd_flow_director_port_dst =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t      port_dst, UINT16);\n+cmdline_parse_token_string_t cmd_flow_director_verify_tag =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t  verify_tag, \"verify_tag\");\n+cmdline_parse_token_num_t cmd_flow_director_verify_tag_value =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t      verify_tag_value, UINT32);\n+cmdline_parse_token_string_t cmd_flow_director_flexwords =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t flexwords, \"flexwords\");\n+cmdline_parse_token_string_t cmd_flow_director_flexwords_value =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t      flexwords_value, NULL);\n+cmdline_parse_token_string_t cmd_flow_director_drop =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t drop, \"drop#fwd\");\n+cmdline_parse_token_string_t cmd_flow_director_queue =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t queue, \"queue\");\n+cmdline_parse_token_num_t cmd_flow_director_queue_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t      queue_id, UINT16);\n+cmdline_parse_token_string_t cmd_flow_director_fd_id =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t\t fd_id, \"fd_id\");\n+cmdline_parse_token_num_t cmd_flow_director_fd_id_value =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_flow_director_result,\n+\t\t\t      fd_id_value, UINT32);\n+\n+cmdline_parse_inst_t cmd_add_del_ip_flow_director = {\n+\t.f = cmd_flow_director_filter_parsed,\n+\t.data = NULL,\n+\t.help_str = \"add or delete a ip flow director entry on NIC\",\n+\t.tokens = {\n+\t\t(void *)&cmd_flow_director_filter,\n+\t\t(void *)&cmd_flow_director_port_id,\n+\t\t(void *)&cmd_flow_director_ops,\n+\t\t(void *)&cmd_flow_director_flow,\n+\t\t(void *)&cmd_flow_director_flow_type,\n+\t\t(void *)&cmd_flow_director_src,\n+\t\t(void *)&cmd_flow_director_ip_src,\n+\t\t(void *)&cmd_flow_director_dst,\n+\t\t(void *)&cmd_flow_director_ip_dst,\n+\t\t(void *)&cmd_flow_director_flexwords,\n+\t\t(void *)&cmd_flow_director_flexwords_value,\n+\t\t(void *)&cmd_flow_director_drop,\n+\t\t(void *)&cmd_flow_director_queue,\n+\t\t(void *)&cmd_flow_director_queue_id,\n+\t\t(void *)&cmd_flow_director_fd_id,\n+\t\t(void *)&cmd_flow_director_fd_id_value,\n+\t\tNULL,\n+\t},\n+};\n+\n+cmdline_parse_inst_t cmd_add_del_udp_flow_director = {\n+\t.f = cmd_flow_director_filter_parsed,\n+\t.data = NULL,\n+\t.help_str = \"add or delete a udp/tcp flow director entry on NIC\",\n+\t.tokens = {\n+\t\t(void *)&cmd_flow_director_filter,\n+\t\t(void *)&cmd_flow_director_port_id,\n+\t\t(void *)&cmd_flow_director_ops,\n+\t\t(void *)&cmd_flow_director_flow,\n+\t\t(void *)&cmd_flow_director_flow_type,\n+\t\t(void *)&cmd_flow_director_src,\n+\t\t(void *)&cmd_flow_director_ip_src,\n+\t\t(void *)&cmd_flow_director_port_src,\n+\t\t(void *)&cmd_flow_director_dst,\n+\t\t(void *)&cmd_flow_director_ip_dst,\n+\t\t(void *)&cmd_flow_director_port_dst,\n+\t\t(void *)&cmd_flow_director_flexwords,\n+\t\t(void *)&cmd_flow_director_flexwords_value,\n+\t\t(void *)&cmd_flow_director_drop,\n+\t\t(void *)&cmd_flow_director_queue,\n+\t\t(void *)&cmd_flow_director_queue_id,\n+\t\t(void *)&cmd_flow_director_fd_id,\n+\t\t(void *)&cmd_flow_director_fd_id_value,\n+\t\tNULL,\n+\t},\n+};\n+\n+cmdline_parse_inst_t cmd_add_del_sctp_flow_director = {\n+\t.f = cmd_flow_director_filter_parsed,\n+\t.data = NULL,\n+\t.help_str = \"add or delete a sctp flow director entry on NIC\",\n+\t.tokens = {\n+\t\t(void *)&cmd_flow_director_filter,\n+\t\t(void *)&cmd_flow_director_port_id,\n+\t\t(void *)&cmd_flow_director_ops,\n+\t\t(void *)&cmd_flow_director_flow,\n+\t\t(void *)&cmd_flow_director_flow_type,\n+\t\t(void *)&cmd_flow_director_src,\n+\t\t(void *)&cmd_flow_director_ip_src,\n+\t\t(void *)&cmd_flow_director_dst,\n+\t\t(void *)&cmd_flow_director_ip_dst,\n+\t\t(void *)&cmd_flow_director_verify_tag,\n+\t\t(void *)&cmd_flow_director_verify_tag_value,\n+\t\t(void *)&cmd_flow_director_flexwords,\n+\t\t(void *)&cmd_flow_director_flexwords_value,\n+\t\t(void *)&cmd_flow_director_drop,\n+\t\t(void *)&cmd_flow_director_queue,\n+\t\t(void *)&cmd_flow_director_queue_id,\n+\t\t(void *)&cmd_flow_director_fd_id,\n+\t\t(void *)&cmd_flow_director_fd_id_value,\n+\t\tNULL,\n+\t},\n+};\n+\n /* ******************************************************************************** */\n \n /* list of instructions */\n@@ -7541,6 +7985,9 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_add_flex_filter,\n \t(cmdline_parse_inst_t *)&cmd_remove_flex_filter,\n \t(cmdline_parse_inst_t *)&cmd_get_flex_filter,\n+\t(cmdline_parse_inst_t *)&cmd_add_del_ip_flow_director,\n+\t(cmdline_parse_inst_t *)&cmd_add_del_udp_flow_director,\n+\t(cmdline_parse_inst_t *)&cmd_add_del_sctp_flow_director,\n \tNULL,\n };\n \ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 9cbfeac..74c0c0c 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -73,6 +73,9 @@ int main(int argc, char **argv);\n #define NUMA_NO_CONFIG 0xFF\n #define UMA_NO_CONFIG  0xFF\n \n+#define BYTES_PER_WORD  2\n+#define IPV6_ADDR_LEN 16\n+\n typedef uint8_t  lcoreid_t;\n typedef uint8_t  portid_t;\n typedef uint16_t queueid_t;\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "06/21"
    ]
}