dpdk: do not use TSO for small packets
[vpp.git] / src / vppinfra / socket.c
index 4522514..3271393 100644 (file)
@@ -38,6 +38,7 @@
 #include <stdio.h>
 #include <string.h>            /* strchr */
 #define __USE_GNU
+#define _GNU_SOURCE
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <vppinfra/format.h>
 #include <vppinfra/error.h>
 
-void
+#ifndef __GLIBC__
+/* IPPORT_USERRESERVED is not part of musl libc. */
+#define IPPORT_USERRESERVED 5000
+#endif
+
+__clib_export void
 clib_socket_tx_add_formatted (clib_socket_t * s, char *fmt, ...)
 {
   va_list va;
@@ -380,7 +386,7 @@ socket_init_funcs (clib_socket_t * s)
     s->recvmsg_func = default_socket_recvmsg;
 }
 
-clib_error_t *
+__clib_export clib_error_t *
 clib_socket_init (clib_socket_t * s)
 {
   union
@@ -522,7 +528,7 @@ done:
   return error;
 }
 
-clib_error_t *
+__clib_export clib_error_t *
 clib_socket_accept (clib_socket_t * server, clib_socket_t * client)
 {
   clib_error_t *err = 0;