Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp914264pxb; Wed, 6 Apr 2022 04:07:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+lSHCkR9lILlfqdqLp5Bt9THVhHfzLY+Dn9PpboPnv9T6NyA2foBUgXG37plpVyeTe2uq X-Received: by 2002:a05:6a00:114e:b0:4c8:55f7:faad with SMTP id b14-20020a056a00114e00b004c855f7faadmr8509719pfm.86.1649243279002; Wed, 06 Apr 2022 04:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649243278; cv=none; d=google.com; s=arc-20160816; b=U6F3fuf/14bKKCvqFhXuAm8jrMz7K++OmhrW+0Ltlh7/aYcsTBx6F1JkBaRtorhkgU Xz8GfwJObSpCqlMKRpUJWmusDemAz3nCEztaNHQRr7s0FG+DeKxHmv2fg3i3CRI82qdd y6L0Kn46nttBk5MZrGTHIrJXck/xPLJw8xropz8YBIOEYpIBVSS9ptZqUgm0kjb6ESX0 Ee/fOR8K3hEDaLT9PAhNpJXOByw56LL83Rgu0w2CeVJiphnPiGwfGuZgPftT+8MAGui/ 4IiN3ikKGZNQNtIjoK85Zg1HQRxmGUo2XOT72c5ISCCxMUNf++iwqMOEf7JgI/qEtP5S AvmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QG+czr/dZ0VG69KRtje6CI+JSq6H9p6IhABTWqgOWmI=; b=kEEjS8jl7hI93Q1KgBuPg6OjpV3Jue9wIkBgshgSWj/DkNt7eoRXl2bIn8edlKms8d qbUGqkgzZ/+SRgUUrZlm3oI5z/imJlnwNsibbu1FeY7sVm3bnf1So86MbB/+AAom1Dc+ z5BDWUePD6csnXYc0mt2KovymmC/mEkm0zpn9ufc4JWUkDvNuO2/32c0/XlNY/epUolw oYmYy9VD7FuaNQvSwfB77J9ky0iW/BZ9xzbRlEabNuxfftoss9PRgZjzGziYsgYVhHhz zSQYBz18rx/ZDB5ZNUkpm54yInefrT0Rq1y3/UUy8dkQM50ts0k7Q/EGyN2DG055wGmj Fsxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="bu/JViFn"; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 34-20020a17090a0fa500b001ca6c627df7si4371056pjz.117.2022.04.06.04.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:07:58 -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=@intel.com header.s=Intel header.b="bu/JViFn"; 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=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0A9C62E9BD4; Wed, 6 Apr 2022 02:30:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1839414AbiDFBDL (ORCPT + 99 others); Tue, 5 Apr 2022 21:03:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355415AbiDELOr (ORCPT ); Tue, 5 Apr 2022 07:14:47 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 126234C792; Tue, 5 Apr 2022 03:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649154872; x=1680690872; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UTD9oe2pef3Z84hPGqQnOjRJpiHk0wcvpWnMnU5moJo=; b=bu/JViFnT33N1Vvgq9Gdkmhd0X8GObKDaZzQvnhTXRKihTWXkw5099Z4 5LFQVGbdZXuRDjUQMiVAr9B09lgVY7KYI1C/M1sggJB7K5NBwoVHes3nf Ik5P0ujproIsBO+NBWYYUBT8zngyBUHjCqe/RMFncfG3Qr2vqYFjCFZ+A 1SSJzkKf9Yr3cuvmOQaC161OFwqnONJvABklcXIbIRa8+p1WYofOZkL5+ dSc7hJf4sdQGnPVkiASrG8Pppbj7tKAbrLD8OH4or/NbRF5GA8vTb4iEo UPwHNonYAd7milViz5vl2IB3k4c0ktZox1RBZyhHnFKC0dMlYD53k0AxU Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10307"; a="258301832" X-IronPort-AV: E=Sophos;i="5.90,236,1643702400"; d="scan'208";a="258301832" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2022 03:34:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,236,1643702400"; d="scan'208";a="549005815" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by orsmga007.jf.intel.com with ESMTP; 05 Apr 2022 03:34:27 -0700 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 235AYPjg012310; Tue, 5 Apr 2022 11:34:25 +0100 From: Alexander Lobakin To: Andrii Nakryiko Cc: Alexander Lobakin , 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 Subject: Re: [PATCH bpf-next] samples: bpf: fix linking xdp_router_ipv4 after migration Date: Tue, 5 Apr 2022 12:32:14 +0200 Message-Id: <20220405103214.3526290-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: <20220404115451.1116478-1-alexandr.lobakin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 From: Andrii Nakryiko Date: Mon, 4 Apr 2022 14:45:43 -0700 > 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. Depends on the compiler/linker I guess. They appear on `make LLVM=1` on my setup. Thanks! > > > > > 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 Al