Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7365/?format=api
https://patches.dpdk.org/api/patches/7365/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/2acc6b1d5d4099612fd2c91123ddd2e9bcaf53d4.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": "<2acc6b1d5d4099612fd2c91123ddd2e9bcaf53d4.1443704150.git.rahul.lakkireddy@chelsio.com>", "list_archive_url": "https://inbox.dpdk.org/dev/2acc6b1d5d4099612fd2c91123ddd2e9bcaf53d4.1443704150.git.rahul.lakkireddy@chelsio.com", "date": "2015-10-02T11:16:54", "name": "[dpdk-dev,5/6] cxgbe: Allow apps to change mtu", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "777830596c2d92aef4cd8d66454634d9863e2634", "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/2acc6b1d5d4099612fd2c91123ddd2e9bcaf53d4.1443704150.git.rahul.lakkireddy@chelsio.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7365/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7365/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 22FA78E85;\n\tFri, 2 Oct 2015 13:17:45 +0200 (CEST)", "from stargate3.asicdesigners.com (stargate.chelsio.com\n\t[67.207.112.58]) by dpdk.org (Postfix) with ESMTP id 794378E85\n\tfor <dev@dpdk.org>; Fri, 2 Oct 2015 13:17:42 +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\tt92BHdGF005253; Fri, 2 Oct 2015 04:17:40 -0700" ], "From": "Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>", "To": "dev@dpdk.org", "Date": "Fri, 2 Oct 2015 16:46:54 +0530", "Message-Id": "<2acc6b1d5d4099612fd2c91123ddd2e9bcaf53d4.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 5/6] cxgbe: Allow apps to change 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": "Add a mtu_set() eth_dev_ops to allow DPDK apps to modify device mtu.\n\nSigned-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>\nSigned-off-by: Kumar Sanghvi <kumaras@chelsio.com>\n---\n drivers/net/cxgbe/cxgbe_ethdev.c | 29 +++++++++++++++++++++++++++++\n 1 file changed, 29 insertions(+)", "diff": "diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c\nindex 6d7b29c..a8e057b 100644\n--- a/drivers/net/cxgbe/cxgbe_ethdev.c\n+++ b/drivers/net/cxgbe/cxgbe_ethdev.c\n@@ -225,6 +225,34 @@ static int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,\n \treturn 0;\n }\n \n+static int cxgbe_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)\n+{\n+\tstruct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);\n+\tstruct adapter *adapter = pi->adapter;\n+\tstruct rte_eth_dev_info dev_info;\n+\tint err;\n+\tuint16_t new_mtu = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;\n+\n+\tcxgbe_dev_info_get(eth_dev, &dev_info);\n+\n+\t/* Must accommodate at least ETHER_MIN_MTU */\n+\tif ((new_mtu < ETHER_MIN_MTU) || (new_mtu > dev_info.max_rx_pktlen))\n+\t\treturn -EINVAL;\n+\n+\t/* set to jumbo mode if needed */\n+\tif (new_mtu > 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_set_rxmode(adapter, adapter->mbox, pi->viid, new_mtu, -1, -1,\n+\t\t\t -1, -1, true);\n+\tif (!err)\n+\t\teth_dev->data->dev_conf.rxmode.max_rx_pkt_len = new_mtu;\n+\n+\treturn err;\n+}\n+\n static int cxgbe_dev_tx_queue_start(struct rte_eth_dev *eth_dev,\n \t\t\t\t uint16_t tx_queue_id);\n static int cxgbe_dev_rx_queue_start(struct rte_eth_dev *eth_dev,\n@@ -724,6 +752,7 @@ static struct eth_dev_ops cxgbe_eth_dev_ops = {\n \t.dev_configure\t\t= cxgbe_dev_configure,\n \t.dev_infos_get\t\t= cxgbe_dev_info_get,\n \t.link_update\t\t= cxgbe_dev_link_update,\n+\t.mtu_set\t\t= cxgbe_dev_mtu_set,\n \t.tx_queue_setup = cxgbe_dev_tx_queue_setup,\n \t.tx_queue_start\t\t= cxgbe_dev_tx_queue_start,\n \t.tx_queue_stop\t\t= cxgbe_dev_tx_queue_stop,\n", "prefixes": [ "dpdk-dev", "5/6" ] }{ "id": 7365, "url": "