get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 114062,
    "url": "https://patches.dpdk.org/api/patches/114062/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/781607bf0fe0426f9d5882a7b88ccd13@huawei.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": "<781607bf0fe0426f9d5882a7b88ccd13@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/781607bf0fe0426f9d5882a7b88ccd13@huawei.com",
    "date": "2022-07-20T06:39:44",
    "name": "答复: [dpdk-dev] [PATCH] net/bonding: fix double get slave link status",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "19edf715b7eb53d65c2135cfad4469673187c4c1",
    "submitter": {
        "id": 1944,
        "url": "https://patches.dpdk.org/api/people/1944/?format=api",
        "name": "humin (Q)",
        "email": "humin29@huawei.com"
    },
    "delegate": {
        "id": 3961,
        "url": "https://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/781607bf0fe0426f9d5882a7b88ccd13@huawei.com/mbox/",
    "series": [
        {
            "id": 24035,
            "url": "https://patches.dpdk.org/api/series/24035/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24035",
            "date": "2022-07-20T06:39:44",
            "name": "答复: [dpdk-dev] [PATCH] net/bonding: fix double get slave link status",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/24035/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/114062/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/114062/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 BB399A0032;\n\tWed, 20 Jul 2022 08:39:49 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 957F940697;\n\tWed, 20 Jul 2022 08:39:49 +0200 (CEST)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 23CEF4003C;\n Wed, 20 Jul 2022 08:39:47 +0200 (CEST)",
            "from dggpemm500024.china.huawei.com (unknown [172.30.72.54])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LnmGz2G2JzlVm0;\n Wed, 20 Jul 2022 14:38:03 +0800 (CST)",
            "from dggpemm500006.china.huawei.com (7.185.36.236) by\n dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.24; Wed, 20 Jul 2022 14:39:45 +0800",
            "from kwepemi500012.china.huawei.com (7.221.188.12) by\n dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.24; Wed, 20 Jul 2022 14:39:45 +0800",
            "from kwepemi500012.china.huawei.com ([7.221.188.12]) by\n kwepemi500012.china.huawei.com ([7.221.188.12]) with mapi id 15.01.2375.024;\n Wed, 20 Jul 2022 14:39:44 +0800"
        ],
        "From": "\"humin (Q)\" <humin29@huawei.com>",
        "To": "wangyunjian <wangyunjian@huawei.com>, \"dev@dpdk.org\" <dev@dpdk.org>",
        "CC": "\"chas3@att.com\" <chas3@att.com>, Huangshaozhang\n <huangshaozhang@huawei.com>, \"stable@dpdk.org\" <stable@dpdk.org>",
        "Subject": "\n =?eucgb2312_cn?b?tPC4tDogW2RwZGstZGV2XSBbUEFUQ0hdIG5ldC9ib25kaW5nOiBmaXgg?=\n\t=?eucgb2312_cn?b?ZG91YmxlIGdldCBzbGF2ZSBsaW5rIHN0YXR1cw==?=",
        "Thread-Topic": "[dpdk-dev] [PATCH] net/bonding: fix double get slave link status",
        "Thread-Index": "AQHYlqlOk/0ozG+kYEWFmTLJ7jR46a2G2YFA",
        "Date": "Wed, 20 Jul 2022 06:39:44 +0000",
        "Message-ID": "<781607bf0fe0426f9d5882a7b88ccd13@huawei.com>",
        "References": "\n <598d08fa7e4da0ba42ba21ed3461ead4f6f9d23f.1657710002.git.wangyunjian@huawei.com>",
        "In-Reply-To": "\n <598d08fa7e4da0ba42ba21ed3461ead4f6f9d23f.1657710002.git.wangyunjian@huawei.com>",
        "Accept-Language": "zh-CN, en-US",
        "Content-Language": "zh-CN",
        "X-MS-Has-Attach": "",
        "X-MS-TNEF-Correlator": "",
        "x-originating-ip": "[10.78.23.197]",
        "Content-Type": "text/plain; charset=\"gb2312\"",
        "Content-Transfer-Encoding": "base64",
        "MIME-Version": "1.0",
        "X-CFilter-Loop": "Reflected",
        "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": "Acked-by: Min Hu (Connor) <humin29@huawei.com>\n\n-----邮件原件-----\n发件人: wangyunjian <wangyunjian@huawei.com> \n发送时间: 2022年7月13日 19:11\n收件人: dev@dpdk.org\n抄送: chas3@att.com; humin (Q) <humin29@huawei.com>; Huangshaozhang <huangshaozhang@huawei.com>; wangyunjian <wangyunjian@huawei.com>; stable@dpdk.org\n主题: [dpdk-dev] [PATCH] net/bonding: fix double get slave link status\n\nWhen link status polling mode is using, the slave link status is queried twice, which may be inconsistent. To fix this, we can keep the lastest queried link state.\n\nFixes: a45b288ef21a (\"bond: support link status polling\")\nCc: stable@dpdk.org\n\nSigned-off-by: Yunjian Wang <wangyunjian@huawei.com>\n---\n drivers/net/bonding/rte_eth_bond_pmd.c | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)\n\n \tfor (i = 0; i < internals->slave_count; i++) {\n \t\tif (internals->slaves[i].port_id == port_id) {\n \t\t\tvalid_slave = 1;\n+\t\t\tslave_idx = i;\n \t\t\tbreak;\n \t\t}\n \t}\n@@ -3000,6 +2998,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,\n \t * slaves\n \t */\n \tbond_ethdev_link_update(bonded_eth_dev, 0);\n+\tinternals->slaves[slave_idx].last_link_status = link.link_status;\n \n \tif (lsc_flag) {\n \t\t/* Cancel any possible outstanding interrupts if delays are enabled */\n--\n2.27.0",
    "diff": "diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c\r\nindex 845e8fd0cf..5c4c47251b 100644\r\n--- a/drivers/net/bonding/rte_eth_bond_pmd.c\r\n+++ b/drivers/net/bonding/rte_eth_bond_pmd.c\r\n@@ -2390,9 +2390,6 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg)\r\n \t\t\t * event callback */\r\n \t\t\tif (slave_ethdev->data->dev_link.link_status !=\r\n \t\t\t\t\tinternals->slaves[i].last_link_status) {\r\n-\t\t\t\tinternals->slaves[i].last_link_status =\r\n-\t\t\t\t\t\tslave_ethdev->data->dev_link.link_status;\r\n-\r\n \t\t\t\tbond_ethdev_lsc_event_callback(internals->slaves[i].port_id,\r\n \t\t\t\t\t\tRTE_ETH_EVENT_INTR_LSC,\r\n \t\t\t\t\t\t&bonded_ethdev->data->port_id,\r\n@@ -2891,7 +2888,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,\r\n \r\n \tuint8_t lsc_flag = 0;\r\n \tint valid_slave = 0;\r\n-\tuint16_t active_pos;\r\n+\tuint16_t active_pos, slave_idx;\r\n \tuint16_t i;\r\n \r\n \tif (type != RTE_ETH_EVENT_INTR_LSC || param == NULL) @@ -2912,6 +2909,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,\r\n",
    "prefixes": []
}