Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/20400/?format=api
https://patches.dpdk.org/api/patches/20400/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170213142820.8964-6-maxime.coquelin@redhat.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": "<20170213142820.8964-6-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20170213142820.8964-6-maxime.coquelin@redhat.com", "date": "2017-02-13T14:28:18", "name": "[dpdk-dev,5/7] net/vhost: Implement mtu_set callback", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "85b74a0b54a35491898a7200fbdf488bb4d9649f", "submitter": { "id": 512, "url": "https://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.com" }, "delegate": { "id": 355, "url": "https://patches.dpdk.org/api/users/355/?format=api", "username": "yliu", "first_name": "Yuanhan", "last_name": "Liu", "email": "yuanhan.liu@linux.intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170213142820.8964-6-maxime.coquelin@redhat.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/20400/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/20400/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 06D9DF955;\n\tMon, 13 Feb 2017 15:29:02 +0100 (CET)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id CA28BF923\n\tfor <dev@dpdk.org>; Mon, 13 Feb 2017 15:28:49 +0100 (CET)", "from int-mx11.intmail.prod.int.phx2.redhat.com\n\t(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 435BD4E33D;\n\tMon, 13 Feb 2017 14:28:50 +0000 (UTC)", "from max-t460s.redhat.com (ovpn-117-88.ams2.redhat.com\n\t[10.36.117.88])\n\tby int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with\n\tESMTP id v1DESW1B014561; Mon, 13 Feb 2017 09:28:47 -0500" ], "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "aconole@redhat.com, sodey@sonusnet.com, yuanhan.liu@linux.intel.com,\n\tjianfeng.tan@intel.com, dev@dpdk.org", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>", "Date": "Mon, 13 Feb 2017 15:28:18 +0100", "Message-Id": "<20170213142820.8964-6-maxime.coquelin@redhat.com>", "In-Reply-To": "<20170213142820.8964-1-maxime.coquelin@redhat.com>", "References": "<20170213142820.8964-1-maxime.coquelin@redhat.com>", "X-Scanned-By": "MIMEDefang 2.68 on 10.5.11.24", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]); Mon, 13 Feb 2017 14:28:50 +0000 (UTC)", "Subject": "[dpdk-dev] [PATCH 5/7] net/vhost: Implement mtu_set callback", "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": "This patch implements the eth_dev's mtu_set callback.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n doc/guides/nics/features/vhost.ini | 1 +\n drivers/net/vhost/rte_eth_vhost.c | 18 ++++++++++++++++++\n 2 files changed, 19 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/vhost.ini b/doc/guides/nics/features/vhost.ini\nindex 23166fb..590dadb 100644\n--- a/doc/guides/nics/features/vhost.ini\n+++ b/doc/guides/nics/features/vhost.ini\n@@ -11,3 +11,4 @@ Basic stats = Y\n Extended stats = Y\n x86-32 = Y\n x86-64 = Y\n+MTU update = Y\ndiff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c\nindex e98cffd..75feef1 100644\n--- a/drivers/net/vhost/rte_eth_vhost.c\n+++ b/drivers/net/vhost/rte_eth_vhost.c\n@@ -575,6 +575,8 @@ new_device(int vid)\n \tfor (i = 0; i < rte_vhost_get_queue_num(vid) * VIRTIO_QNUM; i++)\n \t\trte_vhost_enable_guest_notification(vid, i, 0);\n \n+\trte_vhost_mtu_get(vid, ð_dev->data->mtu);\n+\n \teth_dev->data->dev_link.link_status = ETH_LINK_UP;\n \n \trte_atomic32_set(&internal->dev_attached, 1);\n@@ -966,6 +968,21 @@ eth_link_update(struct rte_eth_dev *dev __rte_unused,\n \treturn 0;\n }\n \n+static int\n+eth_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)\n+{\n+\tif (dev->data->dev_link.link_status != ETH_LINK_UP)\n+\t\treturn -EAGAIN;\n+\n+\tif (!dev->data->mtu)\n+\t\treturn -ENOTSUP;\n+\n+\tif (dev->data->mtu != mtu)\n+\t\treturn -EINVAL;\n+\n+\treturn 0;\n+}\n+\n /**\n * Disable features in feature_mask. Returns 0 on success.\n */\n@@ -1002,6 +1019,7 @@ static const struct eth_dev_ops ops = {\n \t.rx_queue_release = eth_queue_release,\n \t.tx_queue_release = eth_queue_release,\n \t.link_update = eth_link_update,\n+\t.mtu_set = eth_mtu_set,\n \t.stats_get = eth_stats_get,\n \t.stats_reset = eth_stats_reset,\n \t.xstats_reset = vhost_dev_xstats_reset,\n", "prefixes": [ "dpdk-dev", "5/7" ] }{ "id": 20400, "url": "