get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86711,
    "url": "https://patches.dpdk.org/api/patches/86711/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/92d7ce2b978c6dd777d2c25e536530972789d10c.1610730372.git.rahul.lakkireddy@chelsio.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": "<92d7ce2b978c6dd777d2c25e536530972789d10c.1610730372.git.rahul.lakkireddy@chelsio.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/92d7ce2b978c6dd777d2c25e536530972789d10c.1610730372.git.rahul.lakkireddy@chelsio.com",
    "date": "2021-01-15T17:19:17",
    "name": "[2/2] net/cxgbe: avoid link FEC retraining during probe",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "4577e48009548cc666f67d4c669c5f5db12cccad",
    "submitter": {
        "id": 241,
        "url": "https://patches.dpdk.org/api/people/241/?format=api",
        "name": "Rahul Lakkireddy",
        "email": "rahul.lakkireddy@chelsio.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/92d7ce2b978c6dd777d2c25e536530972789d10c.1610730372.git.rahul.lakkireddy@chelsio.com/mbox/",
    "series": [
        {
            "id": 14785,
            "url": "https://patches.dpdk.org/api/series/14785/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14785",
            "date": "2021-01-15T17:19:15",
            "name": "net/cxgbe: minor fixes for link related changes",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/14785/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/86711/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/86711/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 D3E33A0A05;\n\tFri, 15 Jan 2021 18:36:39 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3056D1411FE;\n\tFri, 15 Jan 2021 18:36:34 +0100 (CET)",
            "from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8])\n by mails.dpdk.org (Postfix) with ESMTP id 33B4D1411FC\n for <dev@dpdk.org>; Fri, 15 Jan 2021 18:36:32 +0100 (CET)",
            "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id 10FHaTdQ013288;\n Fri, 15 Jan 2021 09:36:29 -0800"
        ],
        "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>",
        "To": "dev@dpdk.org",
        "Cc": "kaara.satwik@chelsio.com",
        "Date": "Fri, 15 Jan 2021 22:49:17 +0530",
        "Message-Id": "\n <92d7ce2b978c6dd777d2c25e536530972789d10c.1610730372.git.rahul.lakkireddy@chelsio.com>",
        "X-Mailer": "git-send-email 2.5.3",
        "In-Reply-To": [
            "<cover.1610730372.git.rahul.lakkireddy@chelsio.com>",
            "<cover.1610730372.git.rahul.lakkireddy@chelsio.com>"
        ],
        "References": [
            "<cover.1610730372.git.rahul.lakkireddy@chelsio.com>",
            "<cover.1610730372.git.rahul.lakkireddy@chelsio.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH 2/2] net/cxgbe: avoid link FEC retraining during\n probe",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "If link FEC has already been saved by firmware during link training\nin probe, then use the saved FEC value, instead of retraining the\nlink. If link training is still not complete in probe, then firmware\nwill send the actual FEC later in link config change reply after\ntraining is complete.\n\nAlso, there can only be 1 active FEC at any time. So, simplify the\nFEC get ops. If FEC is supported and if none of the supported FEC\ncaps are set, then assume NOFEC by default, instead of AUTO.\n\nFixes: b99a547371e3 (\"net/cxgbe: support configuring link FEC\")\n\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\n---\n drivers/net/cxgbe/base/t4_hw.c   | 11 ++++++++++-\n drivers/net/cxgbe/cxgbe_ethdev.c | 21 +++++----------------\n 2 files changed, 15 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c\nindex 8587eec60..ef20dc667 100644\n--- a/drivers/net/cxgbe/base/t4_hw.c\n+++ b/drivers/net/cxgbe/base/t4_hw.c\n@@ -4700,6 +4700,7 @@ void t4_reset_link_config(struct adapter *adap, int idx)\n void t4_init_link_config(struct port_info *pi, u32 pcaps, u32 acaps,\n \t\t\t u8 mdio_addr, u8 port_type, u8 mod_type)\n {\n+\tu8 fec_rs = 0, fec_baser = 0, fec_none = 0;\n \tstruct link_config *lc = &pi->link_cfg;\n \n \tlc->pcaps = pcaps;\n@@ -4722,8 +4723,16 @@ void t4_init_link_config(struct port_info *pi, u32 pcaps, u32 acaps,\n \n \t/* Reset FEC caps to default values */\n \tif (lc->pcaps & V_FW_PORT_CAP32_FEC(M_FW_PORT_CAP32_FEC)) {\n+\t\tif (lc->acaps & FW_PORT_CAP32_FEC_RS)\n+\t\t\tfec_rs = 1;\n+\t\telse if (lc->acaps & FW_PORT_CAP32_FEC_BASER_RS)\n+\t\t\tfec_baser = 1;\n+\t\telse\n+\t\t\tfec_none = 1;\n+\n \t\tlc->admin_caps &= ~V_FW_PORT_CAP32_FEC(M_FW_PORT_CAP32_FEC);\n-\t\tt4_set_link_fec(pi, 0, 0, 0, &lc->admin_caps);\n+\t\tt4_set_link_fec(pi, fec_rs, fec_baser, fec_none,\n+\t\t\t\t&lc->admin_caps);\n \t}\n \n \tif (lc->pcaps & FW_PORT_CAP32_FORCE_FEC)\ndiff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c\nindex 6f481551d..eb4258fe1 100644\n--- a/drivers/net/cxgbe/cxgbe_ethdev.c\n+++ b/drivers/net/cxgbe/cxgbe_ethdev.c\n@@ -1256,24 +1256,13 @@ static int cxgbe_fec_get(struct rte_eth_dev *dev, uint32_t *fec_capa)\n \tif (!(lc->pcaps & V_FW_PORT_CAP32_FEC(M_FW_PORT_CAP32_FEC)))\n \t\treturn -EOPNOTSUPP;\n \n-\tif (caps & FW_PORT_CAP32_FEC_NO_FEC) {\n-\t\tfec_caps = RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC);\n-\t\tgoto out;\n-\t}\n-\n-\tif (caps & FW_PORT_CAP32_FEC_BASER_RS) {\n-\t\tfec_caps = RTE_ETH_FEC_MODE_CAPA_MASK(BASER);\n-\t\tgoto out;\n-\t}\n-\n-\tif (caps & FW_PORT_CAP32_FEC_RS) {\n+\tif (caps & FW_PORT_CAP32_FEC_RS)\n \t\tfec_caps = RTE_ETH_FEC_MODE_CAPA_MASK(RS);\n-\t\tgoto out;\n-\t}\n-\n-\tfec_caps = RTE_ETH_FEC_MODE_CAPA_MASK(AUTO);\n+\telse if (caps & FW_PORT_CAP32_FEC_BASER_RS)\n+\t\tfec_caps = RTE_ETH_FEC_MODE_CAPA_MASK(BASER);\n+\telse\n+\t\tfec_caps = RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC);\n \n-out:\n \t*fec_capa = fec_caps;\n \treturn 0;\n }\n",
    "prefixes": [
        "2/2"
    ]
}