get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99774,
    "url": "http://patches.dpdk.org/api/patches/99774/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210927122650.30881-2-nipun.gupta@nxp.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20210927122650.30881-2-nipun.gupta@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210927122650.30881-2-nipun.gupta@nxp.com",
    "date": "2021-09-27T12:26:40",
    "name": "[01/11] bus/fslmc: updated MC FW to 10.28",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "bc97c0dc149af2f69d5a7a404b70ee51b1a22ccf",
    "submitter": {
        "id": 471,
        "url": "http://patches.dpdk.org/api/people/471/?format=api",
        "name": "Nipun Gupta",
        "email": "nipun.gupta@nxp.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210927122650.30881-2-nipun.gupta@nxp.com/mbox/",
    "series": [
        {
            "id": 19191,
            "url": "http://patches.dpdk.org/api/series/19191/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19191",
            "date": "2021-09-27T12:26:39",
            "name": "NXP DPAAx Bus and PMD changes",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/19191/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/99774/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/99774/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 659EAA0548;\n\tMon, 27 Sep 2021 14:26:59 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3CB8B40E3C;\n\tMon, 27 Sep 2021 14:26:57 +0200 (CEST)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by mails.dpdk.org (Postfix) with ESMTP id E50A940E3C\n for <dev@dpdk.org>; Mon, 27 Sep 2021 14:26:53 +0200 (CEST)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BA8041A2528;\n Mon, 27 Sep 2021 14:26:53 +0200 (CEST)",
            "from aprdc01srsp001v.ap-rdc01.nxp.com\n (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 05C601A165D;\n Mon, 27 Sep 2021 14:26:53 +0200 (CEST)",
            "from lsv03274.swis.in-blr01.nxp.com (lsv03274.swis.in-blr01.nxp.com\n [92.120.147.114])\n by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id D0173183AD0B;\n Mon, 27 Sep 2021 20:26:51 +0800 (+08)"
        ],
        "From": "nipun.gupta@nxp.com",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, ferruh.yigit@intel.com, hemant.agrawal@nxp.com,\n sachin.saxena@nxp.com",
        "Date": "Mon, 27 Sep 2021 17:56:40 +0530",
        "Message-Id": "<20210927122650.30881-2-nipun.gupta@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210927122650.30881-1-nipun.gupta@nxp.com>",
        "References": "<20210927122650.30881-1-nipun.gupta@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH 01/11] bus/fslmc: updated MC FW to 10.28",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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: Hemant Agrawal <hemant.agrawal@nxp.com>\n\nUpdating MC firmware support APIs to be latest. It supports\nimproved DPDMUX (SRIOV equivalent) for traffic split between\ndpnis and additional PTP APIs.\n\nSigned-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n drivers/bus/fslmc/mc/dpdmai.c         |   4 +-\n drivers/bus/fslmc/mc/fsl_dpdmai.h     |  21 ++++-\n drivers/bus/fslmc/mc/fsl_dpdmai_cmd.h |  15 ++--\n drivers/bus/fslmc/mc/fsl_dpmng.h      |   4 +-\n drivers/bus/fslmc/mc/fsl_dpopr.h      |   7 +-\n drivers/net/dpaa2/dpaa2_ethdev.c      |   2 +-\n drivers/net/dpaa2/mc/dpdmux.c         |  43 +++++++++\n drivers/net/dpaa2/mc/dpni.c           |  48 ++++++----\n drivers/net/dpaa2/mc/dprtc.c          |  78 +++++++++++++++-\n drivers/net/dpaa2/mc/fsl_dpdmux.h     |   6 ++\n drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h |   9 ++\n drivers/net/dpaa2/mc/fsl_dpkg.h       |   6 +-\n drivers/net/dpaa2/mc/fsl_dpni.h       | 124 ++++++++++++++++++++++----\n drivers/net/dpaa2/mc/fsl_dpni_cmd.h   |  55 +++++++++---\n drivers/net/dpaa2/mc/fsl_dprtc.h      |  19 +++-\n drivers/net/dpaa2/mc/fsl_dprtc_cmd.h  |  25 +++++-\n 16 files changed, 401 insertions(+), 65 deletions(-)",
    "diff": "diff --git a/drivers/bus/fslmc/mc/dpdmai.c b/drivers/bus/fslmc/mc/dpdmai.c\nindex dcb9d516a1..9c2f3bf9d5 100644\n--- a/drivers/bus/fslmc/mc/dpdmai.c\n+++ b/drivers/bus/fslmc/mc/dpdmai.c\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright 2018 NXP\n+ * Copyright 2018-2021 NXP\n  */\n \n #include <fsl_mc_sys.h>\n@@ -116,6 +116,7 @@ int dpdmai_create(struct fsl_mc_io *mc_io,\n \tcmd_params->num_queues = cfg->num_queues;\n \tcmd_params->priorities[0] = cfg->priorities[0];\n \tcmd_params->priorities[1] = cfg->priorities[1];\n+\tcmd_params->options = cpu_to_le32(cfg->adv.options);\n \n \t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n@@ -299,6 +300,7 @@ int dpdmai_get_attributes(struct fsl_mc_io *mc_io,\n \tattr->id = le32_to_cpu(rsp_params->id);\n \tattr->num_of_priorities = rsp_params->num_of_priorities;\n \tattr->num_of_queues = rsp_params->num_of_queues;\n+\tattr->options = le32_to_cpu(rsp_params->options);\n \n \treturn 0;\n }\ndiff --git a/drivers/bus/fslmc/mc/fsl_dpdmai.h b/drivers/bus/fslmc/mc/fsl_dpdmai.h\nindex 19328c00a0..5af8ed48c0 100644\n--- a/drivers/bus/fslmc/mc/fsl_dpdmai.h\n+++ b/drivers/bus/fslmc/mc/fsl_dpdmai.h\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright 2018 NXP\n+ * Copyright 2018-2021 NXP\n  */\n \n #ifndef __FSL_DPDMAI_H\n@@ -36,15 +36,32 @@ int dpdmai_close(struct fsl_mc_io *mc_io,\n \t\t uint32_t cmd_flags,\n \t\t uint16_t token);\n \n+/* DPDMAI options */\n+\n+/**\n+ * Enable individual Congestion Groups usage per each priority queue\n+ * If this option is not enabled then only one CG is used for all priority\n+ * queues\n+ * If this option is enabled then a separate specific CG is used for each\n+ * individual priority queue.\n+ * In this case the priority queue must be specified via congestion notification\n+ * API\n+ */\n+#define DPDMAI_OPT_CG_PER_PRIORITY\t\t0x00000001\n+\n /**\n  * struct dpdmai_cfg - Structure representing DPDMAI configuration\n  * @priorities: Priorities for the DMA hardware processing; valid priorities are\n  *\tconfigured with values 1-8; the entry following last valid entry\n  *\tshould be configured with 0\n+ *\t@options: dpdmai options\n  */\n struct dpdmai_cfg {\n \tuint8_t num_queues;\n \tuint8_t priorities[DPDMAI_PRIO_NUM];\n+\tstruct {\n+\t\tuint32_t options;\n+\t} adv;\n };\n \n int dpdmai_create(struct fsl_mc_io *mc_io,\n@@ -81,11 +98,13 @@ int dpdmai_reset(struct fsl_mc_io *mc_io,\n  * struct dpdmai_attr - Structure representing DPDMAI attributes\n  * @id: DPDMAI object ID\n  * @num_of_priorities: number of priorities\n+ * @options: dpdmai options\n  */\n struct dpdmai_attr {\n \tint id;\n \tuint8_t num_of_priorities;\n \tuint8_t num_of_queues;\n+\tuint32_t options;\n };\n \n __rte_internal\ndiff --git a/drivers/bus/fslmc/mc/fsl_dpdmai_cmd.h b/drivers/bus/fslmc/mc/fsl_dpdmai_cmd.h\nindex 7e122de4ef..c8f6b990f8 100644\n--- a/drivers/bus/fslmc/mc/fsl_dpdmai_cmd.h\n+++ b/drivers/bus/fslmc/mc/fsl_dpdmai_cmd.h\n@@ -1,32 +1,33 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright 2018 NXP\n+ * Copyright 2017-2018, 2020-2021 NXP\n  */\n-\n #ifndef _FSL_DPDMAI_CMD_H\n #define _FSL_DPDMAI_CMD_H\n \n /* DPDMAI Version */\n #define DPDMAI_VER_MAJOR\t\t3\n-#define DPDMAI_VER_MINOR\t\t3\n+#define DPDMAI_VER_MINOR\t\t4\n \n /* Command versioning */\n #define DPDMAI_CMD_BASE_VERSION\t\t1\n #define DPDMAI_CMD_VERSION_2\t\t2\n+#define DPDMAI_CMD_VERSION_3\t\t3\n #define DPDMAI_CMD_ID_OFFSET\t\t4\n \n #define DPDMAI_CMD(id)\t((id << DPDMAI_CMD_ID_OFFSET) | DPDMAI_CMD_BASE_VERSION)\n #define DPDMAI_CMD_V2(id) ((id << DPDMAI_CMD_ID_OFFSET) | DPDMAI_CMD_VERSION_2)\n+#define DPDMAI_CMD_V3(id) ((id << DPDMAI_CMD_ID_OFFSET) | DPDMAI_CMD_VERSION_3)\n \n /* Command IDs */\n #define DPDMAI_CMDID_CLOSE\t\tDPDMAI_CMD(0x800)\n #define DPDMAI_CMDID_OPEN\t\tDPDMAI_CMD(0x80E)\n-#define DPDMAI_CMDID_CREATE\t\tDPDMAI_CMD_V2(0x90E)\n+#define DPDMAI_CMDID_CREATE\t\tDPDMAI_CMD_V3(0x90E)\n #define DPDMAI_CMDID_DESTROY\t\tDPDMAI_CMD(0x98E)\n #define DPDMAI_CMDID_GET_API_VERSION\tDPDMAI_CMD(0xa0E)\n \n #define DPDMAI_CMDID_ENABLE\t\tDPDMAI_CMD(0x002)\n #define DPDMAI_CMDID_DISABLE\t\tDPDMAI_CMD(0x003)\n-#define DPDMAI_CMDID_GET_ATTR\t\tDPDMAI_CMD_V2(0x004)\n+#define DPDMAI_CMDID_GET_ATTR\t\tDPDMAI_CMD_V3(0x004)\n #define DPDMAI_CMDID_RESET\t\tDPDMAI_CMD(0x005)\n #define DPDMAI_CMDID_IS_ENABLED\t\tDPDMAI_CMD(0x006)\n \n@@ -51,6 +52,8 @@ struct dpdmai_cmd_open {\n struct dpdmai_cmd_create {\n \tuint8_t num_queues;\n \tuint8_t priorities[2];\n+\tuint8_t pad;\n+\tuint32_t options;\n };\n \n struct dpdmai_cmd_destroy {\n@@ -69,6 +72,8 @@ struct dpdmai_rsp_get_attr {\n \tuint32_t id;\n \tuint8_t num_of_priorities;\n \tuint8_t num_of_queues;\n+\tuint16_t pad;\n+\tuint32_t options;\n };\n \n #define DPDMAI_DEST_TYPE_SHIFT\t0\ndiff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h\nindex 8764ceaed9..7e9bd96429 100644\n--- a/drivers/bus/fslmc/mc/fsl_dpmng.h\n+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  *\n  * Copyright 2013-2015 Freescale Semiconductor Inc.\n- * Copyright 2017-2019 NXP\n+ * Copyright 2017-2021 NXP\n  *\n  */\n #ifndef __FSL_DPMNG_H\n@@ -20,7 +20,7 @@ struct fsl_mc_io;\n  * Management Complex firmware version information\n  */\n #define MC_VER_MAJOR 10\n-#define MC_VER_MINOR 18\n+#define MC_VER_MINOR 28\n \n /**\n  * struct mc_version\ndiff --git a/drivers/bus/fslmc/mc/fsl_dpopr.h b/drivers/bus/fslmc/mc/fsl_dpopr.h\nindex fd727e011b..74dd32f783 100644\n--- a/drivers/bus/fslmc/mc/fsl_dpopr.h\n+++ b/drivers/bus/fslmc/mc/fsl_dpopr.h\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  *\n  * Copyright 2013-2015 Freescale Semiconductor Inc.\n- * Copyright 2018 NXP\n+ * Copyright 2018-2021 NXP\n  *\n  */\n #ifndef __FSL_DPOPR_H_\n@@ -22,7 +22,10 @@\n  * Retire an existing Order Point Record option\n  */\n #define OPR_OPT_RETIRE 0x2\n-\n+/**\n+ * Assign an existing Order Point Record to a queue\n+ */\n+#define OPR_OPT_ASSIGN 0x4\n /**\n  * struct opr_cfg - Structure representing OPR configuration\n  * @oprrws: Order point record (OPR) restoration window size (0 to 5)\ndiff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c\nindex c12169578e..560b79151b 100644\n--- a/drivers/net/dpaa2/dpaa2_ethdev.c\n+++ b/drivers/net/dpaa2/dpaa2_ethdev.c\n@@ -2273,7 +2273,7 @@ int dpaa2_eth_eventq_attach(const struct rte_eth_dev *dev,\n \n \t\tret = dpni_set_opr(dpni, CMD_PRI_LOW, eth_priv->token,\n \t\t\t\t   dpaa2_ethq->tc_index, flow_id,\n-\t\t\t\t   OPR_OPT_CREATE, &ocfg);\n+\t\t\t\t   OPR_OPT_CREATE, &ocfg, 0);\n \t\tif (ret) {\n \t\t\tDPAA2_PMD_ERR(\"Error setting opr: ret: %d\\n\", ret);\n \t\t\treturn ret;\ndiff --git a/drivers/net/dpaa2/mc/dpdmux.c b/drivers/net/dpaa2/mc/dpdmux.c\nindex 93912ef9d3..edbb01b45b 100644\n--- a/drivers/net/dpaa2/mc/dpdmux.c\n+++ b/drivers/net/dpaa2/mc/dpdmux.c\n@@ -491,6 +491,49 @@ int dpdmux_set_max_frame_length(struct fsl_mc_io *mc_io,\n \treturn mc_send_command(mc_io, &cmd);\n }\n \n+/**\n+ * dpdmux_get_max_frame_length() - Return the maximum frame length for DPDMUX\n+ * interface\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\t\tToken of DPDMUX object\n+ * @if_id:\t\tInterface id\n+ * @max_frame_length:\tmaximum frame length\n+ *\n+ * When dpdmux object is in VEPA mode this function will ignore if_id parameter\n+ * and will return maximum frame length for uplink interface (if_id==0).\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dpdmux_get_max_frame_length(struct fsl_mc_io *mc_io,\n+\t\t\t\tuint32_t cmd_flags,\n+\t\t\t\tuint16_t token,\n+\t\t\t\tuint16_t if_id,\n+\t\t\t\tuint16_t *max_frame_length)\n+{\n+\tstruct mc_command cmd = { 0 };\n+\tstruct dpdmux_cmd_get_max_frame_len *cmd_params;\n+\tstruct dpdmux_rsp_get_max_frame_len *rsp_params;\n+\tint err = 0;\n+\n+\t/* prepare command */\n+\tcmd.header = mc_encode_cmd_header(DPDMUX_CMDID_GET_MAX_FRAME_LENGTH,\n+\t\t\t\t\t  cmd_flags,\n+\t\t\t\t\t  token);\n+\tcmd_params = (struct dpdmux_cmd_get_max_frame_len *)cmd.params;\n+\tcmd_params->if_id = cpu_to_le16(if_id);\n+\n+\terr = mc_send_command(mc_io, &cmd);\n+\tif (err)\n+\t\treturn err;\n+\n+\trsp_params = (struct dpdmux_rsp_get_max_frame_len *)cmd.params;\n+\t*max_frame_length = le16_to_cpu(rsp_params->max_len);\n+\n+\t/* send command to mc*/\n+\treturn err;\n+}\n+\n /**\n  * dpdmux_ul_reset_counters() - Function resets the uplink counter\n  * @mc_io:\tPointer to MC portal's I/O object\ndiff --git a/drivers/net/dpaa2/mc/dpni.c b/drivers/net/dpaa2/mc/dpni.c\nindex b254931386..60048d6c43 100644\n--- a/drivers/net/dpaa2/mc/dpni.c\n+++ b/drivers/net/dpaa2/mc/dpni.c\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  *\n  * Copyright 2013-2016 Freescale Semiconductor Inc.\n- * Copyright 2016-2020 NXP\n+ * Copyright 2016-2021 NXP\n  *\n  */\n #include <fsl_mc_sys.h>\n@@ -126,6 +126,8 @@ int dpni_create(struct fsl_mc_io *mc_io,\n \tcmd_params->qos_entries = cfg->qos_entries;\n \tcmd_params->fs_entries = cpu_to_le16(cfg->fs_entries);\n \tcmd_params->num_cgs = cfg->num_cgs;\n+\tcmd_params->num_opr = cfg->num_opr;\n+\tcmd_params->dist_key_size = cfg->dist_key_size;\n \n \t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n@@ -1829,6 +1831,7 @@ int dpni_add_fs_entry(struct fsl_mc_io *mc_io,\n \tcmd_params->options = cpu_to_le16(action->options);\n \tcmd_params->flow_id = cpu_to_le16(action->flow_id);\n \tcmd_params->flc = cpu_to_le64(action->flc);\n+\tcmd_params->redir_token = cpu_to_le16(action->redirect_obj_token);\n \n \t/* send command to mc*/\n \treturn mc_send_command(mc_io, &cmd);\n@@ -2442,7 +2445,7 @@ int dpni_reset_statistics(struct fsl_mc_io *mc_io,\n }\n \n /**\n- * dpni_set_taildrop() - Set taildrop per queue or TC\n+ * dpni_set_taildrop() - Set taildrop per congestion group\n  *\n  * Setting a per-TC taildrop (cg_point = DPNI_CP_GROUP) will reset any current\n  * congestion notification or early drop (WRED) configuration previously applied\n@@ -2451,13 +2454,14 @@ int dpni_reset_statistics(struct fsl_mc_io *mc_io,\n  * @mc_io:\tPointer to MC portal's I/O object\n  * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n  * @token:\tToken of DPNI object\n- * @cg_point:\tCongestion point, DPNI_CP_QUEUE is only supported in\n+ * @cg_point:\tCongestion group identifier DPNI_CP_QUEUE is only supported in\n  *\t\tcombination with DPNI_QUEUE_RX.\n  * @q_type:\tQueue type, can be DPNI_QUEUE_RX or DPNI_QUEUE_TX.\n  * @tc:\t\tTraffic class to apply this taildrop to\n- * @q_index:\tIndex of the queue if the DPNI supports multiple queues for\n+ * @index/cgid:\tIndex of the queue if the DPNI supports multiple queues for\n  *\t\ttraffic distribution.\n- *\t\tIgnored if CONGESTION_POINT is not DPNI_CP_QUEUE.\n+ *\t\tIf CONGESTION_POINT is DPNI_CP_CONGESTION_GROUP then it\n+ *\t\trepresent the cgid of the congestion point\n  * @taildrop:\tTaildrop structure\n  *\n  * Return:\t'0' on Success; Error code otherwise.\n@@ -2577,7 +2581,8 @@ int dpni_set_opr(struct fsl_mc_io *mc_io,\n \t\t uint8_t tc,\n \t\t uint8_t index,\n \t\t uint8_t options,\n-\t\t struct opr_cfg *cfg)\n+\t\t struct opr_cfg *cfg,\n+\t\t uint8_t opr_id)\n {\n \tstruct dpni_cmd_set_opr *cmd_params;\n \tstruct mc_command cmd = { 0 };\n@@ -2591,6 +2596,7 @@ int dpni_set_opr(struct fsl_mc_io *mc_io,\n \tcmd_params->tc_id = tc;\n \tcmd_params->index = index;\n \tcmd_params->options = options;\n+\tcmd_params->opr_id = opr_id;\n \tcmd_params->oloe = cfg->oloe;\n \tcmd_params->oeane = cfg->oeane;\n \tcmd_params->olws = cfg->olws;\n@@ -2621,7 +2627,9 @@ int dpni_get_opr(struct fsl_mc_io *mc_io,\n \t\t uint8_t tc,\n \t\t uint8_t index,\n \t\t struct opr_cfg *cfg,\n-\t\t struct opr_qry *qry)\n+\t\t struct opr_qry *qry,\n+\t\t uint8_t flags,\n+\t\t uint8_t opr_id)\n {\n \tstruct dpni_rsp_get_opr *rsp_params;\n \tstruct dpni_cmd_get_opr *cmd_params;\n@@ -2635,6 +2643,8 @@ int dpni_get_opr(struct fsl_mc_io *mc_io,\n \tcmd_params = (struct dpni_cmd_get_opr *)cmd.params;\n \tcmd_params->index = index;\n \tcmd_params->tc_id = tc;\n+\tcmd_params->flags = flags;\n+\tcmd_params->opr_id = opr_id;\n \n \t/* send command to mc*/\n \terr = mc_send_command(mc_io, &cmd);\n@@ -2673,7 +2683,7 @@ int dpni_get_opr(struct fsl_mc_io *mc_io,\n  * If the FS is already enabled with a previous call the classification\n  *\t\tkey will be changed but all the table rules are kept. If the\n  *\t\texisting rules do not match the key the results will not be\n- *\t\tpredictable. It is the user responsibility to keep key integrity\n+ *\t\tpredictable. It is the user responsibility to keep keyintegrity.\n  * If cfg.enable is set to 1 the command will create a flow steering table\n  *\t\tand will classify packets according to this table. The packets\n  *\t\tthat miss all the table rules will be classified according to\n@@ -2695,7 +2705,7 @@ int dpni_set_rx_fs_dist(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n \tcmd_params = (struct dpni_cmd_set_rx_fs_dist *)cmd.params;\n \tcmd_params->dist_size\t= cpu_to_le16(cfg->dist_size);\n \tdpni_set_field(cmd_params->enable, RX_FS_DIST_ENABLE, cfg->enable);\n-\tcmd_params->tc = cfg->tc;\n+\tcmd_params->tc\t\t\t= cfg->tc;\n \tcmd_params->miss_flow_id = cpu_to_le16(cfg->fs_miss_flow_id);\n \tcmd_params->key_cfg_iova = cpu_to_le64(cfg->key_cfg_iova);\n \n@@ -2710,9 +2720,9 @@ int dpni_set_rx_fs_dist(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n  * @token:\tToken of DPNI object\n  * @cfg: Distribution configuration\n  * If cfg.enable is set to 1 the packets will be classified using a hash\n- *\t\tfunction based on the key received in cfg.key_cfg_iova parameter\n+ *\tfunction based on the key received in cfg.key_cfg_iova parameter.\n  * If cfg.enable is set to 0 the packets will be sent to the queue configured in\n- *\t\tdpni_set_rx_dist_default_queue() call\n+ *\tdpni_set_rx_dist_default_queue() call\n  */\n int dpni_set_rx_hash_dist(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n \t\tuint16_t token, const struct dpni_rx_dist_cfg *cfg)\n@@ -2735,9 +2745,9 @@ int dpni_set_rx_hash_dist(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n }\n \n /**\n- * dpni_add_custom_tpid() - Configures a distinct Ethertype value\n- *\t\t(or TPID value) to indicate VLAN tag in addition to the common\n- *\t\tTPID values 0x8100 and 0x88A8\n+ * dpni_add_custom_tpid() - Configures a distinct Ethertype value (or TPID\n+ *\t\tvalue) to indicate VLAN tag in adition to the common TPID values\n+ *\t\t0x81000 and 0x88A8\n  * @mc_io:\tPointer to MC portal's I/O object\n  * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n  * @token:\tToken of DPNI object\n@@ -2745,8 +2755,8 @@ int dpni_set_rx_hash_dist(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n  *\n  * Only two custom values are accepted. If the function is called for the third\n  * time it will return error.\n- * To replace an existing value use dpni_remove_custom_tpid() to remove\n- * a previous TPID and after that use again the function.\n+ * To replace an existing value use dpni_remove_custom_tpid() to remove a\n+ * previous TPID and after that use again the function.\n  *\n  * Return:\t'0' on Success; Error code otherwise.\n  */\n@@ -2769,7 +2779,7 @@ int dpni_add_custom_tpid(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n \n /**\n  * dpni_remove_custom_tpid() - Removes a distinct Ethertype value added\n- *\t\tpreviously with dpni_add_custom_tpid()\n+ * previously with dpni_add_custom_tpid()\n  * @mc_io:\tPointer to MC portal's I/O object\n  * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n  * @token:\tToken of DPNI object\n@@ -2798,8 +2808,8 @@ int dpni_remove_custom_tpid(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n }\n \n /**\n- * dpni_get_custom_tpid() - Returns custom TPID (vlan tags) values configured\n- *\t\t\t\tto detect 802.1q frames\n+ * dpni_get_custom_tpid() - Returns custom TPID (vlan tags) values configured to\n+ * detect 802.1q frames\n  * @mc_io:\tPointer to MC portal's I/O object\n  * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n  * @token:\tToken of DPNI object\ndiff --git a/drivers/net/dpaa2/mc/dprtc.c b/drivers/net/dpaa2/mc/dprtc.c\nindex 42ac89150e..36e62eb0c3 100644\n--- a/drivers/net/dpaa2/mc/dprtc.c\n+++ b/drivers/net/dpaa2/mc/dprtc.c\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n- * Copyright 2019 NXP\n+ * Copyright 2019-2021 NXP\n  */\n #include <fsl_mc_sys.h>\n #include <fsl_mc_cmd.h>\n@@ -521,3 +521,79 @@ int dprtc_get_api_version(struct fsl_mc_io *mc_io,\n \n \treturn 0;\n }\n+\n+/**\n+ * dprtc_get_ext_trigger_timestamp - Retrieve the Ext trigger timestamp status\n+ * (timestamp + flag for unread timestamp in FIFO).\n+ *\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPRTC object\n+ * @id:     External trigger id.\n+ * @status:\tReturned object's external trigger status\n+ *\n+ * Return:\t'0' on Success; Error code otherwise.\n+ */\n+int dprtc_get_ext_trigger_timestamp(struct fsl_mc_io *mc_io,\n+\t\tuint32_t cmd_flags,\n+\t\tuint16_t token,\n+\t\tuint8_t id,\n+\t\tstruct dprtc_ext_trigger_status *status)\n+{\n+\tstruct dprtc_rsp_ext_trigger_timestamp *rsp_params;\n+\tstruct dprtc_cmd_ext_trigger_timestamp *cmd_params;\n+\tstruct mc_command cmd = { 0 };\n+\tint err;\n+\n+\t/* prepare command */\n+\tcmd.header = mc_encode_cmd_header(DPRTC_CMDID_GET_EXT_TRIGGER_TIMESTAMP,\n+\t\t\t\t\t  cmd_flags,\n+\t\t\t\t\t  token);\n+\n+\tcmd_params = (struct dprtc_cmd_ext_trigger_timestamp *)cmd.params;\n+\tcmd_params->id = id;\n+\t/* send command to mc*/\n+\terr = mc_send_command(mc_io, &cmd);\n+\tif (err)\n+\t\treturn err;\n+\n+\t/* retrieve response parameters */\n+\trsp_params = (struct dprtc_rsp_ext_trigger_timestamp *)cmd.params;\n+\tstatus->timestamp = le64_to_cpu(rsp_params->timestamp);\n+\tstatus->unread_valid_timestamp = rsp_params->unread_valid_timestamp;\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * dprtc_set_fiper_loopback() - Set the fiper pulse as source of interrupt for\n+ * External Trigger stamps\n+ * @mc_io:\tPointer to MC portal's I/O object\n+ * @cmd_flags:\tCommand flags; one or more of 'MC_CMD_FLAG_'\n+ * @token:\tToken of DPRTC object\n+ * @id:     External trigger id.\n+ * @fiper_as_input:\tBit used to control interrupt signal source:\n+ *                  0 = Normal operation, interrupt external source\n+ *                  1 = Fiper pulse is looped back into Trigger input\n+ *\n+ * Return:  '0' on Success; Error code otherwise.\n+ */\n+int dprtc_set_fiper_loopback(struct fsl_mc_io *mc_io,\n+\t\tuint32_t cmd_flags,\n+\t\tuint16_t token,\n+\t\tuint8_t id,\n+\t\tuint8_t fiper_as_input)\n+{\n+\tstruct  dprtc_ext_trigger_cfg *cmd_params;\n+\tstruct mc_command cmd = { 0 };\n+\n+\tcmd.header = mc_encode_cmd_header(DPRTC_CMDID_SET_FIPER_LOOPBACK,\n+\t\t\t\t\tcmd_flags,\n+\t\t\t\t\ttoken);\n+\n+\tcmd_params = (struct dprtc_ext_trigger_cfg *)cmd.params;\n+\tcmd_params->id = id;\n+\tcmd_params->fiper_as_input = fiper_as_input;\n+\n+\treturn mc_send_command(mc_io, &cmd);\n+}\ndiff --git a/drivers/net/dpaa2/mc/fsl_dpdmux.h b/drivers/net/dpaa2/mc/fsl_dpdmux.h\nindex f4f9598a29..b01a98eb59 100644\n--- a/drivers/net/dpaa2/mc/fsl_dpdmux.h\n+++ b/drivers/net/dpaa2/mc/fsl_dpdmux.h\n@@ -196,6 +196,12 @@ int dpdmux_set_max_frame_length(struct fsl_mc_io *mc_io,\n \t\t\t\tuint16_t token,\n \t\t\t\tuint16_t max_frame_length);\n \n+int dpdmux_get_max_frame_length(struct fsl_mc_io *mc_io,\n+\t\t\t\tuint32_t cmd_flags,\n+\t\t\t\tuint16_t token,\n+\t\t\t\tuint16_t if_id,\n+\t\t\t\tuint16_t *max_frame_length);\n+\n /**\n  * enum dpdmux_counter_type - Counter types\n  * @DPDMUX_CNT_ING_FRAME: Counts ingress frames\ndiff --git a/drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h b/drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h\nindex 2ab4d75dfb..f8a1b5b1ae 100644\n--- a/drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h\n+++ b/drivers/net/dpaa2/mc/fsl_dpdmux_cmd.h\n@@ -39,6 +39,7 @@\n #define DPDMUX_CMDID_RESET\t\t\tDPDMUX_CMD(0x005)\n #define DPDMUX_CMDID_IS_ENABLED\t\t\tDPDMUX_CMD(0x006)\n #define DPDMUX_CMDID_SET_MAX_FRAME_LENGTH\tDPDMUX_CMD(0x0a1)\n+#define DPDMUX_CMDID_GET_MAX_FRAME_LENGTH\tDPDMUX_CMD(0x0a2)\n \n #define DPDMUX_CMDID_UL_RESET_COUNTERS\t\tDPDMUX_CMD(0x0a3)\n \n@@ -124,6 +125,14 @@ struct dpdmux_cmd_set_max_frame_length {\n \tuint16_t max_frame_length;\n };\n \n+struct dpdmux_cmd_get_max_frame_len {\n+\tuint16_t if_id;\n+};\n+\n+struct dpdmux_rsp_get_max_frame_len {\n+\tuint16_t max_len;\n+};\n+\n #define DPDMUX_ACCEPTED_FRAMES_TYPE_SHIFT\t0\n #define DPDMUX_ACCEPTED_FRAMES_TYPE_SIZE\t4\n #define DPDMUX_UNACCEPTED_FRAMES_ACTION_SHIFT\t4\ndiff --git a/drivers/net/dpaa2/mc/fsl_dpkg.h b/drivers/net/dpaa2/mc/fsl_dpkg.h\nindex 02fe8d50e7..70f2339ea5 100644\n--- a/drivers/net/dpaa2/mc/fsl_dpkg.h\n+++ b/drivers/net/dpaa2/mc/fsl_dpkg.h\n@@ -1,6 +1,6 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  * Copyright 2013-2015 Freescale Semiconductor Inc.\n- * Copyright 2016-2017 NXP\n+ * Copyright 2016-2021 NXP\n  *\n  */\n #ifndef __FSL_DPKG_H_\n@@ -21,7 +21,7 @@\n /**\n  * Number of extractions per key profile\n  */\n-#define DPKG_MAX_NUM_OF_EXTRACTS\t10\n+#define DPKG_MAX_NUM_OF_EXTRACTS\t20\n \n /**\n  * enum dpkg_extract_from_hdr_type - Selecting extraction by header types\n@@ -177,7 +177,7 @@ struct dpni_ext_set_rx_tc_dist {\n \tuint8_t num_extracts;\n \tuint8_t pad[7];\n \t/* words 1..25 */\n-\tstruct dpni_dist_extract extracts[10];\n+\tstruct dpni_dist_extract extracts[DPKG_MAX_NUM_OF_EXTRACTS];\n };\n \n int dpkg_prepare_key_cfg(const struct dpkg_profile_cfg *cfg,\ndiff --git a/drivers/net/dpaa2/mc/fsl_dpni.h b/drivers/net/dpaa2/mc/fsl_dpni.h\nindex df42746c9a..34c6b20033 100644\n--- a/drivers/net/dpaa2/mc/fsl_dpni.h\n+++ b/drivers/net/dpaa2/mc/fsl_dpni.h\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  *\n  * Copyright 2013-2016 Freescale Semiconductor Inc.\n- * Copyright 2016-2020 NXP\n+ * Copyright 2016-2021 NXP\n  *\n  */\n #ifndef __FSL_DPNI_H\n@@ -19,6 +19,11 @@ struct fsl_mc_io;\n \n /** General DPNI macros */\n \n+/**\n+ * Maximum size of a key\n+ */\n+#define DPNI_MAX_KEY_SIZE\t\t56\n+\n /**\n  * Maximum number of traffic classes\n  */\n@@ -95,8 +100,18 @@ struct fsl_mc_io;\n  * Define a custom number of congestion groups\n  */\n #define DPNI_OPT_CUSTOM_CG\t\t\t\t0x000200\n-\n-\n+/**\n+ * Define a custom number of order point records\n+ */\n+#define DPNI_OPT_CUSTOM_OPR\t\t\t\t0x000400\n+/**\n+ * Hash key is shared between all traffic classes\n+ */\n+#define DPNI_OPT_SHARED_HASH_KEY\t\t0x000800\n+/**\n+ * Flow steering table is shared between all traffic classes\n+ */\n+#define DPNI_OPT_SHARED_FS\t\t\t\t0x001000\n /**\n  * Software sequence maximum layout size\n  */\n@@ -183,6 +198,8 @@ struct dpni_cfg {\n \tuint8_t  num_rx_tcs;\n \tuint8_t  qos_entries;\n \tuint8_t  num_cgs;\n+\tuint16_t num_opr;\n+\tuint8_t  dist_key_size;\n };\n \n int dpni_create(struct fsl_mc_io *mc_io,\n@@ -366,28 +383,45 @@ int dpni_get_attributes(struct fsl_mc_io *mc_io,\n /**\n  * Extract out of frame header error\n  */\n-#define DPNI_ERROR_EOFHE\t0x00020000\n+#define DPNI_ERROR_MS\t\t\t0x40000000\n+#define DPNI_ERROR_PTP\t\t\t0x08000000\n+/* Ethernet multicast frame */\n+#define DPNI_ERROR_MC\t\t\t0x04000000\n+/* Ethernet broadcast frame */\n+#define DPNI_ERROR_BC\t\t\t0x02000000\n+#define DPNI_ERROR_KSE\t\t\t0x00040000\n+#define DPNI_ERROR_EOFHE\t\t0x00020000\n+#define DPNI_ERROR_MNLE\t\t\t0x00010000\n+#define DPNI_ERROR_TIDE\t\t\t0x00008000\n+#define DPNI_ERROR_PIEE\t\t\t0x00004000\n /**\n  * Frame length error\n  */\n-#define DPNI_ERROR_FLE\t\t0x00002000\n+#define DPNI_ERROR_FLE\t\t\t0x00002000\n /**\n  * Frame physical error\n  */\n-#define DPNI_ERROR_FPE\t\t0x00001000\n+#define DPNI_ERROR_FPE\t\t\t0x00001000\n+#define DPNI_ERROR_PTE\t\t\t0x00000080\n+#define DPNI_ERROR_ISP\t\t\t0x00000040\n /**\n  * Parsing header error\n  */\n-#define DPNI_ERROR_PHE\t\t0x00000020\n+#define DPNI_ERROR_PHE\t\t\t0x00000020\n+\n+#define DPNI_ERROR_BLE\t\t\t0x00000010\n /**\n  * Parser L3 checksum error\n  */\n-#define DPNI_ERROR_L3CE\t\t0x00000004\n+#define DPNI_ERROR_L3CV\t\t\t0x00000008\n+\n+#define DPNI_ERROR_L3CE\t\t\t0x00000004\n /**\n- * Parser L3 checksum error\n+ * Parser L4 checksum error\n  */\n-#define DPNI_ERROR_L4CE\t\t0x00000001\n+#define DPNI_ERROR_L4CV\t\t\t0x00000002\n \n+#define DPNI_ERROR_L4CE\t\t\t0x00000001\n /**\n  * enum dpni_error_action - Defines DPNI behavior for errors\n  * @DPNI_ERROR_ACTION_DISCARD: Discard the frame\n@@ -455,6 +489,10 @@ int dpni_set_errors_behavior(struct fsl_mc_io *mc_io,\n  * Select to modify the sw-opaque value setting\n  */\n #define DPNI_BUF_LAYOUT_OPT_SW_OPAQUE\t\t0x00000080\n+/**\n+ * Select to disable Scatter Gather and use single buffer\n+ */\n+#define DPNI_BUF_LAYOUT_OPT_NO_SG\t\t0x00000100\n \n /**\n  * struct dpni_buffer_layout - Structure representing DPNI buffer layout\n@@ -733,7 +771,7 @@ int dpni_get_link_state(struct fsl_mc_io *mc_io,\n \n /**\n  * struct dpni_tx_shaping - Structure representing DPNI tx shaping configuration\n- * @rate_limit:\t\tRate in Mbps\n+ * @rate_limit:\t\tRate in Mbits/s\n  * @max_burst_size:\tBurst size in bytes (up to 64KB)\n  */\n struct dpni_tx_shaping_cfg {\n@@ -798,6 +836,11 @@ int dpni_get_primary_mac_addr(struct fsl_mc_io *mc_io,\n \t\t\t      uint16_t token,\n \t\t\t      uint8_t mac_addr[6]);\n \n+/**\n+ * Set mac addr queue action\n+ */\n+#define DPNI_MAC_SET_QUEUE_ACTION 1\n+\n int dpni_add_mac_addr(struct fsl_mc_io *mc_io,\n \t\t      uint32_t cmd_flags,\n \t\t      uint16_t token,\n@@ -1464,6 +1507,7 @@ int dpni_clear_qos_table(struct fsl_mc_io *mc_io,\n struct dpni_fs_action_cfg {\n \tuint64_t flc;\n \tuint16_t flow_id;\n+\tuint16_t redirect_obj_token;\n \tuint16_t options;\n };\n \n@@ -1595,7 +1639,8 @@ int dpni_set_opr(struct fsl_mc_io *mc_io,\n \t\t uint8_t tc,\n \t\t uint8_t index,\n \t\t uint8_t options,\n-\t\t struct opr_cfg *cfg);\n+\t\t struct opr_cfg *cfg,\n+\t\t uint8_t opr_id);\n \n int dpni_get_opr(struct fsl_mc_io *mc_io,\n \t\t uint32_t cmd_flags,\n@@ -1603,7 +1648,9 @@ int dpni_get_opr(struct fsl_mc_io *mc_io,\n \t\t uint8_t tc,\n \t\t uint8_t index,\n \t\t struct opr_cfg *cfg,\n-\t\t struct opr_qry *qry);\n+\t\t struct opr_qry *qry,\n+\t\t uint8_t flags,\n+\t\t uint8_t opr_id);\n \n /**\n  * When used for queue_idx in function dpni_set_rx_dist_default_queue will\n@@ -1779,14 +1826,57 @@ int dpni_get_sw_sequence_layout(struct fsl_mc_io *mc_io,\n \n /**\n  * dpni_extract_sw_sequence_layout() - extract the software sequence layout\n- * @layout:\t\tsoftware sequence layout\n- * @sw_sequence_layout_buf:\tZeroed 264 bytes of memory before mapping it\n- *\t\t\t\tto DMA\n+ * @layout:\tsoftware sequence layout\n+ * @sw_sequence_layout_buf:Zeroed 264 bytes of memory before mapping it to DMA\n  *\n  * This function has to be called after dpni_get_sw_sequence_layout\n- *\n  */\n void dpni_extract_sw_sequence_layout(struct dpni_sw_sequence_layout *layout,\n \t\t\t\t     const uint8_t *sw_sequence_layout_buf);\n \n+/**\n+ * struct dpni_ptp_cfg - configure single step PTP (IEEE 1588)\n+ *\t@en: enable single step PTP. When enabled the PTPv1 functionality will\n+ *\t\tnot work. If the field is zero, offset and ch_update parameters\n+ *\t\twill be ignored\n+ *\t@offset: start offset from the beginning of the frame where timestamp\n+ *\t\tfield is found. The offset must respect all MAC headers, VLAN\n+ *\ttags and other protocol headers\n+ *\t@ch_update: when set UDP checksum will be updated inside packet\n+ *\t@peer_delay: For peer-to-peer transparent clocks add this value to the\n+ *\t\tcorrection field in addition to the transient time update. The\n+ *\t\tvalue expresses nanoseconds.\n+ */\n+struct dpni_single_step_cfg {\n+\tuint8_t en;\n+\tuint8_t ch_update;\n+\tuint16_t offset;\n+\tuint32_t peer_delay;\n+};\n+\n+int dpni_set_single_step_cfg(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n+\t\tuint16_t token, struct dpni_single_step_cfg *ptp_cfg);\n+\n+int dpni_get_single_step_cfg(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n+\t\tuint16_t token, struct dpni_single_step_cfg *ptp_cfg);\n+\n+/**\n+ * loopback_en field is valid when calling function dpni_set_port_cfg\n+ */\n+#define DPNI_PORT_CFG_LOOPBACK\t\t0x01\n+\n+/**\n+ * struct dpni_port_cfg - custom configuration for dpni physical port\n+ *\t@loopback_en: port loopback enabled\n+ */\n+struct dpni_port_cfg {\n+\tint loopback_en;\n+};\n+\n+int dpni_set_port_cfg(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n+\t\tuint16_t token, uint32_t flags, struct dpni_port_cfg *port_cfg);\n+\n+int dpni_get_port_cfg(struct fsl_mc_io *mc_io, uint32_t cmd_flags,\n+\t\tuint16_t token, struct dpni_port_cfg *port_cfg);\n+\n #endif /* __FSL_DPNI_H */\ndiff --git a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h\nindex c40090b8fe..6fbd93bb38 100644\n--- a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h\n+++ b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h\n@@ -1,7 +1,7 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n  *\n  * Copyright 2013-2016 Freescale Semiconductor Inc.\n- * Copyright 2016-2020 NXP\n+ * Copyright 2016-2021 NXP\n  *\n  */\n #ifndef _FSL_DPNI_CMD_H\n@@ -9,21 +9,25 @@\n \n /* DPNI Version */\n #define DPNI_VER_MAJOR\t\t\t\t7\n-#define DPNI_VER_MINOR\t\t\t\t13\n+#define DPNI_VER_MINOR\t\t\t\t17\n \n #define DPNI_CMD_BASE_VERSION\t\t\t1\n #define DPNI_CMD_VERSION_2\t\t\t2\n #define DPNI_CMD_VERSION_3\t\t\t3\n+#define DPNI_CMD_VERSION_4\t\t\t4\n+#define DPNI_CMD_VERSION_5\t\t\t5\n #define DPNI_CMD_ID_OFFSET\t\t\t4\n \n #define DPNI_CMD(id)\t(((id) << DPNI_CMD_ID_OFFSET) | DPNI_CMD_BASE_VERSION)\n #define DPNI_CMD_V2(id)\t(((id) << DPNI_CMD_ID_OFFSET) | DPNI_CMD_VERSION_2)\n #define DPNI_CMD_V3(id)\t(((id) << DPNI_CMD_ID_OFFSET) | DPNI_CMD_VERSION_3)\n+#define DPNI_CMD_V4(id)\t(((id) << DPNI_CMD_ID_OFFSET) | DPNI_CMD_VERSION_4)\n+#define DPNI_CMD_V5(id)\t(((id) << DPNI_CMD_ID_OFFSET) | DPNI_CMD_VERSION_5)\n \n /* Command IDs */\n #define DPNI_CMDID_OPEN\t\t\t\tDPNI_CMD(0x801)\n #define DPNI_CMDID_CLOSE\t\t\tDPNI_CMD(0x800)\n-#define DPNI_CMDID_CREATE\t\t\tDPNI_CMD_V3(0x901)\n+#define DPNI_CMDID_CREATE\t\t\tDPNI_CMD_V5(0x901)\n #define DPNI_CMDID_DESTROY\t\t\tDPNI_CMD(0x981)\n #define DPNI_CMDID_GET_API_VERSION\t\tDPNI_CMD(0xa01)\n \n@@ -67,7 +71,7 @@\n #define DPNI_CMDID_REMOVE_VLAN_ID\t\tDPNI_CMD(0x232)\n #define DPNI_CMDID_CLR_VLAN_FILTERS\t\tDPNI_CMD(0x233)\n \n-#define DPNI_CMDID_SET_RX_TC_DIST\t\tDPNI_CMD_V3(0x235)\n+#define DPNI_CMDID_SET_RX_TC_DIST\t\tDPNI_CMD_V4(0x235)\n \n #define DPNI_CMDID_SET_RX_TC_POLICING\t\tDPNI_CMD(0x23E)\n \n@@ -75,7 +79,7 @@\n #define DPNI_CMDID_ADD_QOS_ENT\t\t\tDPNI_CMD_V2(0x241)\n #define DPNI_CMDID_REMOVE_QOS_ENT\t\tDPNI_CMD(0x242)\n #define DPNI_CMDID_CLR_QOS_TBL\t\t\tDPNI_CMD(0x243)\n-#define DPNI_CMDID_ADD_FS_ENT\t\t\tDPNI_CMD(0x244)\n+#define DPNI_CMDID_ADD_FS_ENT\t\t\tDPNI_CMD_V2(0x244)\n #define DPNI_CMDID_REMOVE_FS_ENT\t\tDPNI_CMD(0x245)\n #define DPNI_CMDID_CLR_FS_ENT\t\t\tDPNI_CMD(0x246)\n \n@@ -140,7 +144,9 @@ struct dpni_cmd_create {\n \tuint16_t fs_entries;\n \tuint8_t num_rx_tcs;\n \tuint8_t pad4;\n-\tuint8_t num_cgs;\n+\tuint8_t  num_cgs;\n+\tuint16_t num_opr;\n+\tuint8_t dist_key_size;\n };\n \n struct dpni_cmd_destroy {\n@@ -411,8 +417,6 @@ struct dpni_rsp_get_port_mac_addr {\n \tuint8_t mac_addr[6];\n };\n \n-#define DPNI_MAC_SET_QUEUE_ACTION 1\n-\n struct dpni_cmd_add_mac_addr {\n \tuint8_t flags;\n \tuint8_t pad;\n@@ -594,6 +598,7 @@ struct dpni_cmd_add_fs_entry {\n \tuint64_t key_iova;\n \tuint64_t mask_iova;\n \tuint64_t flc;\n+\tuint16_t redir_token;\n };\n \n struct dpni_cmd_remove_fs_entry {\n@@ -779,7 +784,7 @@ struct dpni_rsp_get_congestion_notification {\n };\n \n struct dpni_cmd_set_opr {\n-\tuint8_t pad0;\n+\tuint8_t opr_id;\n \tuint8_t tc_id;\n \tuint8_t index;\n \tuint8_t options;\n@@ -792,9 +797,10 @@ struct dpni_cmd_set_opr {\n };\n \n struct dpni_cmd_get_opr {\n-\tuint8_t pad;\n+\tuint8_t flags;\n \tuint8_t tc_id;\n \tuint8_t index;\n+\tuint8_t opr_id;\n };\n \n #define DPNI_RIP_SHIFT\t0\n@@ -911,5 +917,34 @@ struct dpni_sw_sequence_layout_entry {\n \tuint16_t pad;\n };\n \n+#define DPNI_PTP_ENABLE_SHIFT\t\t\t0\n+#define DPNI_PTP_ENABLE_SIZE\t\t\t1\n+#define DPNI_PTP_CH_UPDATE_SHIFT\t\t1\n+#define DPNI_PTP_CH_UPDATE_SIZE\t\t\t1\n+struct dpni_cmd_single_step_cfg {\n+\tuint16_t\tflags;\n+\tuint16_t\toffset;\n+\tuint32_t\tpeer_delay;\n+};\n+\n+struct dpni_rsp_single_step_cfg {\n+\tuint16_t\tflags;\n+\tuint16_t\toffset;\n+\tuint32_t\tpeer_delay;\n+};\n+\n+#define DPNI_PORT_LOOPBACK_EN_SHIFT\t0\n+#define DPNI_PORT_LOOPBACK_EN_SIZE\t1\n+\n+struct dpni_cmd_set_port_cfg {\n+\tuint32_t\tflags;\n+\tuint32_t\tbit_params;\n+};\n+\n+struct dpni_rsp_get_port_cfg {\n+\tuint32_t\tflags;\n+\tuint32_t\tbit_params;\n+};\n+\n #pragma pack(pop)\n #endif /* _FSL_DPNI_CMD_H */\ndiff --git a/drivers/net/dpaa2/mc/fsl_dprtc.h b/drivers/net/dpaa2/mc/fsl_dprtc.h\nindex 49edb5a050..84ab158444 100644\n--- a/drivers/net/dpaa2/mc/fsl_dprtc.h\n+++ b/drivers/net/dpaa2/mc/fsl_dprtc.h\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n- * Copyright 2019 NXP\n+ * Copyright 2019-2021 NXP\n  */\n #ifndef __FSL_DPRTC_H\n #define __FSL_DPRTC_H\n@@ -86,6 +86,23 @@ int dprtc_set_alarm(struct fsl_mc_io *mc_io,\n \t\t    uint16_t token,\n \t\t    uint64_t time);\n \n+struct dprtc_ext_trigger_status {\n+\t\t\tuint64_t timestamp;\n+\t\t\tuint8_t unread_valid_timestamp;\n+};\n+\n+int dprtc_get_ext_trigger_timestamp(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tuint8_t id,\n+\t\t\tstruct dprtc_ext_trigger_status *status);\n+\n+int dprtc_set_fiper_loopback(struct fsl_mc_io *mc_io,\n+\t\t\tuint32_t cmd_flags,\n+\t\t\tuint16_t token,\n+\t\t\tuint8_t id,\n+\t\t\tuint8_t fiper_as_input);\n+\n /**\n  * struct dprtc_attr - Structure representing DPRTC attributes\n  * @id:\t\tDPRTC object ID\ndiff --git a/drivers/net/dpaa2/mc/fsl_dprtc_cmd.h b/drivers/net/dpaa2/mc/fsl_dprtc_cmd.h\nindex eca12ff5ee..61aaa4daab 100644\n--- a/drivers/net/dpaa2/mc/fsl_dprtc_cmd.h\n+++ b/drivers/net/dpaa2/mc/fsl_dprtc_cmd.h\n@@ -1,5 +1,5 @@\n /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)\n- * Copyright 2019 NXP\n+ * Copyright 2019-2021 NXP\n  */\n #include <fsl_mc_sys.h>\n #ifndef _FSL_DPRTC_CMD_H\n@@ -7,13 +7,15 @@\n \n /* DPRTC Version */\n #define DPRTC_VER_MAJOR\t\t\t2\n-#define DPRTC_VER_MINOR\t\t\t1\n+#define DPRTC_VER_MINOR\t\t\t3\n \n /* Command versioning */\n #define DPRTC_CMD_BASE_VERSION\t\t1\n+#define DPRTC_CMD_VERSION_2\t\t2\n #define DPRTC_CMD_ID_OFFSET\t\t4\n \n #define DPRTC_CMD(id)\t(((id) << DPRTC_CMD_ID_OFFSET) | DPRTC_CMD_BASE_VERSION)\n+#define DPRTC_CMD_V2(id) (((id) << DPRTC_CMD_ID_OFFSET) | DPRTC_CMD_VERSION_2)\n \n /* Command IDs */\n #define DPRTC_CMDID_CLOSE\t\t\tDPRTC_CMD(0x800)\n@@ -39,6 +41,7 @@\n #define DPRTC_CMDID_SET_EXT_TRIGGER\t\tDPRTC_CMD(0x1d8)\n #define DPRTC_CMDID_CLEAR_EXT_TRIGGER\t\tDPRTC_CMD(0x1d9)\n #define DPRTC_CMDID_GET_EXT_TRIGGER_TIMESTAMP\tDPRTC_CMD(0x1dA)\n+#define DPRTC_CMDID_SET_FIPER_LOOPBACK\tDPRTC_CMD(0x1dB)\n \n /* Macros for accessing command fields smaller than 1byte */\n #define DPRTC_MASK(field)        \\\n@@ -87,5 +90,23 @@ struct dprtc_rsp_get_api_version {\n \tuint16_t major;\n \tuint16_t minor;\n };\n+\n+struct dprtc_cmd_ext_trigger_timestamp {\n+\tuint32_t pad;\n+\tuint8_t id;\n+};\n+\n+struct dprtc_rsp_ext_trigger_timestamp {\n+\tuint8_t unread_valid_timestamp;\n+\tuint8_t pad1;\n+\tuint16_t pad2;\n+\tuint32_t pad3;\n+\tuint64_t timestamp;\n+};\n+\n+struct dprtc_ext_trigger_cfg {\n+\tuint8_t id;\n+\tuint8_t fiper_as_input;\n+};\n #pragma pack(pop)\n #endif /* _FSL_DPRTC_CMD_H */\n",
    "prefixes": [
        "01/11"
    ]
}