Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp784550ybb; Fri, 20 Mar 2020 08:03:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt84yac+uQHVVkV2kek8YYkERI37x9db7bklQdBY7H8wzxGN5qmOenQwXTP6AzFdRtcSwSZ X-Received: by 2002:aca:bd46:: with SMTP id n67mr6510335oif.120.1584716617325; Fri, 20 Mar 2020 08:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584716617; cv=none; d=google.com; s=arc-20160816; b=MzBM5HpZWysnx8LqAmbJpHt0GC1jcfvew04//uUOo1PPvEo1oZ9j+72rsTFy5sh+aW jO2z8j34wcEjwxBUutj1wan6L6JrM8eTf8MDKrxsBGOJjAr8i1+rNbWpIcvsENh4A/PW o3+HHutpjrqFI48KLb5HHLdDrArFhw6Q5L3k0VmfdHwTPASxA/cxcGcXiw4JNBgb9YJS F4b1Q8Mv/m8h2s+asDh7ubk9t3SGGw8zhb/Folix6eDPO/jVXJ9xv8l8OP1vCg6QNu8v /spzpOqF+C5R4z00grlvgIjiY3n7dNASW8pXlf0KPhsu6fosoDkowGHFs7sPMyD4SUfo CY3Q== 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=JwKwofE1xJU21Hk8Qs8B9P6JNEiNAQK5YY5D/Mdl+gU=; b=IZa99PWQgwRGWDOidkA1rw7WUTig0WslX9CWXg/50K0fROYPo8M6fr4C6ZR/qEdaBP mfqJ+xCFhO82U5jKUwiHXlnX7+9V7tyWXBGu1LqpbnlwNN9S8sSRAECke353H8yBeNT6 BD9odRKfKUxxn2De+aYX81twVPLOagp+4el3FGK6/xTmUajpnymmlKgNKXiVKie/mIbI sixJcuCwOOhFIVqCBS1D92X7HLfoX2bSyKNY7X9ei4vV3eH4a3ZkUSNGb6an/n/E2+X4 fw5j89wUjjXZopxMYBQ5O/Tt78qgHumVISskLdHMlXwGJzSZkk/VH4gzwYuzqjyk09Oo EpgA== 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 s6si2976851oig.131.2020.03.20.08.02.55; Fri, 20 Mar 2020 08:03:37 -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 S1727177AbgCTPBr (ORCPT + 99 others); Fri, 20 Mar 2020 11:01:47 -0400 Received: from www62.your-server.de ([213.133.104.62]:50940 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgCTPBr (ORCPT ); Fri, 20 Mar 2020 11:01:47 -0400 Received: from sslproxy05.your-server.de ([78.46.172.2]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1jFJ9R-0004Ty-AF; Fri, 20 Mar 2020 16:01:33 +0100 Received: from [85.7.42.192] (helo=pc-9.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFJ9Q-000LQU-Ua; Fri, 20 Mar 2020 16:01:32 +0100 Subject: Re: [PATCH bpf-next 1/2] bpf: tcp: Fix unused function warnings To: Yonghong Song , YueHaibing , lmb@cloudflare.com, jakub@cloudflare.com, john.fastabend@gmail.com Cc: davem@davemloft.net, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, andrii.nakryiko@gmail.com References: <20200319124631.58432-1-yuehaibing@huawei.com> <20200320023426.60684-1-yuehaibing@huawei.com> <20200320023426.60684-2-yuehaibing@huawei.com> From: Daniel Borkmann Message-ID: <71161d44-da82-b4ae-ee9e-8291d9d03021@iogearbox.net> Date: Fri, 20 Mar 2020 16:01:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.2/25757/Fri Mar 20 14:13:59 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/20/20 5:21 AM, Yonghong Song wrote: > On 3/19/20 7:34 PM, YueHaibing wrote: >> If BPF_STREAM_PARSER is not set, gcc warns: >> >> net/ipv4/tcp_bpf.c:483:12: warning: 'tcp_bpf_sendpage' defined but not used [-Wunused-function] >> net/ipv4/tcp_bpf.c:395:12: warning: 'tcp_bpf_sendmsg' defined but not used [-Wunused-function] >> net/ipv4/tcp_bpf.c:13:13: warning: 'tcp_bpf_stream_read' defined but not used [-Wunused-function] >> >> Moves the unused functions into the #ifdef > > Maybe explicit "into the #ifdef CONFIG_BPF_STREAM_PARSER"? > >> Reported-by: Hulk Robot >> Fixes: f747632b608f ("bpf: sockmap: Move generic sockmap hooks from BPF TCP") >> Signed-off-by: YueHaibing >> Reviewed-by: Lorenz Bauer >> Reviewed-by: Jakub Sitnicki > > Acked-by: Yonghong Song Both applied and addressed feedback from Yonghong, thanks!