List patch comments

GET /api/patches/187/comments/?format=api&order=id
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/187/comments/?format=api&order=id&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/187/comments/?format=api&order=id&page=1>; rel="last"
Vary: Accept
[ { "id": 582, "web_url": "https://patches.dpdk.org/comment/582/", "msgid": "<1869800.0euLpIG2Cy@xps13>", "list_archive_url": "https://inbox.dpdk.org/dev/1869800.0euLpIG2Cy@xps13", "date": "2014-08-30T14:52:04", "subject": "Re: [dpdk-dev] [PATCH 2/3] i40evf: support\n\tI40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EX in i40e VF PMD", "submitter": { "id": 1, "url": "https://patches.dpdk.org/api/people/1/?format=api", "name": "Thomas Monjalon", "email": "thomas.monjalon@6wind.com" }, "content": "2014-08-20 11:33, Helin Zhang:\n> To support configurable CRC in VF, use operation of\n> I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EX to carry more\n> information from VM to PF host, if the peer is DPDK\n> PF host. Otherwise assume it is Linux PF host and\n> just use operation of I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES.\n[...]\n> +/* It configures VSI queues to co-work with Linux PF host */\n> static int\n> -i40evf_configure_queues(struct rte_eth_dev *dev)\n> +i40evf_configure_vsi_queues(struct rte_eth_dev *dev)\n> {\n> \tstruct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);\n> -\tstruct i40e_virtchnl_vsi_queue_config_info *queue_info;\n> -\tstruct i40e_virtchnl_queue_pair_info *queue_cfg;\n> \tstruct i40e_rx_queue **rxq =\n> \t\t(struct i40e_rx_queue **)dev->data->rx_queues;\n> \tstruct i40e_tx_queue **txq =\n> \t\t(struct i40e_tx_queue **)dev->data->tx_queues;\n> -\tint i, len, nb_qpairs, num_rxq, num_txq;\n> -\tint err;\n> +\tstruct i40e_virtchnl_vsi_queue_config_info *vc_vqci;\n> +\tstruct i40e_virtchnl_queue_pair_info *vc_qpi;\n> \tstruct vf_cmd_info args;\n> -\tstruct rte_pktmbuf_pool_private *mbp_priv;\n> -\n> -\tnb_qpairs = vf->num_queue_pairs;\n> -\tlen = sizeof(*queue_info) + sizeof(*queue_cfg) * nb_qpairs;\n> -\tqueue_info = rte_zmalloc(\"queue_info\", len, 0);\n> -\tif (queue_info == NULL) {\n> -\t\tPMD_INIT_LOG(ERR, \"failed alloc memory for queue_info\\n\");\n> -\t\treturn -1;\n> +\tint size, i, nb_qp, ret;\n> +\n> +\tnb_qp = vf->num_queue_pairs;\n> +\tsize = sizeof(struct i40e_virtchnl_vsi_queue_config_info) +\n> +\t\tsizeof(struct i40e_virtchnl_queue_pair_info) * nb_qp;\n> +\tvc_vqci = rte_zmalloc(\"queue_info\", size, 0);\n> +\tif (!vc_vqci) {\n> +\t\tPMD_DRV_LOG(ERR, \"Failed to allocate memory for VF \"\n> +\t\t\t\t\t\"configuring queues\\n\");\n> +\t\treturn -ENOMEM;\n> \t}\n> -\tqueue_info->vsi_id = vf->vsi_res->vsi_id;\n> -\tqueue_info->num_queue_pairs = nb_qpairs;\n> -\tqueue_cfg = queue_info->qpair;\n> -\n> -\tnum_rxq = dev->data->nb_rx_queues;\n> -\tnum_txq = dev->data->nb_tx_queues;\n> -\t/*\n> -\t * PF host driver required to configure queues in pairs, which means\n> -\t * rxq_num should equals to txq_num. The actual usage won't always\n> -\t * work that way. The solution is fills 0 with HW ring option in case\n> -\t * they are not equal.\n> -\t */\n> -\tfor (i = 0; i < nb_qpairs; i++) {\n> -\t\t/*Fill TX info */\n> -\t\tqueue_cfg->txq.vsi_id = queue_info->vsi_id;\n> -\t\tqueue_cfg->txq.queue_id = i;\n> -\t\tif (i < num_txq) {\n> -\t\t\tqueue_cfg->txq.ring_len = txq[i]->nb_tx_desc;\n> -\t\t\tqueue_cfg->txq.dma_ring_addr = txq[i]->tx_ring_phys_addr;\n> -\t\t} else {\n> -\t\t\tqueue_cfg->txq.ring_len = 0;\n> -\t\t\tqueue_cfg->txq.dma_ring_addr = 0;\n> +\tvc_vqci->vsi_id = vf->vsi_res->vsi_id;\n> +\tvc_vqci->num_queue_pairs = nb_qp;\n> +\n> +\tfor (i = 0, vc_qpi = vc_vqci->qpair; i < nb_qp; i++, vc_qpi++) {\n> +\t\tvc_qpi->txq.vsi_id = vc_vqci->vsi_id;\n> +\t\tvc_qpi->txq.queue_id = i;\n> +\t\tif (i < dev->data->nb_tx_queues) {\n> +\t\t\tvc_qpi->txq.ring_len = txq[i]->nb_tx_desc;\n> +\t\t\tvc_qpi->txq.dma_ring_addr = txq[i]->tx_ring_phys_addr;\n> \t\t}\n> \n> -\t\t/* Fill RX info */\n> -\t\tqueue_cfg->rxq.vsi_id = queue_info->vsi_id;\n> -\t\tqueue_cfg->rxq.queue_id = i;\n> -\t\tqueue_cfg->rxq.max_pkt_size = vf->max_pkt_len;\n> -\t\tif (i < num_rxq) {\n> +\t\tvc_qpi->rxq.vsi_id = vc_vqci->vsi_id;\n> +\t\tvc_qpi->rxq.queue_id = i;\n> +\t\tvc_qpi->rxq.max_pkt_size = vf->max_pkt_len;\n> +\t\tif (i < dev->data->nb_rx_queues) {\n> +\t\t\tstruct rte_pktmbuf_pool_private *mbp_priv;\n> +\n> +\t\t\tvc_qpi->rxq.ring_len = rxq[i]->nb_rx_desc;\n> +\t\t\tvc_qpi->rxq.dma_ring_addr = rxq[i]->rx_ring_phys_addr;\n> \t\t\tmbp_priv = rte_mempool_get_priv(rxq[i]->mp);\n> -\t\t\tqueue_cfg->rxq.databuffer_size = mbp_priv->mbuf_data_room_size -\n> -\t\t\t\t\t\t RTE_PKTMBUF_HEADROOM;;\n> -\t\t\tqueue_cfg->rxq.ring_len = rxq[i]->nb_rx_desc;\n> -\t\t\tqueue_cfg->rxq.dma_ring_addr = rxq[i]->rx_ring_phys_addr;;\n> -\t\t} else {\n> -\t\t\tqueue_cfg->rxq.ring_len = 0;\n> -\t\t\tqueue_cfg->rxq.dma_ring_addr = 0;\n> -\t\t\tqueue_cfg->rxq.databuffer_size = 0;\n> +\t\t\tvc_qpi->rxq.databuffer_size =\n> +\t\t\t\tmbp_priv->mbuf_data_room_size -\n> +\t\t\t\t\tRTE_PKTMBUF_HEADROOM;\n> \t\t}\n> -\t\tqueue_cfg++;\n> \t}\n\nIt's not clear why you reworked the legacy function.\nPlease explain it in the commit log and move renamings in a separated patch.\n\nThanks", "headers": { "Return-Path": "<thomas.monjalon@6wind.com>", "Received": [ "from mail-wg0-f42.google.com (mail-wg0-f42.google.com\n\t[74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 1D282B379\n\tfor <dev@dpdk.org>; Sat, 30 Aug 2014 16:47:55 +0200 (CEST)", "by mail-wg0-f42.google.com with SMTP id b13so3336979wgh.13\n\tfor <dev@dpdk.org>; Sat, 30 Aug 2014 07:52:13 -0700 (PDT)", "from xps13.localnet (APoitiers-651-1-232-7.w2-6.abo.wanadoo.fr.\n\t[2.6.255.7]) by mx.google.com with ESMTPSA id\n\tiy10sm7175220wic.8.2014.08.30.07.52.12 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 30 Aug 2014 07:52:12 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:organization\n\t:user-agent:in-reply-to:references:mime-version\n\t:content-transfer-encoding:content-type;\n\tbh=gDcHomppMnoQOB+8zEsSoQj0zS2QoY7T8ycvU4jUtj8=;\n\tb=I0W8Tt+lCeX9blARGyH8GJqeGmbzGPHnLh5d/p6NWfp+ogBw2VWodgC7HwCdLDec+9\n\tIlxozbmBOPnjOj5I/SSTzJayqhatljU4H55ovCLUKtAOj2++6oseLMl9LHoita7HR1Qk\n\trhdwkJLfKcAty93lLdbmcHAxyQGvUHraaFbE81y6AXXCE++njLBYKYhzEAjOWZI0GsAi\n\tUpxzS8KkhtzTn/zFUzpszLqGCQ9S/uV/iNLiT9B34rorg+pwHXaSJCbXFcLPTsEnQ6jt\n\tM3zgkW5zKI/AM/rlPwpf2fEbQjJCwPqaYBHcLbh6fGTWPv46YilYuM6MPk5eNmOyXsFw\n\tv3xw==", "X-Gm-Message-State": "ALoCoQm0wR7g4WhEva6Xe5ZlKDdaahRynfFzAMXfrtpDOoJtIvjXz2fNR/LKDMOjOwdeysXw6BKw", "X-Received": "by 10.180.21.141 with SMTP id v13mr10911686wie.48.1409410333642; \n\tSat, 30 Aug 2014 07:52:13 -0700 (PDT)", "From": "Thomas Monjalon <thomas.monjalon@6wind.com>", "To": "Helin Zhang <helin.zhang@intel.com>", "Date": "Sat, 30 Aug 2014 16:52:04 +0200", "Message-ID": "<1869800.0euLpIG2Cy@xps13>", "Organization": "6WIND", "User-Agent": "KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; )", "In-Reply-To": "<1408505611-6959-3-git-send-email-helin.zhang@intel.com>", "References": "<1408505611-6959-1-git-send-email-helin.zhang@intel.com>\n\t<1408505611-6959-3-git-send-email-helin.zhang@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "7Bit", "Content-Type": "text/plain; charset=\"us-ascii\"", "Cc": "dev@dpdk.org", "Subject": "Re: [dpdk-dev] [PATCH 2/3] i40evf: support\n\tI40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EX in i40e VF PMD", "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>", "X-List-Received-Date": "Sat, 30 Aug 2014 14:47:55 -0000" }, "addressed": null } ]