Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4141581imm; Mon, 8 Oct 2018 15:55:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV62k9lh2wjJtFQZUKrenmb3MDwXmuE52ECOlFs10k5o6i1CWf5RZaA3YoiuW6q0wilC0zVFc X-Received: by 2002:a62:18d3:: with SMTP id 202-v6mr21648687pfy.143.1539039318529; Mon, 08 Oct 2018 15:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539039318; cv=none; d=google.com; s=arc-20160816; b=XrxAMDorACcCe+JzlNgk2/9jJWRZcgBV4JD5jRg83KS5Nf7/XP8f56LSsN1r4xkbl5 FDL1QjFDTkGKe/ZAw+1TmYKfDWgV6RG6Zrv1+bJzrV8Cc+EjfePEfQCW5mkDWX8U4BTO /mzUvsiukoiJvd7WLCsO+OCOCfPakc7Yd2H8jh7Pgec6H69eb1LUVMK/MfyTEwbKzO9u kAqx4wuB8FLgwfuJQBYpMp+aI8UX8Wv39CDmWOPpAzEHOYjlAOHqV7lMOE6lDLp/ZT73 FepT669dSLJWuki6diw+q8QZ3Nd/1qzipkd7B1IW3UntEJIYIMDfDooLS80gEdrQmvDu JIPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=BAFBS/g/5IUg8+pM2N02XZ4T9PZvyYxcPg6NjaYF9Z0=; b=umCN7d8df2BNGTZafyxJ+Wn9KJVMWz22e8b9ItSPzs37xGyBsPZfFDrrh9lgVWk0tI GsCRKuB+xYfbZnX1QXVxHAA+S4xGjimYsQKiC/RpObkZWrNqSQd72e6PmuQk2IA59mV5 amFSq/yNelxSId5Ocq0Tgqi7WSkwJ+cL24T+CPbrzwdLiLwksL2X2IG0tsNktMbwojk7 4QJfuDuKl4H/A0lu29BMTokYgD1R91+e1K2tzPHqkT4Plk2kStgZhsoHPL5q7iDgrcia GFZ+aifl80klHFttoA41OADsKpY+f7Nqe81gW5CYD8mA65iF5vwrJdC5YYTVSfnDGjBy BRkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h189-v6si15925291pge.174.2018.10.08.15.55.04; Mon, 08 Oct 2018 15:55:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726862AbeJIGIp (ORCPT + 99 others); Tue, 9 Oct 2018 02:08:45 -0400 Received: from www62.your-server.de ([213.133.104.62]:58318 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbeJIGIp (ORCPT ); Tue, 9 Oct 2018 02:08:45 -0400 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1g9ePs-0006DE-5I; Tue, 09 Oct 2018 00:54:20 +0200 Received: from [62.203.87.61] (helo=linux.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1g9ePr-0000MX-VJ; Tue, 09 Oct 2018 00:54:19 +0200 Subject: Re: [PATCHv2 bpf-next] bpf: fix building without CONFIG_INET To: Song Liu , joe@wand.net.nz Cc: Arnd Bergmann , Alexei Starovoitov , "David S . Miller" , John Fastabend , Martin KaFai Lau , makita.toshiaki@lab.ntt.co.jp, Lawrence Brakmo , Andrey Ignatov , Jesper Dangaard Brouer , Jakub Kicinski , Mathieu Xhonneux , David Ahern , Networking , open list References: <20181008183001.10406-1-joe@wand.net.nz> From: Daniel Borkmann Message-ID: <7afaf95f-a8bd-986e-02ac-2f4900ae1c1a@iogearbox.net> Date: Tue, 9 Oct 2018 00:54:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.1/25019/Mon Oct 8 22:53:15 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/08/2018 10:52 PM, Song Liu wrote: > On Mon, Oct 8, 2018 at 11:30 AM Joe Stringer wrote: >> >> From: Arnd Bergmann >> >> The newly added TCP and UDP handling fails to link when CONFIG_INET >> is disabled: >> >> net/core/filter.o: In function `sk_lookup': >> filter.c:(.text+0x7ff8): undefined reference to `tcp_hashinfo' >> filter.c:(.text+0x7ffc): undefined reference to `tcp_hashinfo' >> filter.c:(.text+0x8020): undefined reference to `__inet_lookup_established' >> filter.c:(.text+0x8058): undefined reference to `__inet_lookup_listener' >> filter.c:(.text+0x8068): undefined reference to `udp_table' >> filter.c:(.text+0x8070): undefined reference to `udp_table' >> filter.c:(.text+0x808c): undefined reference to `__udp4_lib_lookup' >> net/core/filter.o: In function `bpf_sk_release': >> filter.c:(.text+0x82e8): undefined reference to `sock_gen_put' >> >> Wrap the related sections of code in #ifdefs for the config option. >> >> Furthermore, sk_lookup() should always have been marked 'static', this >> also avoids a warning about a missing prototype when building with >> 'make W=1'. >> >> Fixes: 6acc9b432e67 ("bpf: Add helper to retrieve socket in BPF") >> Signed-off-by: Arnd Bergmann >> Signed-off-by: Joe Stringer > > Acked-by: Song Liu Applied to bpf-next, thanks!