get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 26525,
    "url": "http://patches.dpdk.org/api/patches/26525/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1499312160-122381-1-git-send-email-beilei.xing@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": "<1499312160-122381-1-git-send-email-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1499312160-122381-1-git-send-email-beilei.xing@intel.com",
    "date": "2017-07-06T03:36:00",
    "name": "[dpdk-dev,v3] net/ixgbe: remove MTU setting limitation when port's stopped",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "976e451768b1b6ef820b66c82d89fce605ed1b94",
    "submitter": {
        "id": 410,
        "url": "http://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@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/1499312160-122381-1-git-send-email-beilei.xing@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/26525/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/26525/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id D251D2A58;\n\tThu,  6 Jul 2017 05:36:05 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 4C1361C0B\n\tfor <dev@dpdk.org>; Thu,  6 Jul 2017 05:36:04 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Jul 2017 20:36:02 -0700",
            "from dpdk9.sh.intel.com ([10.67.118.189])\n\tby orsmga002.jf.intel.com with ESMTP; 05 Jul 2017 20:36:01 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.40,315,1496127600\"; d=\"scan'208\";a=\"107588449\"",
        "From": "Beilei Xing <beilei.xing@intel.com>",
        "To": "wenzhuo.lu@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Thu,  6 Jul 2017 11:36:00 +0800",
        "Message-Id": "<1499312160-122381-1-git-send-email-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1499222024-64581-1-git-send-email-beilei.xing@intel.com>",
        "References": "<1499222024-64581-1-git-send-email-beilei.xing@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3] net/ixgbe: remove MTU setting limitation when\n\tport's stopped",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Currently, setting MTU will fail if MTU requires the support\nof scattered packets before scattered_rx is enabled.\nThis patch allows setting this special MTU when device is\nstopped, cause scattered_rx will be re-configured during\nstarting port.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\nv3 changes:\n -Check dev_data->scattered_rx instead of rx_conf->enable_scatter\nv2 changes:\n -Change commit log\n drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex fb5574e..4814aeb 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -4811,7 +4811,7 @@ ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n \tstruct ixgbe_hw *hw;\n \tstruct rte_eth_dev_info dev_info;\n \tuint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;\n-\tstruct rte_eth_rxmode *rx_conf = &dev->data->dev_conf.rxmode;\n+\tstruct rte_eth_dev_data *dev_data = dev->data;\n \n \tixgbe_dev_info_get(dev, &dev_info);\n \n@@ -4819,13 +4819,15 @@ ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n \tif ((mtu < ETHER_MIN_MTU) || (frame_size > dev_info.max_rx_pktlen))\n \t\treturn -EINVAL;\n \n-\t/* refuse mtu that requires the support of scattered packets when this\n-\t * feature has not been enabled before.\n+\t/* If device is started, refuse mtu that requires the support of\n+\t * scattered packets when this feature has not been enabled before.\n \t */\n-\tif (!rx_conf->enable_scatter &&\n+\tif (dev_data->dev_started && !dev_data->scattered_rx &&\n \t    (frame_size + 2 * IXGBE_VLAN_TAG_SIZE >\n-\t     dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM))\n+\t     dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)) {\n+\t\tPMD_INIT_LOG(ERR, \"Stop port first.\");\n \t\treturn -EINVAL;\n+\t}\n \n \thw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \thlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);\n",
    "prefixes": [
        "dpdk-dev",
        "v3"
    ]
}