Whamcloud - gitweb
Merge b_devel->b_orphan:
authoradilger <adilger>
Wed, 28 May 2003 08:50:46 +0000 (08:50 +0000)
committeradilger <adilger>
Wed, 28 May 2003 08:50:46 +0000 (08:50 +0000)
  DEVEL_ORPHAN_UPDATE_PARENT_20030522->DEVEL_ORPHAN_UPDATE_PARENT_20030528

31 files changed:
lnet/Makefile.am
lnet/archdep.m4
lnet/build.m4
lnet/configure.in
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-p30.h
lnet/include/lnet/lib-types.h
lnet/klnds/Makefile.am
lnet/libcfs/module.c
lnet/lnet/lib-init.c
lnet/lnet/lib-move.c
lnet/portalsconf.m4 [deleted file]
lnet/ulnds/Makefile.am
lnet/ulnds/socklnd/Makefile.am
lnet/utils/.cvsignore
lnet/utils/Makefile.am
lustre/include/linux/lustre_compat25.h
lustre/portals/Makefile.am
lustre/portals/archdep.m4
lustre/portals/build.m4
lustre/portals/configure.in
lustre/portals/include/portals/lib-p30.h
lustre/portals/include/portals/lib-types.h
lustre/portals/knals/Makefile.am
lustre/portals/libcfs/module.c
lustre/portals/portals/lib-init.c
lustre/portals/portals/lib-move.c
lustre/portals/portalsconf.m4 [deleted file]
lustre/portals/unals/Makefile.am
lustre/portals/utils/.cvsignore
lustre/portals/utils/Makefile.am

index 3c42103..26293f2 100644 (file)
@@ -3,6 +3,10 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-EXTRA_DIST = Rules.linux archdep.m4 MCP
+EXTRA_DIST = Rules.linux archdep.m4 
 DIST_SUBDIRS = libcfs portals knals unals utils tests doc router
+if LIBLUSTRE
+SUBDIRS = portals unals utils
+else
 SUBDIRS = libcfs portals knals unals utils tests doc router
+endif
index 0315644..2c7fa59 100644 (file)
@@ -52,6 +52,7 @@ case ${host_cpu} in
        AC_MSG_RESULT($host_cpu)
        KCFLAGS='-g -Wall '
        KCPPFLAGS='-D__arch_lib__ '
+       libdir='${exec_prefix}/lib/lustre'
         MOD_LINK=elf_i386
 ;;
        um )
@@ -144,7 +145,7 @@ fi
 # ------------ include paths ------------------
 
 if test $host_cpu != "lib" ; then 
-    KINCFLAGS='-I$(top_srcdir)/include -I$(top_srcdir)/portals/include -I$(LINUX)/include'
+    KINCFLAGS="-I\$(top_srcdir)/include -I\$(top_srcdir)/portals/include -I$LINUX/include"
 else
     KINCFLAGS='-I$(top_srcdir)/include -I$(top_srcdir)/portals/include'
 fi
@@ -189,18 +190,128 @@ if test $host_cpu != "lib" ; then
   fi
 fi
 
-# ---------- SMP -------------------
-#AC_MSG_CHECKING(for SMP)
-#if egrep -e SMP=y $LINUX/.config >/dev/null 2>&1; then
-#        SMPFLAG=
-#        AC_MSG_RESULT(yes)
+# ---------- Portals flags --------------------
+
+#AC_PREFIX_DEFAULT([])
+#if test "x$prefix" = xNONE || test "x$prefix" = x; then
+#  usrprefix=/usr
 #else
-#        SMPFLAG=
-#        AC_MSG_RESULT(no)
+#  usrprefix='${prefix}'
 #fi
+#AC_SUBST(usrprefix)
+
+AC_MSG_CHECKING(if kernel has CPU affinity support)
+if test "$target_cpu" != ia64 ; then
+  enable_affinity_temp="-DCPU_AFFINITY=1"
+  AC_MSG_RESULT(yes)
+else
+  enable_affinity_temp=""
+  AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(if kernel has zero-copy TCP support)
+ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
+if test "$ZCCD" != 0 ; then
+  enable_zerocopy_temp="-DSOCKNAL_ZC=1"
+  AC_MSG_RESULT(yes)
+else
+  enable_zerocopy_temp=""
+  AC_MSG_RESULT(no)
+fi
+
+AC_ARG_ENABLE(zerocopy, [  --enable-zerocopy enable socknal zerocopy],enable_zerocopy="-DSOCKNAL_ZC=1", enable_zercopy=$enable_zerocopy_temp)
+
+AC_ARG_ENABLE(affinity, [  --enable-affinity enable process/irq affinity],enable_affinity="-DCPU_AFFINITY=1", enable_affinity=$enable_affinity_temp)
+#####################################
+
+AC_MSG_CHECKING(if quadrics kernel headers are present)
+if test -d $LINUX/drivers/net/qsnet ; then
+  AC_MSG_RESULT(yes)
+  QSWNAL="qswnal"
+  with_quadrics="-I$LINUX/drivers/net/qsnet/include"
+  :
+elif test -d $LINUX/drivers/qsnet1 ; then
+  AC_MSG_RESULT(yes)
+  QSWNAL="qswnal"
+  with_quadrics="-I$LINUX/drivers/qsnet1/include -DPROPRIETARY_ELAN"
+  :
+elif test -d $LINUX/drivers/quadrics ; then
+  AC_MSG_RESULT(yes)
+  QSWNAL="qswnal"
+  with_quadrics="-I$LINUX/drivers/quadrics/include -DPROPRIETARY_ELAN"
+  :
+#elif test -d /usr/include/elan3 ; then
+#  AC_MSG_RESULT(yes)
+#  QSWNAL="qswnal"
+#  with_quadrics=""
+#  :
+else
+  AC_MSG_RESULT(no)
+  QSWNAL=""
+  with_quadrics=""
+  :
+fi
+AC_SUBST(with_quadrics)
+AC_SUBST(QSWNAL)
+
+# R. Read 5/02
+GMNAL=""
+echo "checking with-gm=" ${with_gm}
+if test "${with_gm+set}" = set; then
+  if test "${with_gm}" = yes; then
+    with_gm="-I/usr/local/gm/include"
+  else
+    with_gm=-I"$with_gm/include"
+  fi
+  GMNAL="gmnal"
+else
+# default case - no GM
+  with_gm=""
+fi
+AC_SUBST(with_gm)
+AC_SUBST(GMNAL)
+
+
+def_scamac=/opt/scali/include
+AC_ARG_WITH(scamac, [  --with-scamac=[yes/no/path] Path to ScaMAC includes (default=/opt/scali/include)], with_scamac=$withval, with_scamac=$def_scamac)
+AC_MSG_CHECKING(if ScaMAC headers are present)
+if test "$with_scamac" = yes; then
+  with_scamac=$def_scamac
+fi
+if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
+  AC_MSG_RESULT(yes)
+  SCIMACNAL="scimacnal"
+  with_scamac="-I${with_scamac} -I${with_scamac}/icm"
+else
+  AC_MSG_RESULT(no)
+  SCIMACNAL=""
+  with_scamac=""
+fi
+
+AC_SUBST(with_scamac)
+AC_SUBST(SCIMACNAL)
 
 CFLAGS="$KCFLAGS"
