From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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); -- 2.25.1