]> Git Repo - linux.git/commitdiff
Merge tag 'vfs-6.7.iov_iter' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs
authorLinus Torvalds <[email protected]>
Mon, 30 Oct 2023 19:24:21 +0000 (09:24 -1000)
committerLinus Torvalds <[email protected]>
Mon, 30 Oct 2023 19:24:21 +0000 (09:24 -1000)
Pull iov_iter updates from Christian Brauner:
 "This contain's David's iov_iter cleanup work to convert the iov_iter
  iteration macros to inline functions:

   - Remove last_offset from iov_iter as it was only used by ITER_PIPE

   - Add a __user tag on copy_mc_to_user()'s dst argument on x86 to
     match that on powerpc and get rid of a sparse warning

   - Convert iter->user_backed to user_backed_iter() in the sound PCM
     driver

   - Convert iter->user_backed to user_backed_iter() in a couple of
     infiniband drivers

   - Renumber the type enum so that the ITER_* constants match the order
     in iterate_and_advance*()

   - Since the preceding patch puts UBUF and IOVEC at 0 and 1, change
     user_backed_iter() to just use the type value and get rid of the
     extra flag

   - Convert the iov_iter iteration macros to always-inline functions to
     make the code easier to follow. It uses function pointers, but they
     get optimised away

   - Move the check for ->copy_mc to _copy_from_iter() and
     copy_page_from_iter_atomic() rather than in memcpy_from_iter_mc()
     where it gets repeated for every segment. Instead, we check once
     and invoke a side function that can use iterate_bvec() rather than
     iterate_and_advance() and supply a different step function

   - Move the copy-and-csum code to net/ where it can be in proximity
     with the code that uses it

   - Fold memcpy_and_csum() in to its two users

   - Move csum_and_copy_from_iter_full() out of line and merge in
     csum_and_copy_from_iter() since the former is the only caller of
     the latter

   - Move hash_and_copy_to_iter() to net/ where it can be with its only
     caller"

* tag 'vfs-6.7.iov_iter' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs:
  iov_iter, net: Move hash_and_copy_to_iter() to net/
  iov_iter, net: Merge csum_and_copy_from_iter{,_full}() together
  iov_iter, net: Fold in csum_and_memcpy()
  iov_iter, net: Move csum_and_copy_to/from_iter() to net/
  iov_iter: Don't deal with iter->copy_mc in memcpy_from_iter_mc()
  iov_iter: Convert iterate*() to inline funcs
  iov_iter: Derive user-backedness from the iterator type
  iov_iter: Renumber ITER_* constants
  infiniband: Use user_backed_iter() to see if iterator is UBUF/IOVEC
  sound: Fix snd_pcm_readv()/writev() to use iov access functions
  iov_iter, x86: Be consistent about the __user tag on copy_mc_to_user()
  iov_iter: Remove last_offset from iov_iter as it was for ITER_PIPE

1  2 
include/linux/skbuff.h

diff --combined include/linux/skbuff.h
index 97bfef071255f333051dd196578691d5708b3ee0,be402f55f6d6a64a1d5d5489ca451ca3e1d14a50..27998f73183e15ae1f6dc3a3cd8fbe0a4ecf56d4
@@@ -1309,7 -1309,7 +1309,7 @@@ struct sk_buff_fclones 
   *
   * Returns true if skb is a fast clone, and its clone is not freed.
   * Some drivers call skb_orphan() in their ndo_start_xmit(),
 - * so we also check that this didnt happen.
 + * so we also check that didn't happen.
   */
  static inline bool skb_fclone_busy(const struct sock *sk,
                                   const struct sk_buff *skb)
@@@ -2016,7 -2016,7 +2016,7 @@@ static inline struct sk_buff *skb_share
   *    Copy shared buffers into a new sk_buff. We effectively do COW on
   *    packets to handle cases where we have a local reader and forward
   *    and a couple of other messy ones. The normal one is tcpdumping
 - *    a packet thats being forwarded.
 + *    a packet that's being forwarded.
   */
  
  /**
@@@ -3679,6 -3679,9 +3679,9 @@@ static inline int __must_check skb_put_
        return __skb_put_padto(skb, len, true);
  }
  
+ bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i)
+       __must_check;
  static inline int skb_add_data(struct sk_buff *skb,
                               struct iov_iter *from, int copy)
  {
This page took 0.101919 seconds and 4 git commands to generate.