get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50329,
    "url": "http://patches.dpdk.org/api/patches/50329/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190214191112.31018-1-3chas3@gmail.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": "<20190214191112.31018-1-3chas3@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190214191112.31018-1-3chas3@gmail.com",
    "date": "2019-02-14T19:11:12",
    "name": "net/bonding: fix invalid link status",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "439467e4546b70dd0adcd2a211ddcbb418cb4d23",
    "submitter": {
        "id": 341,
        "url": "http://patches.dpdk.org/api/people/341/?format=api",
        "name": "Chas Williams",
        "email": "3chas3@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/20190214191112.31018-1-3chas3@gmail.com/mbox/",
    "series": [
        {
            "id": 3459,
            "url": "http://patches.dpdk.org/api/series/3459/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3459",
            "date": "2019-02-14T19:11:12",
            "name": "net/bonding: fix invalid link status",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/3459/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/50329/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/50329/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 4790C1B49C;\n\tThu, 14 Feb 2019 20:11:19 +0100 (CET)",
            "from mail-qt1-f193.google.com (mail-qt1-f193.google.com\n\t[209.85.160.193]) by dpdk.org (Postfix) with ESMTP id 32FCC1B486;\n\tThu, 14 Feb 2019 20:11:18 +0100 (CET)",
            "by mail-qt1-f193.google.com with SMTP id n32so8101998qte.11;\n\tThu, 14 Feb 2019 11:11:18 -0800 (PST)",
            "from monolith.fios-router.home\n\t(pool-96-255-82-34.washdc.fios.verizon.net. [96.255.82.34])\n\tby smtp.gmail.com with ESMTPSA id\n\tc202sm2197710qkb.19.2019.02.14.11.11.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 14 Feb 2019 11:11:16 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=ZkYdjsFKR1g8HuWCGOxLLmpHzJt40K1+k/ZQrTZtljo=;\n\tb=daCWi+0Tx3gbl7SCnBGZOAcc6iQiLAsZco2fPzewBR1UhmH7/WvTArn+TNm4hehf5G\n\tf15tYGmqnIKciHc0yE+kqlSCmJEV92l5IliSdFQXasrZ/HaXP9zNXugMl9/UPDU3u9Em\n\t1cBGWtW9b6aojGO8h0GZ+EARCfuIYe9KUOBsRzvVpEKxBmaGpgIwfFmShMV8RD6fPGay\n\tc5W0QQU0xzO2FsWnZkka6ELIg79mn1MCmjfy8KFiH6XuSHM9/iG8gzABAotqT5oKzJXZ\n\t8PzGLUrdBJESwpBPSlp813bSENFO1Hv8ih7JxFawIVvLvQQmgMsZRErSXZz63jt8u4Du\n\tPtPQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=ZkYdjsFKR1g8HuWCGOxLLmpHzJt40K1+k/ZQrTZtljo=;\n\tb=UwXIEBOrUg1u9VzB18rp4z20rxYZKele3ZiU5TGiuWlLAnn3WzIeVCEx0kyk9oFnzi\n\tCDQStaOm3nYrHsv+IHEnOl5nwcKCmITOKMFYUMqhdy00sUI+b2iwxCDcoBQ6TGseT+SI\n\tZhKXlBmdvin8WYjxytIdiaptjB99yiFIoItKteemosjcQSJFcd3QnSYhOpRg6jTWewyG\n\tIESPHm8zqN2f10EMMfdhD1eGU8hTPi4/D2CiSBfZwgyRmPdpGSOneER0kMkwcGBqvf4n\n\tWuAtc+IhU8REdbwXNnksTy8n7kN0Ks0Jeikg3WthPgzpb8rqof1T6pf8NcdS1PB3nXfq\n\txR3Q==",
        "X-Gm-Message-State": "AHQUAuaZI0klBdMwIeEhyth7Z8GCdHyZEukhUswdJhUbQrzHSzRw4uS8\n\t7lTRl/CNjksk9jnKChe6JdHbWIQK",
        "X-Google-Smtp-Source": "AHgI3IbhuMgBF06ji0NaPaMR7+7DqAohftcR4qDdB/4vbetCtVdJul26X3qzYIPJiTNX+r6cqYHqNQ==",
        "X-Received": "by 2002:a0c:bec3:: with SMTP id f3mr4294403qvj.127.1550171477527;\n\tThu, 14 Feb 2019 11:11:17 -0800 (PST)",
        "From": "Chas Williams <3chas3@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "Chas Williams <chas3@att.com>,\n\tstable@dpdk.org",
        "Date": "Thu, 14 Feb 2019 14:11:12 -0500",
        "Message-Id": "<20190214191112.31018-1-3chas3@gmail.com>",
        "X-Mailer": "git-send-email 2.17.2",
        "Subject": "[dpdk-dev] [PATCH] net/bonding: fix invalid link status",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Chas Williams <chas3@att.com>\n\nCopying the link properties of the first slave added may copy an\ninvalid link status. The speed and duplex of the slave may not\nbe known at this time. Delay setting the properties until the\nfirst slave reports as link up. Note that we are still ignoring\nan error from link_properties_valid. For some bonding modes,\n802.3ad, we should not activate the slave if it does not have\nmatching link properties.\n\nFixes: a45b288ef21a (\"bond: support link status polling\")\nCc: stable@dpdk.org\nSigned-off-by: Chas Williams <chas3@att.com>\n---\n drivers/net/bonding/rte_eth_bond_api.c     |  4 ---\n drivers/net/bonding/rte_eth_bond_pmd.c     | 31 +++++++++++++---------\n drivers/net/bonding/rte_eth_bond_private.h |  7 -----\n 3 files changed, 18 insertions(+), 24 deletions(-)",
    "diff": "diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c\nindex e5e146540..57ef2f001 100644\n--- a/drivers/net/bonding/rte_eth_bond_api.c\n+++ b/drivers/net/bonding/rte_eth_bond_api.c\n@@ -484,10 +484,6 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)\n \t\t\t}\n \t\t}\n \n-\t\t/* Inherit eth dev link properties from first slave */\n-\t\tlink_properties_set(bonded_eth_dev,\n-\t\t\t\t&(slave_eth_dev->data->dev_link));\n-\n \t\t/* Make primary slave */\n \t\tinternals->primary_port = slave_port_id;\n \t\tinternals->current_primary_port = slave_port_id;\ndiff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c\nindex 61e731a8f..c4a2b955c 100644\n--- a/drivers/net/bonding/rte_eth_bond_pmd.c\n+++ b/drivers/net/bonding/rte_eth_bond_pmd.c\n@@ -1449,7 +1449,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,\n \treturn max_nb_of_tx_pkts;\n }\n \n-void\n+static void\n link_properties_set(struct rte_eth_dev *ethdev, struct rte_eth_link *slave_link)\n {\n \tstruct bond_dev_private *bond_ctx = ethdev->data->dev_private;\n@@ -1474,7 +1474,7 @@ link_properties_set(struct rte_eth_dev *ethdev, struct rte_eth_link *slave_link)\n \t}\n }\n \n-int\n+static int\n link_properties_valid(struct rte_eth_dev *ethdev,\n \t\tstruct rte_eth_link *slave_link)\n {\n@@ -2693,16 +2693,6 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,\n \t\tif (active_pos < internals->active_slave_count)\n \t\t\tgoto link_update;\n \n-\t\t/* if no active slave ports then set this port to be primary port */\n-\t\tif (internals->active_slave_count < 1) {\n-\t\t\t/* If first active slave, then change link status */\n-\t\t\tbonded_eth_dev->data->dev_link.link_status = ETH_LINK_UP;\n-\t\t\tinternals->current_primary_port = port_id;\n-\t\t\tlsc_flag = 1;\n-\n-\t\t\tmac_address_slaves_update(bonded_eth_dev);\n-\t\t}\n-\n \t\t/* check link state properties if bonded link is up*/\n \t\tif (bonded_eth_dev->data->dev_link.link_status == ETH_LINK_UP) {\n \t\t\tif (link_properties_valid(bonded_eth_dev, &link) != 0)\n@@ -2714,9 +2704,24 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,\n \t\t\tlink_properties_set(bonded_eth_dev, &link);\n \t\t}\n \n+\t\t/* If no active slave ports then set this port to be\n+\t\t * the primary port.\n+\t\t */\n+\t\tif (internals->active_slave_count < 1) {\n+\t\t\t/* If first active slave, then change link status */\n+\t\t\tbonded_eth_dev->data->dev_link.link_status =\n+\t\t\t\t\t\t\t\tETH_LINK_UP;\n+\t\t\tinternals->current_primary_port = port_id;\n+\t\t\tlsc_flag = 1;\n+\n+\t\t\tmac_address_slaves_update(bonded_eth_dev);\n+\t\t}\n+\n \t\tactivate_slave(bonded_eth_dev, port_id);\n \n-\t\t/* If user has defined the primary port then default to using it */\n+\t\t/* If the user has defined the primary port then default to\n+\t\t * using it.\n+\t\t */\n \t\tif (internals->user_defined_primary_port &&\n \t\t\t\tinternals->primary_port == port_id)\n \t\t\tbond_ethdev_primary_set(internals, port_id);\ndiff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h\nindex 3ea5d686b..032ffed02 100644\n--- a/drivers/net/bonding/rte_eth_bond_private.h\n+++ b/drivers/net/bonding/rte_eth_bond_private.h\n@@ -222,13 +222,6 @@ deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);\n void\n activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);\n \n-void\n-link_properties_set(struct rte_eth_dev *bonded_eth_dev,\n-\t\tstruct rte_eth_link *slave_dev_link);\n-int\n-link_properties_valid(struct rte_eth_dev *bonded_eth_dev,\n-\t\tstruct rte_eth_link *slave_dev_link);\n-\n int\n mac_address_set(struct rte_eth_dev *eth_dev, struct ether_addr *new_mac_addr);\n \n",
    "prefixes": []
}