2019-03-26, 10:11:34 -0700, Bart Van Assche wrote: > On Mon, 2019-03-25 at 19:26 +0100, Sabrina Dubroca wrote: > > 2019-03-25, 09:17:23 -0700, Bart Van Assche wrote: > > > diff --git a/net/core/datagram.h b/net/core/datagram.h > > > new file mode 100644 > > > index 000000000000..bcfb75bfa3b2 > > > --- /dev/null > > > +++ b/net/core/datagram.h > > > @@ -0,0 +1,15 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 */ > > > + > > > +#ifndef _NET_CORE_DATAGRAM_H_ > > > +#define _NET_CORE_DATAGRAM_H_ > > > + > > > +#include <linux/types.h> > > > + > > > +struct sock; > > > +struct sk_buff; > > > +struct iov_iter; > > > + > > > +int __zerocopy_sg_from_iter(struct sock *sk, struct sk_buff *skb, > > > + struct iov_iter *from, size_t length); > > > + > > > +#endif /* _NET_CORE_DATAGRAM_H_ */ > > > > That's rather ugly. Could it just be moved to an appropriate file in > > include/? > > Hi Sabrina, > > I think the convention in the Linux kernel is to keep header files with local > declarations in the source code directory and only to declare functions that > are used by other kernel components under include/.
I didn't realize it was a common practice. > Do you think that the function __zerocopy_sg_from_iter() will be > needed by other kernel components? No idea. It has a couple of wrappers, so maybe not. The patch looks ok, sorry for the noise. -- Sabrina