-CPPFLAGS="$KINCFLAGS $KCPPFLAGS $MFLAGS "
+CPPFLAGS="$KINCFLAGS $KCPPFLAGS $MFLAGS $enable_zerocopy $enable_affinity $with_quadrics $with_gm $with_scamac "
 
 AC_SUBST(MOD_LINK)
-AC_SUBST(LINUX25)
\ No newline at end of file
+AC_SUBST(LINUX25)
+AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
+
+# ---------- Red Hat 2.4.20 backports some 2.5 bits --------
+# This needs to run after we've defined the KCPPFLAGS
+
+AC_MSG_CHECKING(for kernel version)
+AC_TRY_LINK([#define __KERNEL__
+             #include <linux/sched.h>],
+            [struct task_struct p;
+             p.sighand = NULL;],
+            [RH_2_4_20=1],
+            [RH_2_4_20=0])
+
+if test $RH_2_4_20 = 1; then
+       AC_MSG_RESULT(redhat-2.4.20)
+       CPPFLAGS="$CPPFLAGS -DCONFIG_RH_2_4_20"
+else
+       AC_MSG_RESULT($RELEASE)
+fi 
index 4e8dbbb..025f243 100644 (file)
@@ -1,5 +1,4 @@
-
-# ----------  directories ---------
+# ----------  other tests and settings ---------
 
 
 # ---------  unsigned long long sane? -------
@@ -94,15 +93,3 @@ fi
 AC_SUBST(LIBEFENCE)
 AC_SUBST(HAVE_LIBEFENCE)
 
-AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
-AC_MSG_CHECKING(if you are building lib lustre)
-if test "$host_cpu" = "lib"; then
-   AC_MSG_RESULT(yes)
-   libdir='${exec_prefix}/lib/lustre'
-else
-   AC_MSG_RESULT(no)
-fi
-
-# end -------- Kernel build environment. -----------------
-
-
index 2ee86b2..31d3492 100644 (file)
@@ -13,7 +13,6 @@ AM_INIT_AUTOMAKE(portals, builtin([esyscmd], [sed -ne '/.*define IVERSION /{ s/.
 
 sinclude(build.m4)
 sinclude(archdep.m4)
-sinclude(portalsconf.m4)
 
 if test x$enable_inkernel = xyes ; then
 cp Kernelenv.mk Kernelenv.in
@@ -31,6 +30,5 @@ AC_OUTPUT([Makefile Kernelenv libcfs/Makefile portals/Makefile \
           unals/Makefile knals/Makefile router/Makefile \
          knals/socknal/Makefile knals/gmnal/Makefile knals/qswnal/Makefile \
          knals/scimacnal/Makefile knals/toenal/Makefile \
-          utils/Makefile tests/Makefile doc/Makefile \
-          packaging/Makefile packaging/portals.spec ])
+          utils/Makefile tests/Makefile doc/Makefile ])
 
index b70e128..4a61e76 100644 (file)
@@ -370,6 +370,7 @@ extern void lib_copy_buf2iov (int niov, struct iovec *iov, char *dest, ptl_size_
 extern ptl_size_t lib_kiov_nob (int niov, ptl_kiov_t *iov);
 extern void lib_copy_kiov2buf (char *dest, int niov, ptl_kiov_t *iov, ptl_size_t len);
 extern void lib_copy_buf2kiov (int niov, ptl_kiov_t *iov, char *src, ptl_size_t len);
+extern void lib_assert_wire_constants (void);
 
 extern void lib_recv (nal_cb_t *nal, void *private, lib_msg_t *msg, lib_md_t *md,
                       ptl_size_t offset, ptl_size_t mlen, ptl_size_t rlen);
index b70e128..4a61e76 100644 (file)
@@ -370,6 +370,7 @@ extern void lib_copy_buf2iov (int niov, struct iovec *iov, char *dest, ptl_size_
 extern ptl_size_t lib_kiov_nob (int niov, ptl_kiov_t *iov);
 extern void lib_copy_kiov2buf (char *dest, int niov, ptl_kiov_t *iov, ptl_size_t len);
 extern void lib_copy_buf2kiov (int niov, ptl_kiov_t *iov, char *src, ptl_size_t len);
+extern void lib_assert_wire_constants (void);
 
 extern void lib_recv (nal_cb_t *nal, void *private, lib_msg_t *msg, lib_md_t *md,
                       ptl_size_t offset, ptl_size_t mlen, ptl_size_t rlen);
index bece0a3..47c0dd2 100644 (file)
@@ -31,6 +31,8 @@ typedef struct lib_me_t lib_me_t;
 typedef struct lib_md_t lib_md_t;
 typedef struct lib_eq_t lib_eq_t;
 
+#define WIRE_ATTR      __attribute__((packed))
+
 /* The wire handle's interface cookie only matches one network interface in
  * one epoch (i.e. new cookie when the interface restarts or the node
  * reboots).  The object cookie only matches one object on that interface
@@ -38,7 +40,7 @@ typedef struct lib_eq_t lib_eq_t;
 typedef struct {
         __u64 wh_interface_cookie;
         __u64 wh_object_cookie;
-} ptl_handle_wire_t;
+} WIRE_ATTR ptl_handle_wire_t;
 
 /* byte-flip insensitive! */
 #define PTL_WIRE_HANDLE_NONE \
@@ -63,7 +65,7 @@ typedef struct ptl_ack {
         ptl_handle_wire_t dst_wmd;
         ptl_match_bits_t match_bits;
         ptl_size_t length;                      /* common length (0 for acks) moving out RSN */
-} ptl_ack_t;
+} WIRE_ATTR ptl_ack_t;
 
 typedef struct ptl_put {
         ptl_pt_index_t ptl_index;
@@ -72,7 +74,7 @@ typedef struct ptl_put {
         ptl_size_t length;                      /* common length moving out RSN */
         ptl_size_t offset;
         ptl_hdr_data_t hdr_data;
-} ptl_put_t;
+} WIRE_ATTR ptl_put_t;
 
 typedef struct ptl_get {
         ptl_pt_index_t ptl_index;
@@ -82,7 +84,7 @@ typedef struct ptl_get {
         ptl_size_t src_offset;
         ptl_size_t return_offset;               /* unused: going RSN */
         ptl_size_t sink_length;
-} ptl_get_t;
+} WIRE_ATTR ptl_get_t;
 
 typedef struct ptl_reply {
         __u32 unused1;                          /* unused fields going RSN */
@@ -90,7 +92,7 @@ typedef struct ptl_reply {
         ptl_size_t dst_offset;                  /* unused: going RSN */
         __u32 unused2;
         ptl_size_t length;                      /* common length moving out RSN */
-} ptl_reply_t;
+} WIRE_ATTR ptl_reply_t;
 
 typedef struct {
         ptl_nid_t dest_nid;
@@ -104,7 +106,7 @@ typedef struct {
                 ptl_get_t get;
                 ptl_reply_t reply;
         } msg;
-} ptl_hdr_t;
+} WIRE_ATTR ptl_hdr_t;
 
 /* All length fields in individual unions at same offset */
 /* LASSERT for same in lib-move.c */
@@ -122,7 +124,7 @@ typedef struct {
         __u32  magic;                          /* PORTALS_PROTO_MAGIC */
         __u16   version_major;                  /* increment on incompatible change */
         __u16   version_minor;                  /* increment on compatible change */
-} ptl_magicversion_t;
+} WIRE_ATTR ptl_magicversion_t;
 
 #define PORTALS_PROTO_MAGIC                0xeebc0ded
 
index 5c6085e..fed2785 100644 (file)
@@ -3,4 +3,5 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
+DIST_SUBDIRS= socknal toenal qswnal gmnal scimacnal 
 SUBDIRS= socknal toenal        @QSWNAL@ @GMNAL@ @SCIMACNAL@
index 5025856..c4ca2e3 100644 (file)
@@ -19,7 +19,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 #define DEBUG_SUBSYSTEM S_PORTALS
 
 #include <linux/config.h>
@@ -45,6 +47,7 @@
 #include <portals/lib-p30.h>
 #include <portals/p30.h>
 #include <linux/kp30.h>
+#include <linux/portals_compat25.h>
 
 #define PORTAL_MINOR 240
 
@@ -84,10 +87,10 @@ kportal_blockallsigs ()
 {
         unsigned long  flags;
 
-        spin_lock_irqsave (&current->sigmask_lock, flags);
-        siginitsetinv (&current->blocked, 0);
-        recalc_sigpending (current);
-        spin_unlock_irqrestore (&current->sigmask_lock, flags);
+        SIGNAL_MASK_LOCK(current, flags);
+        sigfillset(&current->blocked);
+        RECALC_SIGPENDING;
+        SIGNAL_MASK_UNLOCK(current, flags);
 }
 
 /* called when opening /dev/device */
index d6315c6..99c4d32 100644 (file)
@@ -357,6 +357,8 @@ lib_init(nal_cb_t * nal, ptl_nid_t nid, ptl_pid_t pid, int gsize,
                 goto out;
         }
 
+        lib_assert_wire_constants ();
+        
         /*
          * Allocate the portal table for this interface
          * and all per-interface objects.
index a04e961..fde4f16 100644 (file)
@@ -1285,3 +1285,95 @@ int do_PtlGet(nal_cb_t * nal, void *private, void *v_args, void *v_ret)
 
         return ret->rc = PTL_OK;
 }
+
+void lib_assert_wire_constants (void)
+{
+        /* Wire protocol assertions generated by 'wirecheck' */
+
+        /* Constants... */
+        LASSERT (PORTALS_PROTO_MAGIC == 0xeebc0ded);
+        LASSERT (PORTALS_PROTO_VERSION_MAJOR == 0);
+        LASSERT (PORTALS_PROTO_VERSION_MINOR == 1);
+        LASSERT (PTL_MSG_ACK == 0);
+        LASSERT (PTL_MSG_PUT == 1);
+        LASSERT (PTL_MSG_GET == 2);
+        LASSERT (PTL_MSG_REPLY == 3);
+        LASSERT (PTL_MSG_HELLO == 4);
+
+        /* Checks for struct ptl_handle_wire_t */
+        LASSERT (sizeof (ptl_handle_wire_t) == 16);
+        LASSERT (offsetof (ptl_handle_wire_t, wh_interface_cookie) == 0);
+        LASSERT (sizeof (((ptl_handle_wire_t *)0)->wh_interface_cookie) == 8);
+        LASSERT (offsetof (ptl_handle_wire_t, wh_object_cookie) == 8);
+        LASSERT (sizeof (((ptl_handle_wire_t *)0)->wh_object_cookie) == 8);
+
+        /* Checks for struct ptl_magicversion_t */
+        LASSERT (sizeof (ptl_magicversion_t) == 8);
+        LASSERT (offsetof (ptl_magicversion_t, magic) == 0);
+        LASSERT (sizeof (((ptl_magicversion_t *)0)->magic) == 4);
+        LASSERT (offsetof (ptl_magicversion_t, version_major) == 4);
+        LASSERT (sizeof (((ptl_magicversion_t *)0)->version_major) == 2);
+        LASSERT (offsetof (ptl_magicversion_t, version_minor) == 6);
+        LASSERT (sizeof (((ptl_magicversion_t *)0)->version_minor) == 2);
+
+        /* Checks for struct ptl_hdr_t */
+        LASSERT (sizeof (ptl_hdr_t) == 72);
+        LASSERT (offsetof (ptl_hdr_t, dest_nid) == 0);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->dest_nid) == 8);
+        LASSERT (offsetof (ptl_hdr_t, src_nid) == 8);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->src_nid) == 8);
+        LASSERT (offsetof (ptl_hdr_t, dest_pid) == 16);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->dest_pid) == 4);
+        LASSERT (offsetof (ptl_hdr_t, src_pid) == 20);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->src_pid) == 4);
+        LASSERT (offsetof (ptl_hdr_t, type) == 24);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->type) == 4);
+
+        /* Ack */
+        LASSERT (offsetof (ptl_hdr_t, msg.ack.mlength) == 28);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.ack.mlength) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.ack.dst_wmd) == 32);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.ack.dst_wmd) == 16);
+        LASSERT (offsetof (ptl_hdr_t, msg.ack.match_bits) == 48);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.ack.match_bits) == 8);
+        LASSERT (offsetof (ptl_hdr_t, msg.ack.length) == 56);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.ack.length) == 4);
+
+        /* Put */
+        LASSERT (offsetof (ptl_hdr_t, msg.put.ptl_index) == 28);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.ptl_index) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.ack_wmd) == 32);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.ack_wmd) == 16);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.match_bits) == 48);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.match_bits) == 8);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.length) == 56);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.length) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.offset) == 60);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.offset) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.hdr_data) == 64);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.hdr_data) == 8);
+
+        /* Get */
+        LASSERT (offsetof (ptl_hdr_t, msg.get.ptl_index) == 28);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.ptl_index) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.return_wmd) == 32);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.return_wmd) == 16);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.match_bits) == 48);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.match_bits) == 8);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.length) == 56);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.length) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.src_offset) == 60);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.src_offset) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.return_offset) == 64);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.return_offset) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.sink_length) == 68);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.sink_length) == 4);
+
+        /* Reply */
+        LASSERT (offsetof (ptl_hdr_t, msg.reply.dst_wmd) == 32);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.reply.dst_wmd) == 16);
+        LASSERT (offsetof (ptl_hdr_t, msg.reply.dst_offset) == 48);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.reply.dst_offset) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.reply.length) == 56);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.reply.length) == 4);
+}
diff --git a/lnet/portalsconf.m4 b/lnet/portalsconf.m4
deleted file mode 100644 (file)
index 7bd3919..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-AC_PREFIX_DEFAULT([])
-if test "x$prefix" = xNONE || test "x$prefix" = x; then
-  usrprefix=/usr
-else
-  usrprefix='${prefix}'
-fi
-AC_SUBST(usrprefix)
-
-AC_ARG_ENABLE(rtscts-myrinet, [ --enable-rtscts-myrinet enable rtscts over myrinet support])
-AM_CONDITIONAL(RTSCTS_MYRINET, test "$enable_rtscts_myrinet" = yes)
-
-
-CPLANT_ARCH=${target_cpu}
-case ${CPLANT_ARCH} in
-alpha*)
-  RTSCTSLIB_CFLAGS='-O4 -mno-fp-regs'
-  RTSCTSLIB_DEFS=-Ddec_linux
-  ;;
-i*86)
-  RTSCTSLIB_CFLAGS=-O4
-  RTSCTSLIB_DEFS=-Dintel_linux
-  ;;
-#*)
-#  AC_MSG_ERROR([Unrecognized architecture '$CPLANT_ARCH' for rtscts])
-#  ;;
-esac
-AC_SUBST(CPLANT_ARCH)
-AC_SUBST(RTSCTSLIB_CFLAGS)
-AC_SUBST(RTSCTSLIB_DEFS)
-
-AC_MSG_CHECKING(if kernel has CPU affinity support)
-if test "$target_cpu" != ia64 ; then
-  enable_affinity_temp="-DCPU_AFFINITY=1"
-  AC_MSG_RESULT(yes)
-else
-  enable_affinity_temp=""
-  AC_MSG_RESULT(no)
-fi
-AC_MSG_CHECKING(if kernel has zero-copy TCP support)
-ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
-if test "$ZCCD" != 0 ; then
-  enable_zerocopy_temp="-DSOCKNAL_ZC=1"
-  AC_MSG_RESULT(yes)
-else
-  enable_zerocopy_temp=""
-  AC_MSG_RESULT(no)
-fi
-
-AC_ARG_ENABLE(zerocopy, [  --enable-zerocopy enable socknal zerocopy],enable_zerocopy="-DSOCKNAL_ZC=1", enable_zercopy=$enable_zerocopy_temp)
-
-AC_ARG_ENABLE(affinity, [  --enable-affinity enable process/irq affinity],enable_affinity="-DCPU_AFFINITY=1", enable_affinity=$enable_affinity_temp)
-#####################################
-
-AC_MSG_CHECKING(if quadrics kernel headers are present)
-if test -d $LINUX/drivers/net/qsnet ; then
-  AC_MSG_RESULT(yes)
-  QSWNAL="qswnal"
-  with_quadrics="-I$LINUX/drivers/net/qsnet/include"
-  :
-elif test -d $LINUX/drivers/qsnet1 ; then
-  AC_MSG_RESULT(yes)
-  QSWNAL="qswnal"
-  with_quadrics="-I$LINUX/drivers/qsnet1/include -DPROPRIETARY_ELAN"
-  :
-elif test -d $LINUX/drivers/quadrics ; then
-  AC_MSG_RESULT(yes)
-  QSWNAL="qswnal"
-  with_quadrics="-I$LINUX/drivers/quadrics/include -DPROPRIETARY_ELAN"
-  :
-#elif test -d /usr/include/elan3 ; then
-#  AC_MSG_RESULT(yes)
-#  QSWNAL="qswnal"
-#  with_quadrics=""
-#  :
-else
-  AC_MSG_RESULT(no)
-  QSWNAL=""
-  with_quadrics=""
-  :
-fi
-AC_SUBST(with_quadrics)
-AC_SUBST(QSWNAL)
-
-# R. Read 5/02
-GMNAL=""
-echo "checking with-gm=" ${with_gm}
-if test "${with_gm+set}" = set; then
-  if test "${with_gm}" = yes; then
-    with_gm="-I/usr/local/gm/include"
-  else
-    with_gm=-I"$with_gm/include"
-  fi
-  GMNAL="gmnal"
-else
-# default case - no GM
-  with_gm=""
-fi
-AC_SUBST(with_gm)
-AC_SUBST(GMNAL)
-
-
-def_scamac=/opt/scali/include
-AC_ARG_WITH(scamac, [  --with-scamac=[yes/no/path] Path to ScaMAC includes (default=/opt/scali/include)], with_scamac=$withval, with_scamac=$def_scamac)
-AC_MSG_CHECKING(if ScaMAC headers are present)
-if test "$with_scamac" = yes; then
-  with_scamac=$def_scamac
-fi
-if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
-  AC_MSG_RESULT(yes)
-  SCIMACNAL="scimacnal"
-  with_scamac="-I${with_scamac} -I${with_scamac}/icm"
-else
-  AC_MSG_RESULT(no)
-  SCIMACNAL=""
-  with_scamac=""
-fi
-AC_SUBST(with_scamac)
-AC_SUBST(SCIMACNAL)
index b62b401..dc427b0 100644 (file)
@@ -1,5 +1,5 @@
 CPPFLAGS=
 INCLUDES=-I$(top_srcdir)/portals/include -I$(top_srcdir)/include -I$(srcdir)
 lib_LIBRARIES = libtcpnal.a
