ia64 )
AC_MSG_RESULT($host_cpu)
- KCFLAGS='-gstabs -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -falign-functions=32 -mb-step'
+ KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -falign-functions=32 -mb-step'
KCPPFLAGS='-D__KERNEL__ -DMODULE'
MOD_LINK=elf64_ia64
;;
AC_MSG_RESULT(no)
fi
-AC_ARG_ENABLE(zerocopy, [ --enable-zerocopy enable socknal zerocopy],enable_zerocopy="-DSOCKNAL_ZC=1", enable_zerocopy="")
+AC_ARG_ENABLE(zerocopy, [ --enable-zerocopy enable socknal zerocopy],enable_zerocopy=$enable_zerocopy_temp, enable_zerocopy="")
AC_ARG_ENABLE(affinity, [ --enable-affinity enable process/irq affinity],enable_affinity="-DCPU_AFFINITY=1", enable_affinity=$enable_affinity_temp)
#####################################
-/* ../include/config.h.in. Generated automatically from configure.in by autoheader. */
+/* portals/include/config.h.in. Generated from configure.in by autoheader. */
-/* Define if you have the readline library (-lreadline). */
-#undef HAVE_LIBREADLINE
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* IOCTL Buffer Size */
+#undef OBD_MAX_IOCTL_BUFFER
/* Name of package */
#undef PACKAGE
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of a `unsigned long long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
/* Version number of package */
#undef VERSION
-
#define PORTAL_ALLOC(ptr, size) \
do { \
- long s = size; \
LASSERT (!in_interrupt()); \
- if (s > PORTAL_VMALLOC_SIZE) \
- (ptr) = vmalloc(s); \
+ if ((size) > PORTAL_VMALLOC_SIZE) \
+ (ptr) = vmalloc(size); \
else \
- (ptr) = kmalloc(s, GFP_NOFS); \
+ (ptr) = kmalloc((size), GFP_NOFS); \
if ((ptr) == NULL) \
- CERROR("PORTALS: out of memory at %s:%d (tried to alloc" \
- " '" #ptr "' = %ld)\n", __FILE__, __LINE__, s); \
+ CERROR("PORTALS: out of memory at %s:%d (tried to alloc '"\
+ #ptr "' = %d)\n", __FILE__, __LINE__, (int)(size));\
else { \
- portal_kmem_inc((ptr), s); \
- memset((ptr), 0, s); \
+ portal_kmem_inc((ptr), (size)); \
+ memset((ptr), 0, (size)); \
} \
- CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %ld at %p (tot %d).\n", \
- s, (ptr), atomic_read (&portal_kmemory)); \
+ CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %d at %p (tot %d).\n", \
+ (int)(size), (ptr), atomic_read (&portal_kmemory)); \
} while (0)
#define PORTAL_FREE(ptr, size) \
do { \
- long s = (size); \
+ int s = (size); \
if ((ptr) == NULL) { \
- CERROR("PORTALS: free NULL '" #ptr "' (%ld bytes) at " \
+ CERROR("PORTALS: free NULL '" #ptr "' (%d bytes) at " \
"%s:%d\n", s, __FILE__, __LINE__); \
break; \
} \
else \
kfree(ptr); \
portal_kmem_dec((ptr), s); \
- CDEBUG(D_MALLOC, "kfreed '" #ptr "': %ld at %p (tot %d).\n", \
- s, (ptr), atomic_read (&portal_kmemory)); \
+ CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p (tot %d).\n", \
+ s, (ptr), atomic_read(&portal_kmemory)); \
} while (0)
#define PORTAL_SLAB_ALLOC(ptr, slab, size) \
do { \
- long s = (size); \
- LASSERT (!in_interrupt()); \
+ LASSERT(!in_interrupt()); \
(ptr) = kmem_cache_alloc((slab), SLAB_KERNEL); \
if ((ptr) == NULL) { \
CERROR("PORTALS: out of memory at %s:%d (tried to alloc" \
" '" #ptr "' from slab '" #slab "')\n", __FILE__, \
__LINE__); \
} else { \
- portal_kmem_inc((ptr), s); \
- memset((ptr), 0, s); \
+ portal_kmem_inc((ptr), (size)); \
+ memset((ptr), 0, (size)); \
} \
CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %ld at %p (tot %d).\n", \
- s, (ptr), atomic_read (&portal_kmemory)); \
+ (int)(size), (ptr), atomic_read(&portal_kmemory)); \
} while (0)
#define PORTAL_SLAB_FREE(ptr, slab, size) \
do { \
- long s = (size); \
+ int s = (size); \
if ((ptr) == NULL) { \
- CERROR("PORTALS: free NULL '" #ptr "' (%ld bytes) at " \
+ CERROR("PORTALS: free NULL '" #ptr "' (%d bytes) at " \
"%s:%d\n", s, __FILE__, __LINE__); \
break; \
} \
memset((ptr), 0x5a, s); \
kmem_cache_free((slab), ptr); \
portal_kmem_dec((ptr), s); \
- CDEBUG(D_MALLOC, "kfreed '" #ptr "': %ld at %p (tot %d).\n", \
+ CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p (tot %d).\n", \
s, (ptr), atomic_read (&portal_kmemory)); \
} while (0)
#define KQSW_TX_MAXCONTIG (1<<10) /* largest payload that gets made contiguous on transmit */
#define KQSW_NTXMSGS 8 /* # normal transmit messages */
-#define KQSW_NNBLK_TXMSGS 128 /* # reserved transmit messages if can't block */
+#define KQSW_NNBLK_TXMSGS 256 /* # reserved transmit messages if can't block */
#define KQSW_NRXMSGS_LARGE 64 /* # large receive buffers */
#define KQSW_EP_ENVELOPES_LARGE 128 /* # large ep envelopes */
if (ktx == NULL) {
kqswnal_cerror_hdr (hdr);
lib_finalize (&kqswnal_lib, private, cookie);
+ return (-1);
}
memcpy (ktx->ktx_buffer, hdr, sizeof (*hdr)); /* copy hdr from caller's stack */
return (-EINVAL);
err = PtlFailNid (*nip, data->ioc_nid, data->ioc_count);
+ kportal_put_ni (data->ioc_nal);
break;
}
ia64 )
AC_MSG_RESULT($host_cpu)
- KCFLAGS='-gstabs -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -falign-functions=32 -mb-step'
+ KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -falign-functions=32 -mb-step'
KCPPFLAGS='-D__KERNEL__ -DMODULE'
MOD_LINK=elf64_ia64
;;
AC_MSG_RESULT(no)
fi
-AC_ARG_ENABLE(zerocopy, [ --enable-zerocopy enable socknal zerocopy],enable_zerocopy="-DSOCKNAL_ZC=1", enable_zerocopy="")
+AC_ARG_ENABLE(zerocopy, [ --enable-zerocopy enable socknal zerocopy],enable_zerocopy=$enable_zerocopy_temp, enable_zerocopy="")
AC_ARG_ENABLE(affinity, [ --enable-affinity enable process/irq affinity],enable_affinity="-DCPU_AFFINITY=1", enable_affinity=$enable_affinity_temp)
#####################################
-/* ../include/config.h.in. Generated automatically from configure.in by autoheader. */
+/* portals/include/config.h.in. Generated from configure.in by autoheader. */
-/* Define if you have the readline library (-lreadline). */
-#undef HAVE_LIBREADLINE
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* IOCTL Buffer Size */
+#undef OBD_MAX_IOCTL_BUFFER
/* Name of package */
#undef PACKAGE
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of a `unsigned long long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
/* Version number of package */
#undef VERSION
-
#define PORTAL_ALLOC(ptr, size) \
do { \
- long s = size; \
LASSERT (!in_interrupt()); \
- if (s > PORTAL_VMALLOC_SIZE) \
- (ptr) = vmalloc(s); \
+ if ((size) > PORTAL_VMALLOC_SIZE) \
+ (ptr) = vmalloc(size); \
else \
- (ptr) = kmalloc(s, GFP_NOFS); \
+ (ptr) = kmalloc((size), GFP_NOFS); \
if ((ptr) == NULL) \
- CERROR("PORTALS: out of memory at %s:%d (tried to alloc" \
- " '" #ptr "' = %ld)\n", __FILE__, __LINE__, s); \
+ CERROR("PORTALS: out of memory at %s:%d (tried to alloc '"\
+ #ptr "' = %d)\n", __FILE__, __LINE__, (int)(size));\
else { \
- portal_kmem_inc((ptr), s); \
- memset((ptr), 0, s); \
+ portal_kmem_inc((ptr), (size)); \
+ memset((ptr), 0, (size)); \
} \
- CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %ld at %p (tot %d).\n", \
- s, (ptr), atomic_read (&portal_kmemory)); \
+ CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %d at %p (tot %d).\n", \
+ (int)(size), (ptr), atomic_read (&portal_kmemory)); \
} while (0)
#define PORTAL_FREE(ptr, size) \
do { \
- long s = (size); \
+ int s = (size); \
if ((ptr) == NULL) { \
- CERROR("PORTALS: free NULL '" #ptr "' (%ld bytes) at " \
+ CERROR("PORTALS: free NULL '" #ptr "' (%d bytes) at " \
"%s:%d\n", s, __FILE__, __LINE__); \
break; \
} \
else \
kfree(ptr); \
portal_kmem_dec((ptr), s); \
- CDEBUG(D_MALLOC, "kfreed '" #ptr "': %ld at %p (tot %d).\n", \
- s, (ptr), atomic_read (&portal_kmemory)); \
+ CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p (tot %d).\n", \
+ s, (ptr), atomic_read(&portal_kmemory)); \
} while (0)
#define PORTAL_SLAB_ALLOC(ptr, slab, size) \
do { \
- long s = (size); \
- LASSERT (!in_interrupt()); \
+ LASSERT(!in_interrupt()); \
(ptr) = kmem_cache_alloc((slab), SLAB_KERNEL); \
if ((ptr) == NULL) { \
CERROR("PORTALS: out of memory at %s:%d (tried to alloc" \
" '" #ptr "' from slab '" #slab "')\n", __FILE__, \
__LINE__); \
} else { \
- portal_kmem_inc((ptr), s); \
- memset((ptr), 0, s); \
+ portal_kmem_inc((ptr), (size)); \
+ memset((ptr), 0, (size)); \
} \
CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %ld at %p (tot %d).\n", \
- s, (ptr), atomic_read (&portal_kmemory)); \
+ (int)(size), (ptr), atomic_read(&portal_kmemory)); \
} while (0)
#define PORTAL_SLAB_FREE(ptr, slab, size) \
do { \
- long s = (size); \
+ int s = (size); \
if ((ptr) == NULL) { \
- CERROR("PORTALS: free NULL '" #ptr "' (%ld bytes) at " \
+ CERROR("PORTALS: free NULL '" #ptr "' (%d bytes) at " \
"%s:%d\n", s, __FILE__, __LINE__); \
break; \
} \
memset((ptr), 0x5a, s); \
kmem_cache_free((slab), ptr); \
portal_kmem_dec((ptr), s); \
- CDEBUG(D_MALLOC, "kfreed '" #ptr "': %ld at %p (tot %d).\n", \
+ CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p (tot %d).\n", \
s, (ptr), atomic_read (&portal_kmemory)); \
} while (0)
#define KQSW_TX_MAXCONTIG (1<<10) /* largest payload that gets made contiguous on transmit */
#define KQSW_NTXMSGS 8 /* # normal transmit messages */
-#define KQSW_NNBLK_TXMSGS 128 /* # reserved transmit messages if can't block */
+#define KQSW_NNBLK_TXMSGS 256 /* # reserved transmit messages if can't block */
#define KQSW_NRXMSGS_LARGE 64 /* # large receive buffers */
#define KQSW_EP_ENVELOPES_LARGE 128 /* # large ep envelopes */
if (ktx == NULL) {
kqswnal_cerror_hdr (hdr);
lib_finalize (&kqswnal_lib, private, cookie);
+ return (-1);
}
memcpy (ktx->ktx_buffer, hdr, sizeof (*hdr)); /* copy hdr from caller's stack */
return (-EINVAL);
err = PtlFailNid (*nip, data->ioc_nid, data->ioc_count);
+ kportal_put_ni (data->ioc_nal);
break;
}