Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7317/?format=api
https://patches.dpdk.org/api/patches/7317/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443621905-7872-4-git-send-email-tomaszx.kulasek@intel.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": "<1443621905-7872-4-git-send-email-tomaszx.kulasek@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1443621905-7872-4-git-send-email-tomaszx.kulasek@intel.com", "date": "2015-09-30T14:04:59", "name": "[dpdk-dev,v5,3/9] null: extend number of virtual queues", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0a5f54a33e63f76b965e6588839435b68a168dde", "submitter": { "id": 155, "url": "https://patches.dpdk.org/api/people/155/?format=api", "name": "Tomasz Kulasek", "email": "tomaszx.kulasek@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1443621905-7872-4-git-send-email-tomaszx.kulasek@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7317/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7317/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 F360D8DAA;\n\tWed, 30 Sep 2015 16:11:06 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id B3E228D9F\n\tfor <dev@dpdk.org>; Wed, 30 Sep 2015 16:11:05 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga102.fm.intel.com with ESMTP; 30 Sep 2015 07:10:57 -0700", "from unknown (HELO Sent) ([10.217.248.94])\n\tby orsmga001.jf.intel.com with SMTP; 30 Sep 2015 07:10:55 -0700", "by Sent (sSMTP sendmail emulation); Wed, 30 Sep 2015 16:09:30 +0200" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.17,612,1437462000\"; d=\"scan'208\";a=\"780947524\"", "From": "Tomasz Kulasek <tomaszx.kulasek@intel.com>", "To": "dev@dpdk.org", "Date": "Wed, 30 Sep 2015 16:04:59 +0200", "Message-Id": "<1443621905-7872-4-git-send-email-tomaszx.kulasek@intel.com>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1443621905-7872-1-git-send-email-tomaszx.kulasek@intel.com>", "References": "<1436981189-3320-1-git-send-email-tomaszx.kulasek@intel.com>\n\t<1443621905-7872-1-git-send-email-tomaszx.kulasek@intel.com>", "Subject": "[dpdk-dev] [PATCH v5 3/9] null: extend number of virtual queues", "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": "This patch adds a possibility to configure more than one queue on null\ndevice.\n\nv5 changes:\n - fixed queues number configuration (using internals->nb_*_queues instead\n of dev->data->nb_*_queues)\n\nSigned-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>\n---\n drivers/net/null/rte_eth_null.c | 28 +++++++++++++++++++---------\n 1 file changed, 19 insertions(+), 9 deletions(-)", "diff": "diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c\nindex c748101..bf81b1b 100644\n--- a/drivers/net/null/rte_eth_null.c\n+++ b/drivers/net/null/rte_eth_null.c\n@@ -71,8 +71,8 @@ struct pmd_internals {\n \tunsigned nb_rx_queues;\n \tunsigned nb_tx_queues;\n \n-\tstruct null_queue rx_null_queues[1];\n-\tstruct null_queue tx_null_queues[1];\n+\tstruct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT];\n+\tstruct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT];\n };\n \n \n@@ -178,7 +178,15 @@ eth_null_copy_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)\n }\n \n static int\n-eth_dev_configure(struct rte_eth_dev *dev __rte_unused) { return 0; }\n+eth_dev_configure(struct rte_eth_dev *dev) {\n+\tstruct pmd_internals *internals;\n+\n+\tinternals = dev->data->dev_private;\n+\tinternals->nb_rx_queues = dev->data->nb_rx_queues;\n+\tinternals->nb_tx_queues = dev->data->nb_tx_queues;\n+\n+\treturn 0;\n+}\n \n static int\n eth_dev_start(struct rte_eth_dev *dev)\n@@ -213,10 +221,11 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,\n \tif ((dev == NULL) || (mb_pool == NULL))\n \t\treturn -EINVAL;\n \n-\tif (rx_queue_id != 0)\n+\tinternals = dev->data->dev_private;\n+\n+\tif (rx_queue_id >= internals->nb_rx_queues)\n \t\treturn -ENODEV;\n \n-\tinternals = dev->data->dev_private;\n \tpacket_size = internals->packet_size;\n \n \tinternals->rx_null_queues[rx_queue_id].mb_pool = mb_pool;\n@@ -246,10 +255,11 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,\n \tif (dev == NULL)\n \t\treturn -EINVAL;\n \n-\tif (tx_queue_id != 0)\n+\tinternals = dev->data->dev_private;\n+\n+\tif (tx_queue_id >= internals->nb_tx_queues)\n \t\treturn -ENODEV;\n \n-\tinternals = dev->data->dev_private;\n \tpacket_size = internals->packet_size;\n \n \tdev->data->tx_queues[tx_queue_id] =\n@@ -279,8 +289,8 @@ eth_dev_info(struct rte_eth_dev *dev,\n \tdev_info->driver_name = drivername;\n \tdev_info->max_mac_addrs = 1;\n \tdev_info->max_rx_pktlen = (uint32_t)-1;\n-\tdev_info->max_rx_queues = (uint16_t)internals->nb_rx_queues;\n-\tdev_info->max_tx_queues = (uint16_t)internals->nb_tx_queues;\n+\tdev_info->max_rx_queues = RTE_DIM(internals->rx_null_queues);\n+\tdev_info->max_tx_queues = RTE_DIM(internals->tx_null_queues);\n \tdev_info->min_rx_bufsize = 0;\n \tdev_info->pci_dev = NULL;\n }\n", "prefixes": [ "dpdk-dev", "v5", "3/9" ] }{ "id": 7317, "url": "