-pkginclude_HEADERS =  pqtimer.h dispatch.h table.h timer.h connection.h
+pkginclude_HEADERS =  pqtimer.h dispatch.h table.h timer.h connection.h ipmap.h bridge.h procbridge.h
 libtcpnal_a_SOURCES = debug.c pqtimer.c select.c table.c pqtimer.h dispatch.h table.h timer.h address.c procapi.c proclib.c connection.c tcpnal.c connection.h
index b62b401..dc427b0 100644 (file)
@@ -1,5 +1,5 @@
 CPPFLAGS=
 INCLUDES=-I$(top_srcdir)/portals/include -I$(top_srcdir)/include -I$(srcdir)
 lib_LIBRARIES = libtcpnal.a
-pkginclude_HEADERS =  pqtimer.h dispatch.h table.h timer.h connection.h
+pkginclude_HEADERS =  pqtimer.h dispatch.h table.h timer.h connection.h ipmap.h bridge.h procbridge.h
 libtcpnal_a_SOURCES = debug.c pqtimer.c select.c table.c pqtimer.h dispatch.h table.h timer.h address.c procapi.c proclib.c connection.c tcpnal.c connection.h
index 041cd6b..148310a 100644 (file)
@@ -5,3 +5,4 @@ debugctl
 ptlctl
 .deps
 routerstat
