get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44312,
    "url": "http://patches.dpdk.org/api/patches/44312/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180905164157.844-1-stephen@networkplumber.org/",
    "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": "<20180905164157.844-1-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180905164157.844-1-stephen@networkplumber.org",
    "date": "2018-09-05T16:41:57",
    "name": "[RFC] ethdev: add min/max MTU to device info",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "42e643343296fddef266d8a78d8254aaa19acca0",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180905164157.844-1-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 1197,
            "url": "http://patches.dpdk.org/api/series/1197/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1197",
            "date": "2018-09-05T16:41:57",
            "name": "[RFC] ethdev: add min/max MTU to device info",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1197/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44312/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44312/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 EA69828FD;\n\tWed,  5 Sep 2018 18:42:02 +0200 (CEST)",
            "from mail-wr1-f68.google.com (mail-wr1-f68.google.com\n\t[209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 556511559\n\tfor <dev@dpdk.org>; Wed,  5 Sep 2018 18:42:01 +0200 (CEST)",
            "by mail-wr1-f68.google.com with SMTP id k5-v6so8353746wre.10\n\tfor <dev@dpdk.org>; Wed, 05 Sep 2018 09:42:01 -0700 (PDT)",
            "from shemminger-XPS-13-9360.access.network ([31.216.236.195])\n\tby smtp.gmail.com with ESMTPSA id\n\tq200-v6sm29494331wmd.2.2018.09.05.09.41.59\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 05 Sep 2018 09:41:59 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id;\n\tbh=ZRawbZCjftw/N3VxCnMtlrCdK25giCcIOQwJ4cFYSNQ=;\n\tb=pQBnz/AsCUpsfQd26NPazO7o9HcFbKFTtELqae6sornsD1WcHl3l/VUvDF5ViNt954\n\tVDGBDeD789B2nWvLti1wOR+WakDrIkyAnFmgT0U7XfiA3T8AtcMBTKz0XfK1bE49TfLl\n\tpMWoJkJbbIzIzHMkIk3ViGZHAx2hEtugigSylwBw0pMb/kEN90u/qqFO38JahD8z8KGR\n\tP9AdY2eKeAgndT0AxEjAmpUQxciZ1Zn+KNP6lPcXQGmqes+iCzVTcyetyEJkQxmR2C5Z\n\tlvM5/UDMUqaPy7oCvSi6CcdyqdOHa7oUOfvuxAwXYyqQb1/bHgyEEZTsde2ModFmUdUD\n\tbrKA==",
        "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=ZRawbZCjftw/N3VxCnMtlrCdK25giCcIOQwJ4cFYSNQ=;\n\tb=ewOM20LWVoV1yhYbh1Y01vL+vG+T2Dux1JI/oe2hf4egYhQC5JOZ27lK/db7pDR/CG\n\toXTOfOrdsqmwTcXzGil/Zgy3LSGlOmNyrjowpZjuGSTyvZyih3E7TRfHP+wFcUZivo0Q\n\tByw9+u2igw9T5LHSAO6BNRJb5cRebrMsORnPuBaDYAQuxgqY4mZJL1aq+ixUKTc5ZuHy\n\tJEJ9udMCpHIKd7uSHCzt3P/y0LRMHCZeSqvcNBo08URrw3rN0iOE8PmRNapjMs+aRaiW\n\tRnrgiLBDDyUBAIC67pAbUqh2gnUBNC2O7i3zf+0+apeR4rZ685fnuXaSOrl0/fYfFpLA\n\tVdKA==",
        "X-Gm-Message-State": "APzg51ADJtU1kHXNElbxKUZdSGLeu+TgpTf63BcAFW7w85G+WP+73idG\n\t+YhBZcpI01ZEWv4vPCIusH6C7g0kQslf+nFR",
        "X-Google-Smtp-Source": "ANB0VdZ6OHCUIXaxknJADXO42DTIQlJrsen9+2SccW8DeanXFve5zLstgAWDTFjcqRlsLnFy4u6Zeg==",
        "X-Received": "by 2002:adf:f7c4:: with SMTP id\n\ta4-v6mr28070494wrq.86.1536165720283; \n\tWed, 05 Sep 2018 09:42:00 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Wed,  5 Sep 2018 17:41:57 +0100",
        "Message-Id": "<20180905164157.844-1-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [RFC] ethdev: add min/max MTU to device info",
        "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": "This addresses the usability issue raised by OVS at DPDK Userspace\nsummit. It adds general min/max mtu into device info. For compatiablity,\nand to save space, it fits in a hole in existing structure.\n\nThe initial version sets max mtu to normal Ethernet, it is up to\nPMD to set larger value if it supports Jumbo frames.\n\nFixing the drivers to use this is trivial and can be done by 18.11.\nAlready have some of the patches done.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_ethdev/rte_ethdev.c | 7 +++++++\n lib/librte_ethdev/rte_ethdev.h | 2 ++\n 2 files changed, 9 insertions(+)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 4c320250589a..df0c7536a7c4 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -2408,6 +2408,8 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)\n \tdev_info->rx_desc_lim = lim;\n \tdev_info->tx_desc_lim = lim;\n \tdev_info->device = dev->device;\n+\tdev_info->min_mtu = ETHER_MIN_MTU;\n+\tdev_info->max_mtu = ETHER_MTU;\n \n \tRTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);\n \t(*dev->dev_ops->dev_infos_get)(dev, dev_info);\n@@ -2471,12 +2473,17 @@ int\n rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)\n {\n \tint ret;\n+\tstruct rte_eth_dev_info dev_info;\n \tstruct rte_eth_dev *dev;\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mtu_set, -ENOTSUP);\n \n+\trte_eth_dev_info_get(port_id, &dev_info);\n+\tif (mtu < dev_info.min_mtu || mtu > dev_info.max_mtu)\n+\t\treturn -EINVAL;\n+\n \tret = (*dev->dev_ops->mtu_set)(dev, mtu);\n \tif (!ret)\n \t\tdev->data->mtu = mtu;\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex 7070e9ab408f..5171a9083288 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1015,6 +1015,8 @@ struct rte_eth_dev_info {\n \tconst char *driver_name; /**< Device Driver name. */\n \tunsigned int if_index; /**< Index to bound host interface, or 0 if none.\n \t\tUse if_indextoname() to translate into an interface name. */\n+\tuint16_t min_mtu;\t/**< Minimum MTU allowed */\n+\tuint16_t max_mtu;\t/**< Maximum MTU allowed */\n \tconst uint32_t *dev_flags; /**< Device flags */\n \tuint32_t min_rx_bufsize; /**< Minimum size of RX buffer. */\n \tuint32_t max_rx_pktlen; /**< Maximum configurable length of RX pkt. */\n",
    "prefixes": [
        "RFC"
    ]
}