From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Kodanev Date: Fri, 10 Nov 2017 16:14:24 +0300 Subject: [LTP] [RFC PATCH 2/4] lapi/socket.h: Move definitions from netstress.c In-Reply-To: <20171109113947.24609-3-pvorel@suse.cz> References: <20171109113947.24609-1-pvorel@suse.cz> <20171109113947.24609-3-pvorel@suse.cz> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it On 11/09/2017 02:39 PM, Petr Vorel wrote: > + remove sys/socket.h from netstress.c What about including it in lapi/socket.h? > Signed-off-by: Petr Vorel > --- > include/lapi/socket.h | 18 +++++++++++++++++- > testcases/network/netstress/netstress.c | 18 ++---------------- > 2 files changed, 19 insertions(+), 17 deletions(-) > > diff --git a/include/lapi/socket.h b/include/lapi/socket.h > index 98263105e..af9448804 100644 > --- a/include/lapi/socket.h > +++ b/include/lapi/socket.h > @@ -19,8 +19,24 @@ > #ifndef __LAPI_SOCKET_H__ > #define __LAPI_SOCKET_H__ > > +#ifndef MSG_FASTOPEN > +#define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */ > +#endif > + > +#ifndef SO_BUSY_POLL > +#define SO_BUSY_POLL 46 > +#endif > + > #ifndef SOCK_CLOEXEC > -# define SOCK_CLOEXEC 02000000 > +#define SOCK_CLOEXEC 02000000 > +#endif > + > +#ifndef SOCK_DCCP > +#define SOCK_DCCP 6 > +#endif The two above should probably be in ascending order... SOCK_CLOEXEC along with SOCK_NONBLOCK already defined in lapi/fcntl.h. I guess we should move them to lapi/socket.h instead. Thanks, Alexey