+wirecheck
\ No newline at end of file
index 065fcf9..05af598 100644 (file)
@@ -7,11 +7,13 @@
 COMPILE = gcc -Wall -g -I$(srcdir)/../include 
 LINK = gcc -o $@
 
-sbin_PROGRAMS = acceptor ptlctl debugctl routerstat
+sbin_PROGRAMS = acceptor ptlctl debugctl routerstat wirecheck
 lib_LIBRARIES = libptlctl.a
 
 acceptor_SOURCES = acceptor.c # -lefence
 
+wirecheck_SOURCES = wirecheck.c
+
 libptlctl_a_SOURCES = portals.c debug.c l_ioctl.c parser.c parser.h
 
 ptlctl_SOURCES = ptlctl.c
index fe08646..4275a10 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
  * vim:expandtab:shiftwidth=8:tabstop=8:
  *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
+ *  Copyright (c) 2003 Cluster File Systems, Inc.
  *
  *   This file is part of Lustre, http://www.lustre.org.
  *
@@ -23,6 +23,7 @@
 #ifndef _COMPAT25_H
 #define _COMPAT25_H
 
+#include <linux/portals_compat25.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 #define KDEVT_VAL(dev, val)         dev.value = 0               
 #endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-# define SIGNAL_MASK_LOCK(task, flags)         spin_lock_irqsave(                     \
