Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp770273pja; Thu, 19 Mar 2020 10:41:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtbazU03M+VvaHc/Cxm4E3vpK6WKQed6HoiLrhdNTUd96MsaIVscn1hc2CNRVAu67U57OXp X-Received: by 2002:aca:5317:: with SMTP id h23mr3360601oib.33.1584639663758; Thu, 19 Mar 2020 10:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584639663; cv=none; d=google.com; s=arc-20160816; b=i5emvL3Gsa8Is80vq3tsjWh1/IjsDGhXDqmT5hc5RGCGuzv0tdxNgNBQ7jt3JaTCJl EiVfGradEduughSCTiMLU8AIEbMUv4kvMSb9EynrqoqqqSoSGd82eAx61Xydi/W1rsUt jJKkOOWu696EY0xN3DXjBNPwbl/AMXggX9E2AndAV8JbtTH5g2pusOhj4xcsxZK9UCm/ MhPbFJwZCcKIAG5401b/bsCObxFG0gh7N4H4cnfK2bh8gYiVNB7b/ejNNyXteHbbC7PV qCGCRy/PwHubmdyEzapjVP72j2Eh4RJnXdWim2ZxkDKzXjRvglH098qujbyKSug6rj5/ 4YuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PPbGgs4Rz2rmlkEGYcxAMjdsYAQ4dAfXfNpPuXXsgYU=; b=ZS4ICF/U3IO16rtqXUyPZ+TtEeVHb7iM1L4uyQwFvoe61VSr+qMlKSQX2AzDKSkDuT UK4TgNr8SAiQwHUS9jh1jOmrdfowqmOWeEljG+gmKomqaPNZnGH05+rpMctnHfiiVI+9 AOE6GMLZuCmMM0cXSi3bugDzkcGMIoTUt9hHuUbJPns6QKR2Du+QFpk0kUc8H0qLOnT0 buAikbAhILUbVzpSXHJAsHYe+YeNt4D56afJ/X99dn8QFwGzcX0Vcb5FHf8d8QxdC8qh gV7LAGhpNS9ifyrAXqypluZPo65pEQnsB+cMO0EDAFAfdpSTp/RU5kYifrO1PnswHl/L Mt7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QreGGVLW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5si1541145otc.161.2020.03.19.10.40.50; Thu, 19 Mar 2020 10:41:03 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QreGGVLW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbgCSRim (ORCPT + 99 others); Thu, 19 Mar 2020 13:38:42 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:37511 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727009AbgCSRil (ORCPT ); Thu, 19 Mar 2020 13:38:41 -0400 Received: by mail-qt1-f196.google.com with SMTP id d12so114540qtj.4; Thu, 19 Mar 2020 10:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PPbGgs4Rz2rmlkEGYcxAMjdsYAQ4dAfXfNpPuXXsgYU=; b=QreGGVLWyJYHh1IFERLJOEvXAy98RixUjHEQKXn5F5+8e7H9hnbWpFmUVdguLCUY2T V4qKC8tmI2glfuWKvVNdgba1uiISdjRZ/r/6NQp1wZOSyfdmJpNVBkkLSmAItLb6E3ur 3hZB6IbL3Jt/0MMTTEZnzAwpsoa0yJ+jybm2JqJvb8W/FBPCAEbOmkwavuUHDgY6RN0Y yJOutyqjFWb8uiZXn7DdKQV0xV8fi1W8FY1Z7wXzOLbStS4ZhpWqSW8rCMzpjWivMKps 09qc39s7ByX4vF/P4tQuPZHJ6kPIs4c1SCRL8qO1sdL5TM0usqaCCFuIYfhMRRVc74+D D5Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PPbGgs4Rz2rmlkEGYcxAMjdsYAQ4dAfXfNpPuXXsgYU=; b=aQs5h9qK1OaXgXxmjPE7WjkLNiVzAOvOJnEmktARzZgjxQTStVJNwOYT5F6vUedawk KB49SK2UTmve4MEIe6d1bor1zqVtdDGHWGmyP2oIRE+p8ei2mFVi1Bm5V6r6slATDZ+3 fqO1t3FrklaIiZk+OTUuWHVS182vyuxx2GZkJ2G+pkwtA0cmqMFxldNcQ/d29WEYcncL PSAzJ8j9axjLWQ20Xr9L7TUwJOARlIzvmfBbpgioOonA+iRNoqEwcKz59C/0jHgAR/UW pMYq51vd6cYafoerq5lxzCZ9LoOdVkaixDwpMJSOG/HoM5CB+xxfcd1LMUYWav9fcv0A 2pqw== X-Gm-Message-State: ANhLgQ0EsIpMqXqJFLwUEfXEQMAfmNM5Xt27jERH0+limAKoXpU8NryL F+L26I6/POKD9TEMrEojYgQ8Cp8L0fTAGQ35RPg= X-Received: by 2002:ac8:7448:: with SMTP id h8mr4101625qtr.117.1584639520560; Thu, 19 Mar 2020 10:38:40 -0700 (PDT) MIME-Version: 1.0 References: <20200319124631.58432-1-yuehaibing@huawei.com> <87fte4xot3.fsf@cloudflare.com> In-Reply-To: <87fte4xot3.fsf@cloudflare.com> From: Andrii Nakryiko Date: Thu, 19 Mar 2020 10:38:29 -0700 Message-ID: Subject: Re: [PATCH bpf-next] bpf: tcp: Fix unused function warnings To: Jakub Sitnicki Cc: YueHaibing , Lorenz Bauer , Daniel Borkmann , john fastabend , "David S. Miller" , Networking , bpf , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 19, 2020 at 10:00 AM Jakub Sitnicki wrote: > > On Thu, Mar 19, 2020 at 01:46 PM CET, 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 > > > > Reported-by: Hulk Robot > > Signed-off-by: YueHaibing > > --- > > In addition to this fix, looks like tcp_bpf_recvmsg can be static and > also conditional on CONFIG_BPF_STREAM_PARSER. > > Reviewed-by: Jakub Sitnicki Fixes tag is missing as well?