From patchwork Mon May 6 15:18:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13655637 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF42015531A for ; Mon, 6 May 2024 15:18:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715008737; cv=fail; b=eWg3dOlDeNuLEz0iypKn1WFzzhqQx27SJ69ytOs4mhQgZJSGPe+gbKbwYk9wDgvz7HKthI1Xl4vR/yxlxJguC0IXhUnCpS13R/TMPtkHikaGgS6b76T4aW9t1x2b36ctIpjzKgP4t2/33hRKqFuJHJ51APzHcqHI+EcG18/a0GE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715008737; c=relaxed/simple; bh=XfLMTSFaEZHpScrTIjKLopuqKnNBjYC2ba4WBxzAPtA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=iUQqpLXiwZmCqWIwYWusbT+iwI+k060Qq1OG3UglYtoZy8c3I4hdeh7pSu87IrKtYWpt6lsa+31YNZeMw3jwLm40QFAbw+ssYS01Pfs2LlDL2vkL9v9nNno3TTOw+XZlrJqaq4eujP7Ni0Ie2Qf0UMjvn7fCNNuhEMhNZ25UvNc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=OxSKW8Z6; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=f2mIiHqm; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="OxSKW8Z6"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="f2mIiHqm" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 446An4ct027858; Mon, 6 May 2024 15:18:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=hKw8TUZgiF/0XcRjt0vzw+7ZblVxrOR0/n9Lxo8Wg+8=; b=OxSKW8Z6zf0fAfqTwWKY8ROEQydHhhpmZxLc8fHYjoTzpsOoPQs0QxKDttXK8GbgZ/OL YziSLHIepSINk1IPWngeDShroDuAR2D71yRLP8BTC1SVUvjptTMQ1X0kzzIjb0CdR6At 1jpM7sD2gBsV2+lW+QclBfVdeThNLPp+N+2wgrCxskQ4MkQVUtiwpepDew4LKnzEuqNW EgvnQrs7CO5Jig8Xw8SVZ7ZgwAesA58oVOviKKPrz3cEGPkhecE/UwEc0DDCTQs20EcZ CnIu8fPMol7fOR26Ht3gjUU/iE50UhaP6O1LbWPhTywbYd2ElpnfeMyLDBdeZMF6EyFh 4w== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xwd2dtu9a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 May 2024 15:18:54 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 446ERLW3029320; Mon, 6 May 2024 15:18:53 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3xwbfc0dg9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 May 2024 15:18:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iXv+aR6LGtrHh4TKqc15vAzT06Pij4mf4349PMmQV/aGOVmPd+IJ52zTNWEUFOylEEf9EZC8sh/yjXx8s1DBc9uFg+YqOgBXXam1thenUcMJ3R5iVcxNjKrXc34wZ4y1D+l6OX+EdGWdLed4hPyo8WQnUzXsMwoYJ1ucFl4Ev6tv2bkQaw7IVJko3I8LdJ/RqH1ibzNhAWmvhO7Sl8sGMDqfVHjzO9vuYpYOuFFoX4bfTDK+EIarfeZytcdNVBJGP6lT7k3EDLr4QwZHSMi3nCGFUPO7/nniZ83MVMHNWTxH/ccQX216hJ8hRZSX8kqVvkkDRhBHDpZoFTJe7qCtJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hKw8TUZgiF/0XcRjt0vzw+7ZblVxrOR0/n9Lxo8Wg+8=; b=ceJ/5rsM8DePV6d/tJQA9Tnmmyes5Bu/uBkdqEiCk6YqmAlbaRJsAVayb47uSKvgr9XK9YaRZqgs1BG8aJpGlTr8jpz8GkW2K2VgHuago0RNksbbomUAgNpXzX1CXOdfSl6GyhMxDCQsDfCLM6tGUX/IJG30mlPndKdF6ST8i/BsAu1IAmziCksHnLEXfbXZLwZ+Jlm6jPdNnS1z5dBRDAmWrBnhWcr6CNGqgXuw7uLbNoyWOf69rAdnLgDDgk04RRcWj90NMj4L+ZdEpPOihEqnyVFdExupuGBdVsg5oEYZ/47LSwDDHfxe8wlcJXA0WFST0l00XNMRpdAI/hs7VQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hKw8TUZgiF/0XcRjt0vzw+7ZblVxrOR0/n9Lxo8Wg+8=; b=f2mIiHqmaZcMox62uF9yEyLyx9pAQs8ZIvporHSV5AuS9W5Q697ix0pUpy/1n6HZMqqZ+sSR0mU3op0poaIyk1HCUfrvHgcJrADenSDwikoPZlmrjGYZolaSL/NwEgtpWNcuAglVXBnFDFufMjIQSYsHiQuSwVUzJfu4ynK/xGQ= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by PH8PR10MB6410.namprd10.prod.outlook.com (2603:10b6:510:1c5::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 15:18:51 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::1e11:7917:d2c:e44c]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::1e11:7917:d2c:e44c%4]) with mapi id 15.20.7544.041; Mon, 6 May 2024 15:18:51 +0000 From: Cupertino Miranda To: bpf@vger.kernel.org Cc: Cupertino Miranda , Alexei Starovoitov , Andrii Nakryiko , Eduard Zingerman , Yonghong Song , David Faust , Jose Marchesi , Elena Zannoni Subject: [PATCH bpf-next 1/2] selftests/bpf: Add CFLAGS per source file and runner Date: Mon, 6 May 2024 16:18:28 +0100 Message-Id: <20240506151829.186607-2-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240506151829.186607-1-cupertino.miranda@oracle.com> References: <20240506151829.186607-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: LO4P265CA0121.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c6::9) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|PH8PR10MB6410:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f751247-2948-4940-5437-08dc6ddfd598 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|376005; X-Microsoft-Antispam-Message-Info: yL7vgjrytt3r8sLI1ZwoOthtOus0vkguy6ZiwnqwcQXFLi0FoTf6ANfAJZqx/w2zj36cjuz8r8Kk8UmWZjz3eqcN0FvqbE4SkNCoq3csRQ5HRLjsNqa3uJzaEuZgpNfcNvRuupQDKwn2iCiA1HtAneiBJ/KHbP/7nXpQKerPYfOfVDTCakIFLRh0dj+jH9zXjIB5FnHUrRuRgKemvmKHqplZYNA0y3aUIgZy+4EmAnCQSn2DZinbUliia1Aa6jx5VFkzuhg2WoiOcARsasVsSuzrtbWE55Xm+Zpnd/TCQR36jD3uUCBGHJqnJ35ouGHkY3aWIRsfGVIMvxXuxYHLoMEjHYmr1q/Se7RKErhLRGzKufwkXBaK8VsBvxh6ftsYibr8hDGzvMKwCImJwtksXUqgzJstCSQnbiXixmG7TEsLsZK8spG+DYQjQqZOneDphJxzPMTPlUjt++YSS8QdfEgHQuh45rCyEkihoozS4SFSDq+evF3O37vAtTQp6acxRcdR6wGcSCSL04myhxE6HkYMgPN6+TDGLvHufU2ka1S7yJwRUYm2rZS6nQbNdd4d89FoEoHAAdwCLcjwLjftVBm8jqUXevULc8m5OuassiKT5HeQ0Eu5g9Y7VmnxdDDaZ8ssD3knHarBh3zdbA32YD5PmvGNlzIvG3FtwECisLgoY3GP/03oDgkNNFoAa4agHjtwKGCezqnsg2tKF7TGd1GloNjRwdp5Lgpc2jMvPQZ1PrOQEYjgJDYhzfcrZppWDiLSymUY5JbcpTgkhLyYSomjoZfUHJmTk+7DbM5mMvBuc3C7btEmVTgk1ipq+Cwo4BcR4eLDP5WolpGWaK+g7r3buFP7+3fxt8R9HE9ehtyVJy/9Fi2VnSQ+qhJfZpWxyEZcNbH0CbmVU1GD9PuSl9F3hcCcPTaOdtQzDAyVyFAQtkUUQuXEWAkQkuTNNLMcV+I8MLjKBBK79SWA19xUnZkXZUSy5QcmktJwAmme+FeZllsHS76HxJkE625X0rI5GK3tbCEFPdxerD/BsbWXbXKmX1nDEAQnmktof0LhEK7x5YVcH7SUFX3fkVAcXONxJa8NcT26dLgIX0gs9PJpCuSF31kX/BZzavYTDPAivZ8nXVVAco86sgLcbL2x770SXBNiRjPOt72T9IV2C+Wr/quVtCqGdQ6an/kyVPrZZgbEVVzL+Lrc1IPO0A4KehCS3CBkgj4S4A11DvhbZOJZuGG1CmTDSa+YNBvCoGT4snJ6a3q9UEcbGOhOwa4bNIhUlPYFv0moGA6y7EE3tMhDMw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR10MB4382.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange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rvxq8vOragUWd0SaeAwA69wCk2gE2QRbvE664tdYYD4PI/o0/pbdXuM2g8YS21p6gqxSluURitRn65otNWYN9z8aSDEjApJCAOMKdOqLuW9uzmNysKjnNLzggbeXJVKJ9wFkUaYSdkKdQVH58KN3Y4T+XCMP6rERLMfwbRc7EBU9ZE2oCQ14Ba/vE7XbRznDfRMTCi2KPrcXwXNkD09+VJlqemdrjeRSgII/8PMjxTsV8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f751247-2948-4940-5437-08dc6ddfd598 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 15:18:51.1323 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HjgzrH24O6RmWUZ3fvZ92UA2pxdnjXSHmjyX/3Ae3SLl5QXILdIHYrQJ+wTq7p0S9aKULTMY4lB5MsoFE+EmVROchmGF/lL8NEc+SfrZgq4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR10MB6410 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_09,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 mlxlogscore=999 adultscore=0 spamscore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405060106 X-Proofpoint-GUID: t92QpJK2l_-48gBg9l_Njb2-SAs2ozRX X-Proofpoint-ORIG-GUID: t92QpJK2l_-48gBg9l_Njb2-SAs2ozRX X-Patchwork-Delegate: bpf@iogearbox.net This patch adds support to specify CFLAGS per source file and per test runner. Signed-off-by: Cupertino Miranda Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Eduard Zingerman Cc: Yonghong Song Cc: David Faust Cc: Jose Marchesi Cc: Elena Zannoni Acked-by: Yonghong Song --- tools/testing/selftests/bpf/Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index ba28d42b74db..e506a5948cc2 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -81,11 +81,11 @@ TEST_INST_SUBDIRS += bpf_gcc # The following tests contain C code that, although technically legal, # triggers GCC warnings that cannot be disabled: declaration of # anonymous struct types in function parameter lists. -progs/btf_dump_test_case_bitfields.c-CFLAGS := -Wno-error -progs/btf_dump_test_case_namespacing.c-CFLAGS := -Wno-error -progs/btf_dump_test_case_packing.c-CFLAGS := -Wno-error -progs/btf_dump_test_case_padding.c-CFLAGS := -Wno-error -progs/btf_dump_test_case_syntax.c-CFLAGS := -Wno-error +progs/btf_dump_test_case_bitfields.c-bpf_gcc-CFLAGS := -Wno-error +progs/btf_dump_test_case_namespacing.c-bpf_gcc-CFLAGS := -Wno-error +progs/btf_dump_test_case_packing.c-bpf_gcc-CFLAGS := -Wno-error +progs/btf_dump_test_case_padding.c-bpf_gcc-CFLAGS := -Wno-error +progs/btf_dump_test_case_syntax.c-bpf_gcc-CFLAGS := -Wno-error endif ifneq ($(CLANG_CPUV4),) @@ -498,7 +498,7 @@ endef # Using TRUNNER_XXX variables, provided by callers of DEFINE_TEST_RUNNER and # set up by DEFINE_TEST_RUNNER itself, create test runner build rules with: # $1 - test runner base binary name (e.g., test_progs) -# $2 - test runner extra "flavor" (e.g., no_alu32, cpuv4, gcc-bpf, etc) +# $2 - test runner extra "flavor" (e.g., no_alu32, cpuv4, bpf_gcc, etc) define DEFINE_TEST_RUNNER_RULES ifeq ($($(TRUNNER_OUTPUT)-dir),) @@ -521,7 +521,8 @@ $(TRUNNER_BPF_OBJS): $(TRUNNER_OUTPUT)/%.bpf.o: \ | $(TRUNNER_OUTPUT) $$(BPFOBJ) $$(call $(TRUNNER_BPF_BUILD_RULE),$$<,$$@, \ $(TRUNNER_BPF_CFLAGS) \ - $$($$<-CFLAGS)) + $$($$<-CFLAGS) \ + $$($$<-$2-CFLAGS)) $(TRUNNER_BPF_SKELS): %.skel.h: %.bpf.o $(BPFTOOL) | $(TRUNNER_OUTPUT) $$(call msg,GEN-SKEL,$(TRUNNER_BINARY),$$@) From patchwork Mon May 6 15:18:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13655638 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D5981552ED for ; Mon, 6 May 2024 15:19:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715008744; cv=fail; b=gsTcmu4TRUsHFUev7e8ZFymCBvjkPzlKREiwr5ecvVHPlmkp2byUoCTcur5OgRpHnPoGYuF8C8YvR3shm0NO/RHX++wtMGo8aLZMdKqqH3N9LkYR6855UwjddjZuvCiLWdPUr1UGYKlx8Ak5y4pv/YAE4yI+V6qW4g1K5gHXrRk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715008744; c=relaxed/simple; bh=cGW7AQqURRTMu0+Qwla9phQ9EVlI6Sw4qSGHYYXd8uQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ZWSR0/dOGaLD3NcwFoUuevdAvH/Jad5oB3xMtdQ3LKftqTAuUKNrU5dk4cNutzeeO++kjse0Z4j0FhzTNovRjO8ZuELYXOufIib3bY/IrWyrKQYgdWZFl18OkZh5i7AvwY/03AlQzx4sFQ2yWELt67djy+EP1sxu8+REq7Z5bBo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=hKnt+VIq; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=yzcfuOsF; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="hKnt+VIq"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="yzcfuOsF" Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 446An54d009283; Mon, 6 May 2024 15:19:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=c2E71BJbuv5p6mFx4wRMMU09muUWSbM5A9AGJ8GQqiQ=; b=hKnt+VIq6+0oRFUhXmZJl+tRMzLv3SbwtGIfghviHJvgLf5ZI+zBPHXxdHR/v6FHYXYZ TOUfPe3K+4+HyL7XhlQNj65BUgbyW6YZ9yw30z167Vub6jkGwE/JzeCQaXiI5pBhPtJb 9YMUhuTAVl2W0RAsSTpc59prylbbd6rjh5/CVONIrzNZQ2zyjVK4iAq/UJ4q0u36NLvW sWKt9uSoYapjFQUrIiO+8X9WrZpMo/TDxhbKq6b6N3B5++PQfuTifI/WWw5jVuhpC3kt ySVBQOKRtVfAWuNypJCuDJDdzlz7Ha2Hfa2O3HHoQe1jYAv6iu++QADGYT4f2qyAHEPD Lw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xwbeetufm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 May 2024 15:19:01 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 446EAE63006969; Mon, 6 May 2024 15:19:00 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xwbf6seg0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 May 2024 15:19:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Be9RpkzijSwx9P5/Af+X0OXEFLVMPbmNKkZJLTi7DNplh9nrX5mkMYfciwMTOz8C4oGdi2jV5r0JQbKiQTSapCJD5BnPH9/0Bczrn2DFc+Ans/v/1xkesTncATTE8BRivaJGMgVKUFnJG6hqn++AQc2l1CirHDqDw9gWkomVn3V/e1UgkQGDdkxvYNf2dApOWKvPIo9mBlhG7J8jtSOZjijWvdpInmtTcs3BCfCSkPSLJqKjNZYIqu2BYGWqKL8msRwvVdj6U6IllWwyzWYW+5X59Tjuv3DeMyVBYY3oN8Pd8q7eq3qlOz/OOrN6u53evRm8RM890WPWL4Jw483Y5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c2E71BJbuv5p6mFx4wRMMU09muUWSbM5A9AGJ8GQqiQ=; b=h+yCMv0Eg4DzHb6w16IrVgO30MCikTBRifF83jG0IcBtpFCZ1pOv8G5hgS907UWTf/aAgKqeut0v/vh6N6hXXhuaa1aloTAMXxzMS08jlCHghXsCXk/MsSb62FGdjvgr1SfbjxRU+KMugSq/Z8O60LtXUftZf8N/bzK41vBhJ0XiHAAn77TaVwYg0ErETJeoJwyrFowDzq7h1LEpttEym3ZWISiVrQGAb4gU00wQ8koYxzEygh/3Pz06JjouuSIUDUt6wgeNy3M8i49NKRFWKB+k1ENM5uF/ZZ+nnMrCzTZOqjN7kg1EI+9CO0uen8+rwdQemEocOlfYJOHlLjLWig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c2E71BJbuv5p6mFx4wRMMU09muUWSbM5A9AGJ8GQqiQ=; b=yzcfuOsFDbT9ymFSFDiwQ6drqNb06htAk4V+83lNFf+8g1vGkdMXgT8cUS31/RY2RQ7AmZl33HH9HJSBlHW0EI9JNCvJ7Juk9A1UJFc/DG2QY0asZEBD7O6uykhM9qMZM0/arbphKuopZaj7RQbEwLEJsIZxoVzsDJxu4Xkdx8o= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by SJ2PR10MB7015.namprd10.prod.outlook.com (2603:10b6:a03:4c1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 15:18:57 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::1e11:7917:d2c:e44c]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::1e11:7917:d2c:e44c%4]) with mapi id 15.20.7544.041; Mon, 6 May 2024 15:18:56 +0000 From: Cupertino Miranda To: bpf@vger.kernel.org Cc: Cupertino Miranda , Alexei Starovoitov , Andrii Nakryiko , Eduard Zingerman , Yonghong Song , David Faust , Jose Marchesi , Elena Zannoni Subject: [PATCH bpf-next 2/2] selftests/bpf: Change functions definitions to support GCC Date: Mon, 6 May 2024 16:18:29 +0100 Message-Id: <20240506151829.186607-3-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240506151829.186607-1-cupertino.miranda@oracle.com> References: <20240506151829.186607-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: LO4P265CA0128.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c6::16) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|SJ2PR10MB7015:EE_ X-MS-Office365-Filtering-Correlation-Id: 5bc67da1-17cd-4b15-bfe3-08dc6ddfd896 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: RoyzJlKYygraPzxN4r0XAiv9N0yWeEE8x/IUAV7e9ExVFkegjarOpOO/TDM5h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lFSHr6pPEAStK0mb37vmN8PcM6Csf5JyFX/2cLxn5luwuCV1P672ibjyL4PyPK4TCfzhEq+YEmlMgrhUdRtjQf1cr8BwQKbz640t/smVX/JStWrUqmBbb2/wRC+pI6Sw8xwVzv3d2ehFJ27LpSviH7g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR10MB4382.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8dXCmGqQwg8qRXv3wq8TRa7WZThZcPNjx8T77yjmlX4MllHWAfMPK8jOJzo7maZi0QPpRSXHJ8U/xjtnOAZHNvOb451DGqjMpqd9xTWwW2ELmFOTwFTierkdXAXBAqL6eSH7uxPv7ebFbrQU9shFuWC8iOfsZwHQz5rrPEYB6ja0wr97mx5KiNKglplMPcPr96tmYEviSag44deRvrsJvTtDEqHuFXbI2msKcV6gwZiGLgGKFUK+4miRbD590Upi37l/2rMv1n6jMrFnj1jubTKN+uaTTZbtftwd7sP59oTVHcGuLQrn2HCBTjKUfH011ENjdMNUX85GPiSQun1BfJ3UMgXXyEwSp6a/bg3GBDRTwY1tK4dESwt3dd/uW74AdatfJwY16Smj+JBpnB4IewCofb6ev9U8f5v0wnsj/uKMsb29Pjuslof0hZMr92e9x6uI0q3dogkwY8WXyhVVpDYA/gEBzoZ5qs4hiRKUalKNViDqzpVgbfLW4s7fl15y6Mg9u5Gl38xVqi1tVddHl91p2ns7/J6T9GXIN0k1/uoH9Nm1B3BipuHYDZzrxPPqQgkmh1i3uW5TA8a8fMWbBXmgCJXJ4SzsWkpmV9v+wCmWYW4sXApXd/B3msZ2cBQu33gzRQ0ow1xRtJygoqhPkYt+iPxZXqg53SgH+L1EPXmBglPCgvsy4oESlHX7yOvti3wh+3GlnXAOQqwsIMNs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BkGgi+vIoIC/c9Vp2a03Lgaq3Ww3ODZCh3HmOvnbH+At3lka3AWqzS8X7g5uly1ossYCseBqAxES8UyLykDSrxdazipWzxqYsKEnUSmFVQrMksz/0sIrLhng4/ooeuJNVW/k9Pv9uMtWLNZNLAZWuGMAJdyZ2FJ1t9sH60iRNyTXeAlyLoN8rza0QNXXFclFjfenH1Qt7P954xzRVRefX5Vey3Z0mqiuME22Egg/XuEr5OIHhYpN8MeQvYu6jRIhqU8nm24RTmng1MoD54lQmZJoYpWBSFNHuBXEgXNKVmuQEF+csO1fMsPkSx0r1RaE6V6gbP+nZJZCfNctPKZi/mw01Nr9a6Eks/+/O44N4794VHYIVgVEMSqNwWTLnNOxGq9ohxcb8TNcKNDje1ylRFmw5CeCzqvJ+eVfT9SQh5mD2kwHK+VLg9yLHPgGBFY++UktV9AyVfe0zTaR1g2MQL5D327cbJJTloU/yEjVe7SwrIrrr5d6gksUV0BwJKdHxK/0TMvpDt+nguVdiWV19kugYsTvkwVrIXeD/1vb0V4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5bc67da1-17cd-4b15-bfe3-08dc6ddfd896 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 15:18:56.0642 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EtMlMCkGmPTYG/d9W0tIlFnpyA8dLBRSBNWAO5H0Z8Ml0SBaHQTGc5dfBzkQ0H47R1zXrtO68uMtBQxtEI8JIRYgzCK5MC2qA7P9UxUotHU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7015 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_09,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405060106 X-Proofpoint-GUID: LKm5Eu8pqCs7c4Qd423iMRW46pCzDe-D X-Proofpoint-ORIG-GUID: LKm5Eu8pqCs7c4Qd423iMRW46pCzDe-D X-Patchwork-Delegate: bpf@iogearbox.net The test_xdp_noinline.c contains 2 functions that use more then 5 arguments. This patch collapses the 2 last arguments in an array. Also in GCC and ipa_sra optimization increases the number of arguments used in function encap_v4. This pass disables the optimization for that particular file. Signed-off-by: Cupertino Miranda Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Eduard Zingerman Cc: Yonghong Song Cc: David Faust Cc: Jose Marchesi Cc: Elena Zannoni Acked-by: Yonghong Song --- tools/testing/selftests/bpf/Makefile | 1 + .../selftests/bpf/progs/test_xdp_noinline.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index e506a5948cc2..6fe9b0dd2ea0 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -86,6 +86,7 @@ progs/btf_dump_test_case_namespacing.c-bpf_gcc-CFLAGS := -Wno-error progs/btf_dump_test_case_packing.c-bpf_gcc-CFLAGS := -Wno-error progs/btf_dump_test_case_padding.c-bpf_gcc-CFLAGS := -Wno-error progs/btf_dump_test_case_syntax.c-bpf_gcc-CFLAGS := -Wno-error +progs/test_xdp_noinline.c-bpf_gcc-CFLAGS := -fno-ipa-sra endif ifneq ($(CLANG_CPUV4),) diff --git a/tools/testing/selftests/bpf/progs/test_xdp_noinline.c b/tools/testing/selftests/bpf/progs/test_xdp_noinline.c index 5c7e4758a0ca..a38199f900ec 100644 --- a/tools/testing/selftests/bpf/progs/test_xdp_noinline.c +++ b/tools/testing/selftests/bpf/progs/test_xdp_noinline.c @@ -588,12 +588,13 @@ static void connection_table_lookup(struct real_definition **real, __attribute__ ((noinline)) static int process_l3_headers_v6(struct packet_description *pckt, __u8 *protocol, __u64 off, - __u16 *pkt_bytes, void *data, - void *data_end) + __u16 *pkt_bytes, void *extra_args[2]) { struct ipv6hdr *ip6h; __u64 iph_len; int action; + void *data = extra_args[0]; + void *data_end = extra_args[1]; ip6h = data + off; if (ip6h + 1 > data_end) @@ -619,11 +620,12 @@ static int process_l3_headers_v6(struct packet_description *pckt, __attribute__ ((noinline)) static int process_l3_headers_v4(struct packet_description *pckt, __u8 *protocol, __u64 off, - __u16 *pkt_bytes, void *data, - void *data_end) + __u16 *pkt_bytes, void *extra_args[2]) { struct iphdr *iph; int action; + void *data = extra_args[0]; + void *data_end = extra_args[1]; iph = data + off; if (iph + 1 > data_end) @@ -666,13 +668,14 @@ static int process_packet(void *data, __u64 off, void *data_end, __u8 protocol; __u32 vip_num; int action; + void *extra_args[2] = { data, data_end }; if (is_ipv6) action = process_l3_headers_v6(&pckt, &protocol, off, - &pkt_bytes, data, data_end); + &pkt_bytes, extra_args); else action = process_l3_headers_v4(&pckt, &protocol, off, - &pkt_bytes, data, data_end); + &pkt_bytes, extra_args); if (action >= 0) return action; protocol = pckt.flow.proto;