-               &task->sighand->siglock, flags)
-# define SIGNAL_MASK_UNLOCK(task, flags)       spin_unlock_irqrestore(                \
-               &task->sighand->siglock, flags)
-#else
-# define SIGNAL_MASK_LOCK(task, flags)         spin_lock_irqsave(                     \
-               &task->sigmask_lock, flags)
-# define SIGNAL_MASK_UNLOCK(task, flags)       spin_unlock_irqrestore(                \
-               &task->sigmask_lock, flags)
-#endif
-
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 # define PGCACHE_WRLOCK(mapping)          write_lock(&mapping->page_lock)
 # define PGCACHE_WRUNLOCK(mapping)        write_unlock(&mapping->page_lock)
 #else
 # define LL_CHECK_DIRTY(sb)              ll_check_dirty(sb)
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-# define RECALC_SIGPENDING         recalc_sigpending()
-#else
-# define RECALC_SIGPENDING         recalc_sigpending(current)
-#endif
-
-
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
 #define  rb_node_s rb_node
 #define  rb_root_s rb_root
index 3c42103..26293f2 100644 (file)
@@ -3,6 +3,10 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-EXTRA_DIST = Rules.linux archdep.m4 MCP
+EXTRA_DIST = Rules.linux archdep.m4 
 DIST_SUBDIRS = libcfs portals knals unals utils tests doc router
+if LIBLUSTRE
+SUBDIRS = portals unals utils
+else
 SUBDIRS = libcfs portals knals unals utils tests doc router
+endif
index 0315644..2c7fa59 100644 (file)
@@ -52,6 +52,7 @@ case ${host_cpu} in
        AC_MSG_RESULT($host_cpu)
        KCFLAGS='-g -Wall '
        KCPPFLAGS='-D__arch_lib__ '
+       libdir='${exec_prefix}/lib/lustre'
         MOD_LINK=elf_i386
 ;;
        um )
@@ -144,7 +145,7 @@ fi
 # ------------ include paths ------------------
 
 if test $host_cpu != "lib" ; then 
-    KINCFLAGS='-I$(top_srcdir)/include -I$(top_srcdir)/portals/include -I$(LINUX)/include'
+    KINCFLAGS="-I\$(top_srcdir)/include -I\$(top_srcdir)/portals/include -I$LINUX/include"
 else
     KINCFLAGS='-I$(top_srcdir)/include -I$(top_srcdir)/portals/include'
 fi
@@ -189,18 +190,128 @@ if test $host_cpu != "lib" ; then
   fi
 fi
 
-# ---------- SMP -------------------
-#AC_MSG_CHECKING(for SMP)
-#if egrep -e SMP=y $LINUX/.config >/dev/null 2>&1; then
-#        SMPFLAG=
-#        AC_MSG_RESULT(yes)
+# ---------- Portals flags --------------------
+
+#AC_PREFIX_DEFAULT([])
+#if test "x$prefix" = xNONE || test "x$prefix" = x; then
+#  usrprefix=/usr
 #else
-#        SMPFLAG=
-#        AC_MSG_RESULT(no)
+#  usrprefix='${prefix}'
 #fi
+#AC_SUBST(usrprefix)
+
+AC_MSG_CHECKING(if kernel has CPU affinity support)
+if test "$target_cpu" != ia64 ; then
+  enable_affinity_temp="-DCPU_AFFINITY=1"
+  AC_MSG_RESULT(yes)
+else
+  enable_affinity_temp=""
+  AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(if kernel has zero-copy TCP support)
+ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
+if test "$ZCCD" != 0 ; then
+  enable_zerocopy_temp="-DSOCKNAL_ZC=1"
+  AC_MSG_RESULT(yes)
+else
+  enable_zerocopy_temp=""
+  AC_MSG_RESULT(no)
+fi
+
+AC_ARG_ENABLE(zerocopy, [  --enable-zerocopy enable socknal zerocopy],enable_zerocopy="-DSOCKNAL_ZC=1", enable_zercopy=$enable_zerocopy_temp)
+
+AC_ARG_ENABLE(affinity, [  --enable-affinity enable process/irq affinity],enable_affinity="-DCPU_AFFINITY=1", enable_affinity=$enable_affinity_temp)
+#####################################
+
+AC_MSG_CHECKING(if quadrics kernel headers are present)
+if test -d $LINUX/drivers/net/qsnet ; then
+  AC_MSG_RESULT(yes)
+  QSWNAL="qswnal"
+  with_quadrics="-I$LINUX/drivers/net/qsnet/include"
+  :
+elif test -d $LINUX/drivers/qsnet1 ; then
+  AC_MSG_RESULT(yes)
+  QSWNAL="qswnal"
+  with_quadrics="-I$LINUX/drivers/qsnet1/include -DPROPRIETARY_ELAN"
+  :
+elif test -d $LINUX/drivers/quadrics ; then
+  AC_MSG_RESULT(yes)
+  QSWNAL="qswnal"
+  with_quadrics="-I$LINUX/drivers/quadrics/include -DPROPRIETARY_ELAN"
+  :
+#elif test -d /usr/include/elan3 ; then
+#  AC_MSG_RESULT(yes)
+#  QSWNAL="qswnal"
+#  with_quadrics=""
+#  :
+else
+  AC_MSG_RESULT(no)
+  QSWNAL=""
+  with_quadrics=""
+  :
+fi
+AC_SUBST(with_quadrics)
+AC_SUBST(QSWNAL)
+
+# R. Read 5/02
+GMNAL=""
+echo "checking with-gm=" ${with_gm}
+if test "${with_gm+set}" = set; then
+  if test "${with_gm}" = yes; then
+    with_gm="-I/usr/local/gm/include"
+  else
+    with_gm=-I"$with_gm/include"
+  fi
+  GMNAL="gmnal"
+else
+# default case - no GM
+  with_gm=""
+fi
+AC_SUBST(with_gm)
+AC_SUBST(GMNAL)
+
+
+def_scamac=/opt/scali/include
+AC_ARG_WITH(scamac, [  --with-scamac=[yes/no/path] Path to ScaMAC includes (default=/opt/scali/include)], with_scamac=$withval, with_scamac=$def_scamac)
+AC_MSG_CHECKING(if ScaMAC headers are present)
+if test "$with_scamac" = yes; then
+  with_scamac=$def_scamac
+fi
+if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
+  AC_MSG_RESULT(yes)
+  SCIMACNAL="scimacnal"
+  with_scamac="-I${with_scamac} -I${with_scamac}/icm"
+else
+  AC_MSG_RESULT(no)
+  SCIMACNAL=""
+  with_scamac=""
+fi
+
+AC_SUBST(with_scamac)
+AC_SUBST(SCIMACNAL)
 
 CFLAGS="$KCFLAGS"
