Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/90305/?format=api
https://patches.dpdk.org/api/patches/90305/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210401094739.22714-17-ndabilpuram@marvell.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20210401094739.22714-17-ndabilpuram@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210401094739.22714-17-ndabilpuram@marvell.com", "date": "2021-04-01T09:47:03", "name": "[v2,16/52] common/cnxk: add npa lf init/fini callback support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "9f0a9ea8577f00c6f9b0fd9d65a2b8fa0831d06d", "submitter": { "id": 1202, "url": "https://patches.dpdk.org/api/people/1202/?format=api", "name": "Nithin Dabilpuram", "email": "ndabilpuram@marvell.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210401094739.22714-17-ndabilpuram@marvell.com/mbox/", "series": [ { "id": 16050, "url": "https://patches.dpdk.org/api/series/16050/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16050", "date": "2021-04-01T09:46:47", "name": "Add Marvell CNXK common driver", "version": 2, "mbox": "https://patches.dpdk.org/series/16050/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/90305/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/90305/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 67B98A0548;\n\tThu, 1 Apr 2021 11:50:33 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E9A1E140E7D;\n\tThu, 1 Apr 2021 11:48:57 +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 06921140F3F\n for <dev@dpdk.org>; Thu, 1 Apr 2021 11:48:55 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 1319gOOY000731 for <dev@dpdk.org>; Thu, 1 Apr 2021 02:48:55 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 37n28jhw6m-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Thu, 01 Apr 2021 02:48:55 -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.2;\n Thu, 1 Apr 2021 02:48:53 -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.2 via Frontend\n Transport; Thu, 1 Apr 2021 02:48:53 -0700", "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id D2C663F7040;\n Thu, 1 Apr 2021 02:48:50 -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=YmbEUE2L9bsSgqQqAk2mAI6/QA5D7zs7arHSMunSQdk=;\n b=Ryi8hYeaGumQjdpXFtA183kr8mo1rG3LSuE/7eMTb8OCf0MVqKaDJB7gTUkFWqJ5mynQ\n +RnSYxywHo2avpOp2P829AM8lZwDxVi1nKrXpDMT9ORu+NxRP+85e3zMK2ndbrOsqBjD\n SnPVPkeGT+8p65wgc+3D4go5NfyQnHUwTkFkM5r8TjY/6dkR1dW4d5xBfzSF82oDelX3\n JV7siRPUPMsjW1aQjYZyVkR3dMdZO6XGuQHbK4SeycVhBEYExOSgCSFfE6xbEKCtxisJ\n YZjYcwdAwe2R2D8PiFH18SfRCYjlryv8BRY+eBLtbMTbRcmar2CNC2TPT+QxX+Q2fKqd Uw==", "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>", "To": "<dev@dpdk.org>", "CC": "<jerinj@marvell.com>, <skori@marvell.com>, <skoteshwar@marvell.com>,\n <pbhagavatula@marvell.com>, <kirankumark@marvell.com>,\n <psatheesh@marvell.com>, <asekhar@marvell.com>", "Date": "Thu, 1 Apr 2021 15:17:03 +0530", "Message-ID": "<20210401094739.22714-17-ndabilpuram@marvell.com>", "X-Mailer": "git-send-email 2.8.4", "In-Reply-To": "<20210401094739.22714-1-ndabilpuram@marvell.com>", "References": "<20210305133918.8005-1-ndabilpuram@marvell.com>\n <20210401094739.22714-1-ndabilpuram@marvell.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Proofpoint-GUID": "pkTEHiCiFvoVQ9YzLKbPq9WTcSVEwbZA", "X-Proofpoint-ORIG-GUID": "pkTEHiCiFvoVQ9YzLKbPq9WTcSVEwbZA", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761\n definitions=2021-04-01_04:2021-03-31,\n 2021-04-01 signatures=0", "Subject": "[dpdk-dev] [PATCH v2 16/52] common/cnxk: add npa lf init/fini\n callback support", "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: Ashwin Sekhar T K <asekhar@marvell.com>\n\nAdd support for npa lf init/fini callbacks.\n\nSigned-off-by: Ashwin Sekhar T K <asekhar@marvell.com>\n---\n drivers/common/cnxk/roc_npa.c | 27 +++++++++++++++++++++++++++\n drivers/common/cnxk/roc_npa.h | 8 ++++++++\n drivers/common/cnxk/version.map | 2 ++\n 3 files changed, 37 insertions(+)", "diff": "diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c\nindex f1e03b7..9528c85 100644\n--- a/drivers/common/cnxk/roc_npa.c\n+++ b/drivers/common/cnxk/roc_npa.c\n@@ -5,6 +5,21 @@\n #include \"roc_api.h\"\n #include \"roc_priv.h\"\n \n+static roc_npa_lf_init_cb_t npa_lf_init_cb;\n+static roc_npa_lf_fini_cb_t npa_lf_fini_cb;\n+\n+void\n+roc_npa_lf_init_cb_register(roc_npa_lf_init_cb_t cb)\n+{\n+\tnpa_lf_init_cb = cb;\n+}\n+\n+void\n+roc_npa_lf_fini_cb_register(roc_npa_lf_fini_cb_t cb)\n+{\n+\tnpa_lf_fini_cb = cb;\n+}\n+\n void\n roc_npa_aura_op_range_set(uint64_t aura_handle, uint64_t start_iova,\n \t\t\t uint64_t end_iova)\n@@ -717,11 +732,20 @@ npa_lf_init(struct dev *dev, struct plt_pci_device *pci_dev)\n \tif (rc)\n \t\tgoto npa_fini;\n \n+\tif (npa_lf_init_cb) {\n+\t\trc = npa_lf_init_cb();\n+\t\tif (rc)\n+\t\t\tgoto npa_irq_unregister;\n+\t}\n+\n \tplt_npa_dbg(\"npa=%p max_pools=%d pf_func=0x%x msix=0x%x\", lf,\n \t\t roc_idev_npa_maxpools_get(), lf->pf_func, npa_msixoff);\n \n \treturn 0;\n \n+npa_irq_unregister:\n+\tnpa_unregister_irqs(idev->npa);\n+\n npa_fini:\n \tnpa_dev_fini(idev->npa);\n npa_detach:\n@@ -750,6 +774,9 @@ npa_lf_fini(void)\n \trc |= npa_detach(idev->npa->mbox);\n \tidev_set_defaults(idev);\n \n+\tif (npa_lf_fini_cb)\n+\t\tnpa_lf_fini_cb();\n+\n \treturn rc;\n }\n \ndiff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h\nindex 89f5c6f..c857789 100644\n--- a/drivers/common/cnxk/roc_npa.h\n+++ b/drivers/common/cnxk/roc_npa.h\n@@ -16,6 +16,10 @@\n */\n #define ROC_CN9K_NPA_BULK_ALLOC_MAX_PTRS 30\n \n+/* Callbacks that are called after NPA lf init/fini respectively */\n+typedef int (*roc_npa_lf_init_cb_t)(void);\n+typedef void (*roc_npa_lf_fini_cb_t)(void);\n+\n /*\n * Generate 64bit handle to have optimized alloc and free aura operation.\n * 0 - ROC_AURA_ID_MASK for storing the aura_id.\n@@ -650,4 +654,8 @@ int __roc_api roc_npa_dump(void);\n /* Reset operation performance counter. */\n int __roc_api roc_npa_pool_op_pc_reset(uint64_t aura_handle);\n \n+/* Callback registration */\n+void __roc_api roc_npa_lf_init_cb_register(roc_npa_lf_init_cb_t cb);\n+void __roc_api roc_npa_lf_fini_cb_register(roc_npa_lf_fini_cb_t cb);\n+\n #endif /* _ROC_NPA_H_ */\ndiff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map\nindex 78e9686..c0f282d 100644\n--- a/drivers/common/cnxk/version.map\n+++ b/drivers/common/cnxk/version.map\n@@ -17,6 +17,8 @@ INTERNAL {\n \troc_npa_dev_fini;\n \troc_npa_dev_init;\n \troc_npa_dump;\n+\troc_npa_lf_fini_cb_register;\n+\troc_npa_lf_init_cb_register;\n \troc_npa_pool_create;\n \troc_npa_pool_destroy;\n \troc_npa_pool_op_pc_reset;\n", "prefixes": [ "v2", "16/52" ] }{ "id": 90305, "url": "