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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 052EEC433ED for ; Mon, 26 Apr 2021 13:00:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C407E6101C for ; Mon, 26 Apr 2021 13:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233043AbhDZNBP (ORCPT ); Mon, 26 Apr 2021 09:01:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:26931 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233378AbhDZNBN (ORCPT ); Mon, 26 Apr 2021 09:01:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619442032; 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: in-reply-to:in-reply-to:references:references; bh=GEpTRPy40MEBUFi+Yc9OsnLT4rHJGc3ZMP0bWoETgcw=; b=YXrJz8OwA0AdoY9e+hLoyZqWS02RTjpgkuVBAYqMiBPPLvCb4JDC8DhtH6tqjvBbZEtc1+ FqadQAUTy8q9aPhMHS0L38AHxdQs5tULQ2pXb1htRt/g9Eg9hcpIK3r8i9oyjrV5+xtCy1 7nMFds3D3knyAr5J5LS6Ddl76Q3oE2M= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-PMLn48OAMUmwcU9eo7cpiQ-1; Mon, 26 Apr 2021 09:00:30 -0400 X-MC-Unique: PMLn48OAMUmwcU9eo7cpiQ-1 Received: by mail-ej1-f72.google.com with SMTP id n13-20020a170906b30db029038ec026319aso745902ejz.1 for ; Mon, 26 Apr 2021 06:00:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=GEpTRPy40MEBUFi+Yc9OsnLT4rHJGc3ZMP0bWoETgcw=; b=O5w9m8sSAB86Qqhk/VHEl+dZoPDs3tmZj/KHBjZpLJ6HIWZxmarij+LUNP/IgdFkpj 5e3R+/APzpI3ZyiyVIV9gBJqxyU5L/QsWlXRJmtJaDRxqgs08vYVsrKQ9vdriu8udyH9 30eazBJA8DP+GZLDBBuczUaTy2NxvNOUDKeK28eOOzuSf+YCXcmCkXX9K7aaWMHhapp3 xiJcHJ0Ytr8lUloZED9ZPPXn4quPycfHewqnF3Jmws5x4jEtCrNvDRoNFD9KaHwrHpDQ ez2h7FXGl1vkbQLk8r02Y6lzlS+CDqCxXSoIjox0aPNIkDf4z0sZG4x7GN7/tda0MP2j ZJPw== X-Gm-Message-State: AOAM530oPZLHo4nJXR+ajwQj+rcxMcCln45jKVUgO2nDP9RKPujkQ+/j tNVemzvjNryro9x7atzvgwMgHRU2DOlUbvifjatvHSnWp6qhYud3+Vl6dQSplx8KKDLO8/1ywum ux56zqnehz+WQ X-Received: by 2002:a17:906:705:: with SMTP id y5mr5385179ejb.261.1619442029031; Mon, 26 Apr 2021 06:00:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW5GJog/3Xe6Vg8Ay+d+x8d9ImPS5ZLoGu+i/a9SCGKNx6PtLiRE2Wddn0nTzXKDs+QO8CMQ== X-Received: by 2002:a17:906:705:: with SMTP id y5mr5385168ejb.261.1619442028894; Mon, 26 Apr 2021 06:00:28 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id t1sm11525390eju.88.2021.04.26.06.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 06:00:28 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id C6614180615; Mon, 26 Apr 2021 15:00:27 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Hangbin Liu , Jesper Dangaard Brouer Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, Jiri Benc , Eelco Chaudron , ast@kernel.org, Daniel Borkmann , Lorenzo Bianconi , David Ahern , Andrii Nakryiko , Alexei Starovoitov , John Fastabend , Maciej Fijalkowski , =?utf-8?B?QmrDtnJuIFQ=?= =?utf-8?B?w7ZwZWw=?= , Martin KaFai Lau Subject: Re: [PATCHv10 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support In-Reply-To: <20210426114742.GU3465@Leo-laptop-t470s> References: <20210423020019.2333192-1-liuhangbin@gmail.com> <20210423020019.2333192-3-liuhangbin@gmail.com> <20210426115350.501cef2a@carbon> <20210426114014.GT3465@Leo-laptop-t470s> <20210426114742.GU3465@Leo-laptop-t470s> X-Clacks-Overhead: GNU Terry Pratchett Date: Mon, 26 Apr 2021 15:00:27 +0200 Message-ID: <87eeexciac.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Hangbin Liu writes: > On Mon, Apr 26, 2021 at 07:40:28PM +0800, Hangbin Liu wrote: >> On Mon, Apr 26, 2021 at 11:53:50AM +0200, Jesper Dangaard Brouer wrote: >> > Decode: perf_trace_xdp_redirect_template+0xba >> > ./scripts/faddr2line vmlinux perf_trace_xdp_redirect_template+0xba >> > perf_trace_xdp_redirect_template+0xba/0x130: >> > perf_trace_xdp_redirect_template at include/trace/events/xdp.h:89 (discriminator 13) >> > >> > less -N net/core/filter.c >> > [...] >> > 3993 if (unlikely(err)) >> > 3994 goto err; >> > 3995 >> > -> 3996 _trace_xdp_redirect_map(dev, xdp_prog, fwd, map_type, map_id, ri->tgt_index); >> >> Oh, the fwd in xdp xdp_redirect_map broadcast is NULL... >> >> I will see how to fix it. Maybe assign the ingress interface to fwd? > > Er, sorry for the flood message. I just checked the trace point code, fwd > in xdp trace event means to_ifindex. So we can't assign the ingress interface > to fwd. > > In xdp_redirect_map broadcast case, there is no specific to_ifindex. > So how about just ignore it... e.g. Yeah, just leaving the ifindex as 0 when tgt is unset is fine :) -Toke