Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/71256/?format=api
https://patches.dpdk.org/api/patches/71256/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200611170839.9206-7-ting.xu@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": "<20200611170839.9206-7-ting.xu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200611170839.9206-7-ting.xu@intel.com", "date": "2020-06-11T17:08:33", "name": "[v2,06/12] net/ice: add Rx queue init in DCF", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "628617889eaa2084fabc110fb2a5997cc4061abf", "submitter": { "id": 1363, "url": "https://patches.dpdk.org/api/people/1363/?format=api", "name": "Xu, Ting", "email": "ting.xu@intel.com" }, "delegate": { "id": 31221, "url": "https://patches.dpdk.org/api/users/31221/?format=api", "username": "yexl", "first_name": "xiaolong", "last_name": "ye", "email": "xiaolong.ye@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200611170839.9206-7-ting.xu@intel.com/mbox/", "series": [ { "id": 10405, "url": "https://patches.dpdk.org/api/series/10405/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10405", "date": "2020-06-11T17:08:27", "name": "enable DCF datapath configuration", "version": 2, "mbox": "https://patches.dpdk.org/series/10405/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/71256/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/71256/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 70ECFA00C5;\n\tThu, 11 Jun 2020 11:10:16 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B374F1BECF;\n\tThu, 11 Jun 2020 11:09:33 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id 945301BEC3\n for <dev@dpdk.org>; Thu, 11 Jun 2020 11:09:31 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jun 2020 02:09:31 -0700", "from dpdk-xuting-main.sh.intel.com ([10.67.117.84])\n by fmsmga005.fm.intel.com with ESMTP; 11 Jun 2020 02:09:29 -0700" ], "IronPort-SDR": [ "\n y1ubiMcdsVLtW4mw1McB2RIvMMScXISZGLroxEc4y9tZkqLNOeOfIyMy4HrZRi4IAekWKzCGVg\n YcAvjfDQ3W8Q==", "\n PEeImUUS26dKkfnPHrC8A+mm5tZ5+zl6cQbePw0LZcwbg/ZNq7Holp4SlYtqt3M9zpp1jP17D+\n j7NV6AqJXwrQ==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.73,499,1583222400\"; d=\"scan'208\";a=\"473737225\"", "From": "Ting Xu <ting.xu@intel.com>", "To": "dev@dpdk.org", "Cc": "xiaolong.ye@intel.com, qi.z.zhang@intel.com, qiming.yang@intel.com,\n john.mcnamara@intel.com, marko.kovacevic@intel.com", "Date": "Thu, 11 Jun 2020 17:08:33 +0000", "Message-Id": "<20200611170839.9206-7-ting.xu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200611170839.9206-1-ting.xu@intel.com>", "References": "<20200605201737.33766-1-ting.xu@intel.com>\n <20200611170839.9206-1-ting.xu@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 06/12] net/ice: add Rx queue init in DCF", "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Qi Zhang <qi.z.zhang@intel.com>\n\nEnable Rx queues initialization during device start in DCF.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nSigned-off-by: Ting Xu <ting.xu@intel.com>\n---\n drivers/net/ice/ice_dcf.h | 1 +\n drivers/net/ice/ice_dcf_ethdev.c | 83 ++++++++++++++++++++++++++++++++\n 2 files changed, 84 insertions(+)", "diff": "diff --git a/drivers/net/ice/ice_dcf.h b/drivers/net/ice/ice_dcf.h\nindex 152266e3c..dcb2a0283 100644\n--- a/drivers/net/ice/ice_dcf.h\n+++ b/drivers/net/ice/ice_dcf.h\n@@ -53,6 +53,7 @@ struct ice_dcf_hw {\n \tuint8_t *rss_lut;\n \tuint8_t *rss_key;\n \tuint64_t supported_rxdid;\n+\tuint16_t num_queue_pairs;\n };\n \n int ice_dcf_execute_virtchnl_cmd(struct ice_dcf_hw *hw,\ndiff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex ff2cab054..6d0f93ca7 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -42,14 +42,97 @@ ice_dcf_xmit_pkts(__rte_unused void *tx_queue,\n \treturn 0;\n }\n \n+static int\n+ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)\n+{\n+\tstruct ice_dcf_adapter *dcf_ad = dev->data->dev_private;\n+\tstruct rte_eth_dev_data *dev_data = dev->data;\n+\tstruct iavf_hw *hw = &dcf_ad->real_hw.avf;\n+\tuint16_t buf_size, max_pkt_len, len;\n+\n+\tbuf_size = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;\n+\trxq->rx_hdr_len = 0;\n+\trxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));\n+\tlen = ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len;\n+\tmax_pkt_len = RTE_MIN(len, dev->data->dev_conf.rxmode.max_rx_pkt_len);\n+\n+\t/* Check if the jumbo frame and maximum packet length are set\n+\t * correctly.\n+\t */\n+\tif (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {\n+\t\tif (max_pkt_len <= RTE_ETHER_MAX_LEN ||\n+\t\t max_pkt_len > ICE_FRAME_SIZE_MAX) {\n+\t\t\tPMD_DRV_LOG(ERR, \"maximum packet length must be \"\n+\t\t\t\t \"larger than %u and smaller than %u, \"\n+\t\t\t\t \"as jumbo frame is enabled\",\n+\t\t\t\t (uint32_t)RTE_ETHER_MAX_LEN,\n+\t\t\t\t (uint32_t)ICE_FRAME_SIZE_MAX);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t} else {\n+\t\tif (max_pkt_len < RTE_ETHER_MIN_LEN ||\n+\t\t max_pkt_len > RTE_ETHER_MAX_LEN) {\n+\t\t\tPMD_DRV_LOG(ERR, \"maximum packet length must be \"\n+\t\t\t\t \"larger than %u and smaller than %u, \"\n+\t\t\t\t \"as jumbo frame is disabled\",\n+\t\t\t\t (uint32_t)RTE_ETHER_MIN_LEN,\n+\t\t\t\t (uint32_t)RTE_ETHER_MAX_LEN);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\trxq->max_pkt_len = max_pkt_len;\n+\tif ((dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER) ||\n+\t (rxq->max_pkt_len + 2 * ICE_VLAN_TAG_SIZE) > buf_size) {\n+\t\tdev_data->scattered_rx = 1;\n+\t}\n+\trxq->qrx_tail = hw->hw_addr + IAVF_QRX_TAIL1(rxq->queue_id);\n+\tIAVF_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);\n+\tIAVF_WRITE_FLUSH(hw);\n+\n+\treturn 0;\n+}\n+\n+static int\n+ice_dcf_init_rx_queues(struct rte_eth_dev *dev)\n+{\n+\tstruct ice_rx_queue **rxq =\n+\t\t(struct ice_rx_queue **)dev->data->rx_queues;\n+\tint i, ret;\n+\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\tif (!rxq[i] || !rxq[i]->q_set)\n+\t\t\tcontinue;\n+\t\tret = ice_dcf_init_rxq(dev, rxq[i]);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\tice_set_rx_function(dev);\n+\tice_set_tx_function(dev);\n+\n+\treturn 0;\n+}\n+\n static int\n ice_dcf_dev_start(struct rte_eth_dev *dev)\n {\n \tstruct ice_dcf_adapter *dcf_ad = dev->data->dev_private;\n \tstruct ice_adapter *ad = &dcf_ad->parent;\n+\tstruct ice_dcf_hw *hw = &dcf_ad->real_hw;\n+\tint ret;\n \n \tad->pf.adapter_stopped = 0;\n \n+\thw->num_queue_pairs = RTE_MAX(dev->data->nb_rx_queues,\n+\t\t\t\t dev->data->nb_tx_queues);\n+\n+\tret = ice_dcf_init_rx_queues(dev);\n+\tif (ret) {\n+\t\tPMD_DRV_LOG(ERR, \"Fail to init queues\");\n+\t\treturn ret;\n+\t}\n+\n \tdev->data->dev_link.link_status = ETH_LINK_UP;\n \n \treturn 0;\n", "prefixes": [ "v2", "06/12" ] }{ "id": 71256, "url": "