Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/130136/?format=api
http://patchwork.dpdk.org/api/patches/130136/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230811085805.441256-22-ndabilpuram@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": "<20230811085805.441256-22-ndabilpuram@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230811085805.441256-22-ndabilpuram@marvell.com", "date": "2023-08-11T08:57:56", "name": "[22/31] net/cnxk: add mapping of DMAC address indexes", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "8823fe1c205ce5ac889141b86384d9346b9bd6e7", "submitter": { "id": 1202, "url": "http://patchwork.dpdk.org/api/people/1202/?format=api", "name": "Nithin Dabilpuram", "email": "ndabilpuram@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/20230811085805.441256-22-ndabilpuram@marvell.com/mbox/", "series": [ { "id": 29177, "url": "http://patchwork.dpdk.org/api/series/29177/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29177", "date": "2023-08-11T08:57:35", "name": "[01/31] common/cnxk: add aura ref count mechanism", "version": 1, "mbox": "http://patchwork.dpdk.org/series/29177/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/130136/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/130136/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 57C6D43032;\n\tFri, 11 Aug 2023 11:00:23 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8844943273;\n\tFri, 11 Aug 2023 10:59:19 +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 325F543265\n for <dev@dpdk.org>; Fri, 11 Aug 2023 10:59:18 +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 37AN2Lhc011196 for <dev@dpdk.org>; Fri, 11 Aug 2023 01:59:17 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3sd8ya1gbj-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Fri, 11 Aug 2023 01:59:17 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Fri, 11 Aug 2023 01:59:15 -0700", "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; Fri, 11 Aug 2023 01:59:15 -0700", "from hyd1588t430.caveonetworks.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 647503F706C;\n Fri, 11 Aug 2023 01:59:13 -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-transfer-encoding : content-type; s=pfpt0220;\n bh=Bl5EUihgFJ6sSJVpzMeBCVRZYmLz4AK+L179F2wU0vk=;\n b=Q3C+eKvrG+OvxEkGU+iL03TeBty2vNBAE29KWaG9+7ZdiygJULJQLVg0zZ+jK8ET+2QR\n GCxVQDZEYa0JHWbnTmbIY4ru+LXFDMokQRNdzxI9wfmE2Q2qqQVWr35pFzkSaT8NBw6e\n Tb8Zxl5amvZhyYzaPpGOBRY3aBgrRxJaJ7g1gHx1jEEn0ccTWfFpnbKBsndawe5+JguN\n RoTgQoNg/FifA3fONgjFUOG4wSUA0sIosJJ4VsxTUbh+iPOEeSROfEPMOFV++a1fsJRg\n YdH9dvcQpmFZiXU0aTwLBH6WQ1reRjU35iflGPY40oi3n8d63QTFp3pyQMa6vMvxiqKb Gg==", "From": "Nithin Dabilpuram <ndabilpuram@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": "<jerinj@marvell.com>, <dev@dpdk.org>", "Subject": "[PATCH 22/31] net/cnxk: add mapping of DMAC address indexes", "Date": "Fri, 11 Aug 2023 14:27:56 +0530", "Message-ID": "<20230811085805.441256-22-ndabilpuram@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230811085805.441256-1-ndabilpuram@marvell.com>", "References": "<20230811085805.441256-1-ndabilpuram@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "J5w6g8jcy2UNmlQqhP2sKm5UgO36310A", "X-Proofpoint-GUID": "J5w6g8jcy2UNmlQqhP2sKm5UgO36310A", "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-10_20,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": "From: Sunil Kumar Kori <skori@marvell.com>\n\nAdd support to map DMAC address indexes during\nmac address add and remove operation.\n\nSigned-off-by: Sunil Kumar Kori <skori@marvell.com>\n---\n drivers/net/cnxk/cnxk_ethdev.c | 11 +++++++++++\n drivers/net/cnxk/cnxk_ethdev.h | 1 +\n drivers/net/cnxk/cnxk_ethdev_ops.c | 4 +++-\n 3 files changed, 15 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c\nindex 46450088eb..bd161ad375 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.c\n+++ b/drivers/net/cnxk/cnxk_ethdev.c\n@@ -1921,6 +1921,13 @@ cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)\n \t\tgoto dev_fini;\n \t}\n \n+\tdev->dmac_idx_map = rte_zmalloc(\"dmac_idx_map\", max_entries * sizeof(int), 0);\n+\tif (dev->dmac_idx_map == NULL) {\n+\t\tplt_err(\"Failed to allocate memory for dmac idx map\");\n+\t\trc = -ENOMEM;\n+\t\tgoto free_mac_addrs;\n+\t}\n+\n \tdev->max_mac_entries = max_entries;\n \tdev->dmac_filter_count = 1;\n \n@@ -1978,6 +1985,7 @@ cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)\n \n free_mac_addrs:\n \trte_free(eth_dev->data->mac_addrs);\n+\trte_free(dev->dmac_idx_map);\n dev_fini:\n \troc_nix_dev_fini(nix);\n error:\n@@ -2095,6 +2103,9 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset)\n \tif (rc)\n \t\tplt_err(\"Failed to free nix lf, rc=%d\", rc);\n \n+\trte_free(dev->dmac_idx_map);\n+\tdev->dmac_idx_map = NULL;\n+\n \trte_free(eth_dev->data->mac_addrs);\n \teth_dev->data->mac_addrs = NULL;\n \ndiff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h\nindex ed531fb277..8649f9e6f0 100644\n--- a/drivers/net/cnxk/cnxk_ethdev.h\n+++ b/drivers/net/cnxk/cnxk_ethdev.h\n@@ -329,6 +329,7 @@ struct cnxk_eth_dev {\n \tuint8_t dmac_filter_count;\n \tuint8_t max_mac_entries;\n \tbool dmac_filter_enable;\n+\tint *dmac_idx_map;\n \n \tuint16_t flags;\n \tuint8_t ptype_disable;\ndiff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c\nindex 3ade8eed36..5de2919047 100644\n--- a/drivers/net/cnxk/cnxk_ethdev_ops.c\n+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c\n@@ -474,6 +474,8 @@ cnxk_nix_mac_addr_add(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr,\n \t\treturn rc;\n \t}\n \n+\tdev->dmac_idx_map[index] = rc;\n+\n \t/* Enable promiscuous mode at NIX level */\n \troc_nix_npc_promisc_ena_dis(nix, true);\n \tdev->dmac_filter_enable = true;\n@@ -490,7 +492,7 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)\n \tstruct roc_nix *nix = &dev->nix;\n \tint rc;\n \n-\trc = roc_nix_mac_addr_del(nix, index);\n+\trc = roc_nix_mac_addr_del(nix, dev->dmac_idx_map[index]);\n \tif (rc)\n \t\tplt_err(\"Failed to delete mac address, rc=%d\", rc);\n \n", "prefixes": [ "22/31" ] }{ "id": 130136, "url": "