get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83992,
    "url": "http://patches.dpdk.org/api/patches/83992/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201111081507.19913-2-ibtisam.tariq@emumba.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20201111081507.19913-2-ibtisam.tariq@emumba.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201111081507.19913-2-ibtisam.tariq@emumba.com",
    "date": "2020-11-11T08:15:02",
    "name": "[2/7] examples/l3fwd-acl: enhance getopt_long usage",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4e451cf9fbd4e7a845a6fe0d6f81d7d2c7eec930",
    "submitter": {
        "id": 1680,
        "url": "http://patches.dpdk.org/api/people/1680/?format=api",
        "name": "Ibtisam Tariq",
        "email": "ibtisam.tariq@emumba.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201111081507.19913-2-ibtisam.tariq@emumba.com/mbox/",
    "series": [
        {
            "id": 13801,
            "url": "http://patches.dpdk.org/api/series/13801/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13801",
            "date": "2020-11-11T08:15:01",
            "name": "[1/7] examples/fips_validation: enhance getopt_long usage",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/13801/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/83992/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/83992/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6333DA09D2;\n\tWed, 11 Nov 2020 09:15:51 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 55F2737B4;\n\tWed, 11 Nov 2020 09:15:38 +0100 (CET)",
            "from mail-wm1-f67.google.com (mail-wm1-f67.google.com\n [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 588EEDED\n for <dev@dpdk.org>; Wed, 11 Nov 2020 09:15:36 +0100 (CET)",
            "by mail-wm1-f67.google.com with SMTP id c9so1373112wml.5\n for <dev@dpdk.org>; Wed, 11 Nov 2020 00:15:36 -0800 (PST)",
            "from localhost.localdomain ([39.33.227.210])\n by smtp.gmail.com with ESMTPSA id z3sm909539wrw.87.2020.11.11.00.15.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Nov 2020 00:15:34 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=emumba-com.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=8/bMqTB2IPlN6tm1497yxo6X2DSOWJfRDe+GNnqAOHk=;\n b=CWo8yJD7Oa7QqZN0zR9SOmGlXZmX0KTD0PL0+U+zegxyCU20XKTL5VPFJCzTSkllVv\n LNAn8hJ7Z2tIVeSEf/DwcpQdpgJIwCmBRXehIzGzenmeZ4w2ALQTHFEOhagDTDJCcRIq\n JfQPrcgc7HdzTG31D04FrzHyCCdhrJUSrBxFW4MG9k2g4wPZErA9zwT6wFKESDNfJbwb\n DgTR5IVUpFtRe8DI0TgNRVIDxxPOeVHppfwR8CkDgWpYrvQWk0b4Jcif+XmdyfaLXjXz\n i8jrvY0oz9DVDTEXNrgIAiaSf8V/pGMGF/e4KnSTgXexkR2hfnftSBGnO2p96DR7Vwag\n fvJA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=8/bMqTB2IPlN6tm1497yxo6X2DSOWJfRDe+GNnqAOHk=;\n b=c4RsAYFfVv6YAvs6fivE7H+1xMHqTNXSWcV0AKHe8gr7LJbnY70PJRQlRy0NBPWAeX\n jFt6Tm354FEeUKGXIhVKh8S+X9kYQPCMD0vOrG9ZHzclt2v2eF14WlRaMcC3peBrPivZ\n K/W/bugQMwl4UosR7SL9mT582hE3rQhtW+oMM1I9FIuBhc21zfJa0kMHA5OznvIZieoO\n I9jEMpASeEeN7SLlmTLyuNNrA1bRkcMuZZssOnT3ysDNt6qh05ppkMf5WtxJMLJaaR+h\n EmlLlVrcKOJeP6u6zyG3SjmLDp+aZslJxV1Txb1U5moXhO3B4EkgnaQOLn4rF1/olxIQ\n Lzdw==",
        "X-Gm-Message-State": "AOAM532Unlj3brjr23muxG2sexXuPMEqCWgraz562ODsSEbP7W3ZcVST\n tuVM+rh4TSstUhTwtsP1g2LfCA==",
        "X-Google-Smtp-Source": "\n ABdhPJxtaVz5rxsdIaGKGIV0WlGVmm3lKEC18pi//QNkrjdD5nfngY2DAriCwPWJ0D4Vv4G01akvVA==",
        "X-Received": "by 2002:a1c:ac03:: with SMTP id v3mr1363360wme.9.1605082535106;\n Wed, 11 Nov 2020 00:15:35 -0800 (PST)",
        "From": "Ibtisam Tariq <ibtisam.tariq@emumba.com>",
        "To": "maxime.coquelin@redhat.com, chenbo.xia@intel.com,\n cristian.dumitrescu@intel.com, jasvinder.singh@intel.com,\n john.mcnamara@intel.com, reshma.pattan@intel.com,\n konstantin.ananyev@intel.com, marko.kovacevic@intel.com",
        "Cc": "dev@dpdk.org,\n\tIbtisam Tariq <ibtisam.tariq@emumba.com>",
        "Date": "Wed, 11 Nov 2020 08:15:02 +0000",
        "Message-Id": "<20201111081507.19913-2-ibtisam.tariq@emumba.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201111081507.19913-1-ibtisam.tariq@emumba.com>",
        "References": "<20201111081507.19913-1-ibtisam.tariq@emumba.com>",
        "Subject": "[dpdk-dev] [PATCH 2/7] examples/l3fwd-acl: enhance getopt_long usage",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Instead of using getopt_long return value, strcmp was used to\ncompare the input parameters with the struct option array. This\npatch get rid of all those strcmp by directly binding each longopt\nwith an int enum. This is to improve readability and consistency in\nall examples.\n\nBugzilla ID: 238\nCc: konstantin.ananyev@intel.com\n\nReported-by: David Marchand <david.marchand@redhat.com>\nSigned-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>\n---\nv2\n* Remove extra indentations.\n* Remove extra block brackets in switch statement.\n* Change enum names to start with OPT_ and remove KEYWORD from enum names.\n\nv1\n* enhance getopt_long usage\n---\n examples/l3fwd-acl/main.c | 219 +++++++++++++++++++-------------------\n 1 file changed, 110 insertions(+), 109 deletions(-)",
    "diff": "diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c\nindex 961594f5f..5725963ad 100644\n--- a/examples/l3fwd-acl/main.c\n+++ b/examples/l3fwd-acl/main.c\n@@ -195,13 +195,24 @@ send_single_packet(struct rte_mbuf *m, uint16_t port);\n #define ACL_LEAD_CHAR\t\t('@')\n #define ROUTE_LEAD_CHAR\t\t('R')\n #define COMMENT_LEAD_CHAR\t('#')\n-#define OPTION_CONFIG\t\t\"config\"\n-#define OPTION_NONUMA\t\t\"no-numa\"\n-#define OPTION_ENBJMO\t\t\"enable-jumbo\"\n-#define OPTION_RULE_IPV4\t\"rule_ipv4\"\n-#define OPTION_RULE_IPV6\t\"rule_ipv6\"\n-#define OPTION_ALG\t\t\"alg\"\n-#define OPTION_ETH_DEST\t\t\"eth-dest\"\n+\n+enum {\n+#define OPT_CONFIG\t\t\"config\"\n+\tOPT_CONFIG_NUM = 256,\n+#define OPT_NONUMA\t\t\"no-numa\"\n+\tOPT_NONUMA_NUM,\n+#define OPT_ENBJMO\t\t\"enable-jumbo\"\n+\tOPT_ENBJMO_NUM,\n+#define OPT_RULE_IPV4\t\"rule_ipv4\"\n+\tOPT_RULE_IPV4_NUM,\n+#define OPT_RULE_IPV6\t\"rule_ipv6\"\n+\tOPT_RULE_IPV6_NUM,\n+#define OPT_ALG\t\t    \"alg\"\n+\tOPT_ALG_NUM,\n+#define OPT_ETH_DEST    \"eth-dest\"\n+\tOPT_ETH_DEST_NUM,\n+};\n+\n #define ACL_DENY_SIGNATURE\t0xf0000000\n #define RTE_LOGTYPE_L3FWDACL\tRTE_LOGTYPE_USER3\n #define acl_log(format, ...)\tRTE_LOG(ERR, L3FWDACL, format, ##__VA_ARGS__)\n@@ -1177,9 +1188,9 @@ static void\n dump_acl_config(void)\n {\n \tprintf(\"ACL option are:\\n\");\n-\tprintf(OPTION_RULE_IPV4\": %s\\n\", parm_config.rule_ipv4_name);\n-\tprintf(OPTION_RULE_IPV6\": %s\\n\", parm_config.rule_ipv6_name);\n-\tprintf(OPTION_ALG\": %s\\n\", str_acl_alg(parm_config.alg));\n+\tprintf(OPT_RULE_IPV4\": %s\\n\", parm_config.rule_ipv4_name);\n+\tprintf(OPT_RULE_IPV6\": %s\\n\", parm_config.rule_ipv6_name);\n+\tprintf(OPT_ALG\": %s\\n\", str_acl_alg(parm_config.alg));\n }\n \n static int\n@@ -1608,27 +1619,27 @@ print_usage(const char *prgname)\n \n \tusage_acl_alg(alg, sizeof(alg));\n \tprintf(\"%s [EAL options] -- -p PORTMASK -P\"\n-\t\t\"--\"OPTION_RULE_IPV4\"=FILE\"\n-\t\t\"--\"OPTION_RULE_IPV6\"=FILE\"\n-\t\t\"  [--\"OPTION_CONFIG\" (port,queue,lcore)[,(port,queue,lcore]]\"\n-\t\t\"  [--\"OPTION_ENBJMO\" [--max-pkt-len PKTLEN]]\\n\"\n+\t\t\"--\"OPT_RULE_IPV4\"=FILE\"\n+\t\t\"--\"OPT_RULE_IPV6\"=FILE\"\n+\t\t\"  [--\"OPT_CONFIG\" (port,queue,lcore)[,(port,queue,lcore]]\"\n+\t\t\"  [--\"OPT_ENBJMO\" [--max-pkt-len PKTLEN]]\\n\"\n \t\t\"  -p PORTMASK: hexadecimal bitmask of ports to configure\\n\"\n \t\t\"  -P : enable promiscuous mode\\n\"\n-\t\t\"  --\"OPTION_CONFIG\": (port,queue,lcore): \"\n+\t\t\"  --\"OPT_CONFIG\": (port,queue,lcore): \"\n \t\t\"rx queues configuration\\n\"\n-\t\t\"  --\"OPTION_NONUMA\": optional, disable numa awareness\\n\"\n-\t\t\"  --\"OPTION_ENBJMO\": enable jumbo frame\"\n+\t\t\"  --\"OPT_NONUMA\": optional, disable numa awareness\\n\"\n+\t\t\"  --\"OPT_ENBJMO\": enable jumbo frame\"\n \t\t\" which max packet len is PKTLEN in decimal (64-9600)\\n\"\n-\t\t\"  --\"OPTION_RULE_IPV4\"=FILE: specify the ipv4 rules entries \"\n+\t\t\"  --\"OPT_RULE_IPV4\"=FILE: specify the ipv4 rules entries \"\n \t\t\"file. \"\n \t\t\"Each rule occupy one line. \"\n \t\t\"2 kinds of rules are supported. \"\n \t\t\"One is ACL entry at while line leads with character '%c', \"\n \t\t\"another is route entry at while line leads with \"\n \t\t\"character '%c'.\\n\"\n-\t\t\"  --\"OPTION_RULE_IPV6\"=FILE: specify the ipv6 rules \"\n+\t\t\"  --\"OPT_RULE_IPV6\"=FILE: specify the ipv6 rules \"\n \t\t\"entries file.\\n\"\n-\t\t\"  --\"OPTION_ALG\": ACL classify method to use, one of: %s\\n\",\n+\t\t\"  --\"OPT_ALG\": ACL classify method to use, one of: %s\\n\",\n \t\tprgname, ACL_LEAD_CHAR, ROUTE_LEAD_CHAR, alg);\n }\n \n@@ -1747,14 +1758,14 @@ parse_args(int argc, char **argv)\n \tint option_index;\n \tchar *prgname = argv[0];\n \tstatic struct option lgopts[] = {\n-\t\t{OPTION_CONFIG, 1, 0, 0},\n-\t\t{OPTION_NONUMA, 0, 0, 0},\n-\t\t{OPTION_ENBJMO, 0, 0, 0},\n-\t\t{OPTION_RULE_IPV4, 1, 0, 0},\n-\t\t{OPTION_RULE_IPV6, 1, 0, 0},\n-\t\t{OPTION_ALG, 1, 0, 0},\n-\t\t{OPTION_ETH_DEST, 1, 0, 0},\n-\t\t{NULL, 0, 0, 0}\n+\t\t{OPT_CONFIG,    1, NULL, OPT_CONFIG_NUM    },\n+\t\t{OPT_NONUMA,    0, NULL, OPT_NONUMA_NUM    },\n+\t\t{OPT_ENBJMO,    0, NULL, OPT_ENBJMO_NUM    },\n+\t\t{OPT_RULE_IPV4, 1, NULL, OPT_RULE_IPV4_NUM },\n+\t\t{OPT_RULE_IPV6, 1, NULL, OPT_RULE_IPV6_NUM },\n+\t\t{OPT_ALG,       1, NULL, OPT_ALG_NUM       },\n+\t\t{OPT_ETH_DEST,  1, NULL, OPT_ETH_DEST_NUM  },\n+\t\t{NULL,          0, 0,    0                 }\n \t};\n \n \targvopt = argv;\n@@ -1772,104 +1783,94 @@ parse_args(int argc, char **argv)\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t\tbreak;\n+\n \t\tcase 'P':\n \t\t\tprintf(\"Promiscuous mode selected\\n\");\n \t\t\tpromiscuous_on = 1;\n \t\t\tbreak;\n \n \t\t/* long options */\n-\t\tcase 0:\n-\t\t\tif (!strncmp(lgopts[option_index].name,\n-\t\t\t\t\tOPTION_CONFIG,\n-\t\t\t\t\tsizeof(OPTION_CONFIG))) {\n-\t\t\t\tret = parse_config(optarg);\n-\t\t\t\tif (ret) {\n-\t\t\t\t\tprintf(\"invalid config\\n\");\n-\t\t\t\t\tprint_usage(prgname);\n-\t\t\t\t\treturn -1;\n-\t\t\t\t}\n-\t\t\t}\n-\n-\t\t\tif (!strncmp(lgopts[option_index].name,\n-\t\t\t\t\tOPTION_NONUMA,\n-\t\t\t\t\tsizeof(OPTION_NONUMA))) {\n-\t\t\t\tprintf(\"numa is disabled\\n\");\n-\t\t\t\tnuma_on = 0;\n-\t\t\t}\n-\n-\t\t\tif (!strncmp(lgopts[option_index].name,\n-\t\t\t\t\tOPTION_ENBJMO, sizeof(OPTION_ENBJMO))) {\n-\t\t\t\tstruct option lenopts = {\n-\t\t\t\t\t\"max-pkt-len\",\n-\t\t\t\t\trequired_argument,\n-\t\t\t\t\t0,\n-\t\t\t\t\t0\n-\t\t\t\t};\n-\n-\t\t\t\tprintf(\"jumbo frame is enabled\\n\");\n-\t\t\t\tport_conf.rxmode.offloads |=\n-\t\t\t\t\t\tDEV_RX_OFFLOAD_JUMBO_FRAME;\n-\t\t\t\tport_conf.txmode.offloads |=\n-\t\t\t\t\t\tDEV_TX_OFFLOAD_MULTI_SEGS;\n-\n-\t\t\t\t/*\n-\t\t\t\t * if no max-pkt-len set, then use the\n-\t\t\t\t * default value RTE_ETHER_MAX_LEN\n-\t\t\t\t */\n-\t\t\t\tif (0 == getopt_long(argc, argvopt, \"\",\n-\t\t\t\t\t\t&lenopts, &option_index)) {\n-\t\t\t\t\tret = parse_max_pkt_len(optarg);\n-\t\t\t\t\tif ((ret < 64) ||\n-\t\t\t\t\t\t(ret > MAX_JUMBO_PKT_LEN)) {\n-\t\t\t\t\t\tprintf(\"invalid packet \"\n-\t\t\t\t\t\t\t\"length\\n\");\n-\t\t\t\t\t\tprint_usage(prgname);\n-\t\t\t\t\t\treturn -1;\n-\t\t\t\t\t}\n-\t\t\t\t\tport_conf.rxmode.max_rx_pkt_len = ret;\n-\t\t\t\t}\n-\t\t\t\tprintf(\"set jumbo frame max packet length \"\n-\t\t\t\t\t\"to %u\\n\",\n-\t\t\t\t\t(unsigned int)\n-\t\t\t\t\tport_conf.rxmode.max_rx_pkt_len);\n+\t\tcase OPT_CONFIG_NUM:\n+\t\t\tret = parse_config(optarg);\n+\t\t\tif (ret) {\n+\t\t\t\tprintf(\"invalid config\\n\");\n+\t\t\t\tprint_usage(prgname);\n+\t\t\t\treturn -1;\n \t\t\t}\n+\t\t\tbreak;\n \n-\t\t\tif (!strncmp(lgopts[option_index].name,\n-\t\t\t\t\tOPTION_RULE_IPV4,\n-\t\t\t\t\tsizeof(OPTION_RULE_IPV4)))\n-\t\t\t\tparm_config.rule_ipv4_name = optarg;\n-\n-\t\t\tif (!strncmp(lgopts[option_index].name,\n-\t\t\t\t\tOPTION_RULE_IPV6,\n-\t\t\t\t\tsizeof(OPTION_RULE_IPV6))) {\n-\t\t\t\tparm_config.rule_ipv6_name = optarg;\n-\t\t\t}\n+\t\tcase OPT_NONUMA_NUM:\n+\t\t\tprintf(\"numa is disabled\\n\");\n+\t\t\tnuma_on = 0;\n+\t\t\tbreak;\n \n-\t\t\tif (!strncmp(lgopts[option_index].name,\n-\t\t\t\t\tOPTION_ALG, sizeof(OPTION_ALG))) {\n-\t\t\t\tparm_config.alg = parse_acl_alg(optarg);\n-\t\t\t\tif (parm_config.alg ==\n-\t\t\t\t\t\tRTE_ACL_CLASSIFY_DEFAULT) {\n-\t\t\t\t\tprintf(\"unknown %s value:\\\"%s\\\"\\n\",\n-\t\t\t\t\t\tOPTION_ALG, optarg);\n+\t\tcase OPT_ENBJMO_NUM:\n+\t\t{\n+\t\t\tstruct option lenopts = {\n+\t\t\t\t\"max-pkt-len\",\n+\t\t\t\trequired_argument,\n+\t\t\t\t0,\n+\t\t\t\t0\n+\t\t\t};\n+\n+\t\t\tprintf(\"jumbo frame is enabled\\n\");\n+\t\t\tport_conf.rxmode.offloads |=\n+\t\t\t\t\tDEV_RX_OFFLOAD_JUMBO_FRAME;\n+\t\t\tport_conf.txmode.offloads |=\n+\t\t\t\t\tDEV_TX_OFFLOAD_MULTI_SEGS;\n+\n+\t\t\t/*\n+\t\t\t * if no max-pkt-len set, then use the\n+\t\t\t * default value RTE_ETHER_MAX_LEN\n+\t\t\t */\n+\t\t\tif (0 == getopt_long(argc, argvopt, \"\",\n+\t\t\t\t\t&lenopts, &option_index)) {\n+\t\t\t\tret = parse_max_pkt_len(optarg);\n+\t\t\t\tif ((ret < 64) ||\n+\t\t\t\t\t(ret > MAX_JUMBO_PKT_LEN)) {\n+\t\t\t\t\tprintf(\"invalid packet \"\n+\t\t\t\t\t\t\"length\\n\");\n \t\t\t\t\tprint_usage(prgname);\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n+\t\t\t\tport_conf.rxmode.max_rx_pkt_len = ret;\n \t\t\t}\n+\t\t\tprintf(\"set jumbo frame max packet length \"\n+\t\t\t\t\"to %u\\n\",\n+\t\t\t\t(unsigned int)\n+\t\t\t\tport_conf.rxmode.max_rx_pkt_len);\n+\t\t\tbreak;\n+\t\t}\n+\t\tcase OPT_RULE_IPV4_NUM:\n+\t\t\tparm_config.rule_ipv4_name = optarg;\n+\t\t\tbreak;\n \n-\t\t\tif (!strncmp(lgopts[option_index].name, OPTION_ETH_DEST,\n-\t\t\t\t\tsizeof(OPTION_ETH_DEST))) {\n-\t\t\t\tconst char *serr = parse_eth_dest(optarg);\n-\t\t\t\tif (serr != NULL) {\n-\t\t\t\t\tprintf(\"invalid %s value:\\\"%s\\\": %s\\n\",\n-\t\t\t\t\t\tOPTION_ETH_DEST, optarg, serr);\n-\t\t\t\t\tprint_usage(prgname);\n-\t\t\t\t\treturn -1;\n-\t\t\t\t}\n-\t\t\t}\n+\t\tcase OPT_RULE_IPV6_NUM:\n+\t\t\tparm_config.rule_ipv6_name = optarg;\n+\t\t\tbreak;\n \n+\t\tcase OPT_ALG_NUM:\n+\t\t\tparm_config.alg = parse_acl_alg(optarg);\n+\t\t\tif (parm_config.alg ==\n+\t\t\t\t\tRTE_ACL_CLASSIFY_DEFAULT) {\n+\t\t\t\tprintf(\"unknown %s value:\\\"%s\\\"\\n\",\n+\t\t\t\t\tOPT_ALG, optarg);\n+\t\t\t\tprint_usage(prgname);\n+\t\t\t\treturn -1;\n+\t\t\t}\n \t\t\tbreak;\n \n+\t\tcase OPT_ETH_DEST_NUM:\n+\t\t{\n+\t\t\tconst char *serr = parse_eth_dest(optarg);\n+\t\t\tif (serr != NULL) {\n+\t\t\t\tprintf(\"invalid %s value:\\\"%s\\\": %s\\n\",\n+\t\t\t\t\tOPT_ETH_DEST, optarg, serr);\n+\t\t\t\tprint_usage(prgname);\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\t\t\tbreak;\n+\t\t}\n \t\tdefault:\n \t\t\tprint_usage(prgname);\n \t\t\treturn -1;\n",
    "prefixes": [
        "2/7"
    ]
}