get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 13943,
    "url": "http://patchwork.dpdk.org/api/patches/13943/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1466140969-5580-3-git-send-email-johndale@cisco.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1466140969-5580-3-git-send-email-johndale@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1466140969-5580-3-git-send-email-johndale@cisco.com",
    "date": "2016-06-17T05:22:47",
    "name": "[dpdk-dev,2/4] enic: set the max allowed MTU for the NIC",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f0592b9f83b818ffbece27a21a4b73af8c1664f0",
    "submitter": {
        "id": 359,
        "url": "http://patchwork.dpdk.org/api/people/359/?format=api",
        "name": "John Daley (johndale)",
        "email": "johndale@cisco.com"
    },
    "delegate": {
        "id": 10,
        "url": "http://patchwork.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1466140969-5580-3-git-send-email-johndale@cisco.com/mbox/",
    "series": [],
    "comments": "http://patchwork.dpdk.org/api/patches/13943/comments/",
    "check": "pending",
    "checks": "http://patchwork.dpdk.org/api/patches/13943/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 8DE1ECC28;\n\tFri, 17 Jun 2016 07:22:59 +0200 (CEST)",
            "from alln-iport-6.cisco.com (alln-iport-6.cisco.com\n\t[173.37.142.93]) by dpdk.org (Postfix) with ESMTP id 7F802CC06\n\tfor <dev@dpdk.org>; Fri, 17 Jun 2016 07:22:53 +0200 (CEST)",
            "from rcdn-core-6.cisco.com ([173.37.93.157])\n\tby alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Jun 2016 05:22:52 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby rcdn-core-6.cisco.com (8.14.5/8.14.5) with ESMTP id u5H5MqMU029877;\n\tFri, 17 Jun 2016 05:22:52 GMT",
            "by cisco.com (Postfix, from userid 392789)\n\tid 160343FAAE32; Thu, 16 Jun 2016 22:22:52 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=3694; q=dns/txt; s=iport;\n\tt=1466140973; x=1467350573;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=oEl6HIFDUyJ5ZdWP//+Fl0IXItjpp6euDZxTHtLJjig=;\n\tb=hviJKJzN0GA6ZoTMep/tMZr766ABGT9L7Kn8iXjAgUjOpn8jeOtvVxZH\n\toJQMfq5kSMo4BaznU0789PAMjKipYnNzusLzJwdIYXRzkOpIFVaHtPBEA\n\t17SIdBULhN3Qt7sG8ApGsqrdCRLfZrqApVxMF2PJ4+Fq6wxDkLghNty2p I=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.26,481,1459814400\"; d=\"scan'208\";a=\"286731923\"",
        "From": "John Daley <johndale@cisco.com>",
        "To": "dev@dpdk.org",
        "Cc": "bruce.richardson@intel.com, John Daley <johndale@cisco.com>",
        "Date": "Thu, 16 Jun 2016 22:22:47 -0700",
        "Message-Id": "<1466140969-5580-3-git-send-email-johndale@cisco.com>",
        "X-Mailer": "git-send-email 2.7.0",
        "In-Reply-To": "<1466140969-5580-1-git-send-email-johndale@cisco.com>",
        "References": "<1466140969-5580-1-git-send-email-johndale@cisco.com>",
        "Subject": "[dpdk-dev] [PATCH 2/4] enic: set the max allowed MTU for the NIC",
        "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": "The max MTU is set to the max egress packet size allowed by the VIC\nminus the size of a an IPv4 L2 header with .1Q (18 bytes).\n\nSigned-off-by: John Daley <johndale@cisco.com>\n---\n drivers/net/enic/enic.h        |  1 +\n drivers/net/enic/enic_ethdev.c |  3 ++-\n drivers/net/enic/enic_res.c    | 25 +++++++++++++++++--------\n drivers/net/enic/enic_res.h    |  4 +++-\n 4 files changed, 23 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h\nindex 1e6914e..78f7bd7 100644\n--- a/drivers/net/enic/enic.h\n+++ b/drivers/net/enic/enic.h\n@@ -118,6 +118,7 @@ struct enic {\n \tu8 ig_vlan_strip_en;\n \tint link_status;\n \tu8 hw_ip_checksum;\n+\tu16 max_mtu;\n \n \tunsigned int flags;\n \tunsigned int priv_flags;\ndiff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c\nindex 697ff82..31d9600 100644\n--- a/drivers/net/enic/enic_ethdev.c\n+++ b/drivers/net/enic/enic_ethdev.c\n@@ -435,7 +435,8 @@ static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev,\n \tdevice_info->max_rx_queues = enic->rq_count;\n \tdevice_info->max_tx_queues = enic->wq_count;\n \tdevice_info->min_rx_bufsize = ENIC_MIN_MTU;\n-\tdevice_info->max_rx_pktlen = enic->config.mtu;\n+\tdevice_info->max_rx_pktlen = enic->rte_dev->data->mtu\n+\t\t\t\t   + ETHER_HDR_LEN + 4;\n \tdevice_info->max_mac_addrs = 1;\n \tdevice_info->rx_offload_capa =\n \t\tDEV_RX_OFFLOAD_VLAN_STRIP |\ndiff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c\nindex ebe379d..e82181f 100644\n--- a/drivers/net/enic/enic_res.c\n+++ b/drivers/net/enic/enic_res.c\n@@ -83,6 +83,20 @@ int enic_get_vnic_config(struct enic *enic)\n \tGET_CONFIG(intr_timer_usec);\n \tGET_CONFIG(loop_tag);\n \tGET_CONFIG(num_arfs);\n+\tGET_CONFIG(max_pkt_size);\n+\n+\t/* max packet size is only defined in newer VIC firmware\n+\t * and will be 0 for legacy firmware and VICs\n+\t */\n+\tif (c->max_pkt_size > ENIC_DEFAULT_MAX_PKT_SIZE)\n+\t\tenic->max_mtu = c->max_pkt_size - (ETHER_HDR_LEN + 4);\n+\telse\n+\t\tenic->max_mtu = ENIC_DEFAULT_MAX_PKT_SIZE - (ETHER_HDR_LEN + 4);\n+\tif (c->mtu == 0)\n+\t\tc->mtu = 1500;\n+\n+\tenic->rte_dev->data->mtu = min_t(u16, enic->max_mtu,\n+\t\t\t\t\t max_t(u16, ENIC_MIN_MTU, c->mtu));\n \n \tc->wq_desc_count =\n \t\tmin_t(u32, ENIC_MAX_WQ_DESCS,\n@@ -96,21 +110,16 @@ int enic_get_vnic_config(struct enic *enic)\n \t\tc->rq_desc_count));\n \tc->rq_desc_count &= 0xffffffe0; /* must be aligned to groups of 32 */\n \n-\tif (c->mtu == 0)\n-\t\tc->mtu = 1500;\n-\tc->mtu = min_t(u16, ENIC_MAX_MTU,\n-\t\tmax_t(u16, ENIC_MIN_MTU,\n-\t\tc->mtu));\n-\n \tc->intr_timer_usec = min_t(u32, c->intr_timer_usec,\n \t\tvnic_dev_get_intr_coal_timer_max(enic->vdev));\n \n \tdev_info(enic_get_dev(enic),\n \t\t\"vNIC MAC addr %02x:%02x:%02x:%02x:%02x:%02x \"\n-\t\t\"wq/rq %d/%d mtu %d\\n\",\n+\t\t\"wq/rq %d/%d mtu %d, max mtu:%d\\n\",\n \t\tenic->mac_addr[0], enic->mac_addr[1], enic->mac_addr[2],\n \t\tenic->mac_addr[3], enic->mac_addr[4], enic->mac_addr[5],\n-\t\tc->wq_desc_count, c->rq_desc_count, c->mtu);\n+\t\tc->wq_desc_count, c->rq_desc_count,\n+\t\tenic->rte_dev->data->mtu, enic->max_mtu);\n \tdev_info(enic_get_dev(enic), \"vNIC csum tx/rx %s/%s \"\n \t\t\"rss %s intr mode %s type %s timer %d usec \"\n \t\t\"loopback tag 0x%04x\\n\",\ndiff --git a/drivers/net/enic/enic_res.h b/drivers/net/enic/enic_res.h\nindex 3c8e303..303530e 100644\n--- a/drivers/net/enic/enic_res.h\n+++ b/drivers/net/enic/enic_res.h\n@@ -46,7 +46,9 @@\n #define ENIC_MAX_RQ_DESCS\t\t4096\n \n #define ENIC_MIN_MTU\t\t\t68\n-#define ENIC_MAX_MTU\t\t\t9000\n+\n+/* Does not include (possible) inserted VLAN tag and FCS */\n+#define ENIC_DEFAULT_MAX_PKT_SIZE\t9022\n \n #define ENIC_MULTICAST_PERFECT_FILTERS\t32\n #define ENIC_UNICAST_PERFECT_FILTERS\t32\n",
    "prefixes": [
        "dpdk-dev",
        "2/4"
    ]
}