get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 119097,
    "url": "http://patches.dpdk.org/api/patches/119097/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221025090729.2593603-6-junfeng.guo@intel.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": "<20221025090729.2593603-6-junfeng.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221025090729.2593603-6-junfeng.guo@intel.com",
    "date": "2022-10-25T09:07:26",
    "name": "[v8,5/8] net/gve: add support for MTU setting",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "dacac31f0f90441dc7fa88c228a723c45c75cc70",
    "submitter": {
        "id": 1785,
        "url": "http://patches.dpdk.org/api/people/1785/?format=api",
        "name": "Junfeng Guo",
        "email": "junfeng.guo@intel.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/20221025090729.2593603-6-junfeng.guo@intel.com/mbox/",
    "series": [
        {
            "id": 25416,
            "url": "http://patches.dpdk.org/api/series/25416/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25416",
            "date": "2022-10-25T09:07:21",
            "name": "introduce GVE PMD",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/25416/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/119097/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/119097/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 EB25BA054A;\n\tTue, 25 Oct 2022 11:09:46 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 707D542C1E;\n\tTue, 25 Oct 2022 11:09:37 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id EB48A42C07\n for <dev@dpdk.org>; Tue, 25 Oct 2022 11:09:29 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 Oct 2022 02:09:29 -0700",
            "from dpdk-jf-ntb-one.sh.intel.com ([10.67.111.104])\n by orsmga004.jf.intel.com with ESMTP; 25 Oct 2022 02:09:26 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1666688970; x=1698224970;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=yNnJH1ymaunvLTTQwdmNYLiBxxYxje/rY7KlzCzs4A0=;\n b=KgbHAgEpe01HfYdw3UwF23S4ELNYz0EsFnZGYLTmG8uSphNn9RM3LJkZ\n SmmtiLYNOd8UFT/eEzi49UEMrkDV89RHHKxw8+vy/AUyZYtkUzYL+y9uW\n JLOub1kvaQn9N49E9ZVUkOUaTmbGCEzB/nJvjOM72hk8Brm4kP6saZb1K\n AbdgxowutNHvC1DWo1bFo+ZZvKAWrwrwG6UXjbV5C/lMWyKXV3yqxWO+C\n sG53WlWACbxbU6+gIm3bZ0zaO25RFnZe/HSEmgsP6XTu0BhPWnQotwFZv\n ufauhyBiW0koLdRcUyJYmVF9z153ktPAzepoykR1uQIKMEi8LtfRSPOwk g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10510\"; a=\"306358833\"",
            "E=Sophos;i=\"5.95,211,1661842800\"; d=\"scan'208\";a=\"306358833\"",
            "E=McAfee;i=\"6500,9779,10510\"; a=\"756864596\"",
            "E=Sophos;i=\"5.95,211,1661842800\"; d=\"scan'208\";a=\"756864596\""
        ],
        "X-ExtLoop1": "1",
        "From": "Junfeng Guo <junfeng.guo@intel.com>",
        "To": "qi.z.zhang@intel.com, jingjing.wu@intel.com, ferruh.yigit@xilinx.com,\n beilei.xing@intel.com",
        "Cc": "dev@dpdk.org, xiaoyun.li@intel.com, awogbemila@google.com,\n bruce.richardson@intel.com, hemant.agrawal@nxp.com,\n stephen@networkplumber.org, chenbo.xia@intel.com, helin.zhang@intel.com,\n Junfeng Guo <junfeng.guo@intel.com>",
        "Subject": "[PATCH v8 5/8] net/gve: add support for MTU setting",
        "Date": "Tue, 25 Oct 2022 17:07:26 +0800",
        "Message-Id": "<20221025090729.2593603-6-junfeng.guo@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20221025090729.2593603-1-junfeng.guo@intel.com>",
        "References": "<20221021091928.2674471-2-junfeng.guo@intel.com>\n <20221025090729.2593603-1-junfeng.guo@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": "Support dev_ops mtu_set.\n\nSigned-off-by: Xiaoyun Li <xiaoyun.li@intel.com>\nSigned-off-by: Junfeng Guo <junfeng.guo@intel.com>\n---\n doc/guides/nics/features/gve.ini |  1 +\n doc/guides/nics/gve.rst          |  2 ++\n drivers/net/gve/gve_ethdev.c     | 28 ++++++++++++++++++++++++++++\n 3 files changed, 31 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/features/gve.ini b/doc/guides/nics/features/gve.ini\nindex ae466ad677..d1703d8dab 100644\n--- a/doc/guides/nics/features/gve.ini\n+++ b/doc/guides/nics/features/gve.ini\n@@ -5,6 +5,7 @@\n ;\n [Features]\n Link status          = Y\n+MTU update           = Y\n Linux                = Y\n x86-32               = Y\n x86-64               = Y\ndiff --git a/doc/guides/nics/gve.rst b/doc/guides/nics/gve.rst\nindex c42ff23841..36a65e4717 100644\n--- a/doc/guides/nics/gve.rst\n+++ b/doc/guides/nics/gve.rst\n@@ -69,3 +69,5 @@ Jumbo Frame is not supported in PMD for now. It'll be added in the future\n DPDK release.\n Also, only GQI_QPL queue format is in use on GCP since GQI_RDA hasn't been\n released in production.\n+\n+Currently, setting MTU with value larger than 1460 is not supported.\ndiff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c\nindex 34243c1672..554f58640d 100644\n--- a/drivers/net/gve/gve_ethdev.c\n+++ b/drivers/net/gve/gve_ethdev.c\n@@ -96,12 +96,40 @@ gve_dev_close(struct rte_eth_dev *dev)\n \treturn err;\n }\n \n+static int\n+gve_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n+{\n+\tstruct gve_priv *priv = dev->data->dev_private;\n+\tint err;\n+\n+\tif (mtu < RTE_ETHER_MIN_MTU || mtu > priv->max_mtu) {\n+\t\tPMD_DRV_LOG(ERR, \"MIN MTU is %u, MAX MTU is %u\",\n+\t\t\t    RTE_ETHER_MIN_MTU, priv->max_mtu);\n+\t\treturn -EINVAL;\n+\t}\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+\terr = gve_adminq_set_mtu(priv, mtu);\n+\tif (err) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to set mtu as %u err = %d\", mtu, err);\n+\t\treturn err;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static const struct eth_dev_ops gve_eth_dev_ops = {\n \t.dev_configure        = gve_dev_configure,\n \t.dev_start            = gve_dev_start,\n \t.dev_stop             = gve_dev_stop,\n \t.dev_close            = gve_dev_close,\n \t.link_update          = gve_link_update,\n+\t.mtu_set              = gve_dev_mtu_set,\n };\n \n static void\n",
    "prefixes": [
        "v8",
        "5/8"
    ]
}