get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66033,
    "url": "http://patches.dpdk.org/api/patches/66033/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200225092903.38455-3-huwei013@chinasoftinc.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": "<20200225092903.38455-3-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200225092903.38455-3-huwei013@chinasoftinc.com",
    "date": "2020-02-25T09:29:03",
    "name": "[2/2] net/bonding: fix MAC address when one port resets",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3b39a08471a23c67928d298327af37641bd8de94",
    "submitter": {
        "id": 1537,
        "url": "http://patches.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.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/20200225092903.38455-3-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 8679,
            "url": "http://patches.dpdk.org/api/series/8679/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8679",
            "date": "2020-02-25T09:29:01",
            "name": "fixes for bonding",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8679/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66033/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/66033/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 4B917A0524;\n\tTue, 25 Feb 2020 10:29:47 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8D2671BFD1;\n\tTue, 25 Feb 2020 10:29:40 +0100 (CET)",
            "from incedge.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id 1F8EC1BFB5\n for <dev@dpdk.org>; Tue, 25 Feb 2020 10:29:36 +0100 (CET)",
            "from mail.chinasoftinc.com (inccas002.ito.icss [10.168.0.52]) by\n incedge.chinasoftinc.com with ESMTP id 69dfd7mzFP3oUeNP (version=TLSv1\n cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO) for <dev@dpdk.org>;\n Tue, 25 Feb 2020 17:29:12 +0800 (CST)",
            "from localhost.localdomain (114.119.4.74) by INCCAS002.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.439.0; Tue, 25 Feb 2020\n 17:29:08 +0800"
        ],
        "X-ASG-Debug-ID": "1582622944-0a3dd113ab17cf0004-TfluYd",
        "X-Barracuda-Envelope-From": "huwei013@chinasoftinc.com",
        "X-Barracuda-RBL-Trusted-Forwarder": [
            "10.168.0.52",
            "10.168.0.60"
        ],
        "X-ASG-Whitelist": "Client",
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Tue, 25 Feb 2020 17:29:03 +0800",
        "X-ASG-Orig-Subj": "[PATCH 2/2] net/bonding: fix MAC address when one port resets",
        "Message-ID": "<20200225092903.38455-3-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20200225092903.38455-1-huwei013@chinasoftinc.com>",
        "References": "<20200225092903.38455-1-huwei013@chinasoftinc.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[114.119.4.74]",
        "X-Barracuda-Connect": "inccas002.ito.icss[10.168.0.52]",
        "X-Barracuda-Start-Time": "1582622952",
        "X-Barracuda-Encrypted": "ECDHE-RSA-AES256-SHA",
        "X-Barracuda-URL": "https://spam.chinasoftinc.com:443/cgi-mod/mark.cgi",
        "X-Virus-Scanned": "by bsmtpd at chinasoftinc.com",
        "X-Barracuda-Scan-Msg-Size": "3111",
        "Subject": "[dpdk-dev] [PATCH 2/2] net/bonding: fix MAC address when one port\n\tresets",
        "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": "From: \"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>\n\nCurrently, based on a active-backup bond device, in the following 2 cases:\n1) The primary port resets. The link status of the primary port changes\n   from up to down.\n2) When switching the active port, one slave port resets at the same time.\none slave port changes to the primary port, but the new primary port's MAC\naddress probably cannot change to the bond device's MAC address. And we\ncan't continue receive packets whose destination MAC addresses are the same\nas the bond devices's MAC address.\n\nThe current bonding PMD driver call mac_address_slaves_update function to\nmodify the MAC address of all slaves devices. In mac_address_slaves_update\nfunction, the rte_eth_dev_default_mac_addr_set API function is called to\nset the MAC address of the slave devices in turn in the for loop statement.\n\nWhen one port reset, calling rte_eth_dev_default_mac_addr_set API fails\nbecause the firmware will not respond to the commands from the driver,\nand exit the loop, so other slave devices cannot continue to update the\nMAC address.\n\nThis patch fixes the issue by avoid exiting the loop when calling\nrte_eth_dev_default_mac_addr_set fails.\n\nFixes: 2efb58cbab6e (\"bond: new link bonding library\")\nCc: stable@dpdk.org\n\nSigned-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\nSigned-off-by: Chunsong Feng <fengchunsong@huawei.com>\nSigned-off-by: Xuan Li <lixuan47@hisilicon.com>\n---\n drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c\nindex ddae3518c..ba3f342e7 100644\n--- a/drivers/net/bonding/rte_eth_bond_pmd.c\n+++ b/drivers/net/bonding/rte_eth_bond_pmd.c\n@@ -1502,6 +1502,7 @@ int\n mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)\n {\n \tstruct bond_dev_private *internals = bonded_eth_dev->data->dev_private;\n+\tbool setted;\n \tint i;\n \n \t/* Update slave devices MAC addresses */\n@@ -1529,6 +1530,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)\n \tcase BONDING_MODE_TLB:\n \tcase BONDING_MODE_ALB:\n \tdefault:\n+\t\tsetted = true;\n \t\tfor (i = 0; i < internals->slave_count; i++) {\n \t\t\tif (internals->slaves[i].port_id ==\n \t\t\t\t\tinternals->current_primary_port) {\n@@ -1537,7 +1539,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)\n \t\t\t\t\t\tbonded_eth_dev->data->mac_addrs)) {\n \t\t\t\t\tRTE_BOND_LOG(ERR, \"Failed to update port Id %d MAC address\",\n \t\t\t\t\t\t\tinternals->current_primary_port);\n-\t\t\t\t\treturn -1;\n+\t\t\t\t\tsetted = false;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (rte_eth_dev_default_mac_addr_set(\n@@ -1545,10 +1547,12 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)\n \t\t\t\t\t\t&internals->slaves[i].persisted_mac_addr)) {\n \t\t\t\t\tRTE_BOND_LOG(ERR, \"Failed to update port Id %d MAC address\",\n \t\t\t\t\t\t\tinternals->slaves[i].port_id);\n-\t\t\t\t\treturn -1;\n+\t\t\t\t\tsetted = false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n+\t\tif (!setted)\n+\t\t\treturn -1;\n \t}\n \n \treturn 0;\n",
    "prefixes": [
        "2/2"
    ]
}