From patchwork Wed Oct 4 12:27:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerin Jacob Kollanukkaran X-Patchwork-Id: 132303 X-Patchwork-Delegate: thomas@monjalon.net 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 1E90A426B6; Wed, 4 Oct 2023 14:28:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0879940695; Wed, 4 Oct 2023 14:28:15 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D881F402CE for ; Wed, 4 Oct 2023 14:28:12 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3945rGHw018975; Wed, 4 Oct 2023 05:28:12 -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=lhLiUHbED4TXG1ufEuUXkepV0HRWvyqRiU5rc2sDl4o=; b=L0jXBo/X8qh9rvOtkBd1xibatHwjRsxbjuN0ZqpugORWebzfazqp2SuJtAA7V5y/b/i6 4P3n1hPbTyJ2kcSeZtSbO9t+ZjkpeZ06W+24EwdbhlQB5mU10/4hFeRSbwC+qPeXeUbj x66Jvmde79q/IHfe2T/26j4IwgrbIv+dokOigeCywJRceb30Lhy3hEFM6h8hqwFZbP8w XYMfK/lsOB6A4CkHhijJXBijAvuk54G1cDrrD0aRrl40yGRvd/FhMbV6vnjTRcRtJqrK ywmwrWs4QcGKLhxCFtL3yUq/fGIL2qaBY9/ywG60HCzIqJupMzwxkg0wcVzlA81M2z6i LA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3th29uh383-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 04 Oct 2023 05:28:11 -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.48; Wed, 4 Oct 2023 05:28:09 -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.48 via Frontend Transport; Wed, 4 Oct 2023 05:28:09 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 2FAFD3F7044; Wed, 4 Oct 2023 05:28:03 -0700 (PDT) From: To: Thomas Monjalon CC: , , Jerin Jacob Subject: [dpdk-dev] [PATCH 2/2] devtools: forbid rte symbols in cnxk base driver Date: Wed, 4 Oct 2023 17:57:53 +0530 Message-ID: <20231004122753.3261337-2-jerinj@marvell.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231004122753.3261337-1-jerinj@marvell.com> References: <20231004122753.3261337-1-jerinj@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: InsWxb9bEO4WGb0j9M_WtbTm5JFaZ7M9 X-Proofpoint-ORIG-GUID: InsWxb9bEO4WGb0j9M_WtbTm5JFaZ7M9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-04_04,2023-10-02_01,2023-05-22_02 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 From: Jerin Jacob cnxk base code is shared between different driver environments. Forbid the direct usage of rte_ symbols instead use plt_ symbol as alternatives. roc_platform.[ch] files abstract the difference of driver environment, hence skip those files for rules check. Suggested-by: David Marchand Signed-off-by: Jerin Jacob --- devtools/checkpatches.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 2635923e14..8baa4e9a04 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -223,6 +223,15 @@ check_forbidden_additions() { # -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # forbid using rte_ symbols in cnxk driver base code + awk -v FOLDERS='drivers/common/cnxk/roc_*' \ + -v SKIP_FILES='roc_platform*' \ + -v EXPRESSIONS="rte_ RTE_" \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Use plt_ symbols instead of rte_ symbols in cnxk driver base code' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + return $res }