get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 12734,
    "url": "https://patches.dpdk.org/api/patches/12734/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1463127333-10007-1-git-send-email-beilei.xing@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": "<1463127333-10007-1-git-send-email-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1463127333-10007-1-git-send-email-beilei.xing@intel.com",
    "date": "2016-05-13T08:15:33",
    "name": "[dpdk-dev,v3] i40e: configure MTU",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b9febc53dcdf89b4b98088982917bcf1aa387a4d",
    "submitter": {
        "id": 410,
        "url": "https://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": {
        "id": 10,
        "url": "https://patches.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1463127333-10007-1-git-send-email-beilei.xing@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/12734/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/12734/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 C76AA5AA5;\n\tFri, 13 May 2016 10:15:44 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 07AC85A8B\n\tfor <dev@dpdk.org>; Fri, 13 May 2016 10:15:42 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 13 May 2016 01:15:42 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 13 May 2016 01:15:41 -0700",
            "from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com\n\t[10.239.29.90])\n\tby shvmail01.sh.intel.com with ESMTP id u4D8FbpY014001;\n\tFri, 13 May 2016 16:15:37 +0800",
            "from shecgisg003.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid u4D8Fbm0010041; Fri, 13 May 2016 16:15:39 +0800",
            "(from beileixi@localhost)\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u4D8FawQ010037; \n\tFri, 13 May 2016 16:15:36 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.24,613,1455004800\"; d=\"scan'208\";a=\"975582965\"",
        "From": "Beilei Xing <beilei.xing@intel.com>",
        "To": "jingjing.wu@intel.com",
        "Cc": "dev@dpdk.org, Beilei Xing <beilei.xing@intel.com>",
        "Date": "Fri, 13 May 2016 16:15:33 +0800",
        "Message-Id": "<1463127333-10007-1-git-send-email-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1461813555-24095-1-git-send-email-beilei.xing@intel.com>",
        "References": "<1461813555-24095-1-git-send-email-beilei.xing@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3] i40e: configure MTU",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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": "This patch enables configuring MTU for i40e.\nSince changing MTU needs to reconfigure queue, stop port first\nbefore configuring MTU.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\nv3 changes:\n Add frame size with extra I40E_VLAN_TAG_SIZE.\n Delete i40e_dev_rx_init(pf) cause it will be called when port starts.\n\nv2 changes:\n If mtu is not within the allowed range, return -EINVAL instead of -EBUSY.\n Delete rxq reconfigure cause rxq reconfigure will be finished in\n i40e_dev_rx_init.\n   \n drivers/net/i40e/i40e_ethdev.c | 34 ++++++++++++++++++++++++++++++++++\n 1 file changed, 34 insertions(+)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex d8b6bd7..96d10c2 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -447,6 +447,8 @@ static int i40e_get_eeprom(struct rte_eth_dev *dev,\n static void i40e_set_default_mac_addr(struct rte_eth_dev *dev,\n \t\t\t\t      struct ether_addr *mac_addr);\n \n+static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);\n+\n static const struct rte_pci_id pci_id_i40e_map[] = {\n #define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) {RTE_PCI_DEVICE(vend, dev)},\n #include \"rte_pci_dev_ids.h\"\n@@ -520,6 +522,7 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {\n \t.get_eeprom_length            = i40e_get_eeprom_length,\n \t.get_eeprom                   = i40e_get_eeprom,\n \t.mac_addr_set                 = i40e_set_default_mac_addr,\n+\t.mtu_set                      = i40e_dev_mtu_set,\n };\n \n /* store statistics names and its offset in stats structure */\n@@ -9103,3 +9106,34 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev,\n \t/* Flags: 0x3 updates port address */\n \ti40e_aq_mac_address_write(hw, 0x3, mac_addr->addr_bytes, NULL);\n }\n+\n+static int\n+i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n+{\n+\tstruct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n+\tstruct rte_eth_dev_data *dev_data = pf->dev_data;\n+\tuint32_t frame_size = mtu + ETHER_HDR_LEN\n+\t\t\t      + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE;\n+\tint ret = 0;\n+\n+\t/* check if mtu is within the allowed range */\n+\tif ((mtu < ETHER_MIN_MTU) || (frame_size > I40E_FRAME_SIZE_MAX))\n+\t\treturn -EINVAL;\n+\n+\t/* mtu setting is forbidden if port is start */\n+\tif (dev_data->dev_started) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"port %d must be stopped before configuration\\n\",\n+\t\t\t    dev_data->port_id);\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\tif (frame_size > ETHER_MAX_LEN)\n+\t\tdev_data->dev_conf.rxmode.jumbo_frame = 1;\n+\telse\n+\t\tdev_data->dev_conf.rxmode.jumbo_frame = 0;\n+\n+\tdev_data->dev_conf.rxmode.max_rx_pkt_len = frame_size;\n+\n+\treturn ret;\n+}\n",
    "prefixes": [
        "dpdk-dev",
        "v3"
    ]
}