get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105151,
    "url": "http://patches.dpdk.org/api/patches/105151/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1639592401-56845-6-git-send-email-rsanford@akamai.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": "<1639592401-56845-6-git-send-email-rsanford@akamai.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1639592401-56845-6-git-send-email-rsanford@akamai.com",
    "date": "2021-12-15T18:19:59",
    "name": "[5/7] net/bonding: add LACP short timeout to tests",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ddb163b4b1fca0a08a4a48984d63c6b9d01197fe",
    "submitter": {
        "id": 7,
        "url": "http://patches.dpdk.org/api/people/7/?format=api",
        "name": "Robert Sanford",
        "email": "rsanford2@gmail.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1639592401-56845-6-git-send-email-rsanford@akamai.com/mbox/",
    "series": [
        {
            "id": 20948,
            "url": "http://patches.dpdk.org/api/series/20948/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20948",
            "date": "2021-12-15T18:19:54",
            "name": "net/bonding: fixes and LACP short timeout",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/20948/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105151/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/105151/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B49FAA00C3;\n\tWed, 15 Dec 2021 19:20:58 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C0BA041152;\n\tWed, 15 Dec 2021 19:20:32 +0100 (CET)",
            "from mail-qk1-f169.google.com (mail-qk1-f169.google.com\n [209.85.222.169])\n by mails.dpdk.org (Postfix) with ESMTP id F27A04115B\n for <dev@dpdk.org>; Wed, 15 Dec 2021 19:20:29 +0100 (CET)",
            "by mail-qk1-f169.google.com with SMTP id t6so20957386qkg.1\n for <dev@dpdk.org>; Wed, 15 Dec 2021 10:20:29 -0800 (PST)",
            "from ubuntu.localdomain\n (99-153-167-175.lightspeed.ftldfl.sbcglobal.net. [99.153.167.175])\n by smtp.gmail.com with ESMTPSA id 8sm2075978qtz.28.2021.12.15.10.20.28\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Wed, 15 Dec 2021 10:20:28 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=cnrpVZf76cZd7Cs8pDy/5yvGZSB37s7U+gTt35HpBUQ=;\n b=fjR4chztBs/szyS91QvNB+7IUbV+WyerCZ9SFLz4UQBiTHJ52y7LCUYJ9ZkrtuIHbE\n tvN3kWZ+6EE/aYdko+oOooTY/6hpshjAUpC/c6KgTN1niAmlsxSFdj7D6eLxyZUzuFnF\n bz3qyaTfNMqx3MzKZ67NX0poskgHPchg26oALje5++v0ld7u/+WHywBh6K+lPMXIuV9g\n qAPit2hddc8vbeRYRrEveB29GK4TdRkitEvCvc8iVylHdS71HuK08axVwmFGx+cokhlE\n UpQhEdgO9nJ1JGC5cBozVOksY5FOnBIsRLq/5htYm8632JI1u38spNIzYZgFHKWKaldQ\n 0VaQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=cnrpVZf76cZd7Cs8pDy/5yvGZSB37s7U+gTt35HpBUQ=;\n b=5+Vuv1pBH/QgKdnZOjBikhxpOKsS2hMuq2fS5u0yfPpLorCpG2k0kyBs4Er1M1Vrrl\n +qGXS5enLKIsQ5O24mnXN7GTlawhgpZtCT1x0bbDNuSyy5moMl1XVdUF/Rpemq71/6BP\n 4HZEeJR4czyO/DihPRREp5uSpn+xzboDNnRICuraNlpaj3JU4NHZx6P5ccE/XLpoG83B\n 7bT2pLpNXJoFF5tvnHHySfl8KFHT0OaYkYShUHYr/31CXSoB0MBQIz0AKuz6QeJ4VR5l\n KTYRfO3EA0wsKnQE24Zk939lK/PKRpVALxAv73yvLg/xFpH6Uv0VLpJMS7NQIC8H0fVk\n LYYA==",
        "X-Gm-Message-State": "AOAM530VOcY+UmITBJmOLsk4I0tSmhJ16Dlp59bfJfAHtvKN54G80wPF\n NPdsuG+F1gJ6W83h6i6q8jnRXx6V4tc=",
        "X-Google-Smtp-Source": "\n ABdhPJzW1U0AWiarxhRM7RmDclQM2OMtxIt3twGsanFz8MMRNMiy3fvU2sLYYUZeqK20K5/sVui1VQ==",
        "X-Received": "by 2002:a05:620a:410e:: with SMTP id\n j14mr9481644qko.47.1639592428880;\n Wed, 15 Dec 2021 10:20:28 -0800 (PST)",
        "From": "Robert Sanford <rsanford2@gmail.com>",
        "X-Google-Original-From": "Robert Sanford <rsanford@akamai.com>",
        "To": "dev@dpdk.org",
        "Cc": "chas3@att.com,\n\thumin29@huawei.com",
        "Subject": "[PATCH 5/7] net/bonding: add LACP short timeout to tests",
        "Date": "Wed, 15 Dec 2021 13:19:59 -0500",
        "Message-Id": "<1639592401-56845-6-git-send-email-rsanford@akamai.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1639592401-56845-1-git-send-email-rsanford@akamai.com>",
        "References": "<1639592401-56845-1-git-send-email-rsanford@akamai.com>",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "- Add \"set bonding lacp timeout_ctrl <port_id> on|off\" to testpmd.\n- Add \"test_mode4_lacp_timeout_control\" to app/test.\n\nSigned-off-by: Robert Sanford <rsanford@akamai.com>\n---\n app/test-pmd/cmdline.c             | 77 ++++++++++++++++++++++++++++++++++++++\n app/test/test_link_bonding_mode4.c | 65 ++++++++++++++++++++++++++++++++\n 2 files changed, 142 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 9fd2c2a..b0c2fb4 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -633,6 +633,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"set bonding mode IEEE802.3AD aggregator policy (port_id) (agg_name)\\n\"\n \t\t\t\"\tSet Aggregation mode for IEEE802.3AD (mode 4)\\n\\n\"\n \n+\t\t\t\"set bonding lacp timeout_ctrl (port_id) (on|off)\\n\"\n+\t\t\t\t\"Configure LACP partner to use fast|slow periodic tx interval.\\n\\n\"\n+\n \t\t\t\"set bonding balance_xmit_policy (port_id) (l2|l23|l34)\\n\"\n \t\t\t\"\tSet the transmit balance policy for bonded device running in balance mode.\\n\\n\"\n \n@@ -6192,6 +6195,7 @@ static void lacp_conf_show(struct rte_eth_bond_8023ad_conf *conf)\n \t\tprintf(\"\\taggregation mode: invalid\\n\");\n \t\tbreak;\n \t}\n+\tprintf(\"\\tlacp timeout control: %u\\n\", conf->lacp_timeout_control);\n \n \tprintf(\"\\n\");\n }\n@@ -6863,6 +6867,78 @@ cmdline_parse_inst_t cmd_set_bonding_agg_mode_policy = {\n };\n \n \n+/* *** SET LACP TIMEOUT CONTROL ON BONDED DEVICE *** */\n+struct cmd_set_lacp_timeout_control_result {\n+\tcmdline_fixed_string_t set;\n+\tcmdline_fixed_string_t bonding;\n+\tcmdline_fixed_string_t lacp;\n+\tcmdline_fixed_string_t timeout_ctrl;\n+\tuint16_t port_id;\n+\tcmdline_fixed_string_t on_off;\n+};\n+\n+static void\n+cmd_set_lacp_timeout_control_parsed(void *parsed_result,\n+\t\t__rte_unused struct cmdline *cl,\n+\t\t__rte_unused void *data)\n+{\n+\tstruct cmd_set_lacp_timeout_control_result *res = parsed_result;\n+\tstruct rte_eth_bond_8023ad_conf port_conf;\n+\tuint8_t on_off = 0;\n+\tint ret;\n+\n+\tif (!strcmp(res->on_off, \"on\"))\n+\t\ton_off = 1;\n+\n+\tret = rte_eth_bond_8023ad_conf_get(res->port_id, &port_conf);\n+\tif (ret != 0) {\n+\t\tfprintf(stderr, \"\\tGet bonded device %u lacp conf failed\\n\",\n+\t\t\tres->port_id);\n+\t\treturn;\n+\t}\n+\n+\tport_conf.lacp_timeout_control = on_off;\n+\tret = rte_eth_bond_8023ad_setup(res->port_id, &port_conf);\n+\tif (ret != 0)\n+\t\tfprintf(stderr, \"\\tSetup bonded device %u lacp conf failed\\n\",\n+\t\t\tres->port_id);\n+}\n+\n+cmdline_parse_token_string_t cmd_set_lacp_timeout_control_set =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_lacp_timeout_control_result,\n+\t\t\t\tset, \"set\");\n+cmdline_parse_token_string_t cmd_set_lacp_timeout_control_bonding =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_lacp_timeout_control_result,\n+\t\t\t\tbonding, \"bonding\");\n+cmdline_parse_token_string_t cmd_set_lacp_timeout_control_lacp =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_lacp_timeout_control_result,\n+\t\t\t\tlacp, \"lacp\");\n+cmdline_parse_token_string_t cmd_set_lacp_timeout_control_timeout_ctrl =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_lacp_timeout_control_result,\n+\t\t\t\ttimeout_ctrl, \"timeout_ctrl\");\n+cmdline_parse_token_num_t cmd_set_lacp_timeout_control_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_set_lacp_timeout_control_result,\n+\t\t\t\tport_id, RTE_UINT16);\n+cmdline_parse_token_string_t cmd_set_lacp_timeout_control_on_off =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_lacp_timeout_control_result,\n+\t\t\t\ton_off, \"on#off\");\n+\n+cmdline_parse_inst_t cmd_set_lacp_timeout_control = {\n+\t.f = cmd_set_lacp_timeout_control_parsed,\n+\t.data = (void *) 0,\n+\t.help_str = \"set bonding lacp timeout_ctrl <port_id> on|off: \"\n+\t\t\"Configure partner to use fast|slow periodic tx interval\",\n+\t.tokens = {\n+\t\t(void *)&cmd_set_lacp_timeout_control_set,\n+\t\t(void *)&cmd_set_lacp_timeout_control_bonding,\n+\t\t(void *)&cmd_set_lacp_timeout_control_lacp,\n+\t\t(void *)&cmd_set_lacp_timeout_control_timeout_ctrl,\n+\t\t(void *)&cmd_set_lacp_timeout_control_port_id,\n+\t\t(void *)&cmd_set_lacp_timeout_control_on_off,\n+\t\tNULL\n+\t}\n+};\n+\n #endif /* RTE_NET_BOND */\n \n /* *** SET FORWARDING MODE *** */\n@@ -17728,6 +17804,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *) &cmd_set_bond_mon_period,\n \t(cmdline_parse_inst_t *) &cmd_set_lacp_dedicated_queues,\n \t(cmdline_parse_inst_t *) &cmd_set_bonding_agg_mode_policy,\n+\t(cmdline_parse_inst_t *) &cmd_set_lacp_timeout_control,\n #endif\n \t(cmdline_parse_inst_t *)&cmd_vlan_offload,\n \t(cmdline_parse_inst_t *)&cmd_vlan_tpid,\ndiff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c\nindex 2be86d5..68f77ec 100644\n--- a/app/test/test_link_bonding_mode4.c\n+++ b/app/test/test_link_bonding_mode4.c\n@@ -735,6 +735,63 @@ test_mode4_agg_mode_selection(void)\n }\n \n static int\n+test_mode4_lacp_timeout_control(void)\n+{\n+\tint retval;\n+\tint iterations;\n+\tsize_t i;\n+\tstruct slave_conf *slave;\n+\tuint16_t port_id = test_params.bonded_port_id;\n+\tstruct rte_eth_bond_8023ad_conf conf;\n+\tstruct rte_eth_bond_8023ad_slave_info info;\n+\tuint8_t on_off = 0;\n+\tuint8_t lacp_timeout_flag = 0;\n+\n+\tretval = initialize_bonded_device_with_slaves(TEST_LACP_SLAVE_COUT, 0);\n+\tTEST_ASSERT_SUCCESS(retval, \"Failed to initialize bonded device\");\n+\n+\t/* Iteration 0: Verify that LACP timeout control is off by default.\n+\t * Iteration 1: Verify that we can set LACP timeout control.\n+\t * Iteration 2: Verify that we can reset LACP timeout control.\n+\t */\n+\tfor (iterations = 0; iterations < 3; iterations++) {\n+\t\t/* Verify that bond conf has expected timeout control value.*/\n+\t\tretval = rte_eth_bond_8023ad_conf_get(port_id, &conf);\n+\t\tTEST_ASSERT_SUCCESS(retval, \"Failed to get LACP conf\");\n+\t\tTEST_ASSERT_EQUAL(conf.lacp_timeout_control, on_off,\n+\t\t\t\"Wrong LACP timeout control value\");\n+\n+\t\t/* State machine must run to propagate new timeout control\n+\t\t * value to slaves (iterations 1 and 2). */\n+\t\tretval = bond_handshake();\n+\t\tTEST_ASSERT_SUCCESS(retval, \"Bond handshake failed\");\n+\n+\t\t/* Verify that slaves' actor states have expected value.*/\n+\t\tFOR_EACH_PORT(i, slave) {\n+\t\t\tretval = rte_eth_bond_8023ad_slave_info(port_id,\n+\t\t\t\tslave->port_id, &info);\n+\t\t\tTEST_ASSERT_SUCCESS(retval,\n+\t\t\t\t\"Failed to get LACP slave info\");\n+\t\t\tTEST_ASSERT_EQUAL((info.actor_state &\n+\t\t\t\tSTATE_LACP_SHORT_TIMEOUT), lacp_timeout_flag,\n+\t\t\t\t\" Wrong LACP slave info timeout flag\");\n+\t\t}\n+\n+\t\t/* Toggle timeout control. */\n+\t\ton_off ^= 1;\n+\t\tlacp_timeout_flag ^= STATE_LACP_SHORT_TIMEOUT;\n+\t\tconf.lacp_timeout_control = on_off;\n+\t\tretval = rte_eth_bond_8023ad_setup(port_id, &conf);\n+\t\tTEST_ASSERT_SUCCESS(retval, \"Failed to setup LACP conf\");\n+\t}\n+\n+\tretval = remove_slaves_and_stop_bonded_device();\n+\tTEST_ASSERT_SUCCESS(retval, \"Test cleanup failed.\");\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n+static int\n generate_packets(struct rte_ether_addr *src_mac,\n \tstruct rte_ether_addr *dst_mac, uint16_t count, struct rte_mbuf **buf)\n {\n@@ -1649,6 +1706,12 @@ test_mode4_ext_lacp_wrapper(void)\n \treturn test_mode4_executor(&test_mode4_ext_lacp);\n }\n \n+static int\n+test_mode4_lacp_timeout_control_wrapper(void)\n+{\n+\treturn test_mode4_executor(&test_mode4_lacp_timeout_control);\n+}\n+\n static struct unit_test_suite link_bonding_mode4_test_suite  = {\n \t.suite_name = \"Link Bonding mode 4 Unit Test Suite\",\n \t.setup = test_setup,\n@@ -1665,6 +1728,8 @@ static struct unit_test_suite link_bonding_mode4_test_suite  = {\n \t\t\t\ttest_mode4_ext_ctrl_wrapper),\n \t\tTEST_CASE_NAMED(\"test_mode4_ext_lacp\",\n \t\t\t\ttest_mode4_ext_lacp_wrapper),\n+\t\tTEST_CASE_NAMED(\"test_mode4_lacp_timeout_control\",\n+\t\t\t\ttest_mode4_lacp_timeout_control_wrapper),\n \n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n",
    "prefixes": [
        "5/7"
    ]
}