Show a patch.

GET /api/patches/73403/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 73403,
    "url": "https://patches.dpdk.org/api/patches/73403/",
    "web_url": "https://patches.dpdk.org/patch/73403/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20200707092244.12791-24-hemant.agrawal@nxp.com>",
    "date": "2020-07-07T09:22:38",
    "name": "[v2,23/29] net/dpaa2: support distribution size set on multiple TCs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8ac324dea7ef9cc9f9dd6242ae852d8ae3243c9f",
    "submitter": {
        "id": 477,
        "url": "https://patches.dpdk.org/api/people/477/",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "https://patches.dpdk.org/patch/73403/mbox/",
    "series": [
        {
            "id": 10842,
            "url": "https://patches.dpdk.org/api/series/10842/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10842",
            "date": "2020-07-07T09:22:15",
            "name": "NXP DPAAx enhancements",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/10842/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73403/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/73403/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Message-Id": "<20200707092244.12791-24-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com,\n\tJun Yang <jun.yang@nxp.com>",
        "X-BeenThere": "dev@dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 05E12A00BE;\n\tTue,  7 Jul 2020 11:31:56 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2B1E91DDFF;\n\tTue,  7 Jul 2020 11:27:35 +0200 (CEST)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by dpdk.org (Postfix) with ESMTP id B77CE1DD49\n for <dev@dpdk.org>; Tue,  7 Jul 2020 11:27:14 +0200 (CEST)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 9D40C1A0A55;\n Tue,  7 Jul 2020 11:27:14 +0200 (CEST)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id B37F31A0A46;\n Tue,  7 Jul 2020 11:27:12 +0200 (CEST)",
            "from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net\n [10.232.133.63])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 782F44030B;\n Tue,  7 Jul 2020 17:27:10 +0800 (SGT)"
        ],
        "Subject": "[dpdk-dev] [PATCH v2 23/29] net/dpaa2: support distribution size\n\tset on multiple TCs",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "In-Reply-To": "<20200707092244.12791-1-hemant.agrawal@nxp.com>",
        "Precedence": "list",
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "References": "<20200527132326.1382-1-hemant.agrawal@nxp.com>\n <20200707092244.12791-1-hemant.agrawal@nxp.com>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Date": "Tue,  7 Jul 2020 14:52:38 +0530",
        "X-Mailman-Version": "2.1.15",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>"
    },
    "content": "From: Jun Yang <jun.yang@nxp.com>\n\nDefault distribution size of TC is 1, which is limited by MC. We have to\nset the distribution size for each TC to support multiple RXQs per TC.\n\nSigned-off-by: Jun Yang <jun.yang@nxp.com>\n---\n drivers/net/dpaa2/base/dpaa2_hw_dpni.c |  6 +--\n drivers/net/dpaa2/dpaa2_ethdev.c       | 51 ++++++++++++++++----------\n drivers/net/dpaa2/dpaa2_ethdev.h       |  2 +-\n 3 files changed, 36 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c\nindex 34de0d1f7..9f0dad6e7 100644\n--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c\n+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c\n@@ -81,14 +81,14 @@ rte_pmd_dpaa2_set_custom_hash(uint16_t port_id,\n \n int\n dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,\n-\t\t      uint64_t req_dist_set)\n+\tuint64_t req_dist_set, int tc_index)\n {\n \tstruct dpaa2_dev_priv *priv = eth_dev->data->dev_private;\n \tstruct fsl_mc_io *dpni = priv->hw;\n \tstruct dpni_rx_tc_dist_cfg tc_cfg;\n \tstruct dpkg_profile_cfg kg_cfg;\n \tvoid *p_params;\n-\tint ret, tc_index = 0;\n+\tint ret;\n \n \tp_params = rte_malloc(\n \t\tNULL, DIST_PARAM_IOVA_SIZE, RTE_CACHE_LINE_SIZE);\n@@ -107,7 +107,7 @@ dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,\n \t\treturn ret;\n \t}\n \ttc_cfg.key_cfg_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(p_params));\n-\ttc_cfg.dist_size = eth_dev->data->nb_rx_queues;\n+\ttc_cfg.dist_size = priv->dist_queues;\n \ttc_cfg.dist_mode = DPNI_DIST_MODE_HASH;\n \n \tret = dpkg_prepare_key_cfg(&kg_cfg, p_params);\ndiff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c\nindex 008e1c570..020af4b03 100644\n--- a/drivers/net/dpaa2/dpaa2_ethdev.c\n+++ b/drivers/net/dpaa2/dpaa2_ethdev.c\n@@ -453,7 +453,7 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)\n \tint rx_l4_csum_offload = false;\n \tint tx_l3_csum_offload = false;\n \tint tx_l4_csum_offload = false;\n-\tint ret;\n+\tint ret, tc_index;\n \n \tPMD_INIT_FUNC_TRACE();\n \n@@ -493,12 +493,16 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)\n \t}\n \n \tif (eth_conf->rxmode.mq_mode == ETH_MQ_RX_RSS) {\n-\t\tret = dpaa2_setup_flow_dist(dev,\n-\t\t\t\teth_conf->rx_adv_conf.rss_conf.rss_hf);\n-\t\tif (ret) {\n-\t\t\tDPAA2_PMD_ERR(\"Unable to set flow distribution.\"\n-\t\t\t\t      \"Check queue config\");\n-\t\t\treturn ret;\n+\t\tfor (tc_index = 0; tc_index < priv->num_rx_tc; tc_index++) {\n+\t\t\tret = dpaa2_setup_flow_dist(dev,\n+\t\t\t\t\teth_conf->rx_adv_conf.rss_conf.rss_hf,\n+\t\t\t\t\ttc_index);\n+\t\t\tif (ret) {\n+\t\t\t\tDPAA2_PMD_ERR(\n+\t\t\t\t\t\"Unable to set flow distribution on tc%d.\"\n+\t\t\t\t\t\"Check queue config\", tc_index);\n+\t\t\t\treturn ret;\n+\t\t\t}\n \t\t}\n \t}\n \n@@ -755,11 +759,11 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev,\n \tflow_id = 0;\n \n \tret = dpni_set_queue(dpni, CMD_PRI_LOW, priv->token, DPNI_QUEUE_TX,\n-\t\t\t     tc_id, flow_id, options, &tx_flow_cfg);\n+\t\t\ttc_id, flow_id, options, &tx_flow_cfg);\n \tif (ret) {\n \t\tDPAA2_PMD_ERR(\"Error in setting the tx flow: \"\n-\t\t\t      \"tc_id=%d, flow=%d err=%d\",\n-\t\t\t      tc_id, flow_id, ret);\n+\t\t\t\"tc_id=%d, flow=%d err=%d\",\n+\t\t\ttc_id, flow_id, ret);\n \t\t\treturn -1;\n \t}\n \n@@ -1984,22 +1988,31 @@ dpaa2_dev_rss_hash_update(struct rte_eth_dev *dev,\n \t\t\t  struct rte_eth_rss_conf *rss_conf)\n {\n \tstruct rte_eth_dev_data *data = dev->data;\n+\tstruct dpaa2_dev_priv *priv = data->dev_private;\n \tstruct rte_eth_conf *eth_conf = &data->dev_conf;\n-\tint ret;\n+\tint ret, tc_index;\n \n \tPMD_INIT_FUNC_TRACE();\n \n \tif (rss_conf->rss_hf) {\n-\t\tret = dpaa2_setup_flow_dist(dev, rss_conf->rss_hf);\n-\t\tif (ret) {\n-\t\t\tDPAA2_PMD_ERR(\"Unable to set flow dist\");\n-\t\t\treturn ret;\n+\t\tfor (tc_index = 0; tc_index < priv->num_rx_tc; tc_index++) {\n+\t\t\tret = dpaa2_setup_flow_dist(dev, rss_conf->rss_hf,\n+\t\t\t\ttc_index);\n+\t\t\tif (ret) {\n+\t\t\t\tDPAA2_PMD_ERR(\"Unable to set flow dist on tc%d\",\n+\t\t\t\t\ttc_index);\n+\t\t\t\treturn ret;\n+\t\t\t}\n \t\t}\n \t} else {\n-\t\tret = dpaa2_remove_flow_dist(dev, 0);\n-\t\tif (ret) {\n-\t\t\tDPAA2_PMD_ERR(\"Unable to remove flow dist\");\n-\t\t\treturn ret;\n+\t\tfor (tc_index = 0; tc_index < priv->num_rx_tc; tc_index++) {\n+\t\t\tret = dpaa2_remove_flow_dist(dev, tc_index);\n+\t\t\tif (ret) {\n+\t\t\t\tDPAA2_PMD_ERR(\n+\t\t\t\t\t\"Unable to remove flow dist on tc%d\",\n+\t\t\t\t\ttc_index);\n+\t\t\t\treturn ret;\n+\t\t\t}\n \t\t}\n \t}\n \teth_conf->rx_adv_conf.rss_conf.rss_hf = rss_conf->rss_hf;\ndiff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h\nindex b49b88a2d..52faeeefe 100644\n--- a/drivers/net/dpaa2/dpaa2_ethdev.h\n+++ b/drivers/net/dpaa2/dpaa2_ethdev.h\n@@ -179,7 +179,7 @@ int dpaa2_distset_to_dpkg_profile_cfg(uint64_t req_dist_set,\n \t\t\t\t      struct dpkg_profile_cfg *kg_cfg);\n \n int dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,\n-\t\t\t  uint64_t req_dist_set);\n+\t\tuint64_t req_dist_set, int tc_index);\n \n int dpaa2_remove_flow_dist(struct rte_eth_dev *eth_dev,\n \t\t\t   uint8_t tc_index);\n",
    "prefixes": [
        "v2",
        "23/29"
    ]
}