-CPPFLAGS="$KINCFLAGS $KCPPFLAGS $MFLAGS "
+CPPFLAGS="$KINCFLAGS $KCPPFLAGS $MFLAGS $enable_zerocopy $enable_affinity $with_quadrics $with_gm $with_scamac "
 
 AC_SUBST(MOD_LINK)
-AC_SUBST(LINUX25)
\ No newline at end of file
+AC_SUBST(LINUX25)
+AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
+
+# ---------- Red Hat 2.4.20 backports some 2.5 bits --------
+# This needs to run after we've defined the KCPPFLAGS
+
+AC_MSG_CHECKING(for kernel version)
+AC_TRY_LINK([#define __KERNEL__
+             #include <linux/sched.h>],
+            [struct task_struct p;
+             p.sighand = NULL;],
+            [RH_2_4_20=1],
+            [RH_2_4_20=0])
+
+if test $RH_2_4_20 = 1; then
+       AC_MSG_RESULT(redhat-2.4.20)
+       CPPFLAGS="$CPPFLAGS -DCONFIG_RH_2_4_20"
+else
+       AC_MSG_RESULT($RELEASE)
+fi 
index 4e8dbbb..025f243 100644 (file)
@@ -1,5 +1,4 @@
-
-# ----------  directories ---------
+# ----------  other tests and settings ---------
 
 
 # ---------  unsigned long long sane? -------
@@ -94,15 +93,3 @@ fi
 AC_SUBST(LIBEFENCE)
 AC_SUBST(HAVE_LIBEFENCE)
 
-AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
-AC_MSG_CHECKING(if you are building lib lustre)
-if test "$host_cpu" = "lib"; then
-   AC_MSG_RESULT(yes)
-   libdir='${exec_prefix}/lib/lustre'
-else
-   AC_MSG_RESULT(no)
-fi
-
-# end -------- Kernel build environment. -----------------
-
-
index 2ee86b2..31d3492 100644 (file)
@@ -13,7 +13,6 @@ AM_INIT_AUTOMAKE(portals, builtin([esyscmd], [sed -ne '/.*define IVERSION /{ s/.
 
 sinclude(build.m4)
 sinclude(archdep.m4)
-sinclude(portalsconf.m4)
 
 if test x$enable_inkernel = xyes ; then
 cp Kernelenv.mk Kernelenv.in
@@ -31,6 +30,5 @@ AC_OUTPUT([Makefile Kernelenv libcfs/Makefile portals/Makefile \
           unals/Makefile knals/Makefile router/Makefile \
          knals/socknal/Makefile knals/gmnal/Makefile knals/qswnal/Makefile \
          knals/scimacnal/Makefile knals/toenal/Makefile \
-          utils/Makefile tests/Makefile doc/Makefile \
-          packaging/Makefile packaging/portals.spec ])
+          utils/Makefile tests/Makefile doc/Makefile ])
 
index b70e128..4a61e76 100644 (file)
@@ -370,6 +370,7 @@ extern void lib_copy_buf2iov (int niov, struct iovec *iov, char *dest, ptl_size_
 extern ptl_size_t lib_kiov_nob (int niov, ptl_kiov_t *iov);
 extern void lib_copy_kiov2buf (char *dest, int niov, ptl_kiov_t *iov, ptl_size_t len);
 extern void lib_copy_buf2kiov (int niov, ptl_kiov_t *iov, char *src, ptl_size_t len);
+extern void lib_assert_wire_constants (void);
 
 extern void lib_recv (nal_cb_t *nal, void *private, lib_msg_t *msg, lib_md_t *md,
                       ptl_size_t offset, ptl_size_t mlen, ptl_size_t rlen);
index bece0a3..47c0dd2 100644 (file)
@@ -31,6 +31,8 @@ typedef struct lib_me_t lib_me_t;
 typedef struct lib_md_t lib_md_t;
 typedef struct lib_eq_t lib_eq_t;
 
+#define WIRE_ATTR      __attribute__((packed))
+
 /* The wire handle's interface cookie only matches one network interface in
  * one epoch (i.e. new cookie when the interface restarts or the node
  * reboots).  The object cookie only matches one object on that interface
@@ -38,7 +40,7 @@ typedef struct lib_eq_t lib_eq_t;
 typedef struct {
         __u64 wh_interface_cookie;
         __u64 wh_object_cookie;
-} ptl_handle_wire_t;
+} WIRE_ATTR ptl_handle_wire_t;
 
 /* byte-flip insensitive! */
 #define PTL_WIRE_HANDLE_NONE \
@@ -63,7 +65,7 @@ typedef struct ptl_ack {
         ptl_handle_wire_t dst_wmd;
         ptl_match_bits_t match_bits;
         ptl_size_t length;                      /* common length (0 for acks) moving out RSN */
-} ptl_ack_t;
+} WIRE_ATTR ptl_ack_t;
 
 typedef struct ptl_put {
         ptl_pt_index_t ptl_index;
@@ -72,7 +74,7 @@ typedef struct ptl_put {
         ptl_size_t length;                      /* common length moving out RSN */
         ptl_size_t offset;
         ptl_hdr_data_t hdr_data;
-} ptl_put_t;
+} WIRE_ATTR ptl_put_t;
 
 typedef struct ptl_get {
         ptl_pt_index_t ptl_index;
@@ -82,7 +84,7 @@ typedef struct ptl_get {
         ptl_size_t src_offset;
         ptl_size_t return_offset;               /* unused: going RSN */
         ptl_size_t sink_length;
-} ptl_get_t;
+} WIRE_ATTR ptl_get_t;
 
 typedef struct ptl_reply {
         __u32 unused1;                          /* unused fields going RSN */
@@ -90,7 +92,7 @@ typedef struct ptl_reply {
         ptl_size_t dst_offset;                  /* unused: going RSN */
         __u32 unused2;
         ptl_size_t length;                      /* common length moving out RSN */
-} ptl_reply_t;
+} WIRE_ATTR ptl_reply_t;
 
 typedef struct {
         ptl_nid_t dest_nid;
@@ -104,7 +106,7 @@ typedef struct {
                 ptl_get_t get;
                 ptl_reply_t reply;
         } msg;
-} ptl_hdr_t;
+} WIRE_ATTR ptl_hdr_t;
 
 /* All length fields in individual unions at same offset */
 /* LASSERT for same in lib-move.c */
@@ -122,7 +124,7 @@ typedef struct {
         __u32  magic;                          /* PORTALS_PROTO_MAGIC */
         __u16   version_major;                  /* increment on incompatible change */
         __u16   version_minor;                  /* increment on compatible change */
-} ptl_magicversion_t;
+} WIRE_ATTR ptl_magicversion_t;
 
 #define PORTALS_PROTO_MAGIC                0xeebc0ded
 
