From nobody Thu Sep 18 12:42:43 2025 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:a689:0:0:0:0:0 with SMTP id j9csp1495285jam; Mon, 20 Sep 2021 10:24:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfVSYmX2Orq9gIEfDyz4XP7ouHBFxZD2rHrSFclTfQQx9o3cV/Xkqt+XX92P14qUQRwlZY X-Received: by 2002:ad4:4b0b:: with SMTP id r11mr26443210qvw.49.1632158690637; Mon, 20 Sep 2021 10:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632158690; cv=none; d=google.com; s=arc-20160816; b=LDvBeXVPZMY54jD7oM1z1knTQWlexPmYwE6ulm+TEXIXxRd1o+Ir0aChMiYgRG+1i0 ChDZzHLHJu6GpSYsioeoVAgRzCaVayJeeSCbOxZI564mwo3d91iN595VxFfqE0wTLLto U3Fu7WMH8c77jZskZAfNAtx67pwjo3LVYSCa1W8FrMlb6uSVjjXdYpRxN4vVfz5vYKBT tJf+bTrBpqwpJbGN07oCUMuh+jPhY/tv191PCoMJubgZkCwTE63Y5mFwmfyhg+jtRE3S 85CkTiBd6iwQwne/o/9eL9s6duFnEft3A0PRbtxOxk+UQYpFYhThHzAQlZT7PxP/Vs5N M9Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=jHJuP6TU+3CSIWM10S4+0yoR3zKV97SHbHfLlIweF6M=; b=iRqaiH/PpS074OudTfKiYocu1zPb9RvMZhPwYTh70XuPyBNoeVtaMop3xQLFv4eEge ojIbmxAjc0/iv7bvrH0Nnkpi4y2wquZFoA/xyhFMondxwMbvh30ObhGxOx7IHB2mgNe2 O/d8/NndfviseRa9bZK/u9B9qQX0A1znxOrxD9hKuIQcR11rWIbbX6s7Ztm9LG+g2Crv F70MrcE0ia/YXaAfWq+H6ZXLY0UjEDZkS/+0xiNEjsK6NIlTBjUl//JWJ3UCguMdH4X1 jD18RlrB44PUtKnGz3LuLI7Bkz45KRQxQM0v2diyTGlXE3AnhL/i0ZuTbjTlpyI4w7kE +XwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="PL1ByMO/"; spf=pass (google.com: domain of mptcp+bounces-1984-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) smtp.mailfrom="mptcp+bounces-1984-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ewr.edge.kernel.org (ewr.edge.kernel.org. [2604:1380:1:3600::1]) by mx.google.com with ESMTPS id p6si1850461qvg.10.2021.09.20.10.24.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Sep 2021 10:24:50 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-1984-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) client-ip=2604:1380:1:3600::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="PL1ByMO/"; spf=pass (google.com: domain of mptcp+bounces-1984-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) smtp.mailfrom="mptcp+bounces-1984-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ewr.edge.kernel.org (Postfix) with ESMTPS id 50D7C1C03AE for ; Mon, 20 Sep 2021 17:24:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA4793FC0; Mon, 20 Sep 2021 17:24:46 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9E233FCB for ; Mon, 20 Sep 2021 17:24:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632158685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jHJuP6TU+3CSIWM10S4+0yoR3zKV97SHbHfLlIweF6M=; b=PL1ByMO/mJzBUiihFtsnVIbfHXilRrV/YG6xqUMUOtJ2mw96ZH1Z9z4dd6A3Ag+w5ITmrX XPniSqcSFIksxvheUj3cGYgAYzBShwPU23/6jiId13wRVtgHY/oJZ7QgcT2d+UwMapa7wy FWIHxz5F/kojMEHvJn78eG4UUrGa/R0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-304-YRTxEMcwP5qEL1qOWgCqYQ-1; Mon, 20 Sep 2021 13:24:43 -0400 X-MC-Unique: YRTxEMcwP5qEL1qOWgCqYQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D56751923767 for ; Mon, 20 Sep 2021 17:24:42 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.193.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D1FE1B400 for ; Mon, 20 Sep 2021 17:24:42 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH mptcp-next 3/3] tcp: make tcp_build_frag() static Date: Mon, 20 Sep 2021 19:24:29 +0200 Message-Id: <1949660e9af338adc8913b7cdf8c632401d6d6e0.1632158356.git.pabeni@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pabeni@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" After the previous patch the mentioned helper is used only inside its compilation unit: let's make it static. RFC -> v1: - preserve the tcp_build_frag() helper (Eric) Signed-off-by: Paolo Abeni --- Note: this should _replace_: """ Partially revert "tcp: factor out tcp_build_frag()" """ I did not opted for a squash to patch, as it would still require conflicts resolution after the previous squash-to patch. @matttbe: please let me know if you prefer otherwise. --- include/net/tcp.h | 2 -- net/ipv4/tcp.c | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 4a96f6e0f6f8..673c3b01e287 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -330,8 +330,6 @@ int tcp_sendpage(struct sock *sk, struct page *page, in= t offset, size_t size, int flags); int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset, size_t size, int flags); -struct sk_buff *tcp_build_frag(struct sock *sk, int size_goal, int flags, - struct page *page, int offset, size_t *size); ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset, size_t size, int flags); int tcp_send_mss(struct sock *sk, int *size_goal, int flags); diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index c592454625e1..4ae43222d71f 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -963,8 +963,8 @@ void tcp_remove_empty_skb(struct sock *sk, struct sk_bu= ff *skb) } } =20 -struct sk_buff *tcp_build_frag(struct sock *sk, int size_goal, int flags, - struct page *page, int offset, size_t *size) +static struct sk_buff *tcp_build_frag(struct sock *sk, int size_goal, int = flags, + struct page *page, int offset, size_t *size) { struct sk_buff *skb =3D tcp_write_queue_tail(sk); struct tcp_sock *tp =3D tcp_sk(sk); @@ -1064,7 +1064,6 @@ ssize_t do_tcp_sendpages(struct sock *sk, struct page= *page, int offset, size_t copy =3D size; =20 skb =3D tcp_build_frag(sk, size_goal, flags, page, offset, ©); - if (!skb) goto wait_for_space; =20 if (!copied) --=20 2.26.3