From patchwork Mon Jul 26 13:58:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 96289 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 86E94A0C47; Mon, 26 Jul 2021 15:58:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 536B9410F1; Mon, 26 Jul 2021 15:58:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id EB844410F1 for ; Mon, 26 Jul 2021 15:58:43 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16QDuHB8006337; Mon, 26 Jul 2021 06:58:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=inTZjsa2KrqVbQ8CR5w7akkuleECRORRuUKDaZ5ulIQ=; b=SS+PnBgD3Uy21Uu1pZ0q4m7tDdk7X6nG8eOYQ9cEJLJcjzDD0+5Nkf2yH/JSl7LaZCTl pJi5Ym+rpscDwIhsZZjtXnE9g4GEupTWsU3SgNmimZI81jCcOBa6gapXzyVJ6CnnFsBc DyHApdd0QEuaaBRFWUrceiGiCAMNQjsCXquk6blxarskIHxPB6MCvs0/7O9rr5jL7VIk qx8HyYWnAZhBzyK2nly5rzVPv5qwO4mVto/GFiWJeVsqFnrVuSJR9UI4/xl03mClSExr kVeZm2dyGSgbG+Pmxw6vcwlwnyqgDRXe3tzDDXUaWtyjmBt4G9FZ4w1WnsvjdgcyjF9g Hw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3a1m961uqv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 06:58:43 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 26 Jul 2021 06:58:40 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 26 Jul 2021 06:58:40 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 6B1553F707B; Mon, 26 Jul 2021 06:58:38 -0700 (PDT) From: Tomasz Duszynski To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , , Tomasz Duszynski Date: Mon, 26 Jul 2021 08:58:10 -0500 Message-ID: <20210726135815.81201-2-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726135815.81201-1-tduszynski@marvell.com> References: <20210726135815.81201-1-tduszynski@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: jBD1Ng5990LcdJ-znR0EmpUBZ_u3hdVe X-Proofpoint-GUID: jBD1Ng5990LcdJ-znR0EmpUBZ_u3hdVe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-26_06:2021-07-26, 2021-07-26 signatures=0 Subject: [dpdk-dev] [PATCH 1/6] common/cnxk: return saner error codes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If particular LMAC does not exist then it's saner to return ENODEV instead of EINVAL. Signed-off-by: Tomasz Duszynski --- drivers/common/cnxk/roc_bphy_cgx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c index 9e53fe238e..7449cbe77a 100644 --- a/drivers/common/cnxk/roc_bphy_cgx.c +++ b/drivers/common/cnxk/roc_bphy_cgx.c @@ -406,7 +406,7 @@ roc_bphy_cgx_fec_set(struct roc_bphy_cgx *roc_cgx, unsigned int lmac, return -EINVAL; if (!roc_bphy_cgx_lmac_exists(roc_cgx, lmac)) - return -EINVAL; + return -ENODEV; scr1 = FIELD_PREP(SCR1_ETH_CMD_ID, ETH_CMD_SET_FEC) | FIELD_PREP(SCR1_ETH_SET_FEC_ARGS, fec); @@ -425,7 +425,7 @@ roc_bphy_cgx_fec_supported_get(struct roc_bphy_cgx *roc_cgx, unsigned int lmac, return -EINVAL; if (!roc_bphy_cgx_lmac_exists(roc_cgx, lmac)) - return -EINVAL; + return -ENODEV; scr1 = FIELD_PREP(SCR1_ETH_CMD_ID, ETH_CMD_GET_SUPPORTED_FEC); From patchwork Mon Jul 26 13:58:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 96290 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 06AACA0C47; Mon, 26 Jul 2021 15:58:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73111410FA; Mon, 26 Jul 2021 15:58:47 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 31FC5410FA for ; Mon, 26 Jul 2021 15:58:46 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16QDuGcS006252; Mon, 26 Jul 2021 06:58:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=KIbWUCgHAof0Hsk3AXxqnbvs+5qFdG6Y4PUiolemseg=; b=Q2N6i5VORJyv+y9tvoaWGc1q8Ec4D/yXp4DAmg8oXxKEpsWzA2063uH+4o+LCkc7oS1w H5bz0rw1mVE6xp8zO2SQsn+/7vu+HT4ug0QEgo0VpOSEds76sXvxaENKxO9U/nsZcx5z pqljxBSePrZbH7y93Bg54fy4I+1W6VDIIVNP3/IJB4u6+o8hTp4hU1lXlxYfTtnEDBLU JrI2ttcu8d5RGGE4GhjQGgqykOtxFbgBsQd/edBCCdhoiFWeZe9TO+FN8yoO/wFdx6X7 EFj5fjmgdlih1L1X1hWxyH7ihxxDj3lZuElaQvydHU2dDS7/19RfGQoRdimdA0yU21hV Gg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3a1m961ur1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 06:58:45 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 26 Jul 2021 06:58:43 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 26 Jul 2021 06:58:43 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 349133F7057; Mon, 26 Jul 2021 06:58:40 -0700 (PDT) From: Tomasz Duszynski To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , , Tomasz Duszynski Date: Mon, 26 Jul 2021 08:58:11 -0500 Message-ID: <20210726135815.81201-3-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726135815.81201-1-tduszynski@marvell.com> References: <20210726135815.81201-1-tduszynski@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: YU03m3ePtq8y-G1XwxnM4laHpvZvlRtL X-Proofpoint-GUID: YU03m3ePtq8y-G1XwxnM4laHpvZvlRtL X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-26_06:2021-07-26, 2021-07-26 signatures=0 Subject: [dpdk-dev] [PATCH 2/6] common/cnxk: remove duplicated constant X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Drop duplicated constant. Signed-off-by: Tomasz Duszynski --- drivers/common/cnxk/roc_bphy_cgx_priv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/common/cnxk/roc_bphy_cgx_priv.h b/drivers/common/cnxk/roc_bphy_cgx_priv.h index e45a13ef09..6a6b5a7b08 100644 --- a/drivers/common/cnxk/roc_bphy_cgx_priv.h +++ b/drivers/common/cnxk/roc_bphy_cgx_priv.h @@ -101,7 +101,6 @@ enum eth_cmd_own { #define SCR0_ETH_EVT_STS_S_ID GENMASK_ULL(8, 3) /* struct eth_lnk_sts_s */ -#define SCR0_ETH_LNK_STS_S_ERR_TYPE GENMASK_ULL(24, 15) #define SCR0_ETH_LNK_STS_S_LINK_UP BIT_ULL(9) #define SCR0_ETH_LNK_STS_S_FULL_DUPLEX BIT_ULL(10) #define SCR0_ETH_LNK_STS_S_SPEED GENMASK_ULL(14, 11) From patchwork Mon Jul 26 13:58:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 96291 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id B9952A0C47; Mon, 26 Jul 2021 15:59:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A123E410EF; Mon, 26 Jul 2021 15:58:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C4EC541101 for ; Mon, 26 Jul 2021 15:58:48 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16QDtQNX027434; Mon, 26 Jul 2021 06:58:48 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=SrmtzwtSZI+KN8IE0Zyn6STy2xX0swUZ2+J5PVqKR14=; b=ivhkT7epwBOHUpnS1fC6Tb6MvSMbIOjK3AI0MHkiP1d3Ns1UAAcCfsNcemhFQwMRwF1z W1GVCTxEsPBbA6+5sbWpTOEPUVZ1B9xEIB07BwEFoCUfyU8qbf1Zo39J5F9C2U559Bgp gghytzPabdCvV4A38XNXQ/IfIdKYozkvt8t1SkmmYE0J0g8pz/3zfr3a1S0PrTGxrtRg F0fLVb/+TlYAuBJkWOf6EZhwTL+M9KPCyGqEVZmPrM9ZhoFxxroWw6porvuFNgXLT1ZW T75Seydz716FJOACBRmewh0sNUzlBCUPVJiWBaZV3DXFb8SQ/td7r6v0gajUPBHzzfg8 XQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3a1v51gept-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 06:58:47 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 26 Jul 2021 06:58:46 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 26 Jul 2021 06:58:46 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 00CDD3F706F; Mon, 26 Jul 2021 06:58:43 -0700 (PDT) From: Tomasz Duszynski To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Jakub Palider , "Tomasz Duszynski" CC: , Date: Mon, 26 Jul 2021 08:58:12 -0500 Message-ID: <20210726135815.81201-4-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726135815.81201-1-tduszynski@marvell.com> References: <20210726135815.81201-1-tduszynski@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: rImzpqi5ten0bgdlSqPuwHNJxCGzmWh1 X-Proofpoint-ORIG-GUID: rImzpqi5ten0bgdlSqPuwHNJxCGzmWh1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-26_06:2021-07-26, 2021-07-26 signatures=0 Subject: [dpdk-dev] [PATCH 3/6] raw/cnxk_bphy: don't include irq header directly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" One should only use roc_api.h which exports all internal headers. Signed-off-by: Tomasz Duszynski --- drivers/common/cnxk/roc_bphy.h | 1 + drivers/raw/cnxk_bphy/cnxk_bphy.c | 1 - drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/common/cnxk/roc_bphy.h b/drivers/common/cnxk/roc_bphy.h index 0579c6c443..ea3124c6aa 100644 --- a/drivers/common/cnxk/roc_bphy.h +++ b/drivers/common/cnxk/roc_bphy.h @@ -6,6 +6,7 @@ #define _ROC_BPHY_ #include "roc_api.h" +#include "roc_bphy_irq.h" struct roc_bphy { struct plt_pci_device *pci_dev; diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c index 9cb3f8d332..affc5c3e83 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c @@ -11,7 +11,6 @@ #include #include -#include #include "cnxk_bphy_irq.h" #include "rte_pmd_bphy.h" diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c index bbcc285a7a..ac1d51777b 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c @@ -7,7 +7,6 @@ #include #include -#include #include "cnxk_bphy_irq.h" From patchwork Mon Jul 26 13:58:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 96292 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 607ADA0C47; Mon, 26 Jul 2021 15:59:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DEBD5410EE; Mon, 26 Jul 2021 15:58:55 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1D6D1410F6 for ; Mon, 26 Jul 2021 15:58:54 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16QDuH1m006314; Mon, 26 Jul 2021 06:58:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=+C8IInlZIH8FbCUNP5yguvrjrUTpNrrF8siicNNqgIs=; b=VXUIvx1cLG9VePeOpDkS4kDSHipSw5YF31Hq/ObvOMXAOelxxC4TQxvvNuITMjKlXWVl Or7dCtOnptYZEVOaUfq695uHDS1iPw31tseG9phhUdBPH4qQIqWiYl9xK8NLM1qV5iUn tPwAhYR32kquxUR0HyzCHwHOBbqutPTtCWFHfftXcvRR6DCIWPO3eE9OKjrEVxQZM83f HtrsxElT3f8+u5HkBLwbMC7zkY3x/B09FVwTeW4pfXjfqX9BO2PvM71TvLVmQSqx42mC oe3VngU3vOszbVwoXRwfIqbrOJlIif+cX8ZyDV+IaeuqrBs5oEsh54EZ+Bwr6Q2sgPHh ng== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3a1m961ura-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 06:58:51 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 26 Jul 2021 06:58:49 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 26 Jul 2021 06:58:49 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 218813F7057; Mon, 26 Jul 2021 06:58:46 -0700 (PDT) From: Tomasz Duszynski To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Ray Kinsella CC: , , Jakub Palider Date: Mon, 26 Jul 2021 08:58:13 -0500 Message-ID: <20210726135815.81201-5-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726135815.81201-1-tduszynski@marvell.com> References: <20210726135815.81201-1-tduszynski@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: LI4dVkuKJWKogk8FxGXLQqkZgsFBgpXB X-Proofpoint-GUID: LI4dVkuKJWKogk8FxGXLQqkZgsFBgpXB X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-26_06:2021-07-26, 2021-07-26 signatures=0 Subject: [dpdk-dev] [PATCH 4/6] common/cnxk: reduce function visibility X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jakub Palider Some functions are not used outside of local ROC scope. These need updating classifiers and removal from header. Signed-off-by: Jakub Palider --- drivers/common/cnxk/roc_bphy_irq.c | 6 +++--- drivers/common/cnxk/roc_bphy_irq.h | 6 ------ drivers/common/cnxk/version.map | 3 --- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c index 882066ef3f..be3c4054af 100644 --- a/drivers/common/cnxk/roc_bphy_irq.c +++ b/drivers/common/cnxk/roc_bphy_irq.c @@ -123,7 +123,7 @@ roc_bphy_intr_fini(struct roc_bphy_irq_chip *irq_chip) plt_free(irq_chip); } -void +static void roc_bphy_irq_stack_remove(int cpu) { struct roc_bphy_irq_stack *curr_stack; @@ -153,7 +153,7 @@ roc_bphy_irq_stack_remove(int cpu) pthread_mutex_unlock(&stacks_mutex); } -void * +static void * roc_bphy_irq_stack_get(int cpu) { #define ARM_STACK_ALIGNMENT (2 * sizeof(void *)) @@ -221,7 +221,7 @@ roc_bphy_intr_handler(unsigned int irq_num) roc_atf_ret(); } -int +static int roc_bphy_irq_handler_set(struct roc_bphy_irq_chip *chip, int irq_num, void (*isr)(int irq_num, void *isr_data), void *isr_data) diff --git a/drivers/common/cnxk/roc_bphy_irq.h b/drivers/common/cnxk/roc_bphy_irq.h index 19ec5fdc4d..0d1335b201 100644 --- a/drivers/common/cnxk/roc_bphy_irq.h +++ b/drivers/common/cnxk/roc_bphy_irq.h @@ -32,13 +32,7 @@ struct roc_bphy_intr { __roc_api struct roc_bphy_irq_chip *roc_bphy_intr_init(void); __roc_api void roc_bphy_intr_fini(struct roc_bphy_irq_chip *irq_chip); -__roc_api void roc_bphy_irq_stack_remove(int cpu); -__roc_api void *roc_bphy_irq_stack_get(int cpu); __roc_api void roc_bphy_intr_handler(unsigned int irq_num); -__roc_api int -roc_bphy_irq_handler_set(struct roc_bphy_irq_chip *chip, int irq_num, - void (*handler)(int irq_num, void *isr_data), - void *isr_data); __roc_api bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip, int irq_num); __roc_api int roc_bphy_handler_clear(struct roc_bphy_irq_chip *chip, diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map index 2cbcc4b93a..7dfc6d8a27 100644 --- a/drivers/common/cnxk/version.map +++ b/drivers/common/cnxk/version.map @@ -43,9 +43,6 @@ INTERNAL { roc_bphy_intr_handler; roc_bphy_intr_init; roc_bphy_intr_register; - roc_bphy_irq_handler_set; - roc_bphy_irq_stack_get; - roc_bphy_irq_stack_remove; roc_clk_freq_get; roc_cpt_afs_print; roc_cpt_dev_clear; From patchwork Mon Jul 26 13:58:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 96293 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 65D69A0C47; Mon, 26 Jul 2021 15:59:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DDDF41120; Mon, 26 Jul 2021 15:58:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 3DD7041120 for ; Mon, 26 Jul 2021 15:58:57 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16QDuH4x006326; Mon, 26 Jul 2021 06:58:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=8DvlzZI39PXll1CMzzyDpI5PoEZhclO5y+nlm9iTKDA=; b=gRdV/Hn/Kp/vD4erfTFipSlJdY1ll7osWynZnJFNiUp2iBvFrwqbyjL5D+jQcRap7m55 IGJcDWtePthlb22/ZEAtwp1mmPECAsbnXE8yVZn3RoAJ4oSNEe/0j2s0+KUOOGROofE+ ArFZKmDKxZ0j4sohLrAXYDBjUrAI42MyenBFHC0qcRkr8RKtwNueA7Jk98943JYXCqjO gSFnC64dtI6xaAynqmlMPh2HifMGctbBpG9xh+pYASe7H4SeeoS2b2+L51A9guMu0JEo 2AmWMiE92YPUfIl/YtOfyYdYHc4uDjm6xEhZt/Fy3UxSPWIrSHvvk6wiMu410FlsAt7X ag== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3a1m961urd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 06:58:54 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 26 Jul 2021 06:58:52 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 26 Jul 2021 06:58:52 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 2A5DD3F707B; Mon, 26 Jul 2021 06:58:49 -0700 (PDT) From: Tomasz Duszynski To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Ray Kinsella , Jakub Palider , Tomasz Duszynski CC: , Date: Mon, 26 Jul 2021 08:58:14 -0500 Message-ID: <20210726135815.81201-6-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726135815.81201-1-tduszynski@marvell.com> References: <20210726135815.81201-1-tduszynski@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: Q7RrkMgcrJT3koyWpty-4o78olR7b2pH X-Proofpoint-GUID: Q7RrkMgcrJT3koyWpty-4o78olR7b2pH X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-26_06:2021-07-26, 2021-07-26 signatures=0 Subject: [dpdk-dev] [PATCH 5/6] common/cnxk: align function naming X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jakub Palider There is an inconsistency in naming interrupt control functions. This patch aligns names accordingly. Signed-off-by: Jakub Palider --- drivers/common/cnxk/roc_bphy_irq.c | 2 +- drivers/common/cnxk/roc_bphy_irq.h | 3 +-- drivers/common/cnxk/version.map | 2 +- drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c index be3c4054af..53eb89c2f1 100644 --- a/drivers/common/cnxk/roc_bphy_irq.c +++ b/drivers/common/cnxk/roc_bphy_irq.c @@ -319,7 +319,7 @@ roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip, int irq_num) } int -roc_bphy_handler_clear(struct roc_bphy_irq_chip *chip, int irq_num) +roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num) { roc_cpuset_t orig_cpuset, intr_cpuset; const struct plt_memzone *mz; diff --git a/drivers/common/cnxk/roc_bphy_irq.h b/drivers/common/cnxk/roc_bphy_irq.h index 0d1335b201..185b6354a5 100644 --- a/drivers/common/cnxk/roc_bphy_irq.h +++ b/drivers/common/cnxk/roc_bphy_irq.h @@ -35,8 +35,7 @@ __roc_api void roc_bphy_intr_fini(struct roc_bphy_irq_chip *irq_chip); __roc_api void roc_bphy_intr_handler(unsigned int irq_num); __roc_api bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip, int irq_num); -__roc_api int roc_bphy_handler_clear(struct roc_bphy_irq_chip *chip, - int irq_num); +__roc_api int roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num); __roc_api int roc_bphy_intr_register(struct roc_bphy_irq_chip *irq_chip, struct roc_bphy_intr *intr); diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map index 7dfc6d8a27..afd78f72f4 100644 --- a/drivers/common/cnxk/version.map +++ b/drivers/common/cnxk/version.map @@ -37,8 +37,8 @@ INTERNAL { roc_bphy_cgx_stop_rxtx; roc_bphy_dev_fini; roc_bphy_dev_init; - roc_bphy_handler_clear; roc_bphy_intr_available; + roc_bphy_intr_clear; roc_bphy_intr_fini; roc_bphy_intr_handler; roc_bphy_intr_init; diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c index ac1d51777b..1fb3bf786b 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c @@ -85,7 +85,7 @@ cnxk_bphy_intr_unregister(uint16_t dev_id, int irq_num) struct bphy_device *bphy_dev = cnxk_bphy_get_bphy_dev_by_dev_id(dev_id); if (bphy_dev->irq_chip) - roc_bphy_handler_clear(bphy_dev->irq_chip, irq_num); + roc_bphy_intr_clear(bphy_dev->irq_chip, irq_num); else plt_err("Missing irq chip"); } From patchwork Mon Jul 26 13:58:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 96294 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id C9B93A0C47; Mon, 26 Jul 2021 15:59:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47CA841125; Mon, 26 Jul 2021 15:59:00 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 8DC124111D for ; Mon, 26 Jul 2021 15:58:57 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16QDuHti006331; Mon, 26 Jul 2021 06:58:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=4S0kPEjh7n9z2jeciPZGWJpDq/q4I/rTDXyukUkUsf8=; b=MbTVSKMzanX9PSp43rb3lPrgtwgicLhqKAm1qZTYhufth7xYxSA2l1a5rJFIf9H9AbwV v3VkMtTyCybdSY6bFpva4svt3li9bvgmBjhIkP4SNegp47mON/bkzg2OdEF2Wgwdx9Qi 9BTqRrBvJ5Z8hcdUDzeplo486IiZ+4i/tmU2qcNsObgkWHvsXLI622tYJaF86iQ4hqK5 M7HtBFLKOIV9Hp66BllMt9htpemGYbbu8yZWnDEdEGOFiIdraEcHoLzqVkDmpylrkRcS BPWvDLG+QWFMWoZjAOVzUGJjyUt8N17WuhiR4Uwl3TX/Ce7BpTAjqswlgySZY/pIzAb4 Vg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3a1m961urf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 06:58:56 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 26 Jul 2021 06:58:54 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 26 Jul 2021 06:58:54 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 6F8DC5E686B; Mon, 26 Jul 2021 06:58:53 -0700 (PDT) From: Tomasz Duszynski To: , Jakub Palider , Tomasz Duszynski CC: , Date: Mon, 26 Jul 2021 08:58:15 -0500 Message-ID: <20210726135815.81201-7-tduszynski@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726135815.81201-1-tduszynski@marvell.com> References: <20210726135815.81201-1-tduszynski@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: XWBGFVFdEmDj-3CZ-3Ge0npwxf8uTBo6 X-Proofpoint-GUID: XWBGFVFdEmDj-3CZ-3Ge0npwxf8uTBo6 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-26_06:2021-07-26, 2021-07-26 signatures=0 Subject: [dpdk-dev] [PATCH 6/6] raw/cnxk_bphy: use named value for queue count X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jakub Palider Queue counter is used in a few places so it was given some reasonable name. Signed-off-by: Jakub Palider --- drivers/raw/cnxk_bphy/cnxk_bphy.c | 2 ++ drivers/raw/cnxk_bphy/cnxk_bphy_irq.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c index affc5c3e83..030beff05e 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c @@ -51,6 +51,8 @@ bphy_rawdev_selftest(uint16_t dev_id) queues = rte_rawdev_queue_count(dev_id); if (queues == 0) return -ENODEV; + if (queues != BPHY_QUEUE_CNT) + return -EINVAL; ret = rte_rawdev_start(dev_id); if (ret) diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h index b55147b93e..f141677e2a 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.h @@ -23,10 +23,11 @@ struct bphy_irq_queue { }; struct bphy_device { +#define BPHY_QUEUE_CNT 1 struct roc_bphy_irq_chip *irq_chip; struct bphy_mem mem; /* bphy irq interface supports single queue only */ - struct bphy_irq_queue queues[1]; + struct bphy_irq_queue queues[BPHY_QUEUE_CNT]; }; int cnxk_bphy_intr_init(uint16_t dev_id);