Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/130180/?format=api
http://patchwork.dpdk.org/api/patches/130180/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230811163419.165790-10-hkalra@marvell.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20230811163419.165790-10-hkalra@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230811163419.165790-10-hkalra@marvell.com", "date": "2023-08-11T16:34:19", "name": "[9/9] net/cnxk: add represented port for cnxk", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "6e0f06e9bd6d611c365d7f63052952a32ae5feab", "submitter": { "id": 1182, "url": "http://patchwork.dpdk.org/api/people/1182/?format=api", "name": "Harman Kalra", "email": "hkalra@marvell.com" }, "delegate": { "id": 310, "url": "http://patchwork.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230811163419.165790-10-hkalra@marvell.com/mbox/", "series": [ { "id": 29193, "url": "http://patchwork.dpdk.org/api/series/29193/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29193", "date": "2023-08-11T16:34:10", "name": "net/cnxk: support for port representors", "version": 1, "mbox": "http://patchwork.dpdk.org/series/29193/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/130180/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/130180/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 CFE9943036;\n\tFri, 11 Aug 2023 18:36:07 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CC58843275;\n\tFri, 11 Aug 2023 18:35:26 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 9AB7C40144\n for <dev@dpdk.org>; Fri, 11 Aug 2023 18:35:23 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 37BEGFrW021082 for <dev@dpdk.org>; Fri, 11 Aug 2023 09:35:23 -0700", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3sd8ya2qv8-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Fri, 11 Aug 2023 09:35:22 -0700", "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Fri, 11 Aug 2023 09:35:20 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Fri, 11 Aug 2023 09:35:20 -0700", "from localhost.localdomain (unknown [10.29.52.211])\n by maili.marvell.com (Postfix) with ESMTP id 2FF843F7055;\n Fri, 11 Aug 2023 09:35:17 -0700 (PDT)" ], "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-type; s=pfpt0220; bh=BAwXTObH9Zs0Pyr0Bg0Gv94ZEBDPmDGQfXsrKTn4Z1o=;\n b=Rx2WZwHJSsq8gxdNb+NyZcfOy9KsBnPI5YrHu7lXud+nqxTfXLtaSYpD0y7vDDct5wAa\n oSQsIOI38r1UHcfFURPxb546LqSVnOoR3rI49UnHYzro6jzxnMAHjB2Mb9dD/CVFW3AB\n x3GfG1ICbbkyCFXx1ZQgWyNOy5QzMLNV0+tZhTu83QEZZbJn9Uq/kbtn02B1Sqh4+znS\n sDb58lOZ49l3nMzTD0vV7f6i5ZQpMYuhmObFNhjl2vdl5HIKHeU9g5oHdWcj7XC3t0r0\n rvi7B9jGXvh7iw59dGgGbpHreiKiTrc8xTcUgqqbBVUxaVNwyOHgPX/ZtrBOUp7YCxez lw==", "From": "Harman Kalra <hkalra@marvell.com>", "To": "<jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>, \"Kiran\n Kumar K\" <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>,\n Satha Rao <skoteshwar@marvell.com>", "CC": "<dev@dpdk.org>, Harman Kalra <hkalra@marvell.com>", "Subject": "[PATCH 9/9] net/cnxk: add represented port for cnxk", "Date": "Fri, 11 Aug 2023 22:04:19 +0530", "Message-ID": "<20230811163419.165790-10-hkalra@marvell.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<20230811163419.165790-1-hkalra@marvell.com>", "References": "<20230811163419.165790-1-hkalra@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "ZDvieZlTOMQgvIP4_1o7C2_4hM_JTfe2", "X-Proofpoint-GUID": "ZDvieZlTOMQgvIP4_1o7C2_4hM_JTfe2", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26\n definitions=2023-08-11_08,2023-08-10_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": "Adding represented port item matching and action support\nfor cnxk device.\n\nSigned-off-by: Kiran Kumar K <kirankumark@marvell.com>\nSigned-off-by: Harman Kalra <hkalra@marvell.com>\n---\n doc/guides/nics/features/cnxk.ini | 1 +\n doc/guides/nics/features/cnxk_vec.ini | 2 +\n doc/guides/nics/features/cnxk_vf.ini | 2 +\n drivers/net/cnxk/cnxk_flow.c | 161 ++++++++++++++++----------\n 4 files changed, 107 insertions(+), 59 deletions(-)", "diff": "diff --git a/doc/guides/nics/features/cnxk.ini b/doc/guides/nics/features/cnxk.ini\nindex f5ff692c27..3b74c6739e 100644\n--- a/doc/guides/nics/features/cnxk.ini\n+++ b/doc/guides/nics/features/cnxk.ini\n@@ -79,6 +79,7 @@ udp = Y\n vlan = Y\n vxlan = Y\n vxlan_gpe = Y\n+represented_port = Y\n \n [rte_flow actions]\n count = Y\ndiff --git a/doc/guides/nics/features/cnxk_vec.ini b/doc/guides/nics/features/cnxk_vec.ini\nindex e2cac64e4b..b33eaaf5d9 100644\n--- a/doc/guides/nics/features/cnxk_vec.ini\n+++ b/doc/guides/nics/features/cnxk_vec.ini\n@@ -73,6 +73,7 @@ udp = Y\n vlan = Y\n vxlan = Y\n vxlan_gpe = Y\n+represented_port = Y\n \n [rte_flow actions]\n count = Y\n@@ -86,5 +87,6 @@ of_set_vlan_vid = Y\n pf = Y\n queue = Y\n rss = Y\n+represented_port = Y\n security = Y\n vf = Y\ndiff --git a/doc/guides/nics/features/cnxk_vf.ini b/doc/guides/nics/features/cnxk_vf.ini\nindex 5579007831..70d7772b92 100644\n--- a/doc/guides/nics/features/cnxk_vf.ini\n+++ b/doc/guides/nics/features/cnxk_vf.ini\n@@ -70,6 +70,7 @@ udp = Y\n vlan = Y\n vxlan = Y\n vxlan_gpe = Y\n+represented_port = Y\n \n [rte_flow actions]\n count = Y\n@@ -83,6 +84,7 @@ of_set_vlan_pcp = Y\n of_set_vlan_vid = Y\n pf = Y\n queue = Y\n+represented_port = Y\n rss = Y\n security = Y\n skip_cman = Y\ndiff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c\nindex c08b09338d..d8213f92e8 100644\n--- a/drivers/net/cnxk/cnxk_flow.c\n+++ b/drivers/net/cnxk/cnxk_flow.c\n@@ -4,69 +4,48 @@\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-\t\t\tconst struct rte_flow_attr *attr,\n+npc_rss_action_validate(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,\n \t\t\tconst struct rte_flow_action *act)\n {\n \tconst struct rte_flow_action_rss *rss;\n@@ -274,28 +253,92 @@ cnxk_map_actions(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,\n }\n \n static int\n-cnxk_map_flow_data(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,\n-\t\t const struct rte_flow_item pattern[], const struct rte_flow_action actions[],\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+cnxk_map_pattern(struct rte_eth_dev *eth_dev, const struct rte_flow_item pattern[],\n+\t\t struct roc_npc_item_info in_pattern[])\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-\tin_attr->ingress = attr->ingress;\n-\tin_attr->egress = attr->egress;\n-\n \twhile (pattern->type != RTE_FLOW_ITEM_TYPE_END) {\n \t\tin_pattern[i].spec = pattern->spec;\n \t\tin_pattern[i].last = pattern->last;\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\tgoto fail;\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\tgoto fail;\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\tgoto fail;\n+\t\t\t}\n+\t\t\tif (cnxk_ethdev_is_representor(if_name)) {\n+\t\t\t\t/* Case where represented port not part of same\n+\t\t\t\t * app and represented by a representor port.\n+\t\t\t\t */\n+\t\t\t\tstruct cnxk_rep_dev *rep_dev;\n+\t\t\t\tstruct cnxk_eth_dev *pf_dev;\n+\n+\t\t\t\trep_dev = cnxk_rep_pmd_priv(portid_eth_dev);\n+\t\t\t\tpf_dev = cnxk_eth_pmd_priv(rep_dev->parent_dev);\n+\t\t\t\tdev->npc.rep_npc = &pf_dev->npc;\n+\t\t\t\tdev->npc.rep_port_id = rep_eth_dev->port_id;\n+\t\t\t\tdev->npc.rep_pf_func = rep_dev->pf_func;\n+\t\t\t\tplt_rep_dbg(\"Represented port %d act port %d rep_dev->pf_func 0x%x\",\n+\t\t\t\t\t rep_eth_dev->port_id, eth_dev->data->port_id,\n+\t\t\t\t\t rep_dev->pf_func);\n+\t\t\t} else {\n+\t\t\t\t/* Case where represented port part of same app\n+\t\t\t\t * as PF.\n+\t\t\t\t */\n+\t\t\t\thw_dst = portid_eth_dev->data->dev_private;\n+\t\t\t\tdev->npc.rep_npc = &hw_dst->npc;\n+\t\t\t\tdev->npc.rep_port_id = rep_eth_dev->port_id;\n+\t\t\t\tdev->npc.rep_pf_func = hw_dst->npc.pf_func;\n+\t\t\t}\n+\t\t}\n \t\tpattern++;\n \t\ti++;\n \t}\n \tin_pattern[i].type = ROC_NPC_ITEM_TYPE_END;\n \n+\treturn 0;\n+fail:\n+\treturn -EINVAL;\n+}\n+\n+static int\n+cnxk_map_flow_data(struct rte_eth_dev *eth_dev, const struct rte_flow_attr *attr,\n+\t\t const struct rte_flow_item pattern[], const struct rte_flow_action actions[],\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+\tint rc;\n+\n+\tin_attr->priority = attr->priority;\n+\tin_attr->ingress = attr->ingress;\n+\tin_attr->egress = attr->egress;\n+\tin_attr->transfer = attr->transfer;\n+\n+\trc = cnxk_map_pattern(eth_dev, pattern, in_pattern);\n+\tif (rc) {\n+\t\tplt_err(\"Failed to map pattern list\");\n+\t\treturn rc;\n+\t}\n+\n \treturn cnxk_map_actions(eth_dev, attr, actions, in_actions, flowkey_cfg, dst_pf_func);\n }\n \n", "prefixes": [ "9/9" ] }{ "id": 130180, "url": "