Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2384/?format=api
https://patches.dpdk.org/api/patches/2384/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421672551-11652-2-git-send-email-pawelx.wodkowski@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": "<1421672551-11652-2-git-send-email-pawelx.wodkowski@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1421672551-11652-2-git-send-email-pawelx.wodkowski@intel.com", "date": "2015-01-19T13:02:28", "name": "[dpdk-dev,v2,1/4] ethdev: Allow zero rx/tx queues in SRIOV mode", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ff1738741f40bae311fc7ccd5149c6ed7549b591", "submitter": { "id": 58, "url": "https://patches.dpdk.org/api/people/58/?format=api", "name": "Wodkowski, PawelX", "email": "pawelx.wodkowski@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421672551-11652-2-git-send-email-pawelx.wodkowski@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/2384/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/2384/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 C3CDA5A82;\n\tMon, 19 Jan 2015 14:12:31 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 34FD55A80\n\tfor <dev@dpdk.org>; Mon, 19 Jan 2015 14:12:29 +0100 (CET)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP; 19 Jan 2015 05:11:05 -0800", "from unknown (HELO Sent) ([10.217.248.233])\n\tby orsmga001.jf.intel.com with SMTP; 19 Jan 2015 05:11:01 -0800", "by Sent (sSMTP sendmail emulation); Mon, 19 Jan 2015 14:05:06 +0100" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.09,426,1418112000\"; d=\"scan'208\";a=\"639312509\"", "From": "Pawel Wodkowski <pawelx.wodkowski@intel.com>", "To": "dev@dpdk.org", "Date": "Mon, 19 Jan 2015 14:02:28 +0100", "Message-Id": "<1421672551-11652-2-git-send-email-pawelx.wodkowski@intel.com>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<1421672551-11652-1-git-send-email-pawelx.wodkowski@intel.com>", "References": "<1421077843-8492-1-git-send-email-michalx.k.jastrzebski@intel.com>\n\t<1421672551-11652-1-git-send-email-pawelx.wodkowski@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 1/4] ethdev: Allow zero rx/tx queues in SRIOV\n\tmode", "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": "Allow zero rx/tx queues to be passed to rte_eth_dev_configure(). This\nway PF might be used only for configuration purpose when no receive\nand/or transmit functionality is needed.\n\nRationale:\nin SRIOV mode PF use first free VF to RX/TX (at least ixgbe based NICs).\nFor example: if using 82599EB based NIC and VF count is 16, 32 or 64 all\nrecources are assigned to VFs so PF might be used only for configuration\npurpose.\n\nSigned-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>\n---\n lib/librte_ether/rte_ethdev.c | 15 +++++++++++----\n 1 file changed, 11 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 077d430..62d7f6e 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -333,7 +333,7 @@ rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)\n \t\tdev->data->rx_queues = rte_zmalloc(\"ethdev->rx_queues\",\n \t\t\t\tsizeof(dev->data->rx_queues[0]) * nb_queues,\n \t\t\t\tRTE_CACHE_LINE_SIZE);\n-\t\tif (dev->data->rx_queues == NULL) {\n+\t\tif (dev->data->rx_queues == NULL && nb_queues > 0) {\n \t\t\tdev->data->nb_rx_queues = 0;\n \t\t\treturn -(ENOMEM);\n \t\t}\n@@ -475,7 +475,7 @@ rte_eth_dev_tx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)\n \t\tdev->data->tx_queues = rte_zmalloc(\"ethdev->tx_queues\",\n \t\t\t\tsizeof(dev->data->tx_queues[0]) * nb_queues,\n \t\t\t\tRTE_CACHE_LINE_SIZE);\n-\t\tif (dev->data->tx_queues == NULL) {\n+\t\tif (dev->data->tx_queues == NULL && nb_queues > 0) {\n \t\t\tdev->data->nb_tx_queues = 0;\n \t\t\treturn -(ENOMEM);\n \t\t}\n@@ -731,7 +731,10 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t}\n \tif (nb_rx_q == 0) {\n \t\tPMD_DEBUG_TRACE(\"ethdev port_id=%d nb_rx_q == 0\\n\", port_id);\n-\t\treturn (-EINVAL);\n+\t\t/* In SRIOV there can be no free resource for PF. So permit use only\n+\t\t * for configuration. */\n+\t\tif (RTE_ETH_DEV_SRIOV(dev).active == 0)\n+\t\t\treturn (-EINVAL);\n \t}\n \n \tif (nb_tx_q > dev_info.max_tx_queues) {\n@@ -739,9 +742,13 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,\n \t\t\t\tport_id, nb_tx_q, dev_info.max_tx_queues);\n \t\treturn (-EINVAL);\n \t}\n+\n \tif (nb_tx_q == 0) {\n \t\tPMD_DEBUG_TRACE(\"ethdev port_id=%d nb_tx_q == 0\\n\", port_id);\n-\t\treturn (-EINVAL);\n+\t\t/* In SRIOV there can be no free resource for PF. So permit use only\n+\t\t * for configuration. */\n+\t\tif (RTE_ETH_DEV_SRIOV(dev).active == 0)\n+\t\t\treturn (-EINVAL);\n \t}\n \n \t/* Copy the dev_conf parameter into the dev structure */\n", "prefixes": [ "dpdk-dev", "v2", "1/4" ] }{ "id": 2384, "url": "