Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3463188pxb; Mon, 4 Apr 2022 17:47:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh9/j6ZgzuhL/doa5/v4OOa4OW8WAL+xtQ03VPVEBpT/Qo1rJqrOyMzt9I5WSP4sQzVHmM X-Received: by 2002:a17:902:d506:b0:154:377b:a38c with SMTP id b6-20020a170902d50600b00154377ba38cmr746653plg.100.1649119650864; Mon, 04 Apr 2022 17:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649119650; cv=none; d=google.com; s=arc-20160816; b=TysvkdAhz2HYQGQAxq3+n1p4wZAeAUeHsHAIaCt5WrvKw6yl2NMp/WEabHkNTf6Mzt cPGHq32+kU2EXPnU8pUyl/2HRanhoGybvVgxlySgVoRbOwwZYsYjoHUx9DEZa+l5gbkD TH1dRUuPC5pPwHvqKsbThLgiJBuntnDiqKVYGWNRds0QAfpuifIb5WVhYxLijxF1n66D RW+FgE7LqZUrQLmoM34gFE/xQkeu68WKHz/TUlCuDI93N3ql3rPeTRGAcSq0BZ19P3la eT99Pyp8LYRvL54vsPkf4GU078KCUa4M7dYD9zSCWaE/DKHO0P2G1yNToukfVU1n3vP7 n1Rg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2EjuVBZ0evCVwiGY5+LkMbkVCTuj7NjulkqEKyyHvfM=; b=mzOkg3JUp8wDeolmF182ifskaYZuTMadoUz30Cvyw+sH8pwZ9rVUBSQMqBt8+VlO0p 3dWy7EH8qkLFVlC1ToMlDtbuXq2kg1nHl5lGAt0D5ofM/KTtHsThiF+5CTf7Asqn6CLP A7g7BdGcw9qm9wGbvn/9AfiRcwbnMyScanOfGWASH3U8szVqcEOpgwK5nrZPl/wd/WJu 4mkoqZUtAxLXzHcGaeHhmAlFaXidAMQgys1TXMe6WRh5jpeFLKpkhDKV4NhOMlf6WV9G CBJGTcQJXA9GQwSOVDcvrocBDOBb8Hr6dPzK2XiR37dYL1mAj18uuGO2LKhU4ag3RXj9 jO1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IeTl+Gfm; 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 w1-20020a63f501000000b00398178a11f3si11376571pgh.467.2022.04.04.17.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 17:47:30 -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=IeTl+Gfm; 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 D2DC6CD314; Mon, 4 Apr 2022 16:58:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233233AbiDDL7D (ORCPT + 99 others); Mon, 4 Apr 2022 07:59:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiDDL7C (ORCPT ); Mon, 4 Apr 2022 07:59:02 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54FE93D1F9; Mon, 4 Apr 2022 04:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649073426; x=1680609426; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cKBDLLuOv+dWVKAI7ODe9hrQ39baEJrrNVpI0RZSqZI=; b=IeTl+Gfmmtc5CA8V1zI20M+VNYZRPAKkuj50MtJnJdioBrd6tDn+TWpU OcOJs7RQAjxTgZpqh16DRs2fVWlxstNe1daQhvQjUXE8uWEvp5nz+Ftlh yv4O8KaN1dYTbrKhhfAGUDQxIYPJ2bBas6AvBw3pMl6rMaxV641gtQM4W t9oHNpQiyQf/lNH2+f9tvvkSR6b7HFKdIg+HcKg2rdXLfeosUkFaVNr5E HN6W5AMFcnvn/33rW25a7DUVOoLLc851epN7rqj8CU+aWHPBnLAvgFlPh dYMm4GHszBOD2y6nWRboYUd3zaEgp8CbgnUhutVXvuN2cydkaj1EX/yDg A==; X-IronPort-AV: E=McAfee;i="6200,9189,10306"; a="260485246" X-IronPort-AV: E=Sophos;i="5.90,234,1643702400"; d="scan'208";a="260485246" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2022 04:57:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,234,1643702400"; d="scan'208";a="608014017" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga008.fm.intel.com with ESMTP; 04 Apr 2022 04:57:02 -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 234Bv0u5012668; Mon, 4 Apr 2022 12:57:00 +0100 From: Alexander Lobakin To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , Lorenzo Bianconi , Maciej Fijalkowski , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Lobakin Subject: [PATCH bpf-next] samples: bpf: fix linking xdp_router_ipv4 after migration Date: Mon, 4 Apr 2022 13:54:51 +0200 Message-Id: <20220404115451.1116478-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.35.1 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 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 [...] 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