get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134879,
    "url": "http://patches.dpdk.org/api/patches/134879/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231205115347.3197124-1-psatheesh@marvell.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": "<20231205115347.3197124-1-psatheesh@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231205115347.3197124-1-psatheesh@marvell.com",
    "date": "2023-12-05T11:53:47",
    "name": "[v2] drivers: add represented port flow item for cnxk",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4304616d323b5a0283969c72b6eedc435453d6b7",
    "submitter": {
        "id": 1663,
        "url": "http://patches.dpdk.org/api/people/1663/?format=api",
        "name": "Satheesh Paul Antonysamy",
        "email": "psatheesh@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231205115347.3197124-1-psatheesh@marvell.com/mbox/",
    "series": [
        {
            "id": 30457,
            "url": "http://patches.dpdk.org/api/series/30457/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30457",
            "date": "2023-12-05T11:53:47",
            "name": "[v2] drivers: add represented port flow item for cnxk",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/30457/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134879/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134879/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 4C0F243677;\n\tTue,  5 Dec 2023 12:53:57 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1A0CA42E3B;\n\tTue,  5 Dec 2023 12:53:57 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 2A88642E2B\n for <dev@dpdk.org>; Tue,  5 Dec 2023 12:53:56 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3B5BQZDO021827 for <dev@dpdk.org>; Tue, 5 Dec 2023 03:53:55 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3usrx3hw3n-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 05 Dec 2023 03:53:55 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Tue, 5 Dec 2023 03:53:53 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Tue, 5 Dec 2023 03:53:53 -0800",
            "from satheeshpaullabpc.. (unknown [10.28.34.33])\n by maili.marvell.com (Postfix) with ESMTP id 2A4053F70A5;\n Tue,  5 Dec 2023 03:53:50 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=+HwAu8tysfe7az+0H1f674td5fsqdusnN+KeUReGgFs=;\n b=fs848Ba9YKOvNfGi2+DB26ys2xigxAu0IHlGfqlFlOGAzL8Q5m4Tu5/XXc8HZaYuceei\n DuCLNl+RMGYnab6RDtaqwGpYxtAS+SFY9aMVA3QVrf5Ck9xbJd/fH55+ku01tEVt6ATJ\n AlOVOp3BJEeUAagWBsfMwGWXWoHkPaGBVvzlIPw+mfXPu/KR+QEUrWIge1PVAgXUPh3S\n qqtqNSfL7Ja/kWYMoE8IwqBqAyMAxYdafV7TKEVIE9mbqg7i2bxrMA5dSPeeEP3zqJ7C\n WWkoJ6oV4+DNwB9EKbTtQgu7lLicavexotYvfK+vjgCJQAbmyGFQEqiWQi1lArZSKOCX mA==",
        "From": "<psatheesh@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>",
        "CC": "<dev@dpdk.org>, Satheesh Paul <psatheesh@marvell.com>",
        "Subject": "[dpdk-dev] [PATCH v2] drivers: add represented port flow item for\n cnxk",
        "Date": "Tue, 5 Dec 2023 17:23:47 +0530",
        "Message-ID": "<20231205115347.3197124-1-psatheesh@marvell.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230904105742.1159342-2-psatheesh@marvell.com>",
        "References": "<20230904105742.1159342-2-psatheesh@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "R2X0Yt8GLHyLlOjwqxsYorryRY3WZFeK",
        "X-Proofpoint-ORIG-GUID": "R2X0Yt8GLHyLlOjwqxsYorryRY3WZFeK",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-12-05_06,2023-12-05_01,2023-05-22_02",
        "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"
    },
    "content": "From: Satheesh Paul <psatheesh@marvell.com>\n\nAdding support for represented port flow item for cnxk device.\n\nSigned-off-by: Kiran Kumar K <kirankumark@marvell.com>\nSigned-off-by: Satheesh Paul <psatheesh@marvell.com>\n---\nv2:\n* Fix issue with flow key alg for cnxk.\n\n doc/guides/nics/features/cnxk.ini    |   1 +\n doc/guides/nics/features/cnxk_vf.ini |   1 +\n drivers/common/cnxk/roc_npc.c        |  61 ++++++++++++---\n drivers/common/cnxk/roc_npc.h        |  13 +++-\n drivers/common/cnxk/roc_npc_mcam.c   |  68 ++++++++---------\n drivers/common/cnxk/roc_npc_parse.c  |  11 +++\n drivers/common/cnxk/roc_npc_priv.h   |   1 +\n drivers/net/cnxk/cnxk_flow.c         | 106 ++++++++++++++-------------\n 8 files changed, 166 insertions(+), 96 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini\nindex ac7de9a0f0..1c7d804aab 100644\n--- a/doc/guides/nics/features/cnxk.ini\n+++ b/doc/guides/nics/features/cnxk.ini\n@@ -72,6 +72,7 @@ mark                 = Y\n mpls                 = Y\n nvgre                = Y\n raw                  = Y\n+represented_port     = Y\n sctp                 = Y\n tcp                  = Y\n tx_queue             = Y\ndiff --git a/doc/guides/nics/features/cnxk_vf.ini b/doc/guides/nics/features/cnxk_vf.ini\nindex b03e8b35c3..96bfd86ac8 100644\n--- a/doc/guides/nics/features/cnxk_vf.ini\n+++ b/doc/guides/nics/features/cnxk_vf.ini\n@@ -63,6 +63,7 @@ mark                 = Y\n mpls                 = Y\n nvgre                = Y\n raw                  = Y\n+represented_port     = Y\n sctp                 = Y\n tcp                  = Y\n tx_queue             = Y\ndiff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c\nindex 1958b3089d..3712f1920c 100644\n--- a/drivers/common/cnxk/roc_npc.c\n+++ b/drivers/common/cnxk/roc_npc.c\n@@ -522,6 +522,8 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n \tflow->ctr_id = NPC_COUNTER_NONE;\n \tflow->mtr_id = ROC_NIX_MTR_ID_INVALID;\n \tpf_func = npc->pf_func;\n+\tif (flow->has_rep)\n+\t\tpf_func = flow->rep_pf_func;\n \n \tfor (; actions->type != ROC_NPC_ACTION_TYPE_END; actions++) {\n \t\tswitch (actions->type) {\n@@ -817,10 +819,14 @@ npc_parse_pattern(struct npc *npc, const struct roc_npc_item_info pattern[],\n \t\t  struct roc_npc_flow *flow, struct npc_parse_state *pst)\n {\n \tnpc_parse_stage_func_t parse_stage_funcs[] = {\n-\t\tnpc_parse_meta_items, npc_parse_mark_item, npc_parse_pre_l2, npc_parse_cpt_hdr,\n-\t\tnpc_parse_higig2_hdr, npc_parse_tx_queue,  npc_parse_la,     npc_parse_lb,\n-\t\tnpc_parse_lc,\t      npc_parse_ld,\t   npc_parse_le,     npc_parse_lf,\n-\t\tnpc_parse_lg,\t      npc_parse_lh,\n+\t\tnpc_parse_meta_items, npc_parse_port_representor_id,\n+\t\tnpc_parse_mark_item,  npc_parse_pre_l2,\n+\t\tnpc_parse_cpt_hdr,    npc_parse_higig2_hdr,\n+\t\tnpc_parse_tx_queue,   npc_parse_la,\n+\t\tnpc_parse_lb,\t      npc_parse_lc,\n+\t\tnpc_parse_ld,\t      npc_parse_le,\n+\t\tnpc_parse_lf,\t      npc_parse_lg,\n+\t\tnpc_parse_lh,\n \t};\n \tuint8_t layer = 0;\n \tint key_offset;\n@@ -1059,15 +1065,20 @@ npc_rss_action_program(struct roc_npc *roc_npc,\n \t\t       struct roc_npc_flow *flow)\n {\n \tconst struct roc_npc_action_rss *rss;\n+\tstruct roc_npc *npc = roc_npc;\n \tuint32_t rss_grp;\n \tuint8_t alg_idx;\n \tint rc;\n \n+\tif (flow->has_rep) {\n+\t\tnpc = roc_npc->rep_npc;\n+\t\tnpc->flowkey_cfg_state = roc_npc->flowkey_cfg_state;\n+\t}\n+\n \tfor (; actions->type != ROC_NPC_ACTION_TYPE_END; actions++) {\n \t\tif (actions->type == ROC_NPC_ACTION_TYPE_RSS) {\n \t\t\trss = (const struct roc_npc_action_rss *)actions->conf;\n-\t\t\trc = npc_rss_action_configure(roc_npc, rss, &alg_idx,\n-\t\t\t\t\t\t      &rss_grp, flow->mcam_id);\n+\t\t\trc = npc_rss_action_configure(npc, rss, &alg_idx, &rss_grp, flow->mcam_id);\n \t\t\tif (rc)\n \t\t\t\treturn rc;\n \n@@ -1090,7 +1101,7 @@ npc_vtag_cfg_delete(struct roc_npc *roc_npc, struct roc_npc_flow *flow)\n \tstruct roc_nix *roc_nix = roc_npc->roc_nix;\n \tstruct nix_vtag_config *vtag_cfg;\n \tstruct nix_vtag_config_rsp *rsp;\n-\tstruct mbox *mbox;\n+\tstruct mbox *mbox, *ombox;\n \tstruct nix *nix;\n \tint rc = 0;\n \n@@ -1100,7 +1111,10 @@ npc_vtag_cfg_delete(struct roc_npc *roc_npc, struct roc_npc_flow *flow)\n \t} tx_vtag_action;\n \n \tnix = roc_nix_to_nix_priv(roc_nix);\n-\tmbox = mbox_get((&nix->dev)->mbox);\n+\tombox = (&nix->dev)->mbox;\n+\tif (flow->has_rep)\n+\t\tombox = flow->rep_mbox;\n+\tmbox = mbox_get(ombox);\n \n \ttx_vtag_action.reg = flow->vtag_action;\n \tvtag_cfg = mbox_alloc_msg_nix_vtag_cfg(mbox);\n@@ -1351,6 +1365,8 @@ npc_vtag_action_program(struct roc_npc *roc_npc,\n \n \tnix = roc_nix_to_nix_priv(roc_nix);\n \tmbox = (&nix->dev)->mbox;\n+\tif (flow->has_rep)\n+\t\tmbox = flow->rep_mbox;\n \n \tmemset(vlan_info, 0, sizeof(vlan_info));\n \n@@ -1506,6 +1522,17 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n \tmemset(flow, 0, sizeof(*flow));\n \tmemset(&parse_state, 0, sizeof(parse_state));\n \n+\tflow->port_id = -1;\n+\tif (roc_npc->rep_npc) {\n+\t\tflow->rep_channel = roc_nix_to_nix_priv(roc_npc->rep_npc->roc_nix)->rx_chan_base;\n+\t\tflow->rep_pf_func = roc_npc->rep_pf_func;\n+\t\tflow->rep_mbox = roc_npc_to_npc_priv(roc_npc->rep_npc)->mbox;\n+\t\tflow->has_rep = true;\n+\t\tflow->is_rep_vf = !roc_nix_is_pf(roc_npc->rep_npc->roc_nix);\n+\t\tflow->port_id = roc_npc->rep_port_id;\n+\t\tflow->rep_npc = roc_npc_to_npc_priv(roc_npc->rep_npc);\n+\t}\n+\n \tparse_state.dst_pf_func = dst_pf_func;\n \n \trc = npc_parse_rule(roc_npc, attr, pattern, actions, flow, &parse_state);\n@@ -1533,6 +1560,7 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n \t\t*errcode = rc;\n \t\tgoto set_rss_failed;\n \t}\n+\troc_npc->rep_npc = NULL;\n \n \tif (flow->has_age_action)\n \t\tnpc_age_flow_list_entry_add(roc_npc, flow);\n@@ -1545,6 +1573,7 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n \tTAILQ_FOREACH(flow_iter, list, next) {\n \t\tif (flow_iter->mcam_id > flow->mcam_id) {\n \t\t\tTAILQ_INSERT_BEFORE(flow_iter, flow, next);\n+\t\t\troc_npc->rep_npc = NULL;\n \t\t\treturn flow;\n \t\t}\n \t}\n@@ -1553,6 +1582,7 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n \treturn flow;\n \n set_rss_failed:\n+\troc_npc->rep_npc = NULL;\n \tif (flow->use_pre_alloc == 0) {\n \t\trc = roc_npc_mcam_free_entry(roc_npc, flow->mcam_id);\n \t\tif (rc != 0) {\n@@ -1564,6 +1594,7 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n \t\tnpc_inline_dev_ipsec_action_free(npc, flow);\n \t}\n err_exit:\n+\troc_npc->rep_npc = NULL;\n \tplt_free(flow);\n \treturn NULL;\n }\n@@ -1571,15 +1602,19 @@ roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,\n int\n npc_rss_group_free(struct npc *npc, struct roc_npc_flow *flow)\n {\n+\tstruct npc *lnpc = npc;\n \tuint32_t rss_grp;\n \n+\tif (flow->has_rep)\n+\t\tlnpc = flow->rep_npc;\n+\n \tif ((flow->npc_action & 0xF) == NIX_RX_ACTIONOP_RSS) {\n \t\trss_grp = (flow->npc_action >> NPC_RSS_ACT_GRP_OFFSET) &\n \t\t\t  NPC_RSS_ACT_GRP_MASK;\n \t\tif (rss_grp == 0 || rss_grp >= npc->rss_grps)\n \t\t\treturn -EINVAL;\n \n-\t\tplt_bitmap_clear(npc->rss_grp_entries, rss_grp);\n+\t\tplt_bitmap_clear(lnpc->rss_grp_entries, rss_grp);\n \t}\n \n \treturn 0;\n@@ -1660,7 +1695,7 @@ roc_npc_flow_destroy(struct roc_npc *roc_npc, struct roc_npc_flow *flow)\n }\n \n void\n-roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc)\n+roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc, int rep_port_id)\n {\n \tstruct npc *npc = roc_npc_to_npc_priv(roc_npc);\n \tstruct roc_npc_flow *flow_iter;\n@@ -1674,12 +1709,14 @@ roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc)\n \n \t\t/* List in ascending order of mcam entries */\n \t\tTAILQ_FOREACH(flow_iter, list, next) {\n-\t\t\troc_npc_flow_mcam_dump(file, roc_npc, flow_iter);\n+\t\t\tif (rep_port_id == -1 || rep_port_id == flow_iter->port_id)\n+\t\t\t\troc_npc_flow_mcam_dump(file, roc_npc, flow_iter);\n \t\t}\n \t}\n \n \tTAILQ_FOREACH(flow_iter, &npc->ipsec_list, next) {\n-\t\troc_npc_flow_mcam_dump(file, roc_npc, flow_iter);\n+\t\tif (rep_port_id == -1 || rep_port_id == flow_iter->port_id)\n+\t\t\troc_npc_flow_mcam_dump(file, roc_npc, flow_iter);\n \t}\n }\n \ndiff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h\nindex 459fa33de9..97576aa94e 100644\n--- a/drivers/common/cnxk/roc_npc.h\n+++ b/drivers/common/cnxk/roc_npc.h\n@@ -41,6 +41,7 @@ enum roc_npc_item_type {\n \tROC_NPC_ITEM_TYPE_MARK,\n \tROC_NPC_ITEM_TYPE_TX_QUEUE,\n \tROC_NPC_ITEM_TYPE_IPV6_ROUTING_EXT,\n+\tROC_NPC_ITEM_TYPE_REPRESENTED_PORT,\n \tROC_NPC_ITEM_TYPE_END,\n };\n \n@@ -321,6 +322,13 @@ struct roc_npc_flow {\n \tvoid *age_context;\n \tuint32_t timeout;\n \tbool has_age_action;\n+\tuint16_t rep_pf_func;\n+\tuint16_t rep_channel;\n+\tstruct mbox *rep_mbox;\n+\tbool has_rep;\n+\tbool is_rep_vf;\n+\tstruct npc *rep_npc;\n+\tint port_id;\n \n \tTAILQ_ENTRY(roc_npc_flow) next;\n };\n@@ -389,6 +397,9 @@ struct roc_npc {\n \tuint16_t sdp_channel;\n \tuint16_t sdp_channel_mask;\n \tstruct roc_npc_flow_age flow_age;\n+\tstruct roc_npc *rep_npc;\n+\tuint16_t rep_pf_func;\n+\tint rep_port_id;\n \n #define ROC_NPC_MEM_SZ (6 * 1024)\n \tuint8_t reserved[ROC_NPC_MEM_SZ];\n@@ -427,7 +438,7 @@ int __roc_api roc_npc_mcam_clear_counter(struct roc_npc *roc_npc, uint32_t ctr_i\n int __roc_api roc_npc_inl_mcam_read_counter(uint32_t ctr_id, uint64_t *count);\n int __roc_api roc_npc_inl_mcam_clear_counter(uint32_t ctr_id);\n int __roc_api roc_npc_mcam_free_all_resources(struct roc_npc *roc_npc);\n-void __roc_api roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc);\n+void __roc_api roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc, int rep_port_id);\n void __roc_api roc_npc_flow_mcam_dump(FILE *file, struct roc_npc *roc_npc,\n \t\t\t\t      struct roc_npc_flow *mcam);\n int __roc_api roc_npc_mark_actions_get(struct roc_npc *roc_npc);\ndiff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c\nindex 41edec7d8d..d73d6bc602 100644\n--- a/drivers/common/cnxk/roc_npc_mcam.c\n+++ b/drivers/common/cnxk/roc_npc_mcam.c\n@@ -143,8 +143,8 @@ npc_lid_lt_in_kex(struct npc *npc, uint8_t lid, uint8_t lt)\n }\n \n static void\n-npc_construct_ldata_mask(struct npc *npc, struct plt_bitmap *bmap, uint8_t lid,\n-\t\t\t uint8_t lt, uint8_t ld)\n+npc_construct_ldata_mask(struct npc *npc, struct plt_bitmap *bmap, uint8_t lid, uint8_t lt,\n+\t\t\t uint8_t ld)\n {\n \tstruct npc_xtract_info *x_info, *infoflag;\n \tint hdr_off, keylen;\n@@ -197,8 +197,7 @@ npc_construct_ldata_mask(struct npc *npc, struct plt_bitmap *bmap, uint8_t lid,\n  * @param len length of the match\n  */\n static bool\n-npc_is_kex_enabled(struct npc *npc, uint8_t lid, uint8_t lt, int offset,\n-\t\t   int len)\n+npc_is_kex_enabled(struct npc *npc, uint8_t lid, uint8_t lt, int offset, int len)\n {\n \tstruct plt_bitmap *bmap;\n \tuint32_t bmap_sz;\n@@ -349,8 +348,8 @@ npc_mcam_alloc_entries(struct mbox *mbox, int ref_mcam, int *alloc_entry, int re\n }\n \n int\n-npc_mcam_alloc_entry(struct npc *npc, struct roc_npc_flow *mcam,\n-\t\t     struct roc_npc_flow *ref_mcam, int prio, int *resp_count)\n+npc_mcam_alloc_entry(struct npc *npc, struct roc_npc_flow *mcam, struct roc_npc_flow *ref_mcam,\n+\t\t     int prio, int *resp_count)\n {\n \tstruct npc_mcam_alloc_entry_req *req;\n \tstruct npc_mcam_alloc_entry_rsp *rsp;\n@@ -450,22 +449,17 @@ npc_mcam_write_entry(struct mbox *mbox, struct roc_npc_flow *mcam)\n static void\n npc_mcam_process_mkex_cfg(struct npc *npc, struct npc_get_kex_cfg_rsp *kex_rsp)\n {\n-\tvolatile uint64_t(\n-\t\t*q)[NPC_MAX_INTF][NPC_MAX_LID][NPC_MAX_LT][NPC_MAX_LD];\n+\tvolatile uint64_t(*q)[NPC_MAX_INTF][NPC_MAX_LID][NPC_MAX_LT][NPC_MAX_LD];\n \tstruct npc_xtract_info *x_info = NULL;\n \tint lid, lt, ld, fl, ix;\n \tnpc_dxcfg_t *p;\n \tuint64_t keyw;\n \tuint64_t val;\n \n-\tnpc->keyx_supp_nmask[NPC_MCAM_RX] =\n-\t\tkex_rsp->rx_keyx_cfg & 0x7fffffffULL;\n-\tnpc->keyx_supp_nmask[NPC_MCAM_TX] =\n-\t\tkex_rsp->tx_keyx_cfg & 0x7fffffffULL;\n-\tnpc->keyx_len[NPC_MCAM_RX] =\n-\t\tnpc_supp_key_len(npc->keyx_supp_nmask[NPC_MCAM_RX]);\n-\tnpc->keyx_len[NPC_MCAM_TX] =\n-\t\tnpc_supp_key_len(npc->keyx_supp_nmask[NPC_MCAM_TX]);\n+\tnpc->keyx_supp_nmask[NPC_MCAM_RX] = kex_rsp->rx_keyx_cfg & 0x7fffffffULL;\n+\tnpc->keyx_supp_nmask[NPC_MCAM_TX] = kex_rsp->tx_keyx_cfg & 0x7fffffffULL;\n+\tnpc->keyx_len[NPC_MCAM_RX] = npc_supp_key_len(npc->keyx_supp_nmask[NPC_MCAM_RX]);\n+\tnpc->keyx_len[NPC_MCAM_TX] = npc_supp_key_len(npc->keyx_supp_nmask[NPC_MCAM_TX]);\n \n \tkeyw = (kex_rsp->rx_keyx_cfg >> 32) & 0x7ULL;\n \tnpc->keyw[NPC_MCAM_RX] = keyw;\n@@ -485,8 +479,7 @@ npc_mcam_process_mkex_cfg(struct npc *npc, struct npc_get_kex_cfg_rsp *kex_rsp)\n \n \t/* Update LID, LT and LDATA cfg */\n \tp = &npc->prx_dxcfg;\n-\tq = (volatile uint64_t(*)[][NPC_MAX_LID][NPC_MAX_LT][NPC_MAX_LD])(\n-\t\t&kex_rsp->intf_lid_lt_ld);\n+\tq = (volatile uint64_t(*)[][NPC_MAX_LID][NPC_MAX_LT][NPC_MAX_LD])(&kex_rsp->intf_lid_lt_ld);\n \tfor (ix = 0; ix < NPC_MAX_INTF; ix++) {\n \t\tfor (lid = 0; lid < NPC_MAX_LID; lid++) {\n \t\t\tfor (lt = 0; lt < NPC_MAX_LT; lt++) {\n@@ -539,8 +532,7 @@ npc_mcam_fetch_kex_cfg(struct npc *npc)\n \t\tgoto done;\n \t}\n \n-\tmbox_memcpy((char *)npc->profile_name, kex_rsp->mkex_pfl_name,\n-\t\t    MKEX_NAME_LEN);\n+\tmbox_memcpy((char *)npc->profile_name, kex_rsp->mkex_pfl_name, MKEX_NAME_LEN);\n \n \tnpc->exact_match_ena = (kex_rsp->rx_keyx_cfg >> 40) & 0xF;\n \tnpc_mcam_process_mkex_cfg(npc, kex_rsp);\n@@ -551,9 +543,8 @@ npc_mcam_fetch_kex_cfg(struct npc *npc)\n }\n \n static void\n-npc_mcam_set_channel(struct roc_npc_flow *flow,\n-\t\t     struct npc_mcam_write_entry_req *req, uint16_t channel,\n-\t\t     uint16_t chan_mask, bool is_second_pass)\n+npc_mcam_set_channel(struct roc_npc_flow *flow, struct npc_mcam_write_entry_req *req,\n+\t\t     uint16_t channel, uint16_t chan_mask, bool is_second_pass)\n {\n \tuint16_t chan = 0, mask = 0;\n \n@@ -710,6 +701,9 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow, struct npc_\n \tif (flow->nix_intf == NIX_INTF_TX) {\n \t\tuint16_t pf_func = (flow->npc_action >> 4) & 0xffff;\n \n+\t\tif (flow->has_rep)\n+\t\t\tpf_func = flow->rep_pf_func;\n+\n \t\tpf_func = plt_cpu_to_be_16(pf_func);\n \n \t\trc = npc_mcam_set_pf_func(npc, flow, pf_func);\n@@ -733,6 +727,14 @@ npc_mcam_alloc_and_write(struct npc *npc, struct roc_npc_flow *flow, struct npc_\n \n \t\t\tnpc_mcam_set_channel(flow, req, inl_dev->channel, inl_dev->chan_mask,\n \t\t\t\t\t     false);\n+\t\t} else if (flow->has_rep) {\n+\t\t\tpf_func = flow->rep_pf_func;\n+\t\t\treq->entry_data.action &= ~(GENMASK(19, 4));\n+\t\t\treq->entry_data.action |= (uint64_t)pf_func << 4;\n+\t\t\tflow->npc_action &= ~(GENMASK(19, 4));\n+\t\t\tflow->npc_action |= (uint64_t)pf_func << 4;\n+\t\t\tnpc_mcam_set_channel(flow, req, flow->rep_channel, (BIT_ULL(12) - 1),\n+\t\t\t\t\t     false);\n \t\t} else if (npc->is_sdp_link) {\n \t\t\tnpc_mcam_set_channel(flow, req, npc->sdp_channel, npc->sdp_channel_mask,\n \t\t\t\t\t     pst->is_second_pass_rule);\n@@ -789,8 +791,7 @@ npc_set_vlan_ltype(struct npc_parse_state *pst)\n \tuint64_t val, mask;\n \tuint8_t lb_offset;\n \n-\tlb_offset =\n-\t\tplt_popcount32(pst->npc->keyx_supp_nmask[pst->nix_intf] &\n+\tlb_offset = plt_popcount32(pst->npc->keyx_supp_nmask[pst->nix_intf] &\n \t\t\t\t   ((1ULL << NPC_LTYPE_LB_OFFSET) - 1));\n \tlb_offset *= 4;\n \n@@ -811,8 +812,7 @@ npc_set_ipv6ext_ltype_mask(struct npc_parse_state *pst)\n \tuint8_t lc_offset, lcflag_offset;\n \tuint64_t val, mask;\n \n-\tlc_offset =\n-\t\tplt_popcount32(pst->npc->keyx_supp_nmask[pst->nix_intf] &\n+\tlc_offset = plt_popcount32(pst->npc->keyx_supp_nmask[pst->nix_intf] &\n \t\t\t\t   ((1ULL << NPC_LTYPE_LC_OFFSET) - 1));\n \tlc_offset *= 4;\n \n@@ -903,13 +903,11 @@ npc_program_mcam(struct npc *npc, struct npc_parse_state *pst, bool mcam_alloc)\n \t\t\t\t\t\tdata_off = 0;\n \t\t\t\t\t\tindex++;\n \t\t\t\t\t}\n-\t\t\t\t\tkey_data[index] |=\n-\t\t\t\t\t\t((uint64_t)data << data_off);\n+\t\t\t\t\tkey_data[index] |= ((uint64_t)data << data_off);\n \n \t\t\t\t\tif (lt == 0)\n \t\t\t\t\t\tmask = 0;\n-\t\t\t\t\tkey_mask[index] |=\n-\t\t\t\t\t\t((uint64_t)mask << data_off);\n+\t\t\t\t\tkey_mask[index] |= ((uint64_t)mask << data_off);\n \t\t\t\t\tdata_off += 4;\n \t\t\t\t}\n \t\t\t}\n@@ -934,8 +932,12 @@ npc_program_mcam(struct npc *npc, struct npc_parse_state *pst, bool mcam_alloc)\n \t    (pst->flow->npc_action & NIX_RX_ACTIONOP_UCAST_IPSEC))\n \t\tskip_base_rule = true;\n \n-\tif (pst->is_vf && pst->flow->nix_intf == NIX_INTF_RX && !skip_base_rule) {\n-\t\tmbox = mbox_get(npc->mbox);\n+\tif ((pst->is_vf || pst->flow->is_rep_vf) && pst->flow->nix_intf == NIX_INTF_RX &&\n+\t    !skip_base_rule) {\n+\t\tif (pst->flow->has_rep)\n+\t\t\tmbox = mbox_get(pst->flow->rep_mbox);\n+\t\telse\n+\t\t\tmbox = mbox_get(npc->mbox);\n \t\t(void)mbox_alloc_msg_npc_read_base_steer_rule(mbox);\n \t\trc = mbox_process_msg(mbox, (void *)&base_rule_rsp);\n \t\tif (rc) {\ndiff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c\nindex ecd1b3e13b..40ed3a55c6 100644\n--- a/drivers/common/cnxk/roc_npc_parse.c\n+++ b/drivers/common/cnxk/roc_npc_parse.c\n@@ -35,6 +35,17 @@ npc_parse_mark_item(struct npc_parse_state *pst)\n \treturn 0;\n }\n \n+int\n+npc_parse_port_representor_id(struct npc_parse_state *pst)\n+{\n+\tif (pst->pattern->type != ROC_NPC_ITEM_TYPE_REPRESENTED_PORT)\n+\t\treturn 0;\n+\n+\tpst->pattern++;\n+\n+\treturn 0;\n+}\n+\n static int\n npc_flow_raw_item_prepare(const struct roc_npc_flow_item_raw *raw_spec,\n \t\t\t  const struct roc_npc_flow_item_raw *raw_mask,\ndiff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h\nindex 424f8e207a..009b1d7b3e 100644\n--- a/drivers/common/cnxk/roc_npc_priv.h\n+++ b/drivers/common/cnxk/roc_npc_priv.h\n@@ -456,6 +456,7 @@ int npc_mask_is_supported(const char *mask, const char *hw_mask, int len);\n int npc_parse_item_basic(const struct roc_npc_item_info *item, struct npc_parse_item_info *info);\n int npc_parse_meta_items(struct npc_parse_state *pst);\n int npc_parse_mark_item(struct npc_parse_state *pst);\n+int npc_parse_port_representor_id(struct npc_parse_state *pst);\n int npc_parse_pre_l2(struct npc_parse_state *pst);\n int npc_parse_higig2_hdr(struct npc_parse_state *pst);\n int npc_parse_cpt_hdr(struct npc_parse_state *pst);\ndiff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c\nindex 08ab75e2bb..94cca880c7 100644\n--- a/drivers/net/cnxk/cnxk_flow.c\n+++ b/drivers/net/cnxk/cnxk_flow.c\n@@ -4,65 +4,45 @@\n #include <cnxk_flow.h>\n \n const struct cnxk_rte_flow_term_info term[] = {\n-\t[RTE_FLOW_ITEM_TYPE_ETH] = {ROC_NPC_ITEM_TYPE_ETH,\n-\t\t\t\t    sizeof(struct rte_flow_item_eth)},\n-\t[RTE_FLOW_ITEM_TYPE_VLAN] = {ROC_NPC_ITEM_TYPE_VLAN,\n-\t\t\t\t     sizeof(struct rte_flow_item_vlan)},\n-\t[RTE_FLOW_ITEM_TYPE_E_TAG] = {ROC_NPC_ITEM_TYPE_E_TAG,\n-\t\t\t\t      sizeof(struct rte_flow_item_e_tag)},\n-\t[RTE_FLOW_ITEM_TYPE_IPV4] = {ROC_NPC_ITEM_TYPE_IPV4,\n-\t\t\t\t     sizeof(struct rte_flow_item_ipv4)},\n-\t[RTE_FLOW_ITEM_TYPE_IPV6] = {ROC_NPC_ITEM_TYPE_IPV6,\n-\t\t\t\t     sizeof(struct rte_flow_item_ipv6)},\n-\t[RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT] = {\n-\t\t\tROC_NPC_ITEM_TYPE_IPV6_FRAG_EXT,\n-\t\t\tsizeof(struct rte_flow_item_ipv6_frag_ext)},\n-\t[RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4] = {\n-\t\t\tROC_NPC_ITEM_TYPE_ARP_ETH_IPV4,\n-\t\t\tsizeof(struct rte_flow_item_arp_eth_ipv4)},\n-\t[RTE_FLOW_ITEM_TYPE_MPLS] = {ROC_NPC_ITEM_TYPE_MPLS,\n-\t\t\t\t     sizeof(struct rte_flow_item_mpls)},\n-\t[RTE_FLOW_ITEM_TYPE_ICMP] = {ROC_NPC_ITEM_TYPE_ICMP,\n-\t\t\t\t     sizeof(struct rte_flow_item_icmp)},\n-\t[RTE_FLOW_ITEM_TYPE_UDP] = {ROC_NPC_ITEM_TYPE_UDP,\n-\t\t\t\t    sizeof(struct rte_flow_item_udp)},\n-\t[RTE_FLOW_ITEM_TYPE_TCP] = {ROC_NPC_ITEM_TYPE_TCP,\n-\t\t\t\t    sizeof(struct rte_flow_item_tcp)},\n-\t[RTE_FLOW_ITEM_TYPE_SCTP] = {ROC_NPC_ITEM_TYPE_SCTP,\n-\t\t\t\t     sizeof(struct rte_flow_item_sctp)},\n-\t[RTE_FLOW_ITEM_TYPE_ESP] = {ROC_NPC_ITEM_TYPE_ESP,\n-\t\t\t\t    sizeof(struct rte_flow_item_esp)},\n-\t[RTE_FLOW_ITEM_TYPE_GRE] = {ROC_NPC_ITEM_TYPE_GRE,\n-\t\t\t\t    sizeof(struct rte_flow_item_gre)},\n-\t[RTE_FLOW_ITEM_TYPE_NVGRE] = {ROC_NPC_ITEM_TYPE_NVGRE,\n-\t\t\t\t      sizeof(struct rte_flow_item_nvgre)},\n-\t[RTE_FLOW_ITEM_TYPE_VXLAN] = {ROC_NPC_ITEM_TYPE_VXLAN,\n-\t\t\t\t      sizeof(struct rte_flow_item_vxlan)},\n-\t[RTE_FLOW_ITEM_TYPE_GTPC] = {ROC_NPC_ITEM_TYPE_GTPC,\n-\t\t\t\t     sizeof(struct rte_flow_item_gtp)},\n-\t[RTE_FLOW_ITEM_TYPE_GTPU] = {ROC_NPC_ITEM_TYPE_GTPU,\n-\t\t\t\t     sizeof(struct rte_flow_item_gtp)},\n+\t[RTE_FLOW_ITEM_TYPE_ETH] = {ROC_NPC_ITEM_TYPE_ETH, sizeof(struct rte_flow_item_eth)},\n+\t[RTE_FLOW_ITEM_TYPE_VLAN] = {ROC_NPC_ITEM_TYPE_VLAN, sizeof(struct rte_flow_item_vlan)},\n+\t[RTE_FLOW_ITEM_TYPE_E_TAG] = {ROC_NPC_ITEM_TYPE_E_TAG, sizeof(struct rte_flow_item_e_tag)},\n+\t[RTE_FLOW_ITEM_TYPE_IPV4] = {ROC_NPC_ITEM_TYPE_IPV4, sizeof(struct rte_flow_item_ipv4)},\n+\t[RTE_FLOW_ITEM_TYPE_IPV6] = {ROC_NPC_ITEM_TYPE_IPV6, sizeof(struct rte_flow_item_ipv6)},\n+\t[RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT] = {ROC_NPC_ITEM_TYPE_IPV6_FRAG_EXT,\n+\t\t\t\t\t      sizeof(struct rte_flow_item_ipv6_frag_ext)},\n+\t[RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4] = {ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4,\n+\t\t\t\t\t     sizeof(struct rte_flow_item_arp_eth_ipv4)},\n+\t[RTE_FLOW_ITEM_TYPE_MPLS] = {ROC_NPC_ITEM_TYPE_MPLS, sizeof(struct rte_flow_item_mpls)},\n+\t[RTE_FLOW_ITEM_TYPE_ICMP] = {ROC_NPC_ITEM_TYPE_ICMP, sizeof(struct rte_flow_item_icmp)},\n+\t[RTE_FLOW_ITEM_TYPE_UDP] = {ROC_NPC_ITEM_TYPE_UDP, sizeof(struct rte_flow_item_udp)},\n+\t[RTE_FLOW_ITEM_TYPE_TCP] = {ROC_NPC_ITEM_TYPE_TCP, sizeof(struct rte_flow_item_tcp)},\n+\t[RTE_FLOW_ITEM_TYPE_SCTP] = {ROC_NPC_ITEM_TYPE_SCTP, sizeof(struct rte_flow_item_sctp)},\n+\t[RTE_FLOW_ITEM_TYPE_ESP] = {ROC_NPC_ITEM_TYPE_ESP, sizeof(struct rte_flow_item_esp)},\n+\t[RTE_FLOW_ITEM_TYPE_GRE] = {ROC_NPC_ITEM_TYPE_GRE, sizeof(struct rte_flow_item_gre)},\n+\t[RTE_FLOW_ITEM_TYPE_NVGRE] = {ROC_NPC_ITEM_TYPE_NVGRE, sizeof(struct rte_flow_item_nvgre)},\n+\t[RTE_FLOW_ITEM_TYPE_VXLAN] = {ROC_NPC_ITEM_TYPE_VXLAN, sizeof(struct rte_flow_item_vxlan)},\n+\t[RTE_FLOW_ITEM_TYPE_GTPC] = {ROC_NPC_ITEM_TYPE_GTPC, sizeof(struct rte_flow_item_gtp)},\n+\t[RTE_FLOW_ITEM_TYPE_GTPU] = {ROC_NPC_ITEM_TYPE_GTPU, sizeof(struct rte_flow_item_gtp)},\n \t[RTE_FLOW_ITEM_TYPE_GENEVE] = {ROC_NPC_ITEM_TYPE_GENEVE,\n \t\t\t\t       sizeof(struct rte_flow_item_geneve)},\n-\t[RTE_FLOW_ITEM_TYPE_VXLAN_GPE] = {\n-\t\t\tROC_NPC_ITEM_TYPE_VXLAN_GPE,\n-\t\t\tsizeof(struct rte_flow_item_vxlan_gpe)},\n+\t[RTE_FLOW_ITEM_TYPE_VXLAN_GPE] = {ROC_NPC_ITEM_TYPE_VXLAN_GPE,\n+\t\t\t\t\t  sizeof(struct rte_flow_item_vxlan_gpe)},\n \t[RTE_FLOW_ITEM_TYPE_IPV6_EXT] = {ROC_NPC_ITEM_TYPE_IPV6_EXT,\n \t\t\t\t\t sizeof(struct rte_flow_item_ipv6_ext)},\n \t[RTE_FLOW_ITEM_TYPE_VOID] = {ROC_NPC_ITEM_TYPE_VOID, 0},\n \t[RTE_FLOW_ITEM_TYPE_ANY] = {ROC_NPC_ITEM_TYPE_ANY, 0},\n-\t[RTE_FLOW_ITEM_TYPE_GRE_KEY] = {ROC_NPC_ITEM_TYPE_GRE_KEY,\n-\t\t\t\t\tsizeof(uint32_t)},\n+\t[RTE_FLOW_ITEM_TYPE_GRE_KEY] = {ROC_NPC_ITEM_TYPE_GRE_KEY, sizeof(uint32_t)},\n \t[RTE_FLOW_ITEM_TYPE_HIGIG2] = {ROC_NPC_ITEM_TYPE_HIGIG2,\n \t\t\t\t       sizeof(struct rte_flow_item_higig2_hdr)},\n-\t[RTE_FLOW_ITEM_TYPE_RAW] = {ROC_NPC_ITEM_TYPE_RAW,\n-\t\t\t\t    sizeof(struct rte_flow_item_raw)},\n-\t[RTE_FLOW_ITEM_TYPE_MARK] = {ROC_NPC_ITEM_TYPE_MARK,\n-\t\t\t\t     sizeof(struct rte_flow_item_mark)},\n+\t[RTE_FLOW_ITEM_TYPE_RAW] = {ROC_NPC_ITEM_TYPE_RAW, sizeof(struct rte_flow_item_raw)},\n+\t[RTE_FLOW_ITEM_TYPE_MARK] = {ROC_NPC_ITEM_TYPE_MARK, sizeof(struct rte_flow_item_mark)},\n \t[RTE_FLOW_ITEM_TYPE_IPV6_ROUTING_EXT] = {ROC_NPC_ITEM_TYPE_IPV6_ROUTING_EXT,\n-\t\t\t\t     sizeof(struct rte_flow_item_ipv6_routing_ext)},\n+\t\t\t\t\t\t sizeof(struct rte_flow_item_ipv6_routing_ext)},\n \t[RTE_FLOW_ITEM_TYPE_TX_QUEUE] = {ROC_NPC_ITEM_TYPE_TX_QUEUE,\n-\t\t\t\t     sizeof(struct rte_flow_item_tx_queue)}};\n+\t\t\t\t\t sizeof(struct rte_flow_item_tx_queue)},\n+\t[RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT] = {ROC_NPC_ITEM_TYPE_REPRESENTED_PORT,\n+\t\t\t\t\t\t sizeof(struct rte_flow_item_ethdev)}};\n \n static int\n npc_rss_action_validate(struct rte_eth_dev *eth_dev,\n@@ -264,6 +244,11 @@ cnxk_map_flow_data(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr\n \t\t   struct roc_npc_attr *in_attr, struct roc_npc_item_info in_pattern[],\n \t\t   struct roc_npc_action in_actions[], uint32_t *flowkey_cfg, uint16_t *dst_pf_func)\n {\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tconst struct rte_flow_item_ethdev *rep_eth_dev;\n+\tstruct rte_eth_dev *portid_eth_dev;\n+\tchar if_name[RTE_ETH_NAME_MAX_LEN];\n+\tstruct cnxk_eth_dev *hw_dst;\n \tint i = 0;\n \n \tin_attr->priority = attr->priority;\n@@ -276,6 +261,27 @@ cnxk_map_flow_data(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr\n \t\tin_pattern[i].mask = pattern->mask;\n \t\tin_pattern[i].type = term[pattern->type].item_type;\n \t\tin_pattern[i].size = term[pattern->type].item_size;\n+\t\tif (pattern->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {\n+\t\t\trep_eth_dev = (const struct rte_flow_item_ethdev *)pattern->spec;\n+\t\t\tif (rte_eth_dev_get_name_by_port(rep_eth_dev->port_id, if_name)) {\n+\t\t\t\tplt_err(\"Name not found for output port id\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\t\t\tportid_eth_dev = rte_eth_dev_allocated(if_name);\n+\t\t\tif (!portid_eth_dev) {\n+\t\t\t\tplt_err(\"eth_dev not found for output port id\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\t\t\tif (strcmp(portid_eth_dev->device->driver->name,\n+\t\t\t\t   eth_dev->device->driver->name) != 0) {\n+\t\t\t\tplt_err(\"Output port not under same driver\");\n+\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\t\t\thw_dst = portid_eth_dev->data->dev_private;\n+\t\t\tdev->npc.rep_npc = &hw_dst->npc;\n+\t\t\tdev->npc.rep_port_id = rep_eth_dev->port_id;\n+\t\t\tdev->npc.rep_pf_func = hw_dst->npc.pf_func;\n+\t\t}\n \t\tpattern++;\n \t\ti++;\n \t}\n@@ -481,7 +487,7 @@ cnxk_flow_dev_dump(struct rte_eth_dev *eth_dev, struct rte_flow *flow,\n \t\treturn -EINVAL;\n \t}\n \n-\troc_npc_flow_dump(file, npc);\n+\troc_npc_flow_dump(file, npc, -1);\n \n \treturn 0;\n }\n",
    "prefixes": [
        "v2"
    ]
}