Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3261840lfo; Mon, 23 May 2022 00:15:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0i7w3Ycv/UPRqw4AnFWWxo3R2HBwb/SUhXWx80fHFPYDcbVZngCskqlHHvq/sW2jox7fK X-Received: by 2002:a05:6a00:2393:b0:518:9ff0:585e with SMTP id f19-20020a056a00239300b005189ff0585emr3862881pfc.8.1653290107115; Mon, 23 May 2022 00:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653290107; cv=none; d=google.com; s=arc-20160816; b=ue7e3wOOooNR0JPXRoNZy5f1QfTXjVCcmdaXHBfDQ50a2QNl+53J1IsuEpBOcvRYQQ DVxU4nHVYXvq2yU/EDJQGGyS1CayiwyQgChkEBhVn9xH2+2l7x6/GzkmcHO27MINr7uv CebcXlfQ3/6BpLwOrFXWLnIGw3qbt1xGTnl9uW7wnK+146UwMUelB6Ujchtzcy+4XSqr ZVkTB4qQwC5BHAkT5Zy8RQKQf1J3bMgDfKPPOIWwnKQ4X9DzxZdLEaPcnPiZcNPRiaq0 zbZLyTgEds+sfej2/Dtm5+2RXm7WXMFXYZ0bsDbP+6kTvjDHsheIJUr7CevS0rfBeGo1 RtXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=ftAlGkfVN9yFSMHjqy7cpbDkYMyhHDjfXWpCptFDTFo=; b=WD7ekVPe+ZO7Mwm+NwwuOJz7CrVDwMZ0iwqtXASzjPBerBAndPHU9MBrx30CJ/2xKr DMLosti9gXd6KrxncOzmXwwS3Ms30yZC8wFJChfpSieCvR08ADD1rllZGoiR2FEd8+mG RqCRF7PB+W6WDFlC8nsdYgFMz3RLr7mh0rnuRy+iVO0UvRhZAqGCjzlptq1qg3C7i4uU gMdCrGVLNGu0+a9QWnNbdDXmV9tdEZ9s6MWRnAxTeESYxczHf4YPp3nqGGZAdKpWsqQU /LBGDRxhCh9jrt5RFAW5unqAIeYzK+T6/RoV/9Uaqn1LD+ZreKl45GXGYxOV5S7SuBbX T/oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=5ZfHbADa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q8-20020a63e948000000b003db2f070ff8si10383158pgj.50.2022.05.23.00.15.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:15:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=5ZfHbADa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C2EA77E1DA; Sun, 22 May 2022 23:33:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344273AbiEWCVl (ORCPT + 99 others); Sun, 22 May 2022 22:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235254AbiEWCVj (ORCPT ); Sun, 22 May 2022 22:21:39 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A72A0B874 for ; Sun, 22 May 2022 19:21:37 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id r71so12510521pgr.0 for ; Sun, 22 May 2022 19:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:to:cc:references :from:in-reply-to:content-transfer-encoding; bh=ftAlGkfVN9yFSMHjqy7cpbDkYMyhHDjfXWpCptFDTFo=; b=5ZfHbADabs94TwJ/7qwTLt2CQFczUjYovL6BMHmANuny7SYgbvOIrrYRILUThJn9sq e5qfNR/l4K6h8svb+auQZgVyvlGygBilUm09/AZMOyp1neoo8ub+9uWPBnDrkD9oLrmn yS3LSDeZZ7st/cOadWljRiZF2y/DrWsTb208bbRC2AnJy2IrM9owWxGPLKv4nbZAZHV0 621c5uRoXUUXfg2ALD7+dYqA7R+RLO8yb4dDZCkxDHPNmEvMzlmY8k/V6xyFDqtSl2YD V8396IHfHEulh4iSKKZ+mG9pifb9qGwd49VlcB+22DNVNWqYsJ/litMpU1fxM0PC7RZL BaEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :to:cc:references:from:in-reply-to:content-transfer-encoding; bh=ftAlGkfVN9yFSMHjqy7cpbDkYMyhHDjfXWpCptFDTFo=; b=6QrrEvJJMXX0rZCoUN/UQB52z5Bpjk+qtd9dkh8qVwYMukHu1F4C6ZFCMoEUYdE4Do r44CSfuiyYaunWOhSsih/uizGXLadRJU5VAOs/3ICr4cpFKj7H/ChRYK7l8SB7PlkhlP PwuhpXs1xZdmN9hnutkq33i2uiwLXBUI1d/VIviMVd/YpUKQdUn6mOqvcG9lkVxVco8i Y3PUC/iZNI59SXzMYrasqvRXL0RRrgBE4P2JNtgqyOrOr31uC4T3GT40Ubn1RH8oQYAq LLWPJov9dvI0aWZXQeZ+HaM1mrfUll6mByUZRHqHvk2OZixz8t0M0GhNDILUjlO7Tjf2 7SqA== X-Gm-Message-State: AOAM533vTZ0wKPmwywoAzo7KWJZjhIbLD3rcfVAl06HeTdF8jccU3Nna aEx9vpdoNDL14Axa6fb2lLTboQ== X-Received: by 2002:a63:553:0:b0:3f5:f32a:7c54 with SMTP id 80-20020a630553000000b003f5f32a7c54mr17959211pgf.138.1653272497211; Sun, 22 May 2022 19:21:37 -0700 (PDT) Received: from [10.71.57.194] ([139.177.225.241]) by smtp.gmail.com with ESMTPSA id y12-20020aa7854c000000b0050dc7628195sm5846585pfn.111.2022.05.22.19.21.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 May 2022 19:21:36 -0700 (PDT) Message-ID: Date: Mon, 23 May 2022 10:21:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [External] Re: [PATCH bpf-next v2] selftests/bpf: fix some bugs in map_lookup_percpu_elem testcase To: Andrii Nakryiko , Yonghong Song Cc: Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin Lau , Song Liu , john fastabend , KP Singh , Steven Rostedt , Ingo Molnar , Jiri Olsa , Dave Marchevsky , Joanne Koong , Geliang Tang , "open list:KERNEL SELFTEST FRAMEWORK" , Networking , bpf , open list , duanxiongchun@bytedance.com, Muchun Song , Dongdong Wang , Cong Wang , zhouchengming@bytedance.com, Yosry Ahmed References: <20220518025053.20492-1-zhoufeng.zf@bytedance.com> From: Feng Zhou In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 在 2022/5/21 上午6:00, Andrii Nakryiko 写道: > On Wed, May 18, 2022 at 8:44 AM Yonghong Song wrote: >> >> >> On 5/17/22 7:50 PM, Feng zhou wrote: >>> From: Feng Zhou >>> >>> comments from Andrii Nakryiko, details in here: >>> https://lore.kernel.org/lkml/20220511093854.411-1-zhoufeng.zf@bytedance.com/T/ >>> >>> use /* */ instead of // >>> use libbpf_num_possible_cpus() instead of sysconf(_SC_NPROCESSORS_ONLN) >>> use 8 bytes for value size >>> fix memory leak >>> use ASSERT_EQ instead of ASSERT_OK >>> add bpf_loop to fetch values on each possible CPU >>> >>> Fixes: ed7c13776e20c74486b0939a3c1de984c5efb6aa ("selftests/bpf: add test case for bpf_map_lookup_percpu_elem") >>> Signed-off-by: Feng Zhou >> Acked-by: Yonghong Song > > I've fixed remaining formatting issues and added my_pid check to avoid > accidental interference with other tests/processes. Applied to > bpf-next, thanks. Ok, Thanks.