Commit c93f75b2 authored by Eric Biggers's avatar Eric Biggers Committed by Jakub Kicinski
Browse files

net: remove skb_copy_and_hash_datagram_iter()



Now that skb_copy_and_hash_datagram_iter() is no longer used, remove it.

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Link: https://patch.msgid.link/20250519175012.36581-11-ebiggers@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 427fff9a
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -274,7 +274,6 @@
			 SKB_DATA_ALIGN(sizeof(struct sk_buff)) +	\
			 SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))

struct ahash_request;
struct net_device;
struct scatterlist;
struct pipe_inode_info;
@@ -4134,9 +4133,6 @@ static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset,
}
int skb_copy_and_csum_datagram_msg(struct sk_buff *skb, int hlen,
				   struct msghdr *msg);
int skb_copy_and_hash_datagram_iter(const struct sk_buff *skb, int offset,
			   struct iov_iter *to, int len,
			   struct ahash_request *hash);
int skb_copy_and_crc32c_datagram_iter(const struct sk_buff *skb, int offset,
				      struct iov_iter *to, int len, u32 *crcp);
int skb_copy_datagram_from_iter(struct sk_buff *skb, int offset,
+0 −37
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@
#include <net/tcp_states.h>
#include <trace/events/skb.h>
#include <net/busy_poll.h>
#include <crypto/hash.h>

#include "devmem.h"

@@ -484,42 +483,6 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
	return 0;
}

static size_t hash_and_copy_to_iter(const void *addr, size_t bytes, void *hashp,
				    struct iov_iter *i)
{
#ifdef CONFIG_CRYPTO_HASH
	struct ahash_request *hash = hashp;
	struct scatterlist sg;
	size_t copied;

	copied = copy_to_iter(addr, bytes, i);
	sg_init_one(&sg, addr, copied);
	ahash_request_set_crypt(hash, &sg, NULL, copied);
	crypto_ahash_update(hash);
	return copied;
#else
	return 0;
#endif
}

/**
 *	skb_copy_and_hash_datagram_iter - Copy datagram to an iovec iterator
 *          and update a hash.
 *	@skb: buffer to copy
 *	@offset: offset in the buffer to start copying from
 *	@to: iovec iterator to copy to
 *	@len: amount of data to copy from buffer to iovec
 *      @hash: hash request to update
 */
int skb_copy_and_hash_datagram_iter(const struct sk_buff *skb, int offset,
			   struct iov_iter *to, int len,
			   struct ahash_request *hash)
{
	return __skb_datagram_iter(skb, offset, to, len, true,
			hash_and_copy_to_iter, hash);
}
EXPORT_SYMBOL(skb_copy_and_hash_datagram_iter);

#ifdef CONFIG_NET_CRC32C
static size_t crc32c_and_copy_to_iter(const void *addr, size_t bytes,
				      void *_crcp, struct iov_iter *i)