Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp408662rwd; Tue, 30 May 2023 23:20:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CVuJXmxuTW/j69nxt1ImYHFEy1qfz0ALTpZe0sm/EZaqFBAA8hjkrQew7oKqDiie2RlGA X-Received: by 2002:a05:6358:5291:b0:125:4dd9:cf23 with SMTP id g17-20020a056358529100b001254dd9cf23mr1129574rwa.12.1685513999679; Tue, 30 May 2023 23:19:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685513999; cv=pass; d=google.com; s=arc-20160816; b=zB+0iehPX2a92Bsvt8o+eLSDRK/AJzzvIgVN1gGPy9cZF+Y9c2R5K4OrJoHv/AYozC W4WbrBkzQgtP3uBlSRcASFMdQEB75a/CdMTdZCmCX+awLxsbwkwi35L+pZwLwnMwo0Sn hgvrwN/N+NZrq+hYOGMfHxk5b8SDOH9NlXnf7XwlmsAq8ude5fkluJoPzxzfxNut81XM gQ8GQp5cTIs5HWcumoNEWS5e7ui50yVs6X8pFpoKoPgDwSql4A08fJ6wN80HDGWVOGsd STh4FhhjQSy1zNiccbtpwxAb5ohRSf4cGfkQU6E9G3stmJJe996oKCQQUs64ZnQtKCuS Qfag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=/bg3st2m2RfBZgSF21C6frsqiRRoDOI2uQ5lo1PIRXo=; b=vGbWZCAJE0nkcAkfsWXtXvqRiqGAhwMfXNo2hgCAyO53K4eG5/HQ5JQ8DqRextTHkO CFNhTMJymJV2Ll3ujIQx66FztCjF3mhRsGE74/vyRVQhDm4U+B2mA2BwCPkmo9PKJ+3x ELGj7bIPp6nq1OLZivXk8bYVeoKYxCN8op36gcdkbiwawlNimgtHiLT68nv/oJ6ZGFHm OXLXNqqocWKA/o2pHDjGmf6YAJVdJcYmGmyCg4VJAJ7hxX82gBKhQC+M4RZ1V0BtQi3c Ol+y1BwBWKP99WYG4AiViyEh0k8YtBPcl7Zny44MqjAj2Zx0hlKFthXIpG1aVuj8D/1X Tg6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=YK5qtLn9; arc=pass (i=1 spf=pass spfdomain=meta.com dkim=pass dkdomain=meta.com dmarc=pass fromdomain=meta.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=meta.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15-20020a638c4f000000b0053071bc497dsi487944pgn.90.2023.05.30.23.19.27; Tue, 30 May 2023 23:19:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=YK5qtLn9; arc=pass (i=1 spf=pass spfdomain=meta.com dkim=pass dkdomain=meta.com dmarc=pass fromdomain=meta.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=meta.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234219AbjEaGJM (ORCPT + 99 others); Wed, 31 May 2023 02:09:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbjEaGJK (ORCPT ); Wed, 31 May 2023 02:09:10 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F10DB9F; Tue, 30 May 2023 23:09:06 -0700 (PDT) Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34UGZuOb011807; Tue, 30 May 2023 23:08:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=s2048-2021-q4; bh=/bg3st2m2RfBZgSF21C6frsqiRRoDOI2uQ5lo1PIRXo=; b=YK5qtLn90AHm7a98xQ/Da6rGM1D505UKryAiXqc+FH2eNdlAUDGkbiuB+Gjz9f4zlqS9 QZ0bDTMDOcJhRQ2heA9rS5q78EXfn2Lteq1xFrwPp5cmKItnDmThyya5DOxYo3r8jgck Ps9wJj4tE8ESxcM9M0YBa6T7B+S1Yz2BJLc5St08uyZcDskVkShEsxczuPhIWTlUalIb pvJ6adxUCGw+XsjaKHxuWCZfUoH2Z1sgUPIyAH/x9XhHkh6aPagGFe6zQP5zJLNHGGp4 CU/sJWMNOjHWi8EhbMe4Vko7tGQFnnFOjuhGanl2JgApNbH3WC7ahu+YJso/xNqfCqiq Ig== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2171.outbound.protection.outlook.com [104.47.55.171]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3qw7mjger8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 23:08:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MwGN0qNWel91h/1ipmQp3BXDHwDEYLlwPp0meJH6oz6o+Sy/v+Q49scqaI+oddZ297GrwGi6QQiVcgGuXg+lo2NWLh9dIzll5CXmg4V5HWbpZLivWdYRMPa0LHWEh69j2O9QPKsqOd99ey6W88rdwRVsb7jB8j5M9hBUB2Ke0/8rKIRLiignDvlgQvv6I3znRZE88syYtsayxEcwZErwxIlibelWJUI8HzrNWT2iyjD7HbvsrGbL4aiL4YH9hJCxUlBJfk41DVPAsUtXGNmzTytGnmBzaCY18yHIvuQZ5sPPEnunqDnuPFqmF+MmAuZFeie1XKYKA4imxpTQA5nqcQ== 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=/bg3st2m2RfBZgSF21C6frsqiRRoDOI2uQ5lo1PIRXo=; b=OiMcj76yt+1HI6netNlXaLzesqEsAeyvjt7ljOijC6eEEun7RAs9VfGfnMumd+X1D4aOwKUIF8K25wYc15eXNm8kp7HMFB7k+JlUIaQv4GFzyABtNMLB5w45mqS7KTUtPuXPxeQADCmzYRIGY5ioYUSOgccsX+25hvfo3iZDkl4kH+rLDwwOrTLhx5TOpMmS03UG2EneLLyYGPUgbMVmF3Q2BCCIY3Pb4Kk+qoARRCT8lv7oBApwZaGoxpPCrMAVYzHgczpTkgTYJomav6D2nuGYI//HCDohCiL8nqEHCX5V2eyHssmOo+ueLg/mrvgpUrY7zHO8+0wyDPEvAPqjqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=meta.com; dmarc=pass action=none header.from=meta.com; dkim=pass header.d=meta.com; arc=none Received: from SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) by CH3PR15MB6213.namprd15.prod.outlook.com (2603:10b6:610:159::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Wed, 31 May 2023 06:08:43 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::bf7d:a453:b8d9:cf0]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::bf7d:a453:b8d9:cf0%6]) with mapi id 15.20.6433.022; Wed, 31 May 2023 06:08:42 +0000 Message-ID: Date: Tue, 30 May 2023 23:08:38 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] bpf/tests: Use struct_size() Content-Language: en-US To: Su Hui , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <20230531043251.989312-1-suhui@nfschina.com> From: Yonghong Song In-Reply-To: <20230531043251.989312-1-suhui@nfschina.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR05CA0184.namprd05.prod.outlook.com (2603:10b6:a03:330::9) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR1501MB2064:EE_|CH3PR15MB6213:EE_ X-MS-Office365-Filtering-Correlation-Id: 53530790-0f43-4eb4-fb47-08db619d7c50 X-FB-Source: Internal X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4geBexDk/IKsPFmuDlXiSiBA2Uy0sVKsfd6ecP20824DDBkxSnEe4iFKMNK3POO19TsGzNVoDneJ1PaYvMHWdUrDu6lxlmwi6IkE1jK3inQAp/wqF4oqlCoQmwEohALhA6Kv2q8PmqtD1uqEFO3X2X9pveKTn6dXh1p4uujHFd5uOZArKyOlvMrpvYE++NqIV0dbRqsELT3x05YULt5z0F+a5VoZhYHHx79UNtpod6eXThCmivCjAC5bhXwZvuOi171/403LFQfs62fLWOmS4wqSizQJBL95ZwjiNWt2IPo5YQkaFZ+ecOWxoGoSGy8chg8AwZ9x5l6lX9Fb5CKYeLK1jkcJj9n2ywC5Qn8QNvFgb1xydVD7WdaeCHTdArcwWuXDeSamRpN0flztcqhqxZJZylRvAitLZjOOKDSUcmzeCR7JGzvzTPbFGXpnKNYby9rr5Av7JPudlKsvpdsV0Jge+8GLh9dsrl/+jc/2FFeBPqsr7HLdl0HVMDqzhEqswcCZj3SU/FL6HA/yvVuIuijdPgRR33JLvTr8U9KdtPFsdIdn6wJ6nOsSlUnKwQgJvMLDO0QQ0dGBHOJovD0W/qxWooa3jZctMC310PixbvldRvUu+cYwThbNV8zas9FNlQVFPcuNjaVDNH1RMdTw5LmoLZt4FpWH6j/ietE/vvI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR1501MB2064.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(396003)(376002)(346002)(136003)(39860400002)(451199021)(558084003)(31696002)(86362001)(110136005)(4326008)(478600001)(316002)(66476007)(66946007)(66556008)(36756003)(6666004)(6486002)(5660300002)(8676002)(8936002)(7416002)(41300700001)(2906002)(38100700002)(921005)(2616005)(186003)(53546011)(6506007)(6512007)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YnZ2MEVFdFMyN2QzUVk0VHhlZUl6djBqRG5CYVB0dkY1a1Jvd1hrVm5vQTJq?= =?utf-8?B?a25NQzUyTUoydk1wL2tLbEVLSEtxQi83NFk3VDZhcnNkRFRIZFR3dDM3cC8z?= =?utf-8?B?UkMrTlJDZ241NXBZVTc0RU5qQy9aNkpyOGdzNE9IcXNiOFh5VUxsQmFHZ0Jp?= =?utf-8?B?cTZBYmo4R3lw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Hc4TEt2cDljTGUwWHZn?= =?utf-8?B?bzhoWEFPQUhsblByUjRRRVFVNkhUdjIvUU41cEtxYzhMMFYzK1Q2RWhHYWZY?= =?utf-8?B?OVQ4OFdQS2plTmlreWNCK2VNWFpiOS82TjJUazVBL3lVejU0UG8vMEg0YTJu?= =?utf-8?B?Zk1rK2dsQTdvM0Y1R3F0ek9henJWOVNZYXFtNk5DVFN3djRVSkhtMURZNG9F?= =?utf-8?B?L1E9PQ==?= X-OriginatorOrg: meta.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53530790-0f43-4eb4-fb47-08db619d7c50 X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2023 06:08:42.8070 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LRUDfOTBzynOYPIFlE0AulHqPY91nJdZrUhHJkmaMvqLI7MAl4SIIJfzET5uOB/f X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR15MB6213 X-Proofpoint-ORIG-GUID: vkREIp9Onc81-7MAXgA7NiNkmuzuCb9d X-Proofpoint-GUID: vkREIp9Onc81-7MAXgA7NiNkmuzuCb9d X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-31_02,2023-05-30_01,2023-05-22_02 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/30/23 9:32 PM, Su Hui wrote: > Use struct_size() instead of hand writing it. > This is less verbose and more informative. > > Signed-off-by: Su Hui Acked-by: Yonghong Song