index 5c6085e..fed2785 100644 (file)
@@ -3,4 +3,5 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
+DIST_SUBDIRS= socknal toenal qswnal gmnal scimacnal 
 SUBDIRS= socknal toenal        @QSWNAL@ @GMNAL@ @SCIMACNAL@
index 5025856..c4ca2e3 100644 (file)
@@ -19,7 +19,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 #define DEBUG_SUBSYSTEM S_PORTALS
 
 #include <linux/config.h>
@@ -45,6 +47,7 @@
 #include <portals/lib-p30.h>
 #include <portals/p30.h>
 #include <linux/kp30.h>
+#include <linux/portals_compat25.h>
 
 #define PORTAL_MINOR 240
 
@@ -84,10 +87,10 @@ kportal_blockallsigs ()
 {
         unsigned long  flags;
 
-        spin_lock_irqsave (&current->sigmask_lock, flags);
-        siginitsetinv (&current->blocked, 0);
-        recalc_sigpending (current);
-        spin_unlock_irqrestore (&current->sigmask_lock, flags);
+        SIGNAL_MASK_LOCK(current, flags);
+        sigfillset(&current->blocked);
+        RECALC_SIGPENDING;
+        SIGNAL_MASK_UNLOCK(current, flags);
 }
 
 /* called when opening /dev/device */
index d6315c6..99c4d32 100644 (file)
@@ -357,6 +357,8 @@ lib_init(nal_cb_t * nal, ptl_nid_t nid, ptl_pid_t pid, int gsize,
                 goto out;
         }
 
+        lib_assert_wire_constants ();
+        
         /*
          * Allocate the portal table for this interface
          * and all per-interface objects.
index a04e961..fde4f16 100644 (file)
@@ -1285,3 +1285,95 @@ int do_PtlGet(nal_cb_t * nal, void *private, void *v_args, void *v_ret)
 
         return ret->rc = PTL_OK;
 }
+
+void lib_assert_wire_constants (void)
+{
+        /* Wire protocol assertions generated by 'wirecheck' */
+
+        /* Constants... */
+        LASSERT (PORTALS_PROTO_MAGIC == 0xeebc0ded);
+        LASSERT (PORTALS_PROTO_VERSION_MAJOR == 0);
+        LASSERT (PORTALS_PROTO_VERSION_MINOR == 1);
+        LASSERT (PTL_MSG_ACK == 0);
+        LASSERT (PTL_MSG_PUT == 1);
+        LASSERT (PTL_MSG_GET == 2);
+        LASSERT (PTL_MSG_REPLY == 3);
+        LASSERT (PTL_MSG_HELLO == 4);
+
+        /* Checks for struct ptl_handle_wire_t */
+        LASSERT (sizeof (ptl_handle_wire_t) == 16);
+        LASSERT (offsetof (ptl_handle_wire_t, wh_interface_cookie) == 0);
+        LASSERT (sizeof (((ptl_handle_wire_t *)0)->wh_interface_cookie) == 8);
+        LASSERT (offsetof (ptl_handle_wire_t, wh_object_cookie) == 8);
+        LASSERT (sizeof (((ptl_handle_wire_t *)0)->wh_object_cookie) == 8);
+
+        /* Checks for struct ptl_magicversion_t */
+        LASSERT (sizeof (ptl_magicversion_t) == 8);
+        LASSERT (offsetof (ptl_magicversion_t, magic) == 0);
+        LASSERT (sizeof (((ptl_magicversion_t *)0)->magic) == 4);
+        LASSERT (offsetof (ptl_magicversion_t, version_major) == 4);
+        LASSERT (sizeof (((ptl_magicversion_t *)0)->version_major) == 2);
+        LASSERT (offsetof (ptl_magicversion_t, version_minor) == 6);
+        LASSERT (sizeof (((ptl_magicversion_t *)0)->version_minor) == 2);
+
+        /* Checks for struct ptl_hdr_t */
+        LASSERT (sizeof (ptl_hdr_t) == 72);
+        LASSERT (offsetof (ptl_hdr_t, dest_nid) == 0);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->dest_nid) == 8);
+        LASSERT (offsetof (ptl_hdr_t, src_nid) == 8);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->src_nid) == 8);
+        LASSERT (offsetof (ptl_hdr_t, dest_pid) == 16);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->dest_pid) == 4);
+        LASSERT (offsetof (ptl_hdr_t, src_pid) == 20);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->src_pid) == 4);
+        LASSERT (offsetof (ptl_hdr_t, type) == 24);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->type) == 4);
+
+        /* Ack */
+        LASSERT (offsetof (ptl_hdr_t, msg.ack.mlength) == 28);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.ack.mlength) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.ack.dst_wmd) == 32);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.ack.dst_wmd) == 16);
+        LASSERT (offsetof (ptl_hdr_t, msg.ack.match_bits) == 48);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.ack.match_bits) == 8);
+        LASSERT (offsetof (ptl_hdr_t, msg.ack.length) == 56);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.ack.length) == 4);
+
+        /* Put */
+        LASSERT (offsetof (ptl_hdr_t, msg.put.ptl_index) == 28);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.ptl_index) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.ack_wmd) == 32);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.ack_wmd) == 16);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.match_bits) == 48);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.match_bits) == 8);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.length) == 56);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.length) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.offset) == 60);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.offset) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.put.hdr_data) == 64);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.put.hdr_data) == 8);
+
+        /* Get */
+        LASSERT (offsetof (ptl_hdr_t, msg.get.ptl_index) == 28);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.ptl_index) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.return_wmd) == 32);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.return_wmd) == 16);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.match_bits) == 48);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.match_bits) == 8);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.length) == 56);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.length) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.src_offset) == 60);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.src_offset) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.return_offset) == 64);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.return_offset) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.get.sink_length) == 68);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.get.sink_length) == 4);
+
+        /* Reply */
+        LASSERT (offsetof (ptl_hdr_t, msg.reply.dst_wmd) == 32);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.reply.dst_wmd) == 16);
+        LASSERT (offsetof (ptl_hdr_t, msg.reply.dst_offset) == 48);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.reply.dst_offset) == 4);
+        LASSERT (offsetof (ptl_hdr_t, msg.reply.length) == 56);
+        LASSERT (sizeof (((ptl_hdr_t *)0)->msg.reply.length) == 4);
+}
diff --git a/lustre/portals/portalsconf.m4 b/lustre/portals/portalsconf.m4
deleted file mode 100644 (file)
index 7bd3919..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-AC_PREFIX_DEFAULT([])
-if test "x$prefix" = xNONE || test "x$prefix" = x; then
-  usrprefix=/usr
-else
-  usrprefix='${prefix}'
-fi
-AC_SUBST(usrprefix)
-
-AC_ARG_ENABLE(rtscts-myrinet, [ --enable-rtscts-myrinet enable rtscts over myrinet support])
-AM_CONDITIONAL(RTSCTS_MYRINET, test "$enable_rtscts_myrinet" = yes)
-
-
-CPLANT_ARCH=${target_cpu}
-case ${CPLANT_ARCH} in
-alpha*)
-  RTSCTSLIB_CFLAGS='-O4 -mno-fp-regs'
-  RTSCTSLIB_DEFS=-Ddec_linux
-  ;;
-i*86)
-  RTSCTSLIB_CFLAGS=-O4
-  RTSCTSLIB_DEFS=-Dintel_linux
-  ;;
-#*)
-#  AC_MSG_ERROR([Unrecognized architecture '$CPLANT_ARCH' for rtscts])
-#  ;;
-esac
-AC_SUBST(CPLANT_ARCH)
-AC_SUBST(RTSCTSLIB_CFLAGS)
-AC_SUBST(RTSCTSLIB_DEFS)
-
-AC_MSG_CHECKING(if kernel has CPU affinity support)
-if test "$target_cpu" != ia64 ; then
-  enable_affinity_temp="-DCPU_AFFINITY=1"
-  AC_MSG_RESULT(yes)
-else
-  enable_affinity_temp=""
-  AC_MSG_RESULT(no)
-fi
-AC_MSG_CHECKING(if kernel has zero-copy TCP support)
-ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
-if test "$ZCCD" != 0 ; then
-  enable_zerocopy_temp="-DSOCKNAL_ZC=1"
-  AC_MSG_RESULT(yes)
-else
-  enable_zerocopy_temp=""
-  AC_MSG_RESULT(no)
-fi
-
-AC_ARG_ENABLE(zerocopy, [  --enable-zerocopy enable socknal zerocopy],enable_zerocopy="-DSOCKNAL_ZC=1", enable_zercopy=$enable_zerocopy_temp)
-
-AC_ARG_ENABLE(affinity, [  --enable-affinity enable process/irq affinity],enable_affinity="-DCPU_AFFINITY=1", enable_affinity=$enable_affinity_temp)
-#####################################
-
-AC_MSG_CHECKING(if quadrics kernel headers are present)
-if test -d $LINUX/drivers/net/qsnet ; then
-  AC_MSG_RESULT(yes)
-  QSWNAL="qswnal"
-  with_quadrics="-I$LINUX/drivers/net/qsnet/include"
-  :
-elif test -d $LINUX/drivers/qsnet1 ; then
-  AC_MSG_RESULT(yes)
-  QSWNAL="qswnal"
-  with_quadrics="-I$LINUX/drivers/qsnet1/include -DPROPRIETARY_ELAN"
-  :
-elif test -d $LINUX/drivers/quadrics ; then
-  AC_MSG_RESULT(yes)
-  QSWNAL="qswnal"
-  with_quadrics="-I$LINUX/drivers/quadrics/include -DPROPRIETARY_ELAN"
-  :
-#elif test -d /usr/include/elan3 ; then
-#  AC_MSG_RESULT(yes)
-#  QSWNAL="qswnal"
-#  with_quadrics=""
-#  :
-else
-  AC_MSG_RESULT(no)
-  QSWNAL=""
-  with_quadrics=""
-  :
-fi
-AC_SUBST(with_quadrics)
-AC_SUBST(QSWNAL)
-
-# R. Read 5/02
-GMNAL=""
-echo "checking with-gm=" ${with_gm}
-if test "${with_gm+set}" = set; then
-  if test "${with_gm}" = yes; then
-    with_gm="-I/usr/local/gm/include"
-  else
-    with_gm=-I"$with_gm/include"
-  fi
-  GMNAL="gmnal"
-else
-# default case - no GM
-  with_gm=""
-fi
-AC_SUBST(with_gm)
-AC_SUBST(GMNAL)
-
-
-def_scamac=/opt/scali/include
-AC_ARG_WITH(scamac, [  --with-scamac=[yes/no/path] Path to ScaMAC includes (default=/opt/scali/include)], with_scamac=$withval, with_scamac=$def_scamac)
-AC_MSG_CHECKING(if ScaMAC headers are present)
-if test "$with_scamac" = yes; then
-  with_scamac=$def_scamac
-fi
-if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
-  AC_MSG_RESULT(yes)
-  SCIMACNAL="scimacnal"
-  with_scamac="-I${with_scamac} -I${with_scamac}/icm"
-else
-  AC_MSG_RESULT(no)
-  SCIMACNAL=""
-  with_scamac=""
-fi
-AC_SUBST(with_scamac)
-AC_SUBST(SCIMACNAL)
index b62b401..dc427b0 100644 (file)
@@ -1,5 +1,5 @@
 CPPFLAGS=
 INCLUDES=-I$(top_srcdir)/portals/include -I$(top_srcdir)/include -I$(srcdir)
 lib_LIBRARIES = libtcpnal.a
-pkginclude_HEADERS =  pqtimer.h dispatch.h table.h timer.h connection.h
+pkginclude_HEADERS =  pqtimer.h dispatch.h table.h timer.h connection.h ipmap.h bridge.h procbridge.h
 libtcpnal_a_SOURCES = debug.c pqtimer.c select.c table.c pqtimer.h dispatch.h table.h timer.h address.c procapi.c proclib.c connection.c tcpnal.c connection.h
index 041cd6b..148310a 100644 (file)
@@ -5,3 +5,4 @@ debugctl
 ptlctl
 .deps
 routerstat
+wirecheck
\ No newline at end of file
index 065fcf9..05af598 100644 (file)
@@ -7,11 +7,13 @@
 COMPILE = gcc -Wall -g -I$(srcdir)/../include 
 LINK = gcc -o $@
 
-sbin_PROGRAMS = acceptor ptlctl debugctl routerstat
+sbin_PROGRAMS = acceptor ptlctl debugctl routerstat wirecheck
 lib_LIBRARIES = libptlctl.a
 
 acceptor_SOURCES = acceptor.c # -lefence
 
+wirecheck_SOURCES = wirecheck.c
+
 libptlctl_a_SOURCES = portals.c debug.c l_ioctl.c parser.c parser.h
 
 ptlctl_SOURCES = ptlctl.c