Skip to content

Commit c93f75b

Browse files
ebiggerskuba-moo
authored andcommitted
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: Eric Biggers <ebiggers@google.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://patch.msgid.link/20250519175012.36581-11-ebiggers@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 427fff9 commit c93f75b

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

include/linux/skbuff.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@
274274
SKB_DATA_ALIGN(sizeof(struct sk_buff)) + \
275275
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
276276

277-
struct ahash_request;
278277
struct net_device;
279278
struct scatterlist;
280279
struct pipe_inode_info;
@@ -4134,9 +4133,6 @@ static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset,
41344133
}
41354134
int skb_copy_and_csum_datagram_msg(struct sk_buff *skb, int hlen,
41364135
struct msghdr *msg);
4137-
int skb_copy_and_hash_datagram_iter(const struct sk_buff *skb, int offset,
4138-
struct iov_iter *to, int len,
4139-
struct ahash_request *hash);
41404136
int skb_copy_and_crc32c_datagram_iter(const struct sk_buff *skb, int offset,
41414137
struct iov_iter *to, int len, u32 *crcp);
41424138
int skb_copy_datagram_from_iter(struct sk_buff *skb, int offset,

net/core/datagram.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
#include <net/tcp_states.h>
6363
#include <trace/events/skb.h>
6464
#include <net/busy_poll.h>
65-
#include <crypto/hash.h>
6665

6766
#include "devmem.h"
6867

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

487-
static size_t hash_and_copy_to_iter(const void *addr, size_t bytes, void *hashp,
488-
struct iov_iter *i)
489-
{
490-
#ifdef CONFIG_CRYPTO_HASH
491-
struct ahash_request *hash = hashp;
492-
struct scatterlist sg;
493-
size_t copied;
494-
495-
copied = copy_to_iter(addr, bytes, i);
496-
sg_init_one(&sg, addr, copied);
497-
ahash_request_set_crypt(hash, &sg, NULL, copied);
498-
crypto_ahash_update(hash);
499-
return copied;
500-
#else
501-
return 0;
502-
#endif
503-
}
504-
505-
/**
506-
* skb_copy_and_hash_datagram_iter - Copy datagram to an iovec iterator
507-
* and update a hash.
508-
* @skb: buffer to copy
509-
* @offset: offset in the buffer to start copying from
510-
* @to: iovec iterator to copy to
511-
* @len: amount of data to copy from buffer to iovec
512-
* @hash: hash request to update
513-
*/
514-
int skb_copy_and_hash_datagram_iter(const struct sk_buff *skb, int offset,
515-
struct iov_iter *to, int len,
516-
struct ahash_request *hash)
517-
{
518-
return __skb_datagram_iter(skb, offset, to, len, true,
519-
hash_and_copy_to_iter, hash);
520-
}
521-
EXPORT_SYMBOL(skb_copy_and_hash_datagram_iter);
522-
523486
#ifdef CONFIG_NET_CRC32C
524487
static size_t crc32c_and_copy_to_iter(const void *addr, size_t bytes,
525488
void *_crcp, struct iov_iter *i)

0 commit comments

Comments
 (0)