Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp122018rwi; Wed, 12 Oct 2022 17:08:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hhFYfjLfrfWoj7NrWTrQ4dETZdr0yGm6c1LTSeUujdbZcADnPIiMtPTeXrpL+3MRFqMS+ X-Received: by 2002:a62:e70f:0:b0:562:d556:8cf2 with SMTP id s15-20020a62e70f000000b00562d5568cf2mr28802218pfh.78.1665619720921; Wed, 12 Oct 2022 17:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665619720; cv=none; d=google.com; s=arc-20160816; b=enTVoJGL2k+GVL2N6DOIpYxyQXPlE4DHgGvt8yzB2X4hmbae+4Q4eXPUmY2V0usPLx ykkcfzQTbRpp+wfUpz2tY9KoonC/As227EkPfKkxD5uVClEmh6radPGdDRU1y8KTZam2 osw9mWk44osIl0Jv6Suzt7Q/d2pw5JCiYNWbrDMBSes6uquBO9h6XTeEOcdnxG5JiJke 0ZWyXUk3yX8omAbTNYfymaFkERUOSC5b+UyvetRNSdhMbCxxJdv3LGjqE4gjlN3mAdFT qwunQ0Y59+daZkWKSTxRdFhHPczwPekXYA+/MqYMKsozjCYIzrn+uOlfDHW2iLlTGFt0 HFew== 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:content-language:subject:mime-version:date :dkim-signature:message-id; bh=XOuJ7J4AXKe3c2xjfQLYvSiF4wv25bV1J+/a3durzkE=; b=U3D6IgRujePyW2Z/hoMH22BrLL1LWyGGdXxsskPfYUeF+3aTZEpMFaEtWfuGBkHg+Q Mhm3ngyfplqybDr2WallrDroouIpAwp68AGoD5kTIR/qyRbJJxjXuOdoKk299lTXzpW0 7iiyVrDaC8QpTkNcUimWWuYmTAE8aScjUqcBZnrecQwm+LcNNQOCSM9wC29s/1ANZRJ4 Bmvyyt4cXeZvVJBAMZzj2E1Xz6IwOWLvLFiQVmXFILxp3OQ8vRexNfDFf2W3T/xA76/d 3tfw+xl0fUyPx9qU/qtz5gOJTQxeltACFsgAkotjA98PsvAzbhnYL2M8ACZUng1V93Ju i1yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ss3SZKmv; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t70-20020a637849000000b0044bd0d0055asi22764230pgc.567.2022.10.12.17.08.28; Wed, 12 Oct 2022 17:08:40 -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=@linux.dev header.s=key1 header.b=ss3SZKmv; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229451AbiJLXSD (ORCPT + 99 others); Wed, 12 Oct 2022 19:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbiJLXSA (ORCPT ); Wed, 12 Oct 2022 19:18:00 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70BEE12C896; Wed, 12 Oct 2022 16:17:58 -0700 (PDT) Message-ID: <611e9bed-df6a-0da9-fbf9-4046f4211a7d@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1665616676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XOuJ7J4AXKe3c2xjfQLYvSiF4wv25bV1J+/a3durzkE=; b=ss3SZKmv5qqRSFdRJIkW6XkbNiHsncJBhMMqUUPKhF/GsqJ4FxMhfCZt4iC/U1y5AiIoVD PqslwXqf9d7tcBZ1fJgav1ZAh+KlPm/LP3w2pm6O803ahiVBUyqbm+OAKmNeKLn4hUx//l 0D2MBZ4NtN/Zr6ZlnnhluC0qO1uJlDk= Date: Wed, 12 Oct 2022 16:17:51 -0700 MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v4 5/6] selftests/bpf: Fix error failure of case test_xdp_adjust_tail_grow Content-Language: en-US To: Xu Kuohai Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , "David S . Miller" , Jakub Kicinski , Jesper Dangaard Brouer , Kumar Kartikeya Dwivedi , Alan Maguire , Delyan Kratunov , Lorenzo Bianconi , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org References: <20221011120108.782373-1-xukuohai@huaweicloud.com> <20221011120108.782373-6-xukuohai@huaweicloud.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: <20221011120108.782373-6-xukuohai@huaweicloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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 10/11/22 5:01 AM, Xu Kuohai wrote: > From: Xu Kuohai > > test_xdp_adjust_tail_grow failed with ipv6: > test_xdp_adjust_tail_grow:FAIL:ipv6 unexpected error: -28 (errno 28) > > The reason is that this test case tests ipv4 before ipv6, and when ipv4 > test finished, topts.data_size_out was set to 54, which is smaller than the > ipv6 output data size 114, so ipv6 test fails with NOSPC error. > > Fix it by reset topts.data_size_out to sizeof(buf) before testing ipv6. > > Fixes: 04fcb5f9a104 ("selftests/bpf: Migrate from bpf_prog_test_run") > Signed-off-by: Xu Kuohai > --- > tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c b/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c > index 9b9cf8458adf..009ee37607df 100644 > --- a/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c > +++ b/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c > @@ -63,6 +63,7 @@ static void test_xdp_adjust_tail_grow(void) > expect_sz = sizeof(pkt_v6) + 40; /* Test grow with 40 bytes */ > topts.data_in = &pkt_v6; > topts.data_size_in = sizeof(pkt_v6); > + topts.data_size_out = sizeof(buf); lgtm but how was it working before... weird. > err = bpf_prog_test_run_opts(prog_fd, &topts); > ASSERT_OK(err, "ipv6"); > ASSERT_EQ(topts.retval, XDP_TX, "ipv6 retval");