Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4109463pxb; Fri, 11 Feb 2022 15:56:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9WIqtyP9/GLCp+DeEmu7NCKMyBiXfvZG54RrWRMr3kdJFpr2BLQFriDRI+Gnc0B+0XvHY X-Received: by 2002:a17:903:11c7:: with SMTP id q7mr3861121plh.83.1644623793000; Fri, 11 Feb 2022 15:56:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644623792; cv=none; d=google.com; s=arc-20160816; b=E81xtNfIXmVbItpJQrp7cVKjg8/x7F/KOD/9GugfTWFid5xRRC/1w2djkooWF1U6zR 9RNFN2omqpg+/w19KXAa8k45IrmIpy7prafh6ng1JcWRZUvxvA/B7EVGNipG6P/Q3F09 hZMOoekDDUp62NELmSAi4EOOR86v6Yo+4a/S2MFTEpdjtu+m0M9/5JpilbbeHrfZJYeD ADBsIA3qQ5Kse00xA+jTrIVveZsLOcqDbL8Rk8sWcf4FRF3WayIC1L1CA75VSPJt2gfv +3xLID2YvxhQG42+cXltdfKWGRZBoISN2KWy9xbbRerzC5Z/aBUmou6pWpc7PtFTtvpm fb9Q== 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=ekc7Tn7BClDcaiwZG8Yr7X/WoQx2hyzA+9mP7+Tb9Iw=; b=sgWQluYJTDHRjI06zIJdT/AsvmAnu1myn8J+U/qB5kD8A+4+16gj+IjHFBW4/YTCEj w0aLBB05GyI/Nw183yZXWfoG1lHoX2WfsD3Rf/G71HLxw2N8XKADNnH3NC3H9ojcuF0K mhi5E5pcSYm9Mt1BuWsIHLITcfPqa4WBuljdgNsawfmzOhjBuiZF/M2jRKhJrR5qRuzi PgpbddQN6dZtc8azHQ8gW67/Fw4etASl7rh3sbSE/24OGmfunx4n1NABDZdN9fucmn9z ei7dYM1HEeluYcCe0hMzOnZOtK2+LXHE+O4NUh16/VuCNgh1r3/l+RZX3wcY9gEP/GLO Pq1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=afCuEy6A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3si440974pgv.814.2022.02.11.15.56.18; Fri, 11 Feb 2022 15:56:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=afCuEy6A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351615AbiBKQkc (ORCPT + 99 others); Fri, 11 Feb 2022 11:40:32 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbiBKQkb (ORCPT ); Fri, 11 Feb 2022 11:40:31 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00F8A102 for ; Fri, 11 Feb 2022 08:40:30 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id y22so12169602eju.9 for ; Fri, 11 Feb 2022 08:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ekc7Tn7BClDcaiwZG8Yr7X/WoQx2hyzA+9mP7+Tb9Iw=; b=afCuEy6Av7E0JVwRWduZBNc4FeWRqu37aNR+Qf+u2ykSinUNiOgppx79vQDsHGDWBF NOzGqNAotlD8xWBfWY+Oj4wE03KNIcbs+yGE8k8ubJSZagWi9lUBFHV79pyFnvhHydtX 0RhzDkrWxuOEIsOhirb9SFIl/IDRN8mnBZaoA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ekc7Tn7BClDcaiwZG8Yr7X/WoQx2hyzA+9mP7+Tb9Iw=; b=skG7/5f27T79VN7uzWOBMCR5gOPVD/bCAHSqD1koRyudzCZQH+ymhQyj1VUJOpp9GY oQxjBC6aI59Tq4yglX3+CsTMttt7UVfAnKCo3LfNElA7MmYvRtym9CrMOU3Fh6FMpOn2 GqGdX538Hn7JIVfLySYbkxDQ9ZL3K8Hsfocc8h+8Le0tmhd871uVuzt+Cde7OsU9KaSQ 18GUV6jHFJCMeF/Nt4ZXa8VRPsOcbYMg9ddH3XNTSZdW1nLLOB8aWOYUdcKmLYBSEZZM mipjdik7Fk+I/G5qLGHvpOnHoGonywSigJyAfXOwudrsuLQO2Qf+x5GimA0r20547cs2 frQg== X-Gm-Message-State: AOAM530Qv7ExFR3oD2rNJErQGJRO6AYQEZwbPptTxBkgFkQuN7c3B8rc jqpPeG4jCaaR56pFgtjO5j3sJg== X-Received: by 2002:a17:907:a428:: with SMTP id sg40mr2165519ejc.128.1644597628508; Fri, 11 Feb 2022 08:40:28 -0800 (PST) Received: from alco.lan (80.71.134.83.ipv4.parknet.dk. [80.71.134.83]) by smtp.gmail.com with ESMTPSA id cn15sm5818965edb.37.2022.02.11.08.40.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Feb 2022 08:40:28 -0800 (PST) From: Ricardo Ribalda To: "David S. Miller" , Jakub Kicinski , Eric Dumazet , Hideaki YOSHIFUJI , David Ahern , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Subject: [PATCH] net: Fix build when CONFIG_INET is not enabled Date: Fri, 11 Feb 2022 17:40:26 +0100 Message-Id: <20220211164026.409225-1-ribalda@chromium.org> X-Mailer: git-send-email 2.35.1.265.g69c8d7142f-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 If the kernel is configured with CONFIG_NET, but without CONFIG_INET we get the following error when building: sock.c:(.text+0x4c17): undefined reference to `__sk_defer_free_flush' Lets move __sk_defer_free_flush to sock.c Signed-off-by: Ricardo Ribalda --- net/core/sock.c | 14 ++++++++++++++ net/ipv4/tcp.c | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/net/core/sock.c b/net/core/sock.c index 4ff806d71921..b93b93497e7e 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -2045,6 +2045,20 @@ static void __sk_destruct(struct rcu_head *head) sk_prot_free(sk->sk_prot_creator, sk); } +void __sk_defer_free_flush(struct sock *sk) +{ + struct llist_node *head; + struct sk_buff *skb, *n; + + head = llist_del_all(&sk->defer_list); + llist_for_each_entry_safe(skb, n, head, ll_node) { + prefetch(n); + skb_mark_not_on_list(skb); + __kfree_skb(skb); + } +} +EXPORT_SYMBOL(__sk_defer_free_flush); + void sk_destruct(struct sock *sk) { bool use_call_rcu = sock_flag(sk, SOCK_RCU_FREE); diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 02cb275e5487..bc5b5c29d5c4 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1589,20 +1589,6 @@ void tcp_cleanup_rbuf(struct sock *sk, int copied) tcp_send_ack(sk); } -void __sk_defer_free_flush(struct sock *sk) -{ - struct llist_node *head; - struct sk_buff *skb, *n; - - head = llist_del_all(&sk->defer_list); - llist_for_each_entry_safe(skb, n, head, ll_node) { - prefetch(n); - skb_mark_not_on_list(skb); - __kfree_skb(skb); - } -} -EXPORT_SYMBOL(__sk_defer_free_flush); - static void tcp_eat_recv_skb(struct sock *sk, struct sk_buff *skb) { __skb_unlink(skb, &sk->sk_receive_queue); -- 2.35.1.265.g69c8d7142f-goog