get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 39598,
    "url": "http://patches.dpdk.org/api/patches/39598/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1525870039-11261-2-git-send-email-wisamm@mellanox.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": "<1525870039-11261-2-git-send-email-wisamm@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1525870039-11261-2-git-send-email-wisamm@mellanox.com",
    "date": "2018-05-09T12:47:18",
    "name": "[dpdk-dev,v3,1/2] app/testpmd: add custom topology command",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": true,
    "hash": "90a3381132f8c34f7910814272e9c339bdbed35b",
    "submitter": {
        "id": 938,
        "url": "http://patches.dpdk.org/api/people/938/?format=api",
        "name": "Wisam Jaddo",
        "email": "wisamm@mellanox.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1525870039-11261-2-git-send-email-wisamm@mellanox.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/39598/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/39598/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F41051B6A7;\n\tWed,  9 May 2018 14:47:58 +0200 (CEST)",
            "from EUR01-DB5-obe.outbound.protection.outlook.com\n\t(mail-db5eur01on0049.outbound.protection.outlook.com [104.47.2.49])\n\tby dpdk.org (Postfix) with ESMTP id 9D9891B664\n\tfor <dev@dpdk.org>; Wed,  9 May 2018 14:47:45 +0200 (CEST)",
            "from mellanox.com (37.142.13.130) by\n\tDB6PR05MB3432.eurprd05.prod.outlook.com (2603:10a6:6:1e::19) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.19;\n\tWed, 9 May 2018 12:47:42 +0000"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com;\n\ts=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=5Jt/hYCOyn+/nm11Nkew3Uq4PQcaJQQPZtWnmL6hnyE=;\n\tb=gsXM+uCKjDH+uMER/cEpyCE5G0wnx6DdPzPaAcSvt3DVnSTL+BkBYd0fO0YxTut1h664WebjecfybyYlrappQEWWOFx2sla4VvQ4FFpe0R2QcBILZbGqhHNav0gG0injIo1u93F3a+x+qZpskq4dN9pJ3QF2I9aKWS+PoHsvH8E=",
        "Authentication-Results": "spf=none (sender IP is )\n\tsmtp.mailfrom=wisamm@mellanox.com; ",
        "From": "Wisam Jaddo <wisamm@mellanox.com>",
        "To": "jingjing.wu@intel.com,\n\twenzhuo.lu@intel.com,\n\tthomas@monjalon.net",
        "Cc": "rasland@mellanox.com, dev@dpdk.org, shahafs@mellanox.com,\n\twisamm@mellanox.com",
        "Date": "Wed,  9 May 2018 15:47:18 +0300",
        "Message-Id": "<1525870039-11261-2-git-send-email-wisamm@mellanox.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1525870039-11261-1-git-send-email-wisamm@mellanox.com>",
        "References": "<1525870039-11261-1-git-send-email-wisamm@mellanox.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[37.142.13.130]",
        "X-ClientProxiedBy": "VI1PR0101CA0056.eurprd01.prod.exchangelabs.com\n\t(2603:10a6:800:1f::24) To DB6PR05MB3432.eurprd05.prod.outlook.com\n\t(2603:10a6:6:1e::19)",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-HT": "Tenant",
        "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020);\n\tSRVR:DB6PR05MB3432; ",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; DB6PR05MB3432;\n\t3:HyE37/CwnSIDM3KrdMD4qziX/I5e/1zwafP16jciekdNlJuh8666mSmXQWHxPRRyB38pqWAQ/xVScDY4hoGzXL40PNdN4k7mCD0wTrMJsagYZdXTXRwx6nm1K/arIxforNlpu1NcmojQN5SDiEJZ+mtUWAObPcEbsE0mgZvqlNt20MF6Phj0EnaYgJcB7WuhlgWdlDf5OMdGtkFBqUVavWf52IGDz0+izG8SMbHg4/VESjwTSKKbhaNQPA3yLGos;\n\t25:YtUjWlctGWXUmYd+lU6/shzGaNTiMBPAdQKFGxhrlipotaicMQxIFcC1zhn8y9bve9dcVEB7VbRlJMGnqzbeJcn0n8hWMKwcMWhsw47zY7hJAyEN6EgeRx6+rZ5/TfzD5sZgcIbkI3pl2L0Ra4ArdFtxn9T6TEXaoGSxmHf1XsqyH5qLtU79s2PfYrOdZDsPPG1kgnfhk2USi4Rk8vWu9z/PRHA2f0WJlk3wKwB0BEEDQ5dhGEBoNG5gPGaQ0xd9iExliC/pNxdVPhuCGwo8diQP6geYk/ULB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3432;\n\t7:92nZrowxhCoqm8TGhb2xtwKzvmhykxSeeBU/dM7t+LaZagOsc+4C9WO9KJZyvkb8Dw15h9IVR9NNS10yyxLrrh6ultq3pPNR7XCyAhDFEf/tkN+Q4AgfRkWQO3oYx7FRIcF/ZAulpcPZ/43/XolPlf2bHB5t88gqhsz0Yyp1mDWtdUgYcWgh3+SONbf34QzFMhXE/WBFAzllucCkZRPlzYtDbXDGo8GNavFhLJADFlPQcCM1bG+ytq7dAghWp2H5"
        ],
        "X-MS-TrafficTypeDiagnostic": "DB6PR05MB3432:",
        "X-LD-Processed": "a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "<DB6PR05MB34323324365E16D5D9DFCC51A9990@DB6PR05MB3432.eurprd05.prod.outlook.com>",
        "X-Exchange-Antispam-Report-Test": "UriScan:;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);\n\tSRVR:DB6PR05MB3432; BCL:0; PCL:0; RULEID:; SRVR:DB6PR05MB3432; ",
        "X-Forefront-PRVS": "0667289FF8",
        "X-Forefront-Antispam-Report": "SFV:NSPM;\n\tSFS:(10009020)(346002)(366004)(376002)(39860400002)(39380400002)(396003)(199004)(189003)(6666003)(8676002)(59450400001)(33026002)(5660300001)(16526019)(26005)(3846002)(478600001)(107886003)(186003)(386003)(316002)(4326008)(6116002)(86362001)(16586007)(106356001)(305945005)(11346002)(48376002)(53936002)(446003)(476003)(7736002)(36756003)(25786009)(52116002)(81156014)(21086003)(7696005)(68736007)(2906002)(66066001)(105586002)(51416003)(55016002)(81166006)(2616005)(486006)(47776003)(69596002)(50226002)(956004)(97736004)(50466002)(8936002)(76176011);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR05MB3432; H:mellanox.com; FPR:;\n\tSPF:None; \n\tLANG:en; PTR:InfoNoRecords; A:1; MX:1; ",
        "Received-SPF": "None (protection.outlook.com: mellanox.com does not designate\n\tpermitted sender hosts)",
        "X-Microsoft-Antispam-Message-Info": "kObBv92E0WNv/Z/R3IM/f9/7tAQZ/9apvh8NcP+p3Ng+XgYHZ25xRwy+S4/UQxqBug9BKVvSmxV8Yb4n9bSbwRNU32dF3PtLZlwPmVRv+inGbDHcrufhUmgnAYqCINlCJdmxRZZL0ZVl9T2Pc8txf/vbJLkbcS9kYMqbuuL1NR5bR0pXIeTvhWLyeClOTu6S",
        "SpamDiagnosticOutput": "1:99",
        "SpamDiagnosticMetadata": "NSPM",
        "X-MS-Office365-Filtering-Correlation-Id": "e2cf6152-e6be-4782-37d2-08d5b5ab0f43",
        "X-OriginatorOrg": "Mellanox.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "09 May 2018 12:47:42.9610\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "e2cf6152-e6be-4782-37d2-08d5b5ab0f43",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "a652971c-7d2e-4d9b-a6a4-d149256f461b",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DB6PR05MB3432",
        "Subject": "[dpdk-dev] [PATCH v3 1/2] app/testpmd: add custom topology command",
        "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://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": "<https://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": "Set custom topology for forwading packets by making the\ngiven two ports as pair, in custom topology the active\nports will be the defiend in custum-topo only.\n\nThis command will be useful in testing, when special\ntopology is needed.\n\nusage:\n         testpmd> set custom-topo (port_id_1) (port_id_2)\n\nSigned-off-by: Wisam Jaddo <wisamm@mellanox.com>\n---\n app/test-pmd/cmdline.c                      | 49 +++++++++++++++++++++++++++++\n app/test-pmd/config.c                       | 41 ++++++++++++++++++++++++\n app/test-pmd/parameters.c                   |  6 ++--\n app/test-pmd/testpmd.h                      |  8 ++++-\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  8 +++++\n 5 files changed, 109 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 9615670..9d48048 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -466,6 +466,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"set eth-peer (port_id) (peer_addr)\\n\"\n \t\t\t\"    set the peer address for certain port.\\n\\n\"\n \n+\t\t\t\"set custom-topo (port_id_1) (port_id_2)\\n\"\n+\t\t\t\"    set custom topo.\\n\\n\"\n+\n \t\t\t\"set port (port_id) uta (mac_address|all) (on|off)\\n\"\n \t\t\t\"    Add/Remove a or all unicast hash filter(s)\"\n \t\t\t\"from port X.\\n\\n\"\n@@ -7649,6 +7652,51 @@ cmdline_parse_inst_t cmd_set_fwd_eth_peer = {\n \t},\n };\n \n+/* *** SET CUSTOM TOPO FOR CERTAIN PORT *** */\n+struct cmd_custom_topo_result {\n+\t\tcmdline_fixed_string_t set;\n+\t\tcmdline_fixed_string_t custom_topo;\n+\t\tportid_t port_id_1;\n+\t\tportid_t port_id_2;\n+};\n+\n+static void cmd_set_custom_topo_parsed(void *parsed_result,\n+\t\t\t\t__attribute__((unused)) struct cmdline *cl,\n+\t\t\t\t__attribute__((unused)) void *data)\n+{\n+\tstruct cmd_custom_topo_result *res = parsed_result;\n+\n+\tif (test_done == 0) {\n+\t\tprintf(\"Please stop forwarding first\\n\");\n+\t\treturn;\n+\t}\n+\tif (!strcmp(res->custom_topo, \"custom-topo\")) {\n+\t\tset_custom_topo(res->port_id_1, res->port_id_2);\n+\t\tfwd_config_setup();\n+\t}\n+}\n+cmdline_parse_token_string_t cmd_set_custom_topo_set =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_custom_topo_result, set, \"set\");\n+cmdline_parse_token_string_t cmd_set_custom_topo_custom_topo =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_custom_topo_result, custom_topo, \"custom-topo\");\n+cmdline_parse_token_num_t cmd_set_custom_topo_port_id_1 =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_custom_topo_result, port_id_1, UINT16);\n+cmdline_parse_token_num_t cmd_set_custom_topo_port_id_2 =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_custom_topo_result, port_id_2, UINT16);\n+\n+cmdline_parse_inst_t cmd_set_custom_topo = {\n+\t.f = cmd_set_custom_topo_parsed,\n+\t.data = NULL,\n+\t.help_str = \"set custom-topo (port_id_1) (port_id_2)\",\n+\t.tokens = {\n+\t\t\t(void *)&cmd_set_custom_topo_set,\n+\t\t\t(void *)&cmd_set_custom_topo_custom_topo,\n+\t\t\t(void *)&cmd_set_custom_topo_port_id_1,\n+\t\t\t(void *)&cmd_set_custom_topo_port_id_2,\n+\t\t\tNULL,\n+\t},\n+};\n+\n /* *** CONFIGURE QUEUE STATS COUNTER MAPPINGS *** */\n struct cmd_set_qmap_result {\n \tcmdline_fixed_string_t set;\n@@ -16540,6 +16588,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_stop,\n \t(cmdline_parse_inst_t *)&cmd_mac_addr,\n \t(cmdline_parse_inst_t *)&cmd_set_fwd_eth_peer,\n+\t(cmdline_parse_inst_t *)&cmd_set_custom_topo,\n \t(cmdline_parse_inst_t *)&cmd_set_qmap,\n \t(cmdline_parse_inst_t *)&cmd_set_xstats_hide_zero,\n \t(cmdline_parse_inst_t *)&cmd_operate_port,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 16fc481..23799ad 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -2069,6 +2069,8 @@ fwd_topology_tx_port_get(portid_t rxp)\n \t\treturn (rxp + 1) % cur_fwd_config.nb_fwd_ports;\n \tcase PORT_TOPOLOGY_LOOP:\n \t\treturn rxp;\n+\tcase PORT_TOPOLOGY_CUSTOM:\n+\t\treturn fwd_streams[rxp]->tx_port;\n \t}\n }\n \n@@ -2378,6 +2380,45 @@ set_fwd_eth_peer(portid_t port_id, char *peer_addr)\n \t\t\tnew_peer_addr[c];\n }\n \n+static void\n+print_ports_range(void)\n+{\n+\tportid_t pid;\n+\tprintf(\"Valid port range is [\");\n+\tRTE_ETH_FOREACH_DEV(pid)\n+\t\tprintf(\", %d\", pid);\n+\tprintf(\"]\\n\");\n+}\n+\n+void\n+set_custom_topo(portid_t port_id_1, portid_t port_id_2)\n+{\n+\tunsigned int portlist[RTE_MAX_ETHPORTS];\n+\tunsigned int i;\n+\tunsigned int nb_pt = 0;\n+\tif (port_topology != PORT_TOPOLOGY_CUSTOM) {\n+\t\tprintf(\"Please set the forward topology to custom first.\\n\");\n+\t\treturn;\n+\t}\n+\tif (port_id_is_invalid(port_id_1, ENABLED_WARN)) {\n+\t\tprint_ports_range();\n+\t\treturn;\n+\t}\n+\tif (port_id_is_invalid(port_id_2, ENABLED_WARN)) {\n+\t\tprint_ports_range();\n+\t\treturn;\n+\t}\n+\tfwd_streams[port_id_1]->tx_port = port_id_2;\n+\tfwd_streams[port_id_2]->tx_port = port_id_1;\n+\tfwd_ports[port_id_1] = port_id_1;\n+\tfwd_ports[port_id_2] = port_id_2;\n+\n+\tfor (i = 0; i < RTE_MAX_ETHPORTS; i++)\n+\t\tif (fwd_ports[i] == i)\n+\t\t\tportlist[nb_pt++] = i;\n+\tset_fwd_ports_list(portlist, nb_pt);\n+}\n+\n int\n set_fwd_lcores_list(unsigned int *lcorelist, unsigned int nb_lc)\n {\ndiff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c\nindex aea8af8..0db411d 100644\n--- a/app/test-pmd/parameters.c\n+++ b/app/test-pmd/parameters.c\n@@ -139,8 +139,8 @@ usage(char* progname)\n \tprintf(\"  --enable-hw-vlan-extend: enable hardware vlan extend.\\n\");\n \tprintf(\"  --enable-drop-en: enable per queue packet drop.\\n\");\n \tprintf(\"  --disable-rss: disable rss.\\n\");\n-\tprintf(\"  --port-topology=N: set port topology (N: paired (default) or \"\n-\t       \"chained).\\n\");\n+\tprintf(\"  --port-topology=N: set port topology (N: paired (default)\"\n+\t       \"(loop), (custom) or (chained).\\n\");\n \tprintf(\"  --forward-mode=N: set forwarding mode (N: %s).\\n\",\n \t       list_pkt_forwarding_modes());\n \tprintf(\"  --rss-ip: set RSS functions to IPv4/IPv6 only .\\n\");\n@@ -920,6 +920,8 @@ launch_args_parse(int argc, char** argv)\n \t\t\t\t\tport_topology = PORT_TOPOLOGY_CHAINED;\n \t\t\t\telse if (!strcmp(optarg, \"loop\"))\n \t\t\t\t\tport_topology = PORT_TOPOLOGY_LOOP;\n+\t\t\t\telse if (!strcmp(optarg, \"custom\"))\n+\t\t\t\t\tport_topology = PORT_TOPOLOGY_CUSTOM;\n \t\t\t\telse\n \t\t\t\t\trte_exit(EXIT_FAILURE, \"port-topology %s invalid -\"\n \t\t\t\t\t\t \" must be: paired, chained or loop\\n\",\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 1af87b8..3250683 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -67,6 +67,7 @@ enum {\n \tPORT_TOPOLOGY_PAIRED,\n \tPORT_TOPOLOGY_CHAINED,\n \tPORT_TOPOLOGY_LOOP,\n+\tPORT_TOPOLOGY_CUSTOM,\n };\n \n #ifdef RTE_TEST_PMD_RECORD_BURST_STATS\n@@ -363,6 +364,11 @@ extern uint8_t txring_numa[RTE_MAX_ETHPORTS];\n extern uint8_t socket_num;\n \n /*\n+ * Store the custom topo.\n+ */\n+portid_t fwd_ports[RTE_MAX_ETHPORTS];\n+\n+/*\n  * Configuration of logical cores:\n  * nb_fwd_lcores <= nb_cfg_lcores <= nb_lcores\n  */\n@@ -598,7 +604,7 @@ void reconfig(portid_t new_port_id, unsigned socket_id);\n int init_fwd_streams(void);\n \n void set_fwd_eth_peer(portid_t port_id, char *peer_addr);\n-\n+void set_custom_topo(portid_t port_id_1, portid_t port_id_2);\n void port_mtu_set(portid_t port_id, uint16_t mtu);\n void port_reg_bit_display(portid_t port_id, uint32_t reg_off, uint8_t bit_pos);\n void port_reg_bit_set(portid_t port_id, uint32_t reg_off, uint8_t bit_pos,\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 013a405..5edf210 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -1090,6 +1090,14 @@ Set the forwarding peer address for certain port::\n \n This is equivalent to the ``--eth-peer`` command-line option.\n \n+set custom-topo\n+~~~~~~~~~~~~~~\n+\n+Set custom topology for forwading packets by making the given two ports as pair.\n+In custom topology the active ports will be the defiend in custum-topo only::\n+\n+   testpmd> set custom-topo (port_id_1) (port_id_2)\n+\n set port-uta\n ~~~~~~~~~~~~\n \n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "1/2"
    ]
}