From patchwork Mon Jul 24 09:57:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jose E. Marchesi" X-Patchwork-Id: 124745 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1689360vqg; Mon, 24 Jul 2023 02:58:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlF3X6uIvDIu2VbiGMSpwfLJY0wJ2Lne+3J2wYzA5bNiZ/1ITd0IoikwWDZjE2tzWmWCTyNY X-Received: by 2002:aa7:d88c:0:b0:522:30d5:6065 with SMTP id u12-20020aa7d88c000000b0052230d56065mr1364711edq.21.1690192689655; Mon, 24 Jul 2023 02:58:09 -0700 (PDT) Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f12-20020a05640214cc00b005222bf8eb74si1458865edx.277.2023.07.24.02.58.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 02:58:09 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=EsW9fR+M; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7BDB73858D32 for ; Mon, 24 Jul 2023 09:58:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BDB73858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690192688; bh=EjFiPo6rW+Y4DwN6BXATQzIs8VKPfvxTBXEl66AgRCk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=EsW9fR+MeUdfnSRswJK0dGyu/4U0N64uPsm6jSIh6yhhTwrNEq0fwWod3qF0wGim6 WIq5vMnE3D2EAvh9dXXI3mQQYzXAIMu6r2ck2aPwDd3KdwbsGz55uqnyg37DkXiSua 1rYMWmieuAPu1UIhM/cD9SuJ20Q7O7frtNYpYhs0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id C592E3858D32 for ; Mon, 24 Jul 2023 09:57:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C592E3858D32 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 36O6mmD6002712 for ; Mon, 24 Jul 2023 09:57:21 GMT Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3s05hdtchn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 24 Jul 2023 09:57:20 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 36O9v9D1027594 for ; Mon, 24 Jul 2023 09:57:20 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2048.outbound.protection.outlook.com [104.47.74.48]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3s05j9fdmr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 24 Jul 2023 09:57:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ReqVVjjUkCvwwDZxFomMJYI88Xuk2ZFzHdCe6ZfySu4TyuoPHD3yapHHa+faey9jhubTpb2GXsv9WMEVRHEZO13BQpvE71F43/5oDJxpKhLuAUQ1xy05GC1W4SwVHsI6VOcyVw5WwN/Jt0UvD+zsGRCRxWGBNjW+Ay5Efps9lWX3QfZraHweke4mikW+h7lQylUkj8dqXJCrDJF6D+hO5DHba+HgtnZWNa3NK6jrX9fAm1/i7r6vIMlumIC3kzefIU72o/5tZj/YXygDuqvk5tjarwqymso0bGMQN4v7jBwGIf7IOBXtumQYESFWPGnfqSTa0PmPuD5/WtIeOHa2ag== 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=EjFiPo6rW+Y4DwN6BXATQzIs8VKPfvxTBXEl66AgRCk=; b=eQXH3Fz/BsAgbvPxF5qxpj+yhjK3BOjQ4fhKVfQ8eXe/QcFM789bPrcvIktF7v0VgCwfKsjuYCRAVxprLoqXCnVhE9X1hLZe6cwc6fU/MFBOm7YantnlnRBgWb2NAsqKn3yDG+Pfb5eGx33krjr5QxSqwdGjqzeCa7NerRVWZQSR+DTPQgCwi+KmTccx66ZHZSZ8Da0RVgxI4TY05+esdu88b3OASW79inPfP7e721P4hhc/IlTv06X/0047AbyoBoLQ21fV0JsqjrIa0V7qORNJYZSVFArRA7EvVi82wybE5U56nloa+OfCHVaLOnayjHmjzMcAsucqTBaWYqmmjQ== 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 Received: from BYAPR10MB2888.namprd10.prod.outlook.com (2603:10b6:a03:88::32) by DS0PR10MB7902.namprd10.prod.outlook.com (2603:10b6:8:1aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Mon, 24 Jul 2023 09:57:18 +0000 Received: from BYAPR10MB2888.namprd10.prod.outlook.com ([fe80::4d0c:9857:9b42:2f6c]) by BYAPR10MB2888.namprd10.prod.outlook.com ([fe80::4d0c:9857:9b42:2f6c%4]) with mapi id 15.20.6609.031; Mon, 24 Jul 2023 09:57:18 +0000 To: gcc-patches@gcc.gnu.org Subject: [COMMITTED] bpf: remove -mkernel option and BPF_KERNEL_VERSION_CODE Date: Mon, 24 Jul 2023 11:57:12 +0200 Message-Id: <20230724095712.14497-1-jose.marchesi@oracle.com> X-Mailer: git-send-email 2.30.2 X-ClientProxiedBy: LO0P123CA0010.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:354::19) To BYAPR10MB2888.namprd10.prod.outlook.com (2603:10b6:a03:88::32) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB2888:EE_|DS0PR10MB7902:EE_ X-MS-Office365-Filtering-Correlation-Id: aeecf1c1-72be-4d71-2701-08db8c2c5d96 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sJI++8+QuFhURHVp8eYfQcfLhtoHA9JG/Mu/VEQwfuBii4QN2/a07eutM+rBi4BGw54qwxys5R426SUDEVrvTJtMY1N7L+XUDXhmpPNrGz4T+xybH2msZYMixr+czAndUwAuJqxeF89+jUWwDP3nndjnTu8LBgRh4kMvy962fnY4DKZ0mjIwUgqoCpl/yDCgClNmiA0rzICJq8US6qQO5+HgrMH1Rh71RwEq+ptBliTcoDtETKVH4W7QjOw70tB9RcHjDcNR5fYshuQ/Xf+tqGledplEWzdWO2dMHp+UYivgFP2P2Q+XkupQCytHGeP2M5xZhzjk1rAWJc4ZCbxaBFgYGOKu7ZjnHgppSySUaBMGGob2lpIQg80Kg5PSRYl6lsrauoezmnYvqB2+BqKPs9LdIhXNarHqSFv8uhgaqkuWm7ozlMfAyCj28d3YmiTA+rlIJjQettMRPOJ4BlDXJ43Hss2sNZlpJTboA8Sfb3JODmeVIGXfEa3dwGej9nzxeArkTqzscHiyKJ1MVXIFookwGjUby2rybP9DAcQ6OYaU5oXrf+vrpo7W+VEAqpBF X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB2888.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(396003)(366004)(136003)(39860400002)(376002)(451199021)(83380400001)(36756003)(2616005)(2906002)(41300700001)(26005)(5660300002)(1076003)(6506007)(8936002)(8676002)(186003)(6666004)(66556008)(66946007)(66476007)(86362001)(6486002)(478600001)(38100700002)(6512007)(316002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +k+FyYUZBeDVk0ob7mX5B0sWJOMx1LBceMAxE81SkDwtUDpaTQjFUol74cswjY4mLs8MXw+Qv1AlLOwkHFVs6IypIv7bn5RTFGGqnKGktH917/pA900DTvCLUQOsDYL4dmGY8vWsQ/qiiOFcctJa+3U6fdgBYtQ47z/1+Th13rh7rOcw2n75u+bpzkfc6IsDuW9N06xwoHmwJfGl0c5/jheytA2tRN2iXW77Jz0YyUIVqJdBM0qfKebo8ukzQvOA8Y+0dF9Mu1WdDquLyzFVULbGHOFfvfAJYjsnOk5ZJ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dI X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: aeecf1c1-72be-4d71-2701-08db8c2c5d96 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2888.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2023 09:57:18.2093 (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: Nx3V6a/YTeTrf/JUG66VGPLKzpHRIe4RoHqnpKfzxFc7My0/zOvcrPyjR4C6D6OUIzleNjjh3qg08A4JiXssal6ARSId6sIyzwCDby2HYp8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7902 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-24_07,2023-07-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307240088 X-Proofpoint-ORIG-GUID: zKjFmgH16IIHWQo4iQPxjOIh8BU0Q0Zr X-Proofpoint-GUID: zKjFmgH16IIHWQo4iQPxjOIh8BU0Q0Zr X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "Jose E. Marchesi via Gcc-patches" From: "Jose E. Marchesi" Reply-To: "Jose E. Marchesi" Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772295489370624171 X-GMAIL-MSGID: 1772295489370624171 Having the ability of specifying a target kernel version when building a BPF program is one of these things that sound pretty good in theory, but simply don't work in practice: kernels in practice contain backports, etc. Also, the addition of CO-RE to BPF has made this uneccessary. This patch removes the -mkernel command line option and also the associated BPF_KERNEL_VERSION_CODE pre-processor constant. Tested in bpf-unknown-none. gcc/ChangeLog * config/bpf/bpf-opts.h (enum bpf_kernel_version): Remove enum. * config/bpf/bpf.opt (mkernel): Remove option. * config/bpf/bpf.cc (bpf_target_macros): Do not define BPF_KERNEL_VERSION_CODE. --- gcc/config/bpf/bpf-opts.h | 33 --------------- gcc/config/bpf/bpf.cc | 40 ------------------ gcc/config/bpf/bpf.opt | 87 --------------------------------------- 3 files changed, 160 deletions(-) diff --git a/gcc/config/bpf/bpf-opts.h b/gcc/config/bpf/bpf-opts.h index e0be591b479..5c9441ccb28 100644 --- a/gcc/config/bpf/bpf-opts.h +++ b/gcc/config/bpf/bpf-opts.h @@ -20,39 +20,6 @@ #ifndef BPF_OPTS_H #define BPF_OPTS_H -/* Supported versions of the Linux kernel. */ -enum bpf_kernel_version -{ - /* Linux 4.x */ - LINUX_V4_0, - LINUX_V4_1, - LINUX_V4_2, - LINUX_V4_3, - LINUX_V4_4, - LINUX_V4_5, - LINUX_V4_6, - LINUX_V4_7, - LINUX_V4_8, - LINUX_V4_9, - LINUX_V4_10, - LINUX_V4_11, - LINUX_V4_12, - LINUX_V4_13, - LINUX_V4_14, - LINUX_V4_15, - LINUX_V4_16, - LINUX_V4_17, - LINUX_V4_18, - LINUX_V4_19, - LINUX_V4_20, - /* Linux 5.x */ - LINUX_V5_0, - LINUX_V5_1, - LINUX_V5_2, - LINUX_LATEST = LINUX_V5_2, - LINUX_NATIVE, -}; - enum bpf_isa_version { ISA_V1, diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc index 6bc715429dc..18d3b5f14d6 100644 --- a/gcc/config/bpf/bpf.cc +++ b/gcc/config/bpf/bpf.cc @@ -308,46 +308,6 @@ bpf_target_macros (cpp_reader *pfile) builtin_define ("__BPF_BIG_ENDIAN__"); else builtin_define ("__BPF_LITTLE_ENDIAN__"); - - /* Define BPF_KERNEL_VERSION_CODE */ - { - const char *version_code; - char *kernel_version_code; - - switch (bpf_kernel) - { - case LINUX_V4_0: version_code = "0x40000"; break; - case LINUX_V4_1: version_code = "0x40100"; break; - case LINUX_V4_2: version_code = "0x40200"; break; - case LINUX_V4_3: version_code = "0x40300"; break; - case LINUX_V4_4: version_code = "0x40400"; break; - case LINUX_V4_5: version_code = "0x40500"; break; - case LINUX_V4_6: version_code = "0x40600"; break; - case LINUX_V4_7: version_code = "0x40700"; break; - case LINUX_V4_8: version_code = "0x40800"; break; - case LINUX_V4_9: version_code = "0x40900"; break; - case LINUX_V4_10: version_code = "0x40a00"; break; - case LINUX_V4_11: version_code = "0x40b00"; break; - case LINUX_V4_12: version_code = "0x40c00"; break; - case LINUX_V4_13: version_code = "0x40d00"; break; - case LINUX_V4_14: version_code = "0x40e00"; break; - case LINUX_V4_15: version_code = "0x40f00"; break; - case LINUX_V4_16: version_code = "0x41000"; break; - case LINUX_V4_17: version_code = "0x42000"; break; - case LINUX_V4_18: version_code = "0x43000"; break; - case LINUX_V4_19: version_code = "0x44000"; break; - case LINUX_V4_20: version_code = "0x45000"; break; - case LINUX_V5_0: version_code = "0x50000"; break; - case LINUX_V5_1: version_code = "0x50100"; break; - case LINUX_V5_2: version_code = "0x50200"; break; - default: - gcc_unreachable (); - } - - kernel_version_code = ACONCAT (("__BPF_KERNEL_VERSION_CODE__=", - version_code, NULL)); - builtin_define (kernel_version_code); - } } /* Return an RTX representing the place where a function returns or diff --git a/gcc/config/bpf/bpf.opt b/gcc/config/bpf/bpf.opt index 1e4dcc871d7..3bf9033279b 100644 --- a/gcc/config/bpf/bpf.opt +++ b/gcc/config/bpf/bpf.opt @@ -21,93 +21,6 @@ HeaderInclude config/bpf/bpf-opts.h -; Selecting the kind of kernel the eBPF will be running on. - -mkernel= -Target RejectNegative Joined Var(bpf_kernel) Enum(bpf_kernel) Init(LINUX_LATEST) -Generate eBPF for the given Linux kernel version. - -Enum -Name(bpf_kernel) Type(enum bpf_kernel_version) - -EnumValue -Enum(bpf_kernel) String(native) Value(LINUX_NATIVE) DriverOnly - -EnumValue -Enum(bpf_kernel) String(latest) Value(LINUX_LATEST) DriverOnly - -EnumValue -Enum(bpf_kernel) String(4.0) Value(LINUX_V4_0) - -EnumValue -Enum(bpf_kernel) String(4.1) Value(LINUX_V4_1) - -EnumValue -Enum(bpf_kernel) String(4.2) Value(LINUX_V4_2) - -EnumValue -Enum(bpf_kernel) String(4.3) Value(LINUX_V4_3) - -EnumValue -Enum(bpf_kernel) String(4.4) Value(LINUX_V4_4) - -EnumValue -Enum(bpf_kernel) String(4.5) Value(LINUX_V4_5) - -EnumValue -Enum(bpf_kernel) String(4.6) Value(LINUX_V4_6) - -EnumValue -Enum(bpf_kernel) String(4.7) Value(LINUX_V4_7) - -EnumValue -Enum(bpf_kernel) String(4.8) Value(LINUX_V4_8) - -EnumValue -Enum(bpf_kernel) String(4.9) Value(LINUX_V4_9) - -EnumValue -Enum(bpf_kernel) String(4.10) Value(LINUX_V4_10) - -EnumValue -Enum(bpf_kernel) String(4.11) Value(LINUX_V4_11) - -EnumValue -Enum(bpf_kernel) String(4.12) Value(LINUX_V4_12) - -EnumValue -Enum(bpf_kernel) String(4.13) Value(LINUX_V4_13) - -EnumValue -Enum(bpf_kernel) String(4.14) Value(LINUX_V4_14) - -EnumValue -Enum(bpf_kernel) String(4.15) Value(LINUX_V4_15) - -EnumValue -Enum(bpf_kernel) String(4.16) Value(LINUX_V4_16) - -EnumValue -Enum(bpf_kernel) String(4.17) Value(LINUX_V4_17) - -EnumValue -Enum(bpf_kernel) String(4.18) Value(LINUX_V4_18) - -EnumValue -Enum(bpf_kernel) String(4.19) Value(LINUX_V4_19) - -EnumValue -Enum(bpf_kernel) String(4.20) Value(LINUX_V4_20) - -EnumValue -Enum(bpf_kernel) String(5.0) Value(LINUX_V5_0) - -EnumValue -Enum(bpf_kernel) String(5.1) Value(LINUX_V5_1) - -EnumValue -Enum(bpf_kernel) String(5.2) Value(LINUX_V5_2) - ; Use xBPF extensions. mxbpf