Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3501798pxb; Mon, 4 Apr 2022 19:02:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9xDZIiINioaWXESUAjJxULiooTvylc/phYZMFKECq+LvKxDusSLELOfA4od1liHkY5Jgd X-Received: by 2002:a65:6942:0:b0:378:9365:5963 with SMTP id w2-20020a656942000000b0037893655963mr917457pgq.142.1649124134991; Mon, 04 Apr 2022 19:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649124134; cv=none; d=google.com; s=arc-20160816; b=vz4j3h6s4tklyBBN+QkGFcgwn6kBlav/53FpK1Z1PTRpytjSLIxZAWYfmuk3M1WHGQ MIyYmrZAh5tZnOYhKWvLMFWCoi2nnEY7Ym5dewV0WjWdpQrMh24LoYnew37js8/MqoX4 hBkXDKu9aKFlbIwAMfVitg5tmqSh1PAIblsdZPycg1DzHZFAj1pgHxa15GPTESFPvFbC +OCdoSlb1i62x5W8pazKYve9WYv6se2caNkbg3aDoEdL3y/cseAQ3RS1vMX2hIIDyIsx al/m5n/DKbxR5rajwcft7rXLulfQlDisVjbVZMPmShNhQxk6wXHw5h488JIJI8SV3lcD 31HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=qbs9fcy6lDcW1tCE9uYKKNhbnr1Z/YXZ62q7mBkw+1c=; b=u9DmrRSc5ahtPkrShziBRrUvQj/r1lRGwhesvm3ynJhwXL4q10F3cQ7H3JzYj+k3SG 64tdFMaQ06T8ProoNlfEVBYNGxrQiZehJNe7NtKA/X2OdWe3F/LIqoqZa6z7u0btCPFi 9isa/oWWwlqnG1OECqWacU9JY/DyT1gtyQckIUQk8NPcZEuBZah2BPLI6/8KC2puO001 muEyfjNS055cimpTOAMV2pU4qkpwH2bzt/izthZKReUxlSjmaQfpHDF2BI7t3y1eP8ie avmMzkxp/DZu6F/wI10tAIseinomKDOc8vjw2l+dmQUL7OpdDJRtKSmo7dZUHkAMmnQ9 oKDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UeAE3U3C; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u11-20020a170902e5cb00b001541c9df632si13131121plf.400.2022.04.04.19.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:02:14 -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=@gmail.com header.s=20210112 header.b=UeAE3U3C; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0EE69223BCD; Mon, 4 Apr 2022 17:28:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235876AbiDDWVJ (ORCPT + 99 others); Mon, 4 Apr 2022 18:21:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347142AbiDDWUm (ORCPT ); Mon, 4 Apr 2022 18:20:42 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 366372AE10; Mon, 4 Apr 2022 14:45:55 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id p21so13032340ioj.4; Mon, 04 Apr 2022 14:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qbs9fcy6lDcW1tCE9uYKKNhbnr1Z/YXZ62q7mBkw+1c=; b=UeAE3U3CTKW6k3yqp8bKs5G6U3tfXakM/JhxcWWsZnY49QOpMTm8SOo2Shls04fi7A EA9zCQqAku5o8m+PAzraf0VORzs3fE/q2Tiye5tkYEQxDHkurkpOwhfKkW3gs/LzDwDN ciJe8mswgvLuE0GV+Gsd6Kd0PqP0l3rG9WWukZDwkqAqtYeEjQYVpMvcTJNa4gNCTUOr dmKkgzgptwLuWHOI0G0eOWLqdGcP/NNKJFIxVN46qj2OQcnOhEEhAouXjqli8dPCDl3z 3qA3asP6zJBSU8fR0JQWcItCnSvaF3dfp4EL1DKeHEHKbyr559BEyz/mmQXUSk/Dy2tH CwCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qbs9fcy6lDcW1tCE9uYKKNhbnr1Z/YXZ62q7mBkw+1c=; b=yxB5JwRRRV3sA7HNdb7GBgfjX8yCQo2UMksfYrbi3AjQTbltic3ZzqP/0qyC0Gxzz/ O5quEUr4awhikVzLM3OokWPngRw4/HqdXJ48Wt4oFVlSvJHi6Be7Wcxg7fSU4mlIb79I MVp5/iXUCHNQr2p7DRSTlcFrFRPxYjyIwxR9VrxeJzhVIjPsWKspLnHRC8XG6RMJBRGe pKeShJykWQ7wbcOlZaXBUR3OtZJyEuJWVh7ElJ9RES9wWRPV2Xwt+s4UVHrWPBtZBXs7 IdPnPzWid3PBKWGRhqE9H4kyvrjBzFgIijlfzdyUp6cFSkKRQB9YqsPiGrP1UeY/bAbc Eu1Q== X-Gm-Message-State: AOAM530Q+x9PPV2aCQ36y2K4LyEH4u12OAnKGBH0d3foFwM/LdtnRlE7 rXHQkjcJ+EZ+Y0RqrhdEbLcFs8zceumzzgFGznw= X-Received: by 2002:a05:6602:185a:b0:645:d914:35e9 with SMTP id d26-20020a056602185a00b00645d91435e9mr163158ioi.154.1649108754584; Mon, 04 Apr 2022 14:45:54 -0700 (PDT) MIME-Version: 1.0 References: <20220404115451.1116478-1-alexandr.lobakin@intel.com> In-Reply-To: <20220404115451.1116478-1-alexandr.lobakin@intel.com> From: Andrii Nakryiko Date: Mon, 4 Apr 2022 14:45:43 -0700 Message-ID: Subject: Re: [PATCH bpf-next] samples: bpf: fix linking xdp_router_ipv4 after migration To: Alexander Lobakin Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , Lorenzo Bianconi , Maciej Fijalkowski , Networking , bpf , open list Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, Apr 4, 2022 at 4:57 AM Alexander Lobakin wrote: > > Users of the xdp_sample_user infra should be explicitly linked > with the standard math library (`-lm`). Otherwise, the following > happens: > > /usr/bin/ld: xdp_sample_user.c:(.text+0x59fc): undefined reference to `ceil' > /usr/bin/ld: xdp_sample_user.c:(.text+0x5a0d): undefined reference to `ceil' > /usr/bin/ld: xdp_sample_user.c:(.text+0x5adc): undefined reference to `floor' > /usr/bin/ld: xdp_sample_user.c:(.text+0x5b01): undefined reference to `ceil' > /usr/bin/ld: xdp_sample_user.c:(.text+0x5c1e): undefined reference to `floor' > /usr/bin/ld: xdp_sample_user.c:(.text+0x5c43): undefined reference to `ceil > [...] I actually don't get these, but applied to bpf-next anyway. > > That happened previously, so there's a block of linkage flags in the > Makefile. xdp_router_ipv4 has been transferred to this infra quite > recently, but hasn't been added to it. Fix. > > Fixes: 85bf1f51691c ("samples: bpf: Convert xdp_router_ipv4 to XDP samples helper") > Signed-off-by: Alexander Lobakin > --- > samples/bpf/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile > index b4fa0e69aa14..342a41a10356 100644 > --- a/samples/bpf/Makefile > +++ b/samples/bpf/Makefile > @@ -219,6 +219,7 @@ TPROGLDLIBS_xdp_redirect += -lm > TPROGLDLIBS_xdp_redirect_cpu += -lm > TPROGLDLIBS_xdp_redirect_map += -lm > TPROGLDLIBS_xdp_redirect_map_multi += -lm > +TPROGLDLIBS_xdp_router_ipv4 += -lm > TPROGLDLIBS_tracex4 += -lrt > TPROGLDLIBS_trace_output += -lrt > TPROGLDLIBS_map_perf_test += -lrt > -- > 2.35.1 >