Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41472/?format=api
http://patchwork.dpdk.org/api/patches/41472/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180625151710.29437-4-yong.liu@intel.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": "<20180625151710.29437-4-yong.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180625151710.29437-4-yong.liu@intel.com", "date": "2018-06-25T15:17:05", "name": "[v2,3/8] net/virtio-user: add mrg_rxbuf and in_order vdev parameters", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "54f2256c5378be4cb73d6cd545986e30cf6519b1", "submitter": { "id": 17, "url": "http://patchwork.dpdk.org/api/people/17/?format=api", "name": "Marvin Liu", "email": "yong.liu@intel.com" }, "delegate": { "id": 2642, "url": "http://patchwork.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180625151710.29437-4-yong.liu@intel.com/mbox/", "series": [ { "id": 223, "url": "http://patchwork.dpdk.org/api/series/223/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=223", "date": "2018-06-25T15:17:02", "name": "support VIRTIO_F_IN_ORDER feature", "version": 2, "mbox": "http://patchwork.dpdk.org/series/223/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/41472/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/41472/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 758911B051;\n\tMon, 25 Jun 2018 09:31:30 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 49C2F5F35\n\tfor <dev@dpdk.org>; Mon, 25 Jun 2018 09:31:28 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jun 2018 00:31:27 -0700", "from dpdk-test32.sh.intel.com ([10.67.119.193])\n\tby fmsmga006.fm.intel.com with ESMTP; 25 Jun 2018 00:31:13 -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,269,1526367600\"; d=\"scan'208\";a=\"240338559\"", "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, 25 Jun 2018 23:17:05 +0800", "Message-Id": "<20180625151710.29437-4-yong.liu@intel.com>", "X-Mailer": "git-send-email 2.17.0", "In-Reply-To": "<20180625151710.29437-1-yong.liu@intel.com>", "References": "<20180625151710.29437-1-yong.liu@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 3/8] 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>", "diff": "diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c\nindex 360a92eae..34a7f53ac 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->unmask_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->unmask_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 \telse {\ndiff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h\nindex a1da5f56c..b97eec075 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 0c02c6851..e9a5039aa 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@@ -462,6 +466,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@@ -561,6 +567,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@@ -577,7 +601,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\tqueue_size, mac_addr, &ifname, mrg_rxbuf,\n+\t\t\tin_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@@ -655,4 +680,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": [ "v2", "3/8" ] }{ "id": 41472, "url": "