From nobody Wed Oct 8 17:31:55 2025 Received: from mailtransmit04.runbox.com (mailtransmit04.runbox.com [185.226.149.37]) (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 824D729DB96 for ; Thu, 26 Jun 2025 08:34:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.226.149.37 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750926867; cv=none; b=RldtyR0kUQ5M/B9mg9HlFyJkkZkiJxoI3zLOWtzX0GrgRyWQqqM2FvhWmQzdVNnDKs/ZqTfELSDWpgBUD90uw29V7XYNVIoQ/dSdbNEwWovsqkUVgW3Wm7i7LP8XAo9+1IZA5GwWrpDdDnwWAgNaxIYo40FWPB1HYMLBluqW0F0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750926867; c=relaxed/simple; bh=Rnaj2PFCa68bxXv5wt1CtX7Z49GHdcxC1ZFTpzR5ZfQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qPDmJ4cmLK0HKeNdUXsZ7SaquS0h2ZpsiHizCTPxMFCN0g9fLwzmsTtHi3pdnirHyxEtHx51aXWVfKOlDlpx+snmlvyFa02W1mj/MHsJE0GyJs7M/XZolvic9czLD8/4aMRajpLSwHB9mT4VxzE9UoOCNKUxL1vkdMrNGfY7esQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co; spf=pass smtp.mailfrom=rbox.co; dkim=pass (2048-bit key) header.d=rbox.co header.i=@rbox.co header.b=YLz891FW; arc=none smtp.client-ip=185.226.149.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rbox.co Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rbox.co header.i=@rbox.co header.b="YLz891FW" Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1uUi3q-00GFia-8R; Thu, 26 Jun 2025 10:34:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector2; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From; bh=w3M0ONjlTeiHEYSZyu+REn2BAtSk5b88mwbjWDKB3yg=; b=YLz891FWNU0bAgUpDo3sbxvp4Q L97fbhpuOBDZX/ibQDA1Sy1AtNKy5iFRiK46ZMId0sLOKl2O6/p+CSMBxbxlxvI5dDoeTyfTtxDMB M3BNDALwW5Y0SgUNhhgoA+ucNPSPTbdTTsN0N9XsoFT4cYUxgDBSuyItypFfAZqsXpFmifhztKG05 SuByf7PljVmtG1REMnVyGbD+nMyWuIOwiEt9s4x/+bSv7mb+0KBPCJHfKvYANHBRJaKrzPvqzCPaC qo6Cs54nBHsYdB65o7xbiGBvB/hPzpnAuZ/uGZUM2tvP8ekZxfLKdv6w9So7AchJVoZJQqkBIofXA 2dijDbBg==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1uUi3p-0002He-Sv; Thu, 26 Jun 2025 10:34:22 +0200 Received: by submission02.runbox with esmtpsa [Authenticated ID (604044)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1uUi3P-009Fh5-9n; Thu, 26 Jun 2025 10:33:55 +0200 From: Michal Luczaj Date: Thu, 26 Jun 2025 10:33:38 +0200 Subject: [PATCH net-next v2 5/9] net: splice: Drop unused @gfp Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250626-splice-drop-unused-v2-5-3268fac1af89@rbox.co> References: <20250626-splice-drop-unused-v2-0-3268fac1af89@rbox.co> In-Reply-To: <20250626-splice-drop-unused-v2-0-3268fac1af89@rbox.co> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Neal Cardwell , Kuniyuki Iwashima , David Ahern , Boris Pismenny , John Fastabend , Ayush Sawal , Andrew Lunn , Wenjia Zhang , Jan Karcher , "D. Wythe" , Tony Lu , Wen Gu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, Michal Luczaj X-Mailer: b4 0.14.2 Since its introduction in commit 2e910b95329c ("net: Add a function to splice pages into an skbuff for MSG_SPLICE_PAGES"), skb_splice_from_iter() never used the @gfp argument. Remove it and adapt callers. No functional change intended. Reviewed-by: Simon Horman Signed-off-by: Michal Luczaj --- drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c | 3 +-- include/linux/skbuff.h | 2 +- net/core/skbuff.c | 3 +-- net/ipv4/ip_output.c | 3 +-- net/ipv4/tcp.c | 3 +-- net/ipv6/ip6_output.c | 3 +-- net/kcm/kcmsock.c | 3 +-- net/unix/af_unix.c | 3 +-- 8 files changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c b/= drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c index d567e42e176011d42b9549d0cc6292a06126d61d..465fa807796439b90c949f54e20= 3a798f06acf1f 100644 --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c @@ -1096,8 +1096,7 @@ int chtls_sendmsg(struct sock *sk, struct msghdr *msg= , size_t size) copy =3D size; =20 if (msg->msg_flags & MSG_SPLICE_PAGES) { - err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy, - sk->sk_allocation); + err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy); if (err < 0) { if (err =3D=3D -EMSGSIZE) goto new_buf; diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 5b6f460c69b277124e788cfa0599486522e62c9c..4952a6991c720a5001477a77d25= 2567aa2c15ac2 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -5264,7 +5264,7 @@ static inline void skb_mark_for_recycle(struct sk_buf= f *skb) } =20 ssize_t skb_splice_from_iter(struct sk_buff *skb, struct iov_iter *iter, - ssize_t maxsize, gfp_t gfp); + ssize_t maxsize); =20 #endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */ diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 02ead44a82bb71d30d294a6931943d07cf7c7177..c381a097aa6e087d1b5934f2d19= 3a896a255bf83 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -7229,7 +7229,6 @@ static void skb_splice_csum_page(struct sk_buff *skb,= struct page *page, * @skb: The buffer to add pages to * @iter: Iterator representing the pages to be added * @maxsize: Maximum amount of pages to be added - * @gfp: Allocation flags * * This is a common helper function for supporting MSG_SPLICE_PAGES. It * extracts pages from an iterator and adds them to the socket buffer if @@ -7240,7 +7239,7 @@ static void skb_splice_csum_page(struct sk_buff *skb,= struct page *page, * insufficient space in the buffer to transfer anything. */ ssize_t skb_splice_from_iter(struct sk_buff *skb, struct iov_iter *iter, - ssize_t maxsize, gfp_t gfp) + ssize_t maxsize) { size_t frag_limit =3D READ_ONCE(net_hotdata.sysctl_max_skb_frags); struct page *pages[8], **ppages =3D pages; diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index a2705d454fd645b442b2901833afa51b26512512..5d75d60efcf361ed9c3b34eaa98= 2f6c667c716f6 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1222,8 +1222,7 @@ static int __ip_append_data(struct sock *sk, if (WARN_ON_ONCE(copy > msg->msg_iter.count)) goto error; =20 - err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy, - sk->sk_allocation); + err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy); if (err < 0) goto error; copy =3D err; diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index b6285fb1369d32541b9f7d660ca33389b7e4da61..9d41113e3a68455f3cc7e067d72= f3aa2485a21f2 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1295,8 +1295,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr= *msg, size_t size) if (!copy) goto wait_for_space; =20 - err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy, - sk->sk_allocation); + err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy); if (err < 0) { if (err =3D=3D -EMSGSIZE) { tcp_mark_push(tp, skb); diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 7bd29a9ff0db8d74c79f50afa5c693231e0f82d5..618ed7d72b28f43ab6d7a02e5f8= f53a4d22de87a 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -1760,8 +1760,7 @@ static int __ip6_append_data(struct sock *sk, if (WARN_ON_ONCE(copy > msg->msg_iter.count)) goto error; =20 - err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy, - sk->sk_allocation); + err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy); if (err < 0) goto error; copy =3D err; diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c index 8140c9c9cc2cb7aa71eaceab8a019d882bc454aa..71fedf9cfac85b7cbcd8fd3dbac= d74440fa556f4 100644 --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c @@ -835,8 +835,7 @@ static int kcm_sendmsg(struct socket *sock, struct msgh= dr *msg, size_t len) if (!sk_wmem_schedule(sk, copy)) goto wait_for_memory; =20 - err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy, - sk->sk_allocation); + err =3D skb_splice_from_iter(skb, &msg->msg_iter, copy); if (err < 0) { if (err =3D=3D -EMSGSIZE) goto wait_for_memory; diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 1e3a4db1a96a57c84c199e30c164f66409b04be4..c2d1a547b14650b53d16c18f239= aeb7c5f50cc96 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2377,8 +2377,7 @@ static int unix_stream_sendmsg(struct socket *sock, s= truct msghdr *msg, =20 if (unlikely(msg->msg_flags & MSG_SPLICE_PAGES)) { skb->ip_summed =3D CHECKSUM_UNNECESSARY; - err =3D skb_splice_from_iter(skb, &msg->msg_iter, size, - sk->sk_allocation); + err =3D skb_splice_from_iter(skb, &msg->msg_iter, size); if (err < 0) goto out_free; =20 --=20 2.49.0