[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1553620294.118779.64.camel@acm.org>
Date: Tue, 26 Mar 2019 10:11:34 -0700
From: Bart Van Assche <bvanassche@....org>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH v2 5/5] net/core: Allow the compiler to verify
declaration and definition consistency
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/. Do you think that the
function __zerocopy_sg_from_iter() will be needed by other kernel components?
Thanks,
Bart.
Powered by blists - more mailing lists