From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55763C433DB for ; Fri, 12 Mar 2021 15:16:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D6B064FEE for ; Fri, 12 Mar 2021 15:16:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbhCLPPt (ORCPT ); Fri, 12 Mar 2021 10:15:49 -0500 Received: from www62.your-server.de ([213.133.104.62]:50942 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbhCLPPa (ORCPT ); Fri, 12 Mar 2021 10:15:30 -0500 Received: from sslproxy05.your-server.de ([78.46.172.2]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lKjVg-000Ceb-KZ; Fri, 12 Mar 2021 16:15:28 +0100 Received: from [85.7.101.30] (helo=pc-9.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKjVg-000UQ0-Dx; Fri, 12 Mar 2021 16:15:28 +0100 Subject: Re: [PATCH net] selftests/bpf: set gopt opt_class to 0 if get tunnel opt failed To: Hangbin Liu , netdev@vger.kernel.org Cc: Jakub Kicinski , Yi-Hung Wei , David Miller , bpf@vger.kernel.org, William Tu References: <20210309032214.2112438-1-liuhangbin@gmail.com> <20210312015617.GZ2900@Leo-laptop-t470s> From: Daniel Borkmann Message-ID: <0b5c810b-5eec-c7b0-15fc-81c989494202@iogearbox.net> Date: Fri, 12 Mar 2021 16:15:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20210312015617.GZ2900@Leo-laptop-t470s> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.4/26106/Fri Mar 12 13:03:16 2021) Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 3/12/21 2:56 AM, Hangbin Liu wrote: > Hi David, > > May I ask what's the status of this patch? From patchwork[1] the state is > accepted. But I can't find the fix on net or net-next. I think there may have been two confusions, i) that $subject says that this goes via net tree instead of bpf tree, which might have caused auto-delegation to move this into 'netdev' patchwork reviewer bucket, and ii) the kernel patchwork bot then had a mismatch as you noticed when it checked net-next after tree merge and replied to the wrong patch of yours which then placed this one into 'accepted' state. I just delegated it to bpf and placed it back under review.. > [1] https://patchwork.kernel.org/project/netdevbpf/patch/20210309032214.2112438-1-liuhangbin@gmail.com/ > > Thanks > Hangbin > On Tue, Mar 09, 2021 at 11:22:14AM +0800, Hangbin Liu wrote: >> When fixing the bpf test_tunnel.sh genve failure. I only fixed >> the IPv4 part but forgot the IPv6 issue. Similar with the IPv4 >> fixes 557c223b643a ("selftests/bpf: No need to drop the packet when >> there is no geneve opt"), when there is no tunnel option and >> bpf_skb_get_tunnel_opt() returns error, there is no need to drop the >> packets and break all geneve rx traffic. Just set opt_class to 0 and >> keep returning TC_ACT_OK at the end. >> >> Fixes: 933a741e3b82 ("selftests/bpf: bpf tunnel test.") >> Signed-off-by: Hangbin Liu >> --- >> tools/testing/selftests/bpf/progs/test_tunnel_kern.c | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/tools/testing/selftests/bpf/progs/test_tunnel_kern.c b/tools/testing/selftests/bpf/progs/test_tunnel_kern.c >> index 9afe947cfae9..ba6eadfec565 100644 >> --- a/tools/testing/selftests/bpf/progs/test_tunnel_kern.c >> +++ b/tools/testing/selftests/bpf/progs/test_tunnel_kern.c >> @@ -508,10 +508,8 @@ int _ip6geneve_get_tunnel(struct __sk_buff *skb) >> } >> >> ret = bpf_skb_get_tunnel_opt(skb, &gopt, sizeof(gopt)); >> - if (ret < 0) { >> - ERROR(ret); >> - return TC_ACT_SHOT; >> - } >> + if (ret < 0) >> + gopt.opt_class = 0; >> >> bpf_trace_printk(fmt, sizeof(fmt), >> key.tunnel_id, key.remote_ipv4, gopt.opt_class); >> -- >> 2.26.2 >>