Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42058/?format=api
http://patches.dpdk.org/api/patches/42058/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180702135642.52577-5-yong.liu@intel.com/", "project": { "id": 1, "url": "http://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": "<20180702135642.52577-5-yong.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180702135642.52577-5-yong.liu@intel.com", "date": "2018-07-02T13:56:37", "name": "[v5,4/9] net/virtio-user: add mrg-rxbuf and in-order vdev parameters", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "ad6bb1308c172556e485240520ddbd3b0d2afbb2", "submitter": { "id": 17, "url": "http://patches.dpdk.org/api/people/17/?format=api", "name": "Marvin Liu", "email": "yong.liu@intel.com" }, "delegate": { "id": 2642, "url": "http://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180702135642.52577-5-yong.liu@intel.com/mbox/", "series": [ { "id": 345, "url": "http://patches.dpdk.org/api/series/345/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=345", "date": "2018-07-02T13:56:33", "name": "support in-order feature", "version": 5, "mbox": "http://patches.dpdk.org/series/345/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42058/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/42058/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 68BA8548B;\n\tMon, 2 Jul 2018 08:11:16 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 3894A326C\n\tfor <dev@dpdk.org>; Mon, 2 Jul 2018 08:11:11 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Jul 2018 23:11:10 -0700", "from dpdk-test32.sh.intel.com ([10.67.119.193])\n\tby orsmga005.jf.intel.com with ESMTP; 01 Jul 2018 23:11:09 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,298,1526367600\"; d=\"scan'208\";a=\"237141572\"", "From": "Marvin Liu <yong.liu@intel.com>", "To": "maxime.coquelin@redhat.com,\n\ttiwei.bie@intel.com", "Cc": "zhihong.wang@intel.com,\n\tdev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>", "Date": "Mon, 2 Jul 2018 21:56:37 +0800", "Message-Id": "<20180702135642.52577-5-yong.liu@intel.com>", "X-Mailer": "git-send-email 2.17.0", "In-Reply-To": "<20180702135642.52577-1-yong.liu@intel.com>", "References": "<20180702135642.52577-1-yong.liu@intel.com>", "Subject": "[dpdk-dev] [PATCH v5 4/9] net/virtio-user: add mrg-rxbuf and\n\tin-order vdev parameters", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/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 parameters for configuring VIRTIO_NET_F_MRG_RXBUF and\nVIRTIO_F_IN_ORDER feature bits. If feature is disabled, also update\ncorresponding unsupported feature bit.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>", "diff": "diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst\nindex a42d1bb30..46e292c4d 100644\n--- a/doc/guides/nics/virtio.rst\n+++ b/doc/guides/nics/virtio.rst\n@@ -331,3 +331,13 @@ The user can specify below argument in devargs.\n driver, and works as a HW vhost backend. This argument is used to specify\n a virtio device needs to work in vDPA mode.\n (Default: 0 (disabled))\n+\n+#. ``mrg_rxbuf``:\n+\n+ It is used to enable virtio device mergeable Rx buffer feature.\n+ (Default: 1 (enabled))\n+\n+#. ``in_order``:\n+\n+ It is used to enable virtio device in-order feature.\n+ (Default: 1 (enabled))\ndiff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c\nindex e0e956888..953c46055 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -375,7 +375,8 @@ virtio_user_dev_setup(struct virtio_user_dev *dev)\n \n int\n virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n-\t\t int cq, int queue_size, const char *mac, char **ifname)\n+\t\t int cq, int queue_size, const char *mac, char **ifname,\n+\t\t int mrg_rxbuf, int in_order)\n {\n \tpthread_mutex_init(&dev->mutex, NULL);\n \tsnprintf(dev->path, PATH_MAX, \"%s\", path);\n@@ -420,6 +421,16 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \t\tdev->device_features = VIRTIO_USER_SUPPORTED_FEATURES;\n \t}\n \n+\tif (!mrg_rxbuf) {\n+\t\tdev->device_features &= ~(1ull << VIRTIO_NET_F_MRG_RXBUF);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_MRG_RXBUF);\n+\t}\n+\n+\tif (!in_order) {\n+\t\tdev->device_features &= ~(1ull << VIRTIO_F_IN_ORDER);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_F_IN_ORDER);\n+\t}\n+\n \tif (dev->mac_specified) {\n \t\tdev->device_features |= (1ull << VIRTIO_NET_F_MAC);\n \t} else {\ndiff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h\nindex c23ddfcc5..d6e0e137b 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h\n@@ -48,7 +48,8 @@ int is_vhost_user_by_type(const char *path);\n int virtio_user_start_device(struct virtio_user_dev *dev);\n int virtio_user_stop_device(struct virtio_user_dev *dev);\n int virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n-\t\t\t int cq, int queue_size, const char *mac, char **ifname);\n+\t\t\t int cq, int queue_size, const char *mac, char **ifname,\n+\t\t\t int mrg_rxbuf, int in_order);\n void virtio_user_dev_uninit(struct virtio_user_dev *dev);\n void virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx);\n uint8_t virtio_user_handle_mq(struct virtio_user_dev *dev, uint16_t q_pairs);\ndiff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c\nindex 08fa4bd47..fcd30251f 100644\n--- a/drivers/net/virtio/virtio_user_ethdev.c\n+++ b/drivers/net/virtio/virtio_user_ethdev.c\n@@ -358,8 +358,12 @@ static const char *valid_args[] = {\n \tVIRTIO_USER_ARG_QUEUE_SIZE,\n #define VIRTIO_USER_ARG_INTERFACE_NAME \"iface\"\n \tVIRTIO_USER_ARG_INTERFACE_NAME,\n-#define VIRTIO_USER_ARG_SERVER_MODE \"server\"\n+#define VIRTIO_USER_ARG_SERVER_MODE \"server\"\n \tVIRTIO_USER_ARG_SERVER_MODE,\n+#define VIRTIO_USER_ARG_MRG_RXBUF \"mrg_rxbuf\"\n+\tVIRTIO_USER_ARG_MRG_RXBUF,\n+#define VIRTIO_USER_ARG_IN_ORDER \"in_order\"\n+\tVIRTIO_USER_ARG_IN_ORDER,\n \tNULL\n };\n \n@@ -464,6 +468,8 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)\n \tuint64_t cq = VIRTIO_USER_DEF_CQ_EN;\n \tuint64_t queue_size = VIRTIO_USER_DEF_Q_SZ;\n \tuint64_t server_mode = VIRTIO_USER_DEF_SERVER_MODE;\n+\tuint64_t mrg_rxbuf = 1;\n+\tuint64_t in_order = 1;\n \tchar *path = NULL;\n \tchar *ifname = NULL;\n \tchar *mac_addr = NULL;\n@@ -563,6 +569,24 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)\n \t\tgoto end;\n \t}\n \n+\tif (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_MRG_RXBUF) == 1) {\n+\t\tif (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_MRG_RXBUF,\n+\t\t\t\t &get_integer_arg, &mrg_rxbuf) < 0) {\n+\t\t\tPMD_INIT_LOG(ERR, \"error to parse %s\",\n+\t\t\t\t VIRTIO_USER_ARG_MRG_RXBUF);\n+\t\t\tgoto end;\n+\t\t}\n+\t}\n+\n+\tif (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_IN_ORDER) == 1) {\n+\t\tif (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_IN_ORDER,\n+\t\t\t\t &get_integer_arg, &in_order) < 0) {\n+\t\t\tPMD_INIT_LOG(ERR, \"error to parse %s\",\n+\t\t\t\t VIRTIO_USER_ARG_IN_ORDER);\n+\t\t\tgoto end;\n+\t\t}\n+\t}\n+\n \tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n \t\tstruct virtio_user_dev *vu_dev;\n \n@@ -579,7 +603,8 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)\n \t\telse\n \t\t\tvu_dev->is_server = false;\n \t\tif (virtio_user_dev_init(hw->virtio_user_dev, path, queues, cq,\n-\t\t\t\t queue_size, mac_addr, &ifname) < 0) {\n+\t\t\t\t queue_size, mac_addr, &ifname, mrg_rxbuf,\n+\t\t\t\t in_order) < 0) {\n \t\t\tPMD_INIT_LOG(ERR, \"virtio_user_dev_init fails\");\n \t\t\tvirtio_user_eth_dev_free(eth_dev);\n \t\t\tgoto end;\n@@ -657,4 +682,6 @@ RTE_PMD_REGISTER_PARAM_STRING(net_virtio_user,\n \t\"cq=<int> \"\n \t\"queue_size=<int> \"\n \t\"queues=<int> \"\n-\t\"iface=<string>\");\n+\t\"iface=<string>\"\n+\t\"mrg_rxbuf=<0|1>\"\n+\t\"in_order=<0|1>\");\n", "prefixes": [ "v5", "4/9" ] }{ "id": 42058, "url": "