get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 122261,
    "url": "https://patches.dpdk.org/api/patches/122261/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230118073154.903012-9-mingxia.liu@intel.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": "<20230118073154.903012-9-mingxia.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230118073154.903012-9-mingxia.liu@intel.com",
    "date": "2023-01-18T07:31:44",
    "name": "[v3,08/21] net/cpfl: support MTU configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "07ce8ebb869a8a850cabb000f67ca4ef512811dd",
    "submitter": {
        "id": 2514,
        "url": "https://patches.dpdk.org/api/people/2514/?format=api",
        "name": "Liu, Mingxia",
        "email": "mingxia.liu@intel.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/20230118073154.903012-9-mingxia.liu@intel.com/mbox/",
    "series": [
        {
            "id": 26588,
            "url": "https://patches.dpdk.org/api/series/26588/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=26588",
            "date": "2023-01-18T07:31:36",
            "name": "add support for cpfl PMD in DPDK",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/26588/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/122261/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/122261/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 E9C534240B;\n\tWed, 18 Jan 2023 09:28:38 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CBE2042D72;\n\tWed, 18 Jan 2023 09:27:56 +0100 (CET)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id 8C58142D68\n for <dev@dpdk.org>; Wed, 18 Jan 2023 09:27:55 +0100 (CET)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Jan 2023 00:27:55 -0800",
            "from dpdk-mingxial-01.sh.intel.com ([10.67.119.167])\n by orsmga007.jf.intel.com with ESMTP; 18 Jan 2023 00:27:50 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1674030475; x=1705566475;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=Za0savtRrn/MzPK0uES8ThZOXuXeoqeVeL75ggWp7Qo=;\n b=G+/Ufhli2ZMQUkt0qe0t3+zTZHo7tZ0ZQk85XY4IyBFI4pefP+3NNeQh\n 3SQS2xLbJ0iTkhzgSzEKIK5Mm3Mer4b0p1uWIrDs9DOHdNkdzTFq29F8e\n CmD+1ElcK8hbX93NyGvGv85m5OFL0Wms1rmZFgyrrXTlhJpE6JDrF0wPM\n zPpgX2brxSOkclkTu0owvCzXdHGApPWeSwvEzACftn0BENDsl36s6oDRL\n Tt8ESWZYhYlcNbucTbl7JbFAQABYyJMSPiOZH4wr5HF2Ez4rRgoOUww6L\n 3Fq3QrU1+oQs/QN6Y2lZ4Mzr1x1xIJNjoLWIqxlHdNmTXIELqOR1dcJkg g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10593\"; a=\"305304249\"",
            "E=Sophos;i=\"5.97,224,1669104000\"; d=\"scan'208\";a=\"305304249\"",
            "E=McAfee;i=\"6500,9779,10593\"; a=\"652835274\"",
            "E=Sophos;i=\"5.97,224,1669104000\"; d=\"scan'208\";a=\"652835274\""
        ],
        "X-ExtLoop1": "1",
        "From": "Mingxia Liu <mingxia.liu@intel.com>",
        "To": "dev@dpdk.org, qi.z.zhang@intel.com, jingjing.wu@intel.com,\n beilei.xing@intel.com",
        "Cc": "wenjun1.wu@intel.com,\n\tMingxia Liu <mingxia.liu@intel.com>",
        "Subject": "[PATCH v3 08/21] net/cpfl: support MTU configuration",
        "Date": "Wed, 18 Jan 2023 07:31:44 +0000",
        "Message-Id": "<20230118073154.903012-9-mingxia.liu@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230118073154.903012-1-mingxia.liu@intel.com>",
        "References": "<20230113081931.221576-1-mingxia.liu@intel.com>\n <20230118073154.903012-1-mingxia.liu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Add dev ops mtu_set.\n\nSigned-off-by: Mingxia Liu <mingxia.liu@intel.com>\n---\n doc/guides/nics/features/cpfl.ini |  1 +\n drivers/net/cpfl/cpfl_ethdev.c    | 27 +++++++++++++++++++++++++++\n 2 files changed, 28 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/features/cpfl.ini b/doc/guides/nics/features/cpfl.ini\nindex a2d1ca9e15..470ba81579 100644\n--- a/doc/guides/nics/features/cpfl.ini\n+++ b/doc/guides/nics/features/cpfl.ini\n@@ -7,6 +7,7 @@\n ; is selected.\n ;\n [Features]\n+MTU update           = Y\n Linux                = Y\n x86-32               = Y\n x86-64               = Y\ndiff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c\nindex 33a0b9ba60..1f40f1749e 100644\n--- a/drivers/net/cpfl/cpfl_ethdev.c\n+++ b/drivers/net/cpfl/cpfl_ethdev.c\n@@ -121,6 +121,27 @@ cpfl_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \treturn 0;\n }\n \n+static int\n+cpfl_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n+{\n+\tstruct idpf_vport *vport = dev->data->dev_private;\n+\n+\t/* mtu setting is forbidden if port is start */\n+\tif (dev->data->dev_started) {\n+\t\tPMD_DRV_LOG(ERR, \"port must be stopped before configuration\");\n+\t\treturn -EBUSY;\n+\t}\n+\n+\tif (mtu > vport->max_mtu) {\n+\t\tPMD_DRV_LOG(ERR, \"MTU should be less than %d\", vport->max_mtu);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tvport->max_pkt_len = mtu + CPFL_ETH_OVERHEAD;\n+\n+\treturn 0;\n+}\n+\n static const uint32_t *\n cpfl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)\n {\n@@ -142,6 +163,7 @@ cpfl_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)\n static int\n cpfl_dev_configure(struct rte_eth_dev *dev)\n {\n+\tstruct idpf_vport *vport = dev->data->dev_private;\n \tstruct rte_eth_conf *conf = &dev->data->dev_conf;\n \n \tif (conf->link_speeds & RTE_ETH_LINK_SPEED_FIXED) {\n@@ -181,6 +203,10 @@ cpfl_dev_configure(struct rte_eth_dev *dev)\n \t\treturn -ENOTSUP;\n \t}\n \n+\tvport->max_pkt_len =\n+\t\t(dev->data->mtu == 0) ? CPFL_DEFAULT_MTU : dev->data->mtu +\n+\t\tCPFL_ETH_OVERHEAD;\n+\n \treturn 0;\n }\n \n@@ -625,6 +651,7 @@ static const struct eth_dev_ops cpfl_eth_dev_ops = {\n \t.tx_queue_stop\t\t\t= cpfl_tx_queue_stop,\n \t.rx_queue_release\t\t= cpfl_dev_rx_queue_release,\n \t.tx_queue_release\t\t= cpfl_dev_tx_queue_release,\n+\t.mtu_set\t\t\t= cpfl_dev_mtu_set,\n \t.dev_supported_ptypes_get\t= cpfl_dev_supported_ptypes_get,\n };\n \n",
    "prefixes": [
        "v3",
        "08/21"
    ]
}