get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73407,
    "url": "https://patches.dpdk.org/api/patches/73407/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200707092244.12791-28-hemant.agrawal@nxp.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": "<20200707092244.12791-28-hemant.agrawal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200707092244.12791-28-hemant.agrawal@nxp.com",
    "date": "2020-07-07T09:22:42",
    "name": "[v2,27/29] net/dpaa2: support flow API FS miss action configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e2c9c5c2a5cf8e275c6b1d8b5a4c55147d0fd85a",
    "submitter": {
        "id": 477,
        "url": "https://patches.dpdk.org/api/people/477/?format=api",
        "name": "Hemant Agrawal",
        "email": "hemant.agrawal@nxp.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200707092244.12791-28-hemant.agrawal@nxp.com/mbox/",
    "series": [
        {
            "id": 10842,
            "url": "https://patches.dpdk.org/api/series/10842/?format=api",
            "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/73407/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/73407/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 46BC1A00BE;\n\tTue,  7 Jul 2020 11:32:54 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EDDF21DE21;\n\tTue,  7 Jul 2020 11:27:39 +0200 (CEST)",
            "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n by dpdk.org (Postfix) with ESMTP id 96C2F1DD5F\n for <dev@dpdk.org>; Tue,  7 Jul 2020 11:27:17 +0200 (CEST)",
            "from inva021.nxp.com (localhost [127.0.0.1])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7CB142008CE;\n Tue,  7 Jul 2020 11:27:17 +0200 (CEST)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 78F502008DD;\n Tue,  7 Jul 2020 11:27:15 +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 36A77402FA;\n Tue,  7 Jul 2020 17:27:13 +0800 (SGT)"
        ],
        "From": "Hemant Agrawal <hemant.agrawal@nxp.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com,\n\tJun Yang <jun.yang@nxp.com>",
        "Date": "Tue,  7 Jul 2020 14:52:42 +0530",
        "Message-Id": "<20200707092244.12791-28-hemant.agrawal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200707092244.12791-1-hemant.agrawal@nxp.com>",
        "References": "<20200527132326.1382-1-hemant.agrawal@nxp.com>\n <20200707092244.12791-1-hemant.agrawal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH v2 27/29] net/dpaa2: support flow API FS miss\n\taction configuration",
        "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: Jun Yang <jun.yang@nxp.com>\n\n1) dpni_set_rx_hash_dist and dpni_set_rx_fs_dist used for TC configuration\ninstead of dpni_set_rx_tc_dist. Otherwise, re-configuration of\ndefault TC of QoS fails.\n\n2) Default miss action is to drop.\n\"export DPAA2_FLOW_CONTROL_MISS_FLOW=flow_id\" is used receive\n the missed packets from flow with flow ID specified.\n\nSigned-off-by: Jun Yang <jun.yang@nxp.com>\n---\n drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 30 +++++++------\n drivers/net/dpaa2/dpaa2_flow.c         | 62 ++++++++++++++++++--------\n 2 files changed, 60 insertions(+), 32 deletions(-)",
    "diff": "diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c\nindex 9f0dad6e7..d69156bcc 100644\n--- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c\n+++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c\n@@ -85,7 +85,7 @@ dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,\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 dpni_rx_dist_cfg tc_cfg;\n \tstruct dpkg_profile_cfg kg_cfg;\n \tvoid *p_params;\n \tint ret;\n@@ -96,8 +96,9 @@ dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,\n \t\tDPAA2_PMD_ERR(\"Unable to allocate flow-dist parameters\");\n \t\treturn -ENOMEM;\n \t}\n+\n \tmemset(p_params, 0, DIST_PARAM_IOVA_SIZE);\n-\tmemset(&tc_cfg, 0, sizeof(struct dpni_rx_tc_dist_cfg));\n+\tmemset(&tc_cfg, 0, sizeof(struct dpni_rx_dist_cfg));\n \n \tret = dpaa2_distset_to_dpkg_profile_cfg(req_dist_set, &kg_cfg);\n \tif (ret) {\n@@ -106,9 +107,11 @@ dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,\n \t\trte_free(p_params);\n \t\treturn ret;\n \t}\n+\n \ttc_cfg.key_cfg_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(p_params));\n \ttc_cfg.dist_size = priv->dist_queues;\n-\ttc_cfg.dist_mode = DPNI_DIST_MODE_HASH;\n+\ttc_cfg.enable = true;\n+\ttc_cfg.tc = tc_index;\n \n \tret = dpkg_prepare_key_cfg(&kg_cfg, p_params);\n \tif (ret) {\n@@ -117,8 +120,7 @@ dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,\n \t\treturn ret;\n \t}\n \n-\tret = dpni_set_rx_tc_dist(dpni, CMD_PRI_LOW, priv->token, tc_index,\n-\t\t\t\t  &tc_cfg);\n+\tret = dpni_set_rx_hash_dist(dpni, CMD_PRI_LOW, priv->token, &tc_cfg);\n \trte_free(p_params);\n \tif (ret) {\n \t\tDPAA2_PMD_ERR(\n@@ -136,7 +138,7 @@ int dpaa2_remove_flow_dist(\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 dpni_rx_dist_cfg tc_cfg;\n \tstruct dpkg_profile_cfg kg_cfg;\n \tvoid *p_params;\n \tint ret;\n@@ -147,13 +149,15 @@ int dpaa2_remove_flow_dist(\n \t\tDPAA2_PMD_ERR(\"Unable to allocate flow-dist parameters\");\n \t\treturn -ENOMEM;\n \t}\n-\tmemset(p_params, 0, DIST_PARAM_IOVA_SIZE);\n-\tmemset(&tc_cfg, 0, sizeof(struct dpni_rx_tc_dist_cfg));\n-\tkg_cfg.num_extracts = 0;\n-\ttc_cfg.key_cfg_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(p_params));\n+\n+\tmemset(&tc_cfg, 0, sizeof(struct dpni_rx_dist_cfg));\n \ttc_cfg.dist_size = 0;\n-\ttc_cfg.dist_mode = DPNI_DIST_MODE_NONE;\n+\ttc_cfg.key_cfg_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(p_params));\n+\ttc_cfg.enable = true;\n+\ttc_cfg.tc = tc_index;\n \n+\tmemset(p_params, 0, DIST_PARAM_IOVA_SIZE);\n+\tkg_cfg.num_extracts = 0;\n \tret = dpkg_prepare_key_cfg(&kg_cfg, p_params);\n \tif (ret) {\n \t\tDPAA2_PMD_ERR(\"Unable to prepare extract parameters\");\n@@ -161,8 +165,8 @@ int dpaa2_remove_flow_dist(\n \t\treturn ret;\n \t}\n \n-\tret = dpni_set_rx_tc_dist(dpni, CMD_PRI_LOW, priv->token, tc_index,\n-\t\t\t\t  &tc_cfg);\n+\tret = dpni_set_rx_hash_dist(dpni, CMD_PRI_LOW, priv->token,\n+\t\t\t&tc_cfg);\n \trte_free(p_params);\n \tif (ret)\n \t\tDPAA2_PMD_ERR(\ndiff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c\nindex 9239fa459..cc789346a 100644\n--- a/drivers/net/dpaa2/dpaa2_flow.c\n+++ b/drivers/net/dpaa2/dpaa2_flow.c\n@@ -30,6 +30,8 @@\n int mc_l4_port_identification;\n \n static char *dpaa2_flow_control_log;\n+static int dpaa2_flow_miss_flow_id =\n+\tDPNI_FS_MISS_DROP;\n \n #define FIXED_ENTRY_SIZE 54\n \n@@ -3201,7 +3203,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,\n \tconst struct rte_flow_action_rss *rss_conf;\n \tint is_keycfg_configured = 0, end_of_list = 0;\n \tint ret = 0, i = 0, j = 0;\n-\tstruct dpni_rx_tc_dist_cfg tc_cfg;\n+\tstruct dpni_rx_dist_cfg tc_cfg;\n \tstruct dpni_qos_tbl_cfg qos_cfg;\n \tstruct dpni_fs_action_cfg action;\n \tstruct dpaa2_dev_priv *priv = dev->data->dev_private;\n@@ -3330,20 +3332,30 @@ dpaa2_generic_flow_set(struct rte_flow *flow,\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n \n-\t\t\t\tmemset(&tc_cfg, 0, sizeof(struct dpni_rx_tc_dist_cfg));\n+\t\t\t\tmemset(&tc_cfg, 0,\n+\t\t\t\t\tsizeof(struct dpni_rx_dist_cfg));\n \t\t\t\ttc_cfg.dist_size = priv->nb_rx_queues / priv->num_rx_tc;\n-\t\t\t\ttc_cfg.dist_mode = DPNI_DIST_MODE_FS;\n \t\t\t\ttc_cfg.key_cfg_iova =\n \t\t\t\t\t(uint64_t)priv->extract.tc_extract_param[flow->tc_id];\n-\t\t\t\ttc_cfg.fs_cfg.miss_action = DPNI_FS_MISS_DROP;\n-\t\t\t\ttc_cfg.fs_cfg.keep_entries = true;\n-\t\t\t\tret = dpni_set_rx_tc_dist(dpni, CMD_PRI_LOW,\n-\t\t\t\t\t\t\t priv->token,\n-\t\t\t\t\t\t\t flow->tc_id, &tc_cfg);\n+\t\t\t\ttc_cfg.tc = flow->tc_id;\n+\t\t\t\ttc_cfg.enable = false;\n+\t\t\t\tret = dpni_set_rx_hash_dist(dpni, CMD_PRI_LOW,\n+\t\t\t\t\t\tpriv->token, &tc_cfg);\n \t\t\t\tif (ret < 0) {\n \t\t\t\t\tDPAA2_PMD_ERR(\n-\t\t\t\t\t\"Distribution cannot be configured.(%d)\"\n-\t\t\t\t\t, ret);\n+\t\t\t\t\t\t\"TC hash cannot be disabled.(%d)\",\n+\t\t\t\t\t\tret);\n+\t\t\t\t\treturn -1;\n+\t\t\t\t}\n+\t\t\t\ttc_cfg.enable = true;\n+\t\t\t\ttc_cfg.fs_miss_flow_id =\n+\t\t\t\t\tdpaa2_flow_miss_flow_id;\n+\t\t\t\tret = dpni_set_rx_fs_dist(dpni, CMD_PRI_LOW,\n+\t\t\t\t\t\t\t priv->token, &tc_cfg);\n+\t\t\t\tif (ret < 0) {\n+\t\t\t\t\tDPAA2_PMD_ERR(\n+\t\t\t\t\t\t\"TC distribution cannot be configured.(%d)\",\n+\t\t\t\t\t\tret);\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n \t\t\t}\n@@ -3508,18 +3520,16 @@ dpaa2_generic_flow_set(struct rte_flow *flow,\n \t\t\t\treturn -1;\n \t\t\t}\n \n-\t\t\tmemset(&tc_cfg, 0, sizeof(struct dpni_rx_tc_dist_cfg));\n+\t\t\tmemset(&tc_cfg, 0, sizeof(struct dpni_rx_dist_cfg));\n \t\t\ttc_cfg.dist_size = rss_conf->queue_num;\n-\t\t\ttc_cfg.dist_mode = DPNI_DIST_MODE_HASH;\n \t\t\ttc_cfg.key_cfg_iova = (size_t)param;\n-\t\t\ttc_cfg.fs_cfg.miss_action = DPNI_FS_MISS_DROP;\n-\n-\t\t\tret = dpni_set_rx_tc_dist(dpni, CMD_PRI_LOW,\n-\t\t\t\t\t\t priv->token, flow->tc_id,\n-\t\t\t\t\t\t &tc_cfg);\n+\t\t\ttc_cfg.enable = true;\n+\t\t\ttc_cfg.tc = flow->tc_id;\n+\t\t\tret = dpni_set_rx_hash_dist(dpni, CMD_PRI_LOW,\n+\t\t\t\t\t\t priv->token, &tc_cfg);\n \t\t\tif (ret < 0) {\n \t\t\t\tDPAA2_PMD_ERR(\n-\t\t\t\t\t\"RSS FS table cannot be configured: %d\\n\",\n+\t\t\t\t\t\"RSS TC table cannot be configured: %d\\n\",\n \t\t\t\t\tret);\n \t\t\t\trte_free((void *)param);\n \t\t\t\treturn -1;\n@@ -3544,7 +3554,7 @@ dpaa2_generic_flow_set(struct rte_flow *flow,\n \t\t\t\t\t\t\t priv->token, &qos_cfg);\n \t\t\t\tif (ret < 0) {\n \t\t\t\t\tDPAA2_PMD_ERR(\n-\t\t\t\t\t\"Distribution can't be configured %d\\n\",\n+\t\t\t\t\t\"RSS QoS dist can't be configured-%d\\n\",\n \t\t\t\t\tret);\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n@@ -3761,6 +3771,20 @@ struct rte_flow *dpaa2_flow_create(struct rte_eth_dev *dev,\n \tdpaa2_flow_control_log =\n \t\tgetenv(\"DPAA2_FLOW_CONTROL_LOG\");\n \n+\tif (getenv(\"DPAA2_FLOW_CONTROL_MISS_FLOW\")) {\n+\t\tstruct dpaa2_dev_priv *priv = dev->data->dev_private;\n+\n+\t\tdpaa2_flow_miss_flow_id =\n+\t\t\tatoi(getenv(\"DPAA2_FLOW_CONTROL_MISS_FLOW\"));\n+\t\tif (dpaa2_flow_miss_flow_id >= priv->dist_queues) {\n+\t\t\tDPAA2_PMD_ERR(\n+\t\t\t\t\"The missed flow ID %d exceeds the max flow ID %d\",\n+\t\t\t\tdpaa2_flow_miss_flow_id,\n+\t\t\t\tpriv->dist_queues - 1);\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+\n \tflow = rte_zmalloc(NULL, sizeof(struct rte_flow), RTE_CACHE_LINE_SIZE);\n \tif (!flow) {\n \t\tDPAA2_PMD_ERR(\"Failure to allocate memory for flow\");\n",
    "prefixes": [
        "v2",
        "27/29"
    ]
}