get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7362,
    "url": "https://patches.dpdk.org/api/patches/7362/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/90e2e170809a7bb6abb1cd6ff395d8710134e0f1.1443704150.git.rahul.lakkireddy@chelsio.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": "<90e2e170809a7bb6abb1cd6ff395d8710134e0f1.1443704150.git.rahul.lakkireddy@chelsio.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/90e2e170809a7bb6abb1cd6ff395d8710134e0f1.1443704150.git.rahul.lakkireddy@chelsio.com",
    "date": "2015-10-02T11:16:51",
    "name": "[dpdk-dev,2/6] cxgbe: Update device info and perform sanity checks to enable jumbo frames",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "abd1ddf5b938b8852940129034c0d53f59b5e4ca",
    "submitter": {
        "id": 241,
        "url": "https://patches.dpdk.org/api/people/241/?format=api",
        "name": "Rahul Lakkireddy",
        "email": "rahul.lakkireddy@chelsio.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/90e2e170809a7bb6abb1cd6ff395d8710134e0f1.1443704150.git.rahul.lakkireddy@chelsio.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7362/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7362/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 9E4D08E7B;\n\tFri,  2 Oct 2015 13:17:36 +0200 (CEST)",
            "from stargate3.asicdesigners.com (stargate.chelsio.com\n\t[67.207.112.58]) by dpdk.org (Postfix) with ESMTP id CFA178E75\n\tfor <dev@dpdk.org>; Fri,  2 Oct 2015 13:17:34 +0200 (CEST)",
            "from localhost (scalar.blr.asicdesigners.com [10.193.185.94])\n\tby stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id\n\tt92BHVvW005244; Fri, 2 Oct 2015 04:17:32 -0700"
        ],
        "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri,  2 Oct 2015 16:46:51 +0530",
        "Message-Id": "<90e2e170809a7bb6abb1cd6ff395d8710134e0f1.1443704150.git.rahul.lakkireddy@chelsio.com>",
        "X-Mailer": "git-send-email 2.5.3",
        "In-Reply-To": [
            "<cover.1443704150.git.rahul.lakkireddy@chelsio.com>",
            "<cover.1443704150.git.rahul.lakkireddy@chelsio.com>"
        ],
        "References": [
            "<cover.1443704150.git.rahul.lakkireddy@chelsio.com>",
            "<cover.1443704150.git.rahul.lakkireddy@chelsio.com>"
        ],
        "Cc": "Kumar Sanghvi <kumaras@chelsio.com>, Felix Marti <felix@chelsio.com>,\n\tNirranjan Kirubaharan <nirranjan@chelsio.com>",
        "Subject": "[dpdk-dev] [PATCH 2/6] cxgbe: Update device info and perform sanity\n\tchecks to enable jumbo frames",
        "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": "Increase max_rx_pktlen to accommodate jumbo frame size. Perform sanity\nchecks and enable jumbo mode in rx queue setup. Set link mtu based on\nmax_rx_pktlen.\n\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\nSigned-off-by: Kumar Sanghvi <kumaras@chelsio.com>\n---\n drivers/net/cxgbe/cxgbe.h        |  3 +++\n drivers/net/cxgbe/cxgbe_ethdev.c | 23 +++++++++++++++++++++--\n drivers/net/cxgbe/cxgbe_main.c   |  3 ++-\n 3 files changed, 26 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h\nindex 97c37d2..adc0d92 100644\n--- a/drivers/net/cxgbe/cxgbe.h\n+++ b/drivers/net/cxgbe/cxgbe.h\n@@ -43,6 +43,9 @@\n #define CXGBE_DEFAULT_TX_DESC_SIZE    1024 /* Default TX ring size */\n #define CXGBE_DEFAULT_RX_DESC_SIZE    1024 /* Default RX ring size */\n \n+#define CXGBE_MIN_RX_BUFSIZE ETHER_MIN_MTU /* min buf size */\n+#define CXGBE_MAX_RX_PKTLEN (9000 + ETHER_HDR_LEN + ETHER_CRC_LEN) /* max pkt */\n+\n int cxgbe_probe(struct adapter *adapter);\n int cxgbe_up(struct adapter *adap);\n int cxgbe_down(struct port_info *pi);\ndiff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c\nindex 478051a..6d7b29c 100644\n--- a/drivers/net/cxgbe/cxgbe_ethdev.c\n+++ b/drivers/net/cxgbe/cxgbe_ethdev.c\n@@ -141,8 +141,8 @@ static void cxgbe_dev_info_get(struct rte_eth_dev *eth_dev,\n \tstruct adapter *adapter = pi->adapter;\n \tint max_queues = adapter->sge.max_ethqsets / adapter->params.nports;\n \n-\tdevice_info->min_rx_bufsize = 68; /* XXX: Smallest pkt size */\n-\tdevice_info->max_rx_pktlen = 1500; /* XXX: For now we support mtu */\n+\tdevice_info->min_rx_bufsize = CXGBE_MIN_RX_BUFSIZE;\n+\tdevice_info->max_rx_pktlen = CXGBE_MAX_RX_PKTLEN;\n \tdevice_info->max_rx_queues = max_queues;\n \tdevice_info->max_tx_queues = max_queues;\n \tdevice_info->max_mac_addrs = 1;\n@@ -498,6 +498,8 @@ static int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,\n \tint err = 0;\n \tint msi_idx = 0;\n \tunsigned int temp_nb_desc;\n+\tstruct rte_eth_dev_info dev_info;\n+\tunsigned int pkt_len = eth_dev->data->dev_conf.rxmode.max_rx_pkt_len;\n \n \tRTE_SET_USED(rx_conf);\n \n@@ -505,6 +507,17 @@ static int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,\n \t\t  __func__, eth_dev->data->nb_rx_queues, queue_idx, nb_desc,\n \t\t  socket_id, mp);\n \n+\tcxgbe_dev_info_get(eth_dev, &dev_info);\n+\n+\t/* Must accommodate at least ETHER_MIN_MTU */\n+\tif ((pkt_len < dev_info.min_rx_bufsize) ||\n+\t    (pkt_len > dev_info.max_rx_pktlen)) {\n+\t\tdev_err(adap, \"%s: max pkt len must be > %d and <= %d\\n\",\n+\t\t\t__func__, dev_info.min_rx_bufsize,\n+\t\t\tdev_info.max_rx_pktlen);\n+\t\treturn -EINVAL;\n+\t}\n+\n \t/*  Free up the existing queue  */\n \tif (eth_dev->data->rx_queues[queue_idx]) {\n \t\tcxgbe_dev_rx_queue_release(eth_dev->data->rx_queues[queue_idx]);\n@@ -534,6 +547,12 @@ static int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,\n \tif ((&rxq->fl) != NULL)\n \t\trxq->fl.size = temp_nb_desc;\n \n+\t/* Set to jumbo mode if necessary */\n+\tif (pkt_len > ETHER_MAX_LEN)\n+\t\teth_dev->data->dev_conf.rxmode.jumbo_frame = 1;\n+\telse\n+\t\teth_dev->data->dev_conf.rxmode.jumbo_frame = 0;\n+\n \terr = t4_sge_alloc_rxq(adapter, &rxq->rspq, false, eth_dev, msi_idx,\n \t\t\t       &rxq->fl, t4_ethrx_handler,\n \t\t\t       t4_get_mps_bg_map(adapter, pi->tx_chan), mp,\ndiff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c\nindex 316b87d..aff23d0 100644\n--- a/drivers/net/cxgbe/cxgbe_main.c\n+++ b/drivers/net/cxgbe/cxgbe_main.c\n@@ -855,12 +855,13 @@ int link_start(struct port_info *pi)\n {\n \tstruct adapter *adapter = pi->adapter;\n \tint ret;\n+\tunsigned int mtu = pi->eth_dev->data->dev_conf.rxmode.max_rx_pkt_len;\n \n \t/*\n \t * We do not set address filters and promiscuity here, the stack does\n \t * that step explicitly.\n \t */\n-\tret = t4_set_rxmode(adapter, adapter->mbox, pi->viid, 1500, -1, -1,\n+\tret = t4_set_rxmode(adapter, adapter->mbox, pi->viid, mtu, -1, -1,\n \t\t\t    -1, 1, true);\n \tif (ret == 0) {\n \t\tret = t4_change_mac(adapter, adapter->mbox, pi->viid,\n",
    "prefixes": [
        "dpdk-dev",
        "2/6"
    ]
}