get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87435,
    "url": "http://patches.dpdk.org/api/patches/87435/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210127160948.6008-29-lironh@marvell.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": "<20210127160948.6008-29-lironh@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210127160948.6008-29-lironh@marvell.com",
    "date": "2021-01-27T16:09:42",
    "name": "[v3,28/34] net/mvpp2: apply flow-ctrl after port init",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8a0051d46567d8d5ea87e0841f0d28ea2deb7717",
    "submitter": {
        "id": 996,
        "url": "http://patches.dpdk.org/api/people/996/?format=api",
        "name": "Liron Himi",
        "email": "lironh@marvell.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/20210127160948.6008-29-lironh@marvell.com/mbox/",
    "series": [
        {
            "id": 14976,
            "url": "http://patches.dpdk.org/api/series/14976/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14976",
            "date": "2021-01-27T16:09:14",
            "name": "net/mvpp2: misc updates",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/14976/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/87435/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/87435/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 871EAA052A;\n\tWed, 27 Jan 2021 17:15:55 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DFE44140F67;\n\tWed, 27 Jan 2021 17:11:02 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id A04C1140F75\n for <dev@dpdk.org>; Wed, 27 Jan 2021 17:10:59 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 10RG62Li017168; Wed, 27 Jan 2021 08:10:58 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 36b1xphfv1-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 27 Jan 2021 08:10:58 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Wed, 27 Jan 2021 08:10:55 -0800",
            "from pt-lxl0023.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Wed, 27 Jan 2021 08:10:54 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=8dDNCL8BezX3IL4ps2KXPTia9s7lue/F2uovG4Xwc9o=;\n b=LcstDsWC7/wrrqgCbqo2XMYRno6bQx756/J48WFgbsuZKJq14H6VT+Vwe6I1zJPTzGGE\n +MrRmuEukixG9dJN9p2ffGmq74W+/KkoiLdmAgMp2RdH/D6zS0zreSpGxHU9mkBTB01P\n sjot/EUC13qYAYTT453Iheh4gvF5Ozj5002UsPjCIdVNk4vOSeeCiD2w1k2FVHsFsKs2\n 0yNSwaz7qYmFA4AR+6Vg2mJrUoTvCu0Vd8gy8/UBOzg4F9KBk3VpEnepX4fGGVW0G6ut\n Z7w7E/4xZzrcpbuyKXB0ok+aQ+3ukfK2X0tlETOOqLTKiLAn0keb4fOo/MaxOXrELzyA xg==",
        "From": "<lironh@marvell.com>",
        "To": "<jerinj@marvell.com>, <ferruh.yigit@intel.com>",
        "CC": "<dev@dpdk.org>, Liron Himi <lironh@marvell.com>",
        "Date": "Wed, 27 Jan 2021 18:09:42 +0200",
        "Message-ID": "<20210127160948.6008-29-lironh@marvell.com>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20210127160948.6008-1-lironh@marvell.com>",
        "References": "<20210122191925.24308-1-lironh@marvell.com>\n <20210127160948.6008-1-lironh@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737\n definitions=2021-01-27_05:2021-01-27,\n 2021-01-27 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v3 28/34] net/mvpp2: apply flow-ctrl after port\n init",
        "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": "From: Liron Himi <lironh@marvell.com>\n\nIn case ppio was not initialized yet (only at 'start' function)\nthe flow-ctrl setting should be saved for later stage.\n\nSigned-off-by: Liron Himi <lironh@marvell.com>\n---\n drivers/net/mvpp2/mrvl_ethdev.c | 26 +++++++++++++++++++++-----\n drivers/net/mvpp2/mrvl_ethdev.h |  2 ++\n 2 files changed, 23 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c\nindex fad08dfd4a..16fb24b809 100644\n--- a/drivers/net/mvpp2/mrvl_ethdev.c\n+++ b/drivers/net/mvpp2/mrvl_ethdev.c\n@@ -164,6 +164,8 @@ static int\n mrvl_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on);\n static int mrvl_promiscuous_enable(struct rte_eth_dev *dev);\n static int mrvl_allmulticast_enable(struct rte_eth_dev *dev);\n+static int\n+mrvl_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf);\n \n #define MRVL_XSTATS_TBL_ENTRY(name) { \\\n \t#name, offsetof(struct pp2_ppio_statistics, name),\t\\\n@@ -915,6 +917,15 @@ mrvl_dev_start(struct rte_eth_dev *dev)\n \tif (dev->data->promiscuous == 1)\n \t\tmrvl_promiscuous_enable(dev);\n \n+\tif (priv->flow_ctrl) {\n+\t\tret = mrvl_flow_ctrl_set(dev, &priv->fc_conf);\n+\t\tif (ret) {\n+\t\t\tMRVL_LOG(ERR, \"Failed to configure flow control\");\n+\t\t\tgoto out;\n+\t\t}\n+\t\tpriv->flow_ctrl = 0;\n+\t}\n+\n \tif (dev->data->dev_link.link_status == ETH_LINK_UP) {\n \t\tret = mrvl_dev_set_link_up(dev);\n \t\tif (ret) {\n@@ -2150,8 +2161,10 @@ mrvl_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)\n \tstruct mrvl_priv *priv = dev->data->dev_private;\n \tint ret, en;\n \n-\tif (!priv)\n-\t\treturn -EPERM;\n+\tif (!priv->ppio) {\n+\t\tmemcpy(fc_conf, &priv->fc_conf, sizeof(struct rte_eth_fc_conf));\n+\t\treturn 0;\n+\t}\n \n \tfc_conf->autoneg = 1;\n \tret = pp2_ppio_get_rx_pause(priv->ppio, &en);\n@@ -2197,9 +2210,6 @@ mrvl_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)\n \tint ret;\n \tint rx_en, tx_en;\n \n-\tif (!priv)\n-\t\treturn -EPERM;\n-\n \tif (fc_conf->high_water ||\n \t    fc_conf->low_water ||\n \t    fc_conf->pause_time ||\n@@ -2214,6 +2224,12 @@ mrvl_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)\n \t\treturn -EINVAL;\n \t}\n \n+\tif (!priv->ppio) {\n+\t\tmemcpy(&priv->fc_conf, fc_conf, sizeof(struct rte_eth_fc_conf));\n+\t\tpriv->flow_ctrl = 1;\n+\t\treturn 0;\n+\t}\n+\n \tswitch (fc_conf->mode) {\n \tcase RTE_FC_FULL:\n \t\trx_en = 1;\ndiff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h\nindex 42b0cc0531..0ee7208fbd 100644\n--- a/drivers/net/mvpp2/mrvl_ethdev.h\n+++ b/drivers/net/mvpp2/mrvl_ethdev.h\n@@ -160,6 +160,8 @@ struct mrvl_priv {\n \tuint8_t isolated;\n \tuint8_t multiseg;\n \tuint16_t max_mtu;\n+\tuint8_t\tflow_ctrl;\n+\tstruct rte_eth_fc_conf fc_conf;\n \n \tstruct pp2_ppio_params ppio_params;\n \tstruct pp2_cls_qos_tbl_params qos_tbl_params;\n",
    "prefixes": [
        "v3",
        "28/34"
    ]
}