get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105150,
    "url": "http://patches.dpdk.org/api/patches/105150/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1639592401-56845-5-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-5-git-send-email-rsanford@akamai.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1639592401-56845-5-git-send-email-rsanford@akamai.com",
    "date": "2021-12-15T18:19:58",
    "name": "[4/7] net/bonding: support enabling LACP short timeout",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4ccbb392a12c164e39b52773796718ecf8111c1d",
    "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-5-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/105150/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/105150/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 93A8BA00C3;\n\tWed, 15 Dec 2021 19:20:52 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CA16F4115E;\n\tWed, 15 Dec 2021 19:20:30 +0100 (CET)",
            "from mail-qk1-f178.google.com (mail-qk1-f178.google.com\n [209.85.222.178])\n by mails.dpdk.org (Postfix) with ESMTP id B97B74114F\n for <dev@dpdk.org>; Wed, 15 Dec 2021 19:20:28 +0100 (CET)",
            "by mail-qk1-f178.google.com with SMTP id m192so20928732qke.2\n for <dev@dpdk.org>; Wed, 15 Dec 2021 10:20:28 -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.27\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Wed, 15 Dec 2021 10:20:27 -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=iAz8LQlJRnR+Y8QTSAM3SyabwC0kEOyz5MdHLVhf6Jw=;\n b=ga5L/EupZ/9N7LoJlra3c+MYtNeewRMOQQ6D7YZUw12vD8v8UYTBGGxcLzr26kovmQ\n h1kMDkmilez80ComMzXuUsanDrq8QoIR/foDuCguW+BXGzqa51P6Z32svXqc0yxNDarN\n Vo7J/jgySoOClWaqQIp5MDdBWhuy0mqbl0ZY2uxsDvjyyQv4zDatwbafB/mVeWhYvEpk\n Y3DVpB/fpdu0InaaJtD+9VYL9ZHNU+pKW8pnXhABvRu0Mb1UyXPS3p3WNxmJ9+BZU6WY\n UTKnCekllWd1UrhxBiQtyy3KsxjHBEAG1G/zWdAASHWMcZHrvfE0qHM+uA/aIs/aWje4\n O4Ug==",
        "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=iAz8LQlJRnR+Y8QTSAM3SyabwC0kEOyz5MdHLVhf6Jw=;\n b=S8rTRTI3LmQgjxqjLbTXQGZGiuu37DyyTYFFza2dpLf+oFUxHmMtMM87KWBLxvBgG8\n uPIGCsgWMDnt2XBv/JVS7zaumARoozjZ1pzj+1fiQN2bjz2A7p3BKRrasAEWgq2UMwyB\n nerIyOdZU54WBjqcebBIOWoYaK60E9fetiujrvobWfWQKpWIItsC0pCHCZERgJxkzOXd\n QrvCLTBLK2DCetTcgB57lZUTrrs+rvYmBTo5KRiEPI8ZCOoinbyql9D5TrK+xV3N7hjJ\n TIxoxAPY81Gr8srs6Sz8g9CUTloAnSq6mj1ZReJ99MSmW0db91c07SYmDPv8brebdqrq\n dyyA==",
        "X-Gm-Message-State": "AOAM530hjqYaDFEByXIeVfUd5+TYSJoFL+NiN+AdKYonFow0F94zybyq\n 7J+nrp4HF03klLGEg0nnYvkSboTzEYg=",
        "X-Google-Smtp-Source": "\n ABdhPJzhCyPymVw/QiQ/Mq9TTOq5tm4H/eHePzt0BT8P2wzf0pfomLnYkFg/jW6Zuw6PinSQQS8qTg==",
        "X-Received": "by 2002:a05:620a:151a:: with SMTP id\n i26mr9703846qkk.499.1639592427968;\n Wed, 15 Dec 2021 10:20:27 -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 4/7] net/bonding: support enabling LACP short timeout",
        "Date": "Wed, 15 Dec 2021 13:19:58 -0500",
        "Message-Id": "<1639592401-56845-5-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 support for enabling LACP short timeout, i.e., link partner can\n  use fast periodic time interval between transmits.\n\nSigned-off-by: Robert Sanford <rsanford@akamai.com>\n---\n drivers/net/bonding/eth_bond_8023ad_private.h |  3 ++-\n drivers/net/bonding/rte_eth_bond_8023ad.c     | 28 +++++++++++++++++++++++----\n drivers/net/bonding/rte_eth_bond_8023ad.h     |  3 +++\n 3 files changed, 29 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/bonding/eth_bond_8023ad_private.h b/drivers/net/bonding/eth_bond_8023ad_private.h\nindex e415f2f..e1a7207 100644\n--- a/drivers/net/bonding/eth_bond_8023ad_private.h\n+++ b/drivers/net/bonding/eth_bond_8023ad_private.h\n@@ -159,7 +159,6 @@ struct mode8023ad_private {\n \tuint64_t rx_marker_timeout;\n \tuint64_t update_timeout_us;\n \trte_eth_bond_8023ad_ext_slowrx_fn slowrx_cb;\n-\tuint8_t external_sm;\n \tstruct rte_ether_addr mac_addr;\n \n \tstruct rte_eth_link slave_link;\n@@ -178,6 +177,8 @@ struct mode8023ad_private {\n \t\tuint16_t tx_qid;\n \t} dedicated_queues;\n \tenum rte_bond_8023ad_agg_selection agg_selection;\n+\tuint8_t short_timeout_enabled : 1;\n+\tuint8_t short_timeout_updated : 1;\n };\n \n /**\ndiff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c\nindex 83d3938..93fbf39 100644\n--- a/drivers/net/bonding/rte_eth_bond_8023ad.c\n+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c\n@@ -868,10 +868,10 @@ bond_mode_8023ad_periodic_cb(void *arg)\n \tstruct rte_eth_link link_info;\n \tstruct rte_ether_addr slave_addr;\n \tstruct rte_mbuf *lacp_pkt = NULL;\n+\tuint8_t short_timeout_updated = internals->mode4.short_timeout_updated;\n \tuint16_t slave_id;\n \tuint16_t i;\n \n-\n \t/* Update link status on each port */\n \tfor (i = 0; i < internals->active_slave_count; i++) {\n \t\tuint16_t key;\n@@ -916,6 +916,13 @@ bond_mode_8023ad_periodic_cb(void *arg)\n \t\tslave_id = internals->active_slaves[i];\n \t\tport = &bond_mode_8023ad_ports[slave_id];\n \n+\t\tif (short_timeout_updated) {\n+\t\t\tif (internals->mode4.short_timeout_enabled)\n+\t\t\t\tACTOR_STATE_SET(port, LACP_SHORT_TIMEOUT);\n+\t\t\telse\n+\t\t\t\tACTOR_STATE_CLR(port, LACP_SHORT_TIMEOUT);\n+\t\t}\n+\n \t\tif ((port->actor.key &\n \t\t\t\trte_cpu_to_be_16(BOND_LINK_FULL_DUPLEX_KEY)) == 0) {\n \n@@ -960,6 +967,9 @@ bond_mode_8023ad_periodic_cb(void *arg)\n \t\tshow_warnings(slave_id);\n \t}\n \n+\tif (short_timeout_updated)\n+\t\tinternals->mode4.short_timeout_updated = 0;\n+\n \trte_eal_alarm_set(internals->mode4.update_timeout_us,\n \t\t\tbond_mode_8023ad_periodic_cb, arg);\n }\n@@ -1054,7 +1064,6 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,\n \t/* Given slave must not be in active list. */\n \tRTE_ASSERT(find_slave_by_id(internals->active_slaves,\n \tinternals->active_slave_count, slave_id) == internals->active_slave_count);\n-\tRTE_SET_USED(internals); /* used only for assert when enabled */\n \n \tmemcpy(&port->actor, &initial, sizeof(struct port_params));\n \t/* Standard requires that port ID must be greater than 0.\n@@ -1065,7 +1074,9 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,\n \tmemcpy(&port->partner_admin, &initial, sizeof(struct port_params));\n \n \t/* default states */\n-\tport->actor_state = STATE_AGGREGATION | STATE_LACP_ACTIVE | STATE_DEFAULTED;\n+\tport->actor_state = STATE_AGGREGATION | STATE_LACP_ACTIVE |\n+\t\tSTATE_DEFAULTED | (internals->mode4.short_timeout_enabled ?\n+\t\tSTATE_LACP_SHORT_TIMEOUT : 0);\n \tport->partner_state = STATE_LACP_ACTIVE | STATE_AGGREGATION;\n \tport->sm_flags = SM_FLAGS_BEGIN;\n \n@@ -1213,6 +1224,7 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev,\n \tstruct mode8023ad_private *mode4 = &internals->mode4;\n \tuint64_t ms_ticks = rte_get_tsc_hz() / 1000;\n \n+\tmemset(conf, 0, sizeof(*conf));\n \tconf->fast_periodic_ms = mode4->fast_periodic_timeout / ms_ticks;\n \tconf->slow_periodic_ms = mode4->slow_periodic_timeout / ms_ticks;\n \tconf->short_timeout_ms = mode4->short_timeout / ms_ticks;\n@@ -1223,6 +1235,7 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev,\n \tconf->rx_marker_period_ms = mode4->rx_marker_timeout / ms_ticks;\n \tconf->slowrx_cb = mode4->slowrx_cb;\n \tconf->agg_selection = mode4->agg_selection;\n+\tconf->lacp_timeout_control = mode4->short_timeout_enabled;\n }\n \n static void\n@@ -1238,6 +1251,7 @@ bond_mode_8023ad_conf_get_default(struct rte_eth_bond_8023ad_conf *conf)\n \tconf->update_timeout_ms = BOND_MODE_8023AX_UPDATE_TIMEOUT_MS;\n \tconf->slowrx_cb = NULL;\n \tconf->agg_selection = AGG_STABLE;\n+\tconf->lacp_timeout_control = 0;\n }\n \n static void\n@@ -1278,6 +1292,11 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,\n \tmode4->slowrx_cb = conf->slowrx_cb;\n \tmode4->agg_selection = AGG_STABLE;\n \n+\tif (mode4->short_timeout_enabled != conf->lacp_timeout_control) {\n+\t\tmode4->short_timeout_enabled = conf->lacp_timeout_control;\n+\t\tmode4->short_timeout_updated = 1;\n+\t}\n+\n \tif (dev->data->dev_started)\n \t\tbond_mode_8023ad_start(dev);\n }\n@@ -1482,7 +1501,8 @@ bond_8023ad_setup_validate(uint16_t port_id,\n \t\t\t\tconf->aggregate_wait_timeout_ms == 0 ||\n \t\t\t\tconf->tx_period_ms == 0 ||\n \t\t\t\tconf->rx_marker_period_ms == 0 ||\n-\t\t\t\tconf->update_timeout_ms == 0) {\n+\t\t\t\tconf->update_timeout_ms == 0 ||\n+\t\t\t\tconf->lacp_timeout_control > 1) {\n \t\t\tRTE_BOND_LOG(ERR, \"given mode 4 configuration is invalid\");\n \t\t\treturn -EINVAL;\n \t\t}\ndiff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h\nindex 7e9a018..87f6b2f 100644\n--- a/drivers/net/bonding/rte_eth_bond_8023ad.h\n+++ b/drivers/net/bonding/rte_eth_bond_8023ad.h\n@@ -139,6 +139,9 @@ struct rte_eth_bond_8023ad_conf {\n \tuint32_t update_timeout_ms;\n \trte_eth_bond_8023ad_ext_slowrx_fn slowrx_cb;\n \tenum rte_bond_8023ad_agg_selection agg_selection;\n+\tuint8_t lacp_timeout_control;\n+\t/**< LACPDU.Actor_State.LACP_Timeout flag: 0=Long 1=Short. */\n+\tuint8_t reserved_8s[3];\n };\n \n struct rte_eth_bond_8023ad_slave_info {\n",
    "prefixes": [
        "4/7"
    ]
}