svn commit: r218185 - head/sbin/hastd

2011-02-02 Thread Pawel Jakub Dawidek
Author: pjd
Date: Wed Feb  2 08:24:26 2011
New Revision: 218185
URL: http://svn.freebsd.org/changeset/base/218185

Log:
  Be prepared that hp_client or hp_server might be NULL now.
  
  MFC after:1 week

Modified:
  head/sbin/hastd/proto.c

Modified: head/sbin/hastd/proto.c
==
--- head/sbin/hastd/proto.c Wed Feb  2 05:58:51 2011(r218184)
+++ head/sbin/hastd/proto.c Wed Feb  2 08:24:26 2011(r218185)
@@ -83,10 +83,17 @@ proto_common_setup(const char *addr, str
return (-1);
 
TAILQ_FOREACH(proto, protos, hp_next) {
-   if (side == PROTO_SIDE_CLIENT)
-   ret = proto-hp_client(addr, ctx);
-   else /* if (side == PROTO_SIDE_SERVER_LISTEN) */
-   ret = proto-hp_server(addr, ctx);
+   if (side == PROTO_SIDE_CLIENT) {
+   if (proto-hp_client == NULL)
+   ret = -1;
+   else
+   ret = proto-hp_client(addr, ctx);
+   } else /* if (side == PROTO_SIDE_SERVER_LISTEN) */ {
+   if (proto-hp_server == NULL)
+   ret = -1;
+   else
+   ret = proto-hp_server(addr, ctx);
+   }
/*
 * ret == 0  - success
 * ret == -1 - addr is not for this protocol
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218186 - head/sys/netinet

2011-02-02 Thread Randall Stewart
Author: rrs
Date: Wed Feb  2 11:13:23 2011
New Revision: 218186
URL: http://svn.freebsd.org/changeset/base/218186

Log:
  1) Allow a chunk to track the cwnd it was at when sent.
  2) Add separate max-bursts for retransmit and hb. These
 are set to sysctlable values but not settable via the
 socket api. This makes sure we don't blast out HB's or
 fast-retransmits.
  3) Determine on the first data transmission on a net if
 its local-lan (by being under or over a RTT). This
 can later be used to think about different algorithms
 based on locallan vs big-i (experimental)
  4) The cwnd should NOT be allowed to grow when an ECNEcho
 is seen (TCP has this same bug). We fix this in SCTP
 so an ECNe being seen prevents an advance of cwnd.
  5) CWR's should not be sent multiple times to the
 same network, instead just updating the TSN being
 transmitted if needed.
  
  MFC after:1 Month

Modified:
  head/sys/netinet/sctp_cc_functions.c
  head/sys/netinet/sctp_constants.h
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctp_indata.h
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet/sctp_pcb.h
  head/sys/netinet/sctp_structs.h
  head/sys/netinet/sctp_sysctl.c
  head/sys/netinet/sctp_sysctl.h
  head/sys/netinet/sctp_timer.c
  head/sys/netinet/sctputil.c
  head/sys/netinet/sctputil.h

Modified: head/sys/netinet/sctp_cc_functions.c
==
--- head/sys/netinet/sctp_cc_functions.cWed Feb  2 08:24:26 2011
(r218185)
+++ head/sys/netinet/sctp_cc_functions.cWed Feb  2 11:13:23 2011
(r218186)
@@ -481,6 +481,7 @@ sctp_cwnd_update_after_timeout(struct sc
}
 }
 
+
 static void
 sctp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb, struct sctp_nets *net,
 int in_window, int num_pkt_lost)

Modified: head/sys/netinet/sctp_constants.h
==
--- head/sys/netinet/sctp_constants.h   Wed Feb  2 08:24:26 2011
(r218185)
+++ head/sys/netinet/sctp_constants.h   Wed Feb  2 11:13:23 2011
(r218186)
@@ -345,6 +345,16 @@ __FBSDID($FreeBSD$);
 
 /* default max I can burst out after a fast retransmit, 0 disables it */
 #define SCTP_DEF_MAX_BURST 0
+#define SCTP_DEF_HBMAX_BURST 4
+#define SCTP_DEF_FRMAX_BURST 4
+
+/* RTO calculation flag to say if it
+ * is safe to determine local lan or not.
+ */
+#define SCTP_DETERMINE_LL_NOTOK 0
+#define SCTP_DETERMINE_LL_OK1
+
+
 /* IP hdr (20/40) + 12+2+2 (enet) + sctp common 12 */
 #define SCTP_FIRST_MBUF_RESV 68
 /* Packet transmit states in the sent field */
@@ -947,6 +957,18 @@ __FBSDID($FreeBSD$);
  */
 #define SCTP_TIME_WAIT 60
 
+/* How many micro seconds is the cutoff from
+ * local lan type rtt's
+ */
+ /*
+  * We allow 500us for the rtt and another 500us for the cookie processing
+  * since we measure this on the first rtt.
+  */
+#define SCTP_LOCAL_LAN_RTT 1100
+#define SCTP_LAN_UNKNOWN  0
+#define SCTP_LAN_LOCAL1
+#define SCTP_LAN_INTERNET 2
+
 #define SCTP_SEND_BUFFER_SPLITTING 0x0001
 #define SCTP_RECV_BUFFER_SPLITTING 0x0002
 
@@ -994,6 +1016,7 @@ __FBSDID($FreeBSD$);
 
 #if defined(_KERNEL)
 
+#define SCTP_GETTIME_TIMESPEC(x) (getnanouptime(x))
 #define SCTP_GETTIME_TIMEVAL(x)(getmicrouptime(x))
 #define SCTP_GETPTIME_TIMEVAL(x)   (microuptime(x))
 #endif

Modified: head/sys/netinet/sctp_indata.c
==
--- head/sys/netinet/sctp_indata.c  Wed Feb  2 08:24:26 2011
(r218185)
+++ head/sys/netinet/sctp_indata.c  Wed Feb  2 11:13:23 2011
(r218186)
@@ -2955,7 +2955,8 @@ sctp_process_segment_range(struct sctp_t
stcb-asoc,
tp1-whoTo,

tp1-sent_rcv_time,
-   
sctp_align_safe_nocopy);
+   
sctp_align_safe_nocopy,
+   
SCTP_DETERMINE_LL_OK);
tp1-do_rtt = 0;
}
}
@@ -3751,7 +3752,7 @@ sctp_window_probe_recovery(struct sctp_t
 
 void
 sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
-uint32_t rwnd, int *abort_now)
+uint32_t rwnd, int *abort_now, int ecne_seen)
 {
struct sctp_nets *net;
struct sctp_association *asoc;
@@ -3902,7 +3903,8 @@ sctp_express_handle_sack(struct sctp_tcb

sctp_calculate_rto(stcb,
  

svn commit: r218189 - head/sys/conf

2011-02-02 Thread Sergey Kandaurov
Author: pluknet
Date: Wed Feb  2 14:41:32 2011
New Revision: 218189
URL: http://svn.freebsd.org/changeset/base/218189

Log:
  Remove OpenSolaris include path referring to a non-existing directory
  never committed from p4 dtrace branch.
  [The correct include path is referenced from every opensolaris compat
  consumer's module Makefile, so it doesn't serve any purpose anyway.]
  
  Reported by:  arundel on freebsd-hackers@ via clang
  Approved by:  kib (mentor)
  MFC after:1 week

Modified:
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/kern.pre.mk
==
--- head/sys/conf/kern.pre.mk   Wed Feb  2 12:24:53 2011(r218188)
+++ head/sys/conf/kern.pre.mk   Wed Feb  2 14:41:32 2011(r218189)
@@ -82,9 +82,6 @@ INCLUDES+= -I$S/dev/twa
 # ...  and XFS
 INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support 
-I$S/gnu/fs/xfs
 
-# ...  and OpenSolaris
-INCLUDES+= -I$S/contrib/opensolaris/compat
-
 # ... and the same for cxgb
 INCLUDES+= -I$S/dev/cxgb
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218190 - head/sys/fs/ext2fs

2011-02-02 Thread John Baldwin
Author: jhb
Date: Wed Feb  2 14:59:05 2011
New Revision: 218190
URL: http://svn.freebsd.org/changeset/base/218190

Log:
  Fix build with DIAGNOSTIC enabled.
  
  Pointy hat to:jhb

Modified:
  head/sys/fs/ext2fs/ext2_alloc.c

Modified: head/sys/fs/ext2fs/ext2_alloc.c
==
--- head/sys/fs/ext2fs/ext2_alloc.c Wed Feb  2 14:41:32 2011
(r218189)
+++ head/sys/fs/ext2fs/ext2_alloc.c Wed Feb  2 14:59:05 2011
(r218190)
@@ -730,13 +730,13 @@ retry:
}
 gotit:
 #ifdef DIAGNOSTIC
-   if (isset(bbp, (daddr_t)bno)) {
-   printf(ext2fs_alloccgblk: cg=%d bno=%d fs=%s\n,
-   cg, bno, fs-e2fs_fsmnt);
+   if (isset(bbp, bno)) {
+   printf(ext2fs_alloccgblk: cg=%d bno=%jd fs=%s\n,
+   cg, (intmax_t)bno, fs-e2fs_fsmnt);
panic(ext2fs_alloccg: dup alloc);
}
 #endif
-   setbit(bbp, (daddr_t)bno);
+   setbit(bbp, bno);
EXT2_LOCK(ump);
fs-e2fs-e2fs_fbcount--;
fs-e2fs_gd[cg].ext2bgd_nbfree--;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218191 - head/sbin/hastd

2011-02-02 Thread Pawel Jakub Dawidek
Author: pjd
Date: Wed Feb  2 15:23:07 2011
New Revision: 218191
URL: http://svn.freebsd.org/changeset/base/218191

Log:
  Move protocol allocation and deallocation to separate functions.
  
  MFC after:1 week

Modified:
  head/sbin/hastd/proto.c

Modified: head/sbin/hastd/proto.c
==
--- head/sbin/hastd/proto.c Wed Feb  2 14:59:05 2011(r218190)
+++ head/sbin/hastd/proto.c Wed Feb  2 15:23:07 2011(r218191)
@@ -36,6 +36,7 @@ __FBSDID($FreeBSD$);
 
 #include errno.h
 #include stdint.h
+#include strings.h
 
 #include pjdlog.h
 #include proto.h
@@ -68,6 +69,40 @@ proto_register(struct hast_proto *proto,
}
 }
 
+static struct proto_conn *
+proto_alloc(struct hast_proto *proto, int side)
+{
+   struct proto_conn *conn;
+
+   PJDLOG_ASSERT(proto != NULL);
+   PJDLOG_ASSERT(side == PROTO_SIDE_CLIENT ||
+   side == PROTO_SIDE_SERVER_LISTEN ||
+   side == PROTO_SIDE_SERVER_WORK);
+
+   conn = malloc(sizeof(*conn));
+   if (conn != NULL) {
+   conn-pc_proto = proto;
+   conn-pc_side = side;
+   conn-pc_magic = PROTO_CONN_MAGIC;
+   }
+   return (conn);
+}
+
+static void
+proto_free(struct proto_conn *conn)
+{
+
+   PJDLOG_ASSERT(conn != NULL);
+   PJDLOG_ASSERT(conn-pc_magic == PROTO_CONN_MAGIC);
+   PJDLOG_ASSERT(conn-pc_side == PROTO_SIDE_CLIENT ||
+   conn-pc_side == PROTO_SIDE_SERVER_LISTEN ||
+   conn-pc_side == PROTO_SIDE_SERVER_WORK);
+   PJDLOG_ASSERT(conn-pc_proto != NULL);
+
+   bzero(conn, sizeof(*conn));
+   free(conn);
+}
+
 static int
 proto_common_setup(const char *addr, struct proto_conn **connp, int side)
 {
@@ -76,11 +111,8 @@ proto_common_setup(const char *addr, str
void *ctx;
int ret;
 
-   PJDLOG_ASSERT(side == PROTO_SIDE_CLIENT || side == 
PROTO_SIDE_SERVER_LISTEN);
-
-   conn = malloc(sizeof(*conn));
-   if (conn == NULL)
-   return (-1);
+   PJDLOG_ASSERT(side == PROTO_SIDE_CLIENT ||
+   side == PROTO_SIDE_SERVER_LISTEN);
 
TAILQ_FOREACH(proto, protos, hp_next) {
if (side == PROTO_SIDE_CLIENT) {
@@ -104,21 +136,24 @@ proto_common_setup(const char *addr, str
}
if (proto == NULL) {
/* Unrecognized address. */
-   free(conn);
errno = EINVAL;
return (-1);
}
if (ret  0) {
/* An error occured. */
-   free(conn);
errno = ret;
return (-1);
}
-   conn-pc_proto = proto;
+   conn = proto_alloc(proto, side);
+   if (conn == NULL) {
+   if (proto-hp_close != NULL)
+   proto-hp_close(ctx);
+   errno = ENOMEM;
+   return (-1);
+   }
conn-pc_ctx = ctx;
-   conn-pc_side = side;
-   conn-pc_magic = PROTO_CONN_MAGIC;
*connp = conn;
+
return (0);
 }
 
@@ -168,20 +203,17 @@ proto_accept(struct proto_conn *conn, st
PJDLOG_ASSERT(conn-pc_proto != NULL);
PJDLOG_ASSERT(conn-pc_proto-hp_accept != NULL);
 
-   newconn = malloc(sizeof(*newconn));
+   newconn = proto_alloc(conn-pc_proto, PROTO_SIDE_SERVER_WORK);
if (newconn == NULL)
return (-1);
 
ret = conn-pc_proto-hp_accept(conn-pc_ctx, newconn-pc_ctx);
if (ret != 0) {
-   free(newconn);
+   proto_free(newconn);
errno = ret;
return (-1);
}
 
-   newconn-pc_proto = conn-pc_proto;
-   newconn-pc_side = PROTO_SIDE_SERVER_WORK;
-   newconn-pc_magic = PROTO_CONN_MAGIC;
*newconnp = newconn;
 
return (0);
@@ -341,6 +373,5 @@ proto_close(struct proto_conn *conn)
PJDLOG_ASSERT(conn-pc_proto-hp_close != NULL);
 
conn-pc_proto-hp_close(conn-pc_ctx);
-   conn-pc_magic = 0;
-   free(conn);
+   proto_free(conn);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218192 - head/sbin/hastd

2011-02-02 Thread Pawel Jakub Dawidek
Author: pjd
Date: Wed Feb  2 15:42:00 2011
New Revision: 218192
URL: http://svn.freebsd.org/changeset/base/218192

Log:
  Allow to specify connection timeout by the caller.
  
  MFC after:1 week

Modified:
  head/sbin/hastd/primary.c
  head/sbin/hastd/proto.c
  head/sbin/hastd/proto.h
  head/sbin/hastd/proto_impl.h
  head/sbin/hastd/proto_tcp4.c
  head/sbin/hastd/proto_uds.c

Modified: head/sbin/hastd/primary.c
==
--- head/sbin/hastd/primary.c   Wed Feb  2 15:23:07 2011(r218191)
+++ head/sbin/hastd/primary.c   Wed Feb  2 15:42:00 2011(r218192)
@@ -515,7 +515,7 @@ init_remote(struct hast_resource *res, s
res-hr_remoteaddr);
}
/* Try to connect, but accept failure. */
-   if (proto_connect(out)  0) {
+   if (proto_connect(out, HAST_TIMEOUT)  0) {
pjdlog_errno(LOG_WARNING, Unable to connect to %s,
res-hr_remoteaddr);
goto close;
@@ -582,7 +582,7 @@ init_remote(struct hast_resource *res, s
res-hr_remoteaddr);
}
/* Try to connect, but accept failure. */
-   if (proto_connect(in)  0) {
+   if (proto_connect(in, HAST_TIMEOUT)  0) {
pjdlog_errno(LOG_WARNING, Unable to connect to %s,
res-hr_remoteaddr);
goto close;

Modified: head/sbin/hastd/proto.c
==
--- head/sbin/hastd/proto.c Wed Feb  2 15:23:07 2011(r218191)
+++ head/sbin/hastd/proto.c Wed Feb  2 15:42:00 2011(r218192)
@@ -165,7 +165,7 @@ proto_client(const char *addr, struct pr
 }
 
 int
-proto_connect(struct proto_conn *conn)
+proto_connect(struct proto_conn *conn, int timeout)
 {
int ret;
 
@@ -174,8 +174,9 @@ proto_connect(struct proto_conn *conn)
PJDLOG_ASSERT(conn-pc_side == PROTO_SIDE_CLIENT);
PJDLOG_ASSERT(conn-pc_proto != NULL);
PJDLOG_ASSERT(conn-pc_proto-hp_connect != NULL);
+   PJDLOG_ASSERT(timeout = 0);
 
-   ret = conn-pc_proto-hp_connect(conn-pc_ctx);
+   ret = conn-pc_proto-hp_connect(conn-pc_ctx, timeout);
if (ret != 0) {
errno = ret;
return (-1);

Modified: head/sbin/hastd/proto.h
==
--- head/sbin/hastd/proto.h Wed Feb  2 15:23:07 2011(r218191)
+++ head/sbin/hastd/proto.h Wed Feb  2 15:42:00 2011(r218192)
@@ -38,7 +38,7 @@
 struct proto_conn;
 
 int proto_client(const char *addr, struct proto_conn **connp);
-int proto_connect(struct proto_conn *conn);
+int proto_connect(struct proto_conn *conn, int timeout);
 int proto_server(const char *addr, struct proto_conn **connp);
 int proto_accept(struct proto_conn *conn, struct proto_conn **newconnp);
 int proto_send(const struct proto_conn *conn, const void *data, size_t size);

Modified: head/sbin/hastd/proto_impl.h
==
--- head/sbin/hastd/proto_impl.hWed Feb  2 15:23:07 2011
(r218191)
+++ head/sbin/hastd/proto_impl.hWed Feb  2 15:42:00 2011
(r218192)
@@ -40,7 +40,7 @@
 #define__constructor   __attribute__((constructor))
 
 typedef int hp_client_t(const char *, void **);
-typedef int hp_connect_t(void *);
+typedef int hp_connect_t(void *, int);
 typedef int hp_server_t(const char *, void **);
 typedef int hp_accept_t(void *, void **);
 typedef int hp_send_t(void *, const unsigned char *, size_t);

Modified: head/sbin/hastd/proto_tcp4.c
==
--- head/sbin/hastd/proto_tcp4.cWed Feb  2 15:23:07 2011
(r218191)
+++ head/sbin/hastd/proto_tcp4.cWed Feb  2 15:42:00 2011
(r218192)
@@ -211,7 +211,7 @@ tcp4_client(const char *addr, void **ctx
 }
 
 static int
-tcp4_connect(void *ctx)
+tcp4_connect(void *ctx, int timeout)
 {
struct tcp4_ctx *tctx = ctx;
struct timeval tv;
@@ -223,6 +223,7 @@ tcp4_connect(void *ctx)
PJDLOG_ASSERT(tctx-tc_magic == TCP4_CTX_MAGIC);
PJDLOG_ASSERT(tctx-tc_side == TCP4_SIDE_CLIENT);
PJDLOG_ASSERT(tctx-tc_fd = 0);
+   PJDLOG_ASSERT(timeout = 0);
 
flags = fcntl(tctx-tc_fd, F_GETFL);
if (flags == -1) {
@@ -255,7 +256,7 @@ tcp4_connect(void *ctx)
 * Connection can't be established immediately, let's wait
 * for HAST_TIMEOUT seconds.
 */
-   tv.tv_sec = HAST_TIMEOUT;
+   tv.tv_sec = timeout;
tv.tv_usec = 0;
 again:
FD_ZERO(fdset);

Modified: head/sbin/hastd/proto_uds.c
==
--- head/sbin/hastd/proto_uds.c Wed Feb  2 15:23:07 2011(r218191)
+++ head/sbin/hastd/proto_uds.c Wed Feb  2 15:42:00 2011(r218192)
@@ -123,7 

svn commit: r218193 - head/sbin/hastd

2011-02-02 Thread Pawel Jakub Dawidek
Author: pjd
Date: Wed Feb  2 15:46:28 2011
New Revision: 218193
URL: http://svn.freebsd.org/changeset/base/218193

Log:
  Add proto_connect_wait() to wait for connection to finish.
  If timeout argument to proto_connect() is -1, then the caller needs to use
  this new function to wait for connection.
  
  This change is in preparation for capsicum, where sandboxed worker wants
  to ask main process to connect in worker's behalf and pass descriptor
  to the worker. Because we don't want the main process to wait for the
  connection, it will start async connection and pass descriptor to the
  worker who will be responsible for waiting for the connection to finish.
  
  MFC after:1 week

Modified:
  head/sbin/hastd/proto.c
  head/sbin/hastd/proto.h
  head/sbin/hastd/proto_impl.h
  head/sbin/hastd/proto_tcp4.c
  head/sbin/hastd/proto_uds.c

Modified: head/sbin/hastd/proto.c
==
--- head/sbin/hastd/proto.c Wed Feb  2 15:42:00 2011(r218192)
+++ head/sbin/hastd/proto.c Wed Feb  2 15:46:28 2011(r218193)
@@ -174,7 +174,7 @@ proto_connect(struct proto_conn *conn, i
PJDLOG_ASSERT(conn-pc_side == PROTO_SIDE_CLIENT);
PJDLOG_ASSERT(conn-pc_proto != NULL);
PJDLOG_ASSERT(conn-pc_proto-hp_connect != NULL);
-   PJDLOG_ASSERT(timeout = 0);
+   PJDLOG_ASSERT(timeout = -1);
 
ret = conn-pc_proto-hp_connect(conn-pc_ctx, timeout);
if (ret != 0) {
@@ -186,6 +186,27 @@ proto_connect(struct proto_conn *conn, i
 }
 
 int
+proto_connect_wait(struct proto_conn *conn, int timeout)
+{
+   int ret;
+
+   PJDLOG_ASSERT(conn != NULL);
+   PJDLOG_ASSERT(conn-pc_magic == PROTO_CONN_MAGIC);
+   PJDLOG_ASSERT(conn-pc_side == PROTO_SIDE_CLIENT);
+   PJDLOG_ASSERT(conn-pc_proto != NULL);
+   PJDLOG_ASSERT(conn-pc_proto-hp_connect_wait != NULL);
+   PJDLOG_ASSERT(timeout = 0);
+
+   ret = conn-pc_proto-hp_connect_wait(conn-pc_ctx, timeout);
+   if (ret != 0) {
+   errno = ret;
+   return (-1);
+   }
+
+   return (0);
+}
+
+int
 proto_server(const char *addr, struct proto_conn **connp)
 {
 

Modified: head/sbin/hastd/proto.h
==
--- head/sbin/hastd/proto.h Wed Feb  2 15:42:00 2011(r218192)
+++ head/sbin/hastd/proto.h Wed Feb  2 15:46:28 2011(r218193)
@@ -39,6 +39,7 @@ struct proto_conn;
 
 int proto_client(const char *addr, struct proto_conn **connp);
 int proto_connect(struct proto_conn *conn, int timeout);
+int proto_connect_wait(struct proto_conn *conn, int timeout);
 int proto_server(const char *addr, struct proto_conn **connp);
 int proto_accept(struct proto_conn *conn, struct proto_conn **newconnp);
 int proto_send(const struct proto_conn *conn, const void *data, size_t size);

Modified: head/sbin/hastd/proto_impl.h
==
--- head/sbin/hastd/proto_impl.hWed Feb  2 15:42:00 2011
(r218192)
+++ head/sbin/hastd/proto_impl.hWed Feb  2 15:46:28 2011
(r218193)
@@ -41,6 +41,7 @@
 
 typedef int hp_client_t(const char *, void **);
 typedef int hp_connect_t(void *, int);
+typedef int hp_connect_wait_t(void *, int);
 typedef int hp_server_t(const char *, void **);
 typedef int hp_accept_t(void *, void **);
 typedef int hp_send_t(void *, const unsigned char *, size_t);
@@ -57,6 +58,7 @@ struct hast_proto {
const char  *hp_name;
hp_client_t *hp_client;
hp_connect_t*hp_connect;
+   hp_connect_wait_t *hp_connect_wait;
hp_server_t *hp_server;
hp_accept_t *hp_accept;
hp_send_t   *hp_send;

Modified: head/sbin/hastd/proto_tcp4.c
==
--- head/sbin/hastd/proto_tcp4.cWed Feb  2 15:42:00 2011
(r218192)
+++ head/sbin/hastd/proto_tcp4.cWed Feb  2 15:46:28 2011
(r218193)
@@ -60,6 +60,7 @@ struct tcp4_ctx {
 #defineTCP4_SIDE_SERVER_WORK   2
 };
 
+static int tcp4_connect_wait(void *ctx, int timeout);
 static void tcp4_close(void *ctx);
 
 static in_addr_t
@@ -214,16 +215,14 @@ static int
 tcp4_connect(void *ctx, int timeout)
 {
struct tcp4_ctx *tctx = ctx;
-   struct timeval tv;
-   fd_set fdset;
-   socklen_t esize;
-   int error, flags, ret;
+   int error, flags;
 
PJDLOG_ASSERT(tctx != NULL);
PJDLOG_ASSERT(tctx-tc_magic == TCP4_CTX_MAGIC);
PJDLOG_ASSERT(tctx-tc_side == TCP4_SIDE_CLIENT);
PJDLOG_ASSERT(tctx-tc_fd = 0);
-   PJDLOG_ASSERT(timeout = 0);
+   PJDLOG_ASSERT(tctx-tc_sin.sin_family != AF_UNSPEC);
+   PJDLOG_ASSERT(timeout = -1);
 
flags = fcntl(tctx-tc_fd, F_GETFL);
if (flags == -1) {
@@ -244,6 +243,8 @@ tcp4_connect(void *ctx, int timeout)
 
if 

svn commit: r218194 - head/sbin/hastd

2011-02-02 Thread Pawel Jakub Dawidek
Author: pjd
Date: Wed Feb  2 15:53:09 2011
New Revision: 218194
URL: http://svn.freebsd.org/changeset/base/218194

Log:
  - Rename proto_descriptor_{send,recv}() functions to
proto_connection_{send,recv} and change them to return proto_conn
structure. We don't operate directly on descriptors, but on
proto_conns.
  - Add wrap method to wrap descriptor with proto_conn.
  - Remove methods to send and receive descriptors and implement this
functionality as additional argument to send and receive methods.
  
  MFC after:1 week

Modified:
  head/sbin/hastd/proto.c
  head/sbin/hastd/proto.h
  head/sbin/hastd/proto_common.c
  head/sbin/hastd/proto_impl.h
  head/sbin/hastd/proto_socketpair.c
  head/sbin/hastd/proto_tcp4.c
  head/sbin/hastd/proto_uds.c

Modified: head/sbin/hastd/proto.c
==
--- head/sbin/hastd/proto.c Wed Feb  2 15:46:28 2011(r218193)
+++ head/sbin/hastd/proto.c Wed Feb  2 15:53:09 2011(r218194)
@@ -36,6 +36,7 @@ __FBSDID($FreeBSD$);
 
 #include errno.h
 #include stdint.h
+#include string.h
 #include strings.h
 
 #include pjdlog.h
@@ -251,7 +252,7 @@ proto_send(const struct proto_conn *conn
PJDLOG_ASSERT(conn-pc_proto != NULL);
PJDLOG_ASSERT(conn-pc_proto-hp_send != NULL);
 
-   ret = conn-pc_proto-hp_send(conn-pc_ctx, data, size);
+   ret = conn-pc_proto-hp_send(conn-pc_ctx, data, size, -1);
if (ret != 0) {
errno = ret;
return (-1);
@@ -269,7 +270,7 @@ proto_recv(const struct proto_conn *conn
PJDLOG_ASSERT(conn-pc_proto != NULL);
PJDLOG_ASSERT(conn-pc_proto-hp_recv != NULL);
 
-   ret = conn-pc_proto-hp_recv(conn-pc_ctx, data, size);
+   ret = conn-pc_proto-hp_recv(conn-pc_ctx, data, size, NULL);
if (ret != 0) {
errno = ret;
return (-1);
@@ -278,16 +279,26 @@ proto_recv(const struct proto_conn *conn
 }
 
 int
-proto_descriptor_send(const struct proto_conn *conn, int fd)
+proto_connection_send(const struct proto_conn *conn, struct proto_conn *mconn)
 {
-   int ret;
+   const char *protoname;
+   int ret, fd;
 
PJDLOG_ASSERT(conn != NULL);
PJDLOG_ASSERT(conn-pc_magic == PROTO_CONN_MAGIC);
PJDLOG_ASSERT(conn-pc_proto != NULL);
-   PJDLOG_ASSERT(conn-pc_proto-hp_descriptor_send != NULL);
-
-   ret = conn-pc_proto-hp_descriptor_send(conn-pc_ctx, fd);
+   PJDLOG_ASSERT(conn-pc_proto-hp_send != NULL);
+   PJDLOG_ASSERT(mconn != NULL);
+   PJDLOG_ASSERT(mconn-pc_magic == PROTO_CONN_MAGIC);
+   PJDLOG_ASSERT(mconn-pc_proto != NULL);
+   fd = proto_descriptor(mconn);
+   PJDLOG_ASSERT(fd = 0);
+   protoname = mconn-pc_proto-hp_name;
+   PJDLOG_ASSERT(protoname != NULL);
+
+   ret = conn-pc_proto-hp_send(conn-pc_ctx, protoname,
+   strlen(protoname) + 1, fd);
+   proto_close(mconn);
if (ret != 0) {
errno = ret;
return (-1);
@@ -296,20 +307,54 @@ proto_descriptor_send(const struct proto
 }
 
 int
-proto_descriptor_recv(const struct proto_conn *conn, int *fdp)
+proto_connection_recv(const struct proto_conn *conn, bool client,
+struct proto_conn **newconnp)
 {
-   int ret;
+   char protoname[128];
+   struct hast_proto *proto;
+   struct proto_conn *newconn;
+   int ret, fd;
 
PJDLOG_ASSERT(conn != NULL);
PJDLOG_ASSERT(conn-pc_magic == PROTO_CONN_MAGIC);
PJDLOG_ASSERT(conn-pc_proto != NULL);
-   PJDLOG_ASSERT(conn-pc_proto-hp_descriptor_recv != NULL);
+   PJDLOG_ASSERT(conn-pc_proto-hp_recv != NULL);
+   PJDLOG_ASSERT(newconnp != NULL);
+
+   bzero(protoname, sizeof(protoname));
+
+   ret = conn-pc_proto-hp_recv(conn-pc_ctx, protoname,
+   sizeof(protoname) - 1, fd);
+   if (ret != 0) {
+   errno = ret;
+   return (-1);
+   }
+
+   PJDLOG_ASSERT(fd = 0);
 
-   ret = conn-pc_proto-hp_descriptor_recv(conn-pc_ctx, fdp);
+   TAILQ_FOREACH(proto, protos, hp_next) {
+   if (strcmp(proto-hp_name, protoname) == 0)
+   break;
+   }
+   if (proto == NULL) {
+   errno = EINVAL;
+   return (-1);
+   }
+
+   newconn = proto_alloc(proto,
+   client ? PROTO_SIDE_CLIENT : PROTO_SIDE_SERVER_WORK);
+   if (newconn == NULL)
+   return (-1);
+   PJDLOG_ASSERT(newconn-pc_proto-hp_wrap != NULL);
+   ret = newconn-pc_proto-hp_wrap(fd, client, newconn-pc_ctx);
if (ret != 0) {
+   proto_free(newconn);
errno = ret;
return (-1);
}
+
+   *newconnp = newconn;
+
return (0);
 }
 

Modified: head/sbin/hastd/proto.h
==
--- head/sbin/hastd/proto.h Wed Feb  2 15:46:28 2011(r218193)
+++ 

svn commit: r218195 - in head/sys: amd64/amd64 arm/arm i386/i386 ia64/ia64 kern mips/mips powerpc/powerpc sparc64/sparc64 sun4v/sun4v sys ufs/ffs

2011-02-02 Thread Matthew D Fleming
Author: mdf
Date: Wed Feb  2 16:35:10 2011
New Revision: 218195
URL: http://svn.freebsd.org/changeset/base/218195

Log:
  Put the general logic for being a CPU hog into a new function
  should_yield().  Use this in various places.  Encapsulate the common
  case of check-and-yield into a new function maybe_yield().
  
  Change several checks for a magic number of iterations to use
  should_yield() instead.
  
  MFC after:1 week

Modified:
  head/sys/amd64/amd64/uio_machdep.c
  head/sys/arm/arm/uio_machdep.c
  head/sys/i386/i386/uio_machdep.c
  head/sys/ia64/ia64/uio_machdep.c
  head/sys/kern/imgact_elf.c
  head/sys/kern/subr_uio.c
  head/sys/kern/vfs_mount.c
  head/sys/kern/vfs_subr.c
  head/sys/mips/mips/uio_machdep.c
  head/sys/powerpc/powerpc/uio_machdep.c
  head/sys/sparc64/sparc64/uio_machdep.c
  head/sys/sun4v/sun4v/uio_machdep.c
  head/sys/sys/uio.h
  head/sys/sys/vnode.h
  head/sys/ufs/ffs/ffs_rawread.c
  head/sys/ufs/ffs/ffs_softdep.c

Modified: head/sys/amd64/amd64/uio_machdep.c
==
--- head/sys/amd64/amd64/uio_machdep.c  Wed Feb  2 15:53:09 2011
(r218194)
+++ head/sys/amd64/amd64/uio_machdep.c  Wed Feb  2 16:35:10 2011
(r218195)
@@ -88,8 +88,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offs
page_offset;
switch (uio-uio_segflg) {
case UIO_USERSPACE:
-   if (ticks - PCPU_GET(switchticks) = hogticks)
-   uio_yield();
+   maybe_yield();
if (uio-uio_rw == UIO_READ)
error = copyout(cp, iov-iov_base, cnt);
else

Modified: head/sys/arm/arm/uio_machdep.c
==
--- head/sys/arm/arm/uio_machdep.c  Wed Feb  2 15:53:09 2011
(r218194)
+++ head/sys/arm/arm/uio_machdep.c  Wed Feb  2 16:35:10 2011
(r218195)
@@ -94,8 +94,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offs
cp = (char*)sf_buf_kva(sf) + page_offset;
switch (uio-uio_segflg) {
case UIO_USERSPACE:
-   if (ticks - PCPU_GET(switchticks) = hogticks)
-   uio_yield();
+   maybe_yield();
if (uio-uio_rw == UIO_READ)
error = copyout(cp, iov-iov_base, cnt);
else

Modified: head/sys/i386/i386/uio_machdep.c
==
--- head/sys/i386/i386/uio_machdep.cWed Feb  2 15:53:09 2011
(r218194)
+++ head/sys/i386/i386/uio_machdep.cWed Feb  2 16:35:10 2011
(r218195)
@@ -90,8 +90,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offs
cp = (char *)sf_buf_kva(sf) + page_offset;
switch (uio-uio_segflg) {
case UIO_USERSPACE:
-   if (ticks - PCPU_GET(switchticks) = hogticks)
-   uio_yield();
+   maybe_yield();
if (uio-uio_rw == UIO_READ)
error = copyout(cp, iov-iov_base, cnt);
else

Modified: head/sys/ia64/ia64/uio_machdep.c
==
--- head/sys/ia64/ia64/uio_machdep.cWed Feb  2 15:53:09 2011
(r218194)
+++ head/sys/ia64/ia64/uio_machdep.cWed Feb  2 16:35:10 2011
(r218195)
@@ -89,8 +89,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offs
page_offset;
switch (uio-uio_segflg) {
case UIO_USERSPACE:
-   if (ticks - PCPU_GET(switchticks) = hogticks)
-   uio_yield();
+   maybe_yield();
if (uio-uio_rw == UIO_READ)
error = copyout(cp, iov-iov_base, cnt);
else

Modified: head/sys/kern/imgact_elf.c
==
--- head/sys/kern/imgact_elf.c  Wed Feb  2 15:53:09 2011(r218194)
+++ head/sys/kern/imgact_elf.c  Wed Feb  2 16:35:10 2011(r218195)
@@ -1622,8 +1622,7 @@ compress_core (gzFile file, char *inbuf,
}
inbuf += chunk_len;
len -= chunk_len;
-   if (ticks - PCPU_GET(switchticks) = hogticks)
-   uio_yield();
+   maybe_yield();
}
 
return (error);

Modified: head/sys/kern/subr_uio.c
==
--- head/sys/kern/subr_uio.cWed Feb  2 15:53:09 2011(r218194)
+++ head/sys/kern/subr_uio.cWed Feb  2 16:35:10 2011(r218195)
@@ -158,8 +158,7 @@ uiomove(void *cp, int n, struct uio *uio

svn commit: r218196 - head/lib/libkvm

2011-02-02 Thread Ulrich Spoerlein
Author: uqs
Date: Wed Feb  2 17:01:26 2011
New Revision: 218196
URL: http://svn.freebsd.org/changeset/base/218196

Log:
  libkvm: fix logic inversion introduced with last commit
  
  Reported by:  Brandon Gooch jamesbrandongo...@gmail.com
  Pointy hat to:uqs

Modified:
  head/lib/libkvm/kvm.c

Modified: head/lib/libkvm/kvm.c
==
--- head/lib/libkvm/kvm.c   Wed Feb  2 16:35:10 2011(r218195)
+++ head/lib/libkvm/kvm.c   Wed Feb  2 17:01:26 2011(r218196)
@@ -454,11 +454,11 @@ again:
p-n_other = 0;
p-n_desc = 0;
if (_kvm_vnet_initialized(kd, initialize) 
-   !strcmp(prefix, VNET_SYMPREFIX) == 0)
+   strcmp(prefix, VNET_SYMPREFIX) == 0)
p-n_value =
_kvm_vnet_validaddr(kd, lookup.symvalue);
else if (_kvm_dpcpu_initialized(kd, initialize) 
-   !strcmp(prefix, DPCPU_SYMPREFIX) == 0)
+   strcmp(prefix, DPCPU_SYMPREFIX) == 0)
p-n_value =
_kvm_dpcpu_validaddr(kd, lookup.symvalue);
else
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218192 - head/sbin/hastd

2011-02-02 Thread Pawel Worach
On Feb 2, 2011, at 16:42, Pawel Jakub Dawidek wrote:
 Author: pjd
 Date: Wed Feb  2 15:42:00 2011
 New Revision: 218192
 URL: http://svn.freebsd.org/changeset/base/218192
 
 Log:
  Allow to specify connection timeout by the caller.
 
  MFC after:   1 week
 
 Modified:
  head/sbin/hastd/primary.c
  head/sbin/hastd/proto.c
  head/sbin/hastd/proto.h
  head/sbin/hastd/proto_impl.h
  head/sbin/hastd/proto_tcp4.c
  head/sbin/hastd/proto_uds.c
 
...
 int
 -proto_connect(struct proto_conn *conn)
 +proto_connect(struct proto_conn *conn, int timeout)
 {

Hi Pawel,

I think you missed to updated a call.

/data/buildslave/freebsd-clang-amd64/obj/obj-llvm.2/Release+Asserts/bin/clang 
-isysroot 
/data/buildslave/freebsd-clang-amd64/obj/obj-freebsd/data/buildslave/freebsd-clang-amd64/src-freebsd/tmp
 
-B/data/buildslave/freebsd-clang-amd64/obj/obj-freebsd/data/buildslave/freebsd-clang-amd64/src-freebsd/tmp/usr/lib/
 
-L/data/buildslave/freebsd-clang-amd64/obj/obj-freebsd/data/buildslave/freebsd-clang-amd64/src-freebsd/tmp/usr/lib/
 -O2 -pipe  
-I/data/buildslave/freebsd-clang-amd64/src-freebsd/sbin/hastctl/../hastd -DINET 
-DINET6 -DYY_NO_UNPUT -DYY_NO_INPUT -DHAVE_CRYPTO -std=gnu99 -fstack-protector 
-Qunused-arguments -Wsystem-headers -Wall -Wno-format-y2k -W 
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter 
-Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls 
-Wold-style-definition -Wno-pointer-sign -c 
/data/buildslave/freebsd-clang-amd64/src-freebsd/sbin/hastctl/hastctl.c
/data/buildslave/freebsd-clang-amd64/src-freebsd/sbin/hastctl/hastctl.c:490:31: 
error: too few arguments to function call, expected 2, have 1
if (proto_connect(controlconn)  0) {
~^
1 error generated.

Regards
-- 
Pawel


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218201 - head/sbin/hastctl

2011-02-02 Thread Bjoern A. Zeeb
Author: bz
Date: Wed Feb  2 20:00:35 2011
New Revision: 218201
URL: http://svn.freebsd.org/changeset/base/218201

Log:
  Add missing argument after r218192.

Modified:
  head/sbin/hastctl/hastctl.c

Modified: head/sbin/hastctl/hastctl.c
==
--- head/sbin/hastctl/hastctl.c Wed Feb  2 19:20:20 2011(r218200)
+++ head/sbin/hastctl/hastctl.c Wed Feb  2 20:00:35 2011(r218201)
@@ -487,7 +487,7 @@ main(int argc, char *argv[])
cfg-hc_controladdr);
}
/* ...and connect to hastd. */
-   if (proto_connect(controlconn)  0) {
+   if (proto_connect(controlconn, HAST_TIMEOUT)  0) {
pjdlog_exit(EX_OSERR, Unable to connect to hastd via %s,
cfg-hc_controladdr);
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218130 - head

2011-02-02 Thread Rob Farmer
On Mon, Jan 31, 2011 at 7:17 AM, Warner Losh i...@freebsd.org wrote:
 Author: imp
 Date: Mon Jan 31 15:17:47 2011
 New Revision: 218130
 URL: http://svn.freebsd.org/changeset/base/218130

 Log:
  Move the architecture guessing from Makefile.inc1 to Makefile.  We
  need to do this because variables specified on the command line
  override those specified in the Makefile.  This is why we also moved
  from TARGET to _TARGET in Makefile, and then set TARGET on the command
  line when we fork a submake with Makefile.inc1.

  This makes mips/mips work again, even without the workaround committed to
  lib/libc/Makefile.

 Modified:
  head/Makefile
  head/Makefile.inc1

 Modified: head/Makefile
 ==
 --- head/Makefile       Mon Jan 31 11:50:11 2011        (r218129)
 +++ head/Makefile       Mon Jan 31 15:17:47 2011        (r218130)
 @@ -126,6 +126,38 @@ BINMAKE= \
        -m ${.CURDIR}/share/mk
  _MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1

 +# Guess machine architecture from machine type, and vice versa.
 +.if !defined(TARGET_ARCH)  defined(TARGET)
 +_TARGET_ARCH=  ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
 +.elif !defined(TARGET)  defined(TARGET_ARCH)  \
 +    ${TARGET_ARCH} != ${MACHINE_ARCH}
 +_TARGET=               ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
 +.endif
 +# Legacy names, for a transition period mips:mips - mipsel:mips
 +.if defined(TARGET)  defined(TARGET_ARCH)  \
 +    ${TARGET_ARCH} == mips  ${TARGET} == mips
 +.warning TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb
 +.if defined(TARGET_BIG_ENDIAN)
 +_TARGET_ARCH=mipseb
 +.else
 +_TARGET_ARCH=mipsel
 +.endif
 +.endif
 +# arm with TARGET_BIG_ENDIAN - armeb
 +.if defined(TARGET_ARCH)  ${TARGET_ARCH} == arm  
 defined(TARGET_BIG_ENDIAN)
 +.warning TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  use 
 armeb
 +_TARGET_ARCH=armeb
 +.endif
 +.if defined(TARGET)  !defined(_TARGET)
 +_TARGET=${TARGET}
 +.endif
 +.if defined(TARGET_ARCH)  !defined(_TARGET_ARCH)
 +_TARGET_ARCH=${TARGET_ARCH}
 +.endif
 +# Otherwise, default to current machine type and architecture.
 +_TARGET?=      ${MACHINE}
 +_TARGET_ARCH?= ${MACHINE_ARCH}
 +
  #
  # Make sure we have an up-to-date make(1). Only world and buildworld
  # should do this as those are the initial targets used for upgrades.
 @@ -173,8 +205,7 @@ cleanworld:
  #

  ${TGTS}:
 -       ${_+_}@cd ${.CURDIR}; \
 -               ${_MAKE} ${.TARGET}
 +       ${_+_}cd ${.CURDIR}; ${_MAKE} TARGET=${_TARGET} 
 TARGET_ARCH=${_TARGET_ARCH} ${.TARGET}

  # Set a reasonable default
  .MAIN: all

 Modified: head/Makefile.inc1
 ==
 --- head/Makefile.inc1  Mon Jan 31 11:50:11 2011        (r218129)
 +++ head/Makefile.inc1  Mon Jan 31 15:17:47 2011        (r218130)
 @@ -116,32 +116,6 @@ VERSION!=  uname -srp
  VERSION+=      ${OSRELDATE}
  .endif

 -# Guess machine architecture from machine type, and vice versa.
 -.if !defined(TARGET_ARCH)  defined(TARGET)
 -TARGET_ARCH=   ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
 -.elif !defined(TARGET)  defined(TARGET_ARCH)  \
 -    ${TARGET_ARCH} != ${MACHINE_ARCH}
 -TARGET=                ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
 -.endif
 -# Legacy names, for a transition period mips:mips - mipsel:mips
 -.if defined(TARGET)  defined(TARGET_ARCH)  \
 -    ${TARGET_ARCH} == mips  ${TARGET} == mips
 -.warning TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb
 -.if defined(TARGET_BIG_ENDIAN)
 -TARGET_ARCH=mipseb
 -.else
 -TARGET_ARCH=mipsel
 -.endif
 -.endif
 -# arm with TARGET_BIG_ENDIAN - armeb
 -.if defined(TARGET_ARCH)  ${TARGET_ARCH} == arm  
 defined(TARGET_BIG_ENDIAN)
 -.warning TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  use 
 armeb
 -TARGET_ARCH=armeb
 -.endif
 -# Otherwise, default to current machine type and architecture.
 -TARGET?=       ${MACHINE}
 -TARGET_ARCH?=  ${MACHINE_ARCH}
 -
  KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips 
 mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerpc 
 powerpc64/powerpc sparc64 sparc64/sun4v
  .if ${TARGET} == ${TARGET_ARCH}
  _t=            ${TARGET}
 ___
 svn-src-head@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-head
 To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Hello,

This breaks make world as used by ports tinderbox:

[rfarmer@turquoise] /usr/src# env DESTDIR=/tmp/world make -DNO_CLEAN world
--
 make world started on Wed Feb  2 11:45:08 PST 2011
--
/usr/src/Makefile.inc1, line 120: Malformed conditional (${TARGET}
== ${TARGET_ARCH})
/usr/src/Makefile.inc1, line 122: if-less else
/usr/src/Makefile.inc1, line 124: if-less endif

svn commit: r218202 - head

2011-02-02 Thread Ulrich Spoerlein
Author: uqs
Date: Wed Feb  2 21:09:30 2011
New Revision: 218202
URL: http://svn.freebsd.org/changeset/base/218202

Log:
  Add some obsolete manpages.

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Wed Feb  2 20:00:35 2011(r218201)
+++ head/ObsoleteFiles.inc  Wed Feb  2 21:09:30 2011(r218202)
@@ -38,6 +38,10 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20110119: Remove SYSCTL_*X* sysctl additions.
+OLD_FILES+=usr/share/man/man9/SYSCTL_XINT.9.gz \
+usr/share/man/man9/SYSCTL_XLONG.9.gz
+
 # 20110112: Update dialog to new version, rename old libdialog to libodialog,
 # removing associated man pages and header files.
 OLD_FILES+=usr/share/man/man3/draw_shadow.3.gz \
@@ -100,6 +104,8 @@ OLD_FILES+=usr/include/machine/mca.h
 .endif
 # 20101020: catch up with vm_page_sleep_if_busy rename
 OLD_FILES+=usr/share/man/man9/vm_page_sleep_busy.9.gz
+# 20101018: taskqueue(9) updates
+OLD_FILES+=usr/share/man/man9/taskqueue_find.9.gz
 # 20101011: removed subblock.h from liblzma
 OLD_FILES+=usr/include/lzma/subblock.h
 # 20101002: removed manpath.config
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r218203 - head/bin/sh

2011-02-02 Thread Jilles Tjoelker
Author: jilles
Date: Wed Feb  2 21:48:53 2011
New Revision: 218203
URL: http://svn.freebsd.org/changeset/base/218203

Log:
  sh: Remove comment mentioning herefd, which is gone.

Modified:
  head/bin/sh/expand.c

Modified: head/bin/sh/expand.c
==
--- head/bin/sh/expand.cWed Feb  2 21:09:30 2011(r218202)
+++ head/bin/sh/expand.cWed Feb  2 21:48:53 2011(r218203)
@@ -155,8 +155,7 @@ stputs_quotes(const char *data, const ch
  * expansion are always performed; additional expansions can be requested
  * via flag (EXP_*).
  * The result is left in the stack string.
- * When arglist is NULL, perform here document expansion.  A partial result
- * may be written to herefd, which is then not included in the stack string.
+ * When arglist is NULL, perform here document expansion.
  *
  * Caution: this function uses global state and is not reentrant.
  * However, a new invocation after an interrupted invocation is safe
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218130 - head

2011-02-02 Thread Warner Losh

On 02/02/2011 12:52, Rob Farmer wrote:

On Mon, Jan 31, 2011 at 7:17 AM, Warner Loshi...@freebsd.org  wrote:

Author: imp
Date: Mon Jan 31 15:17:47 2011
New Revision: 218130
URL: http://svn.freebsd.org/changeset/base/218130

Log:
  Move the architecture guessing from Makefile.inc1 to Makefile.  We
  need to do this because variables specified on the command line
  override those specified in the Makefile.  This is why we also moved
  from TARGET to _TARGET in Makefile, and then set TARGET on the command
  line when we fork a submake with Makefile.inc1.

  This makes mips/mips work again, even without the workaround committed to
  lib/libc/Makefile.

Modified:
  head/Makefile
  head/Makefile.inc1

Modified: head/Makefile
==
--- head/Makefile   Mon Jan 31 11:50:11 2011(r218129)
+++ head/Makefile   Mon Jan 31 15:17:47 2011(r218130)
@@ -126,6 +126,38 @@ BINMAKE= \
-m ${.CURDIR}/share/mk
  _MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1

+# Guess machine architecture from machine type, and vice versa.
+.if !defined(TARGET_ARCH)  defined(TARGET)
+_TARGET_ARCH=  ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
+.elif !defined(TARGET)  defined(TARGET_ARCH)  \
+${TARGET_ARCH} != ${MACHINE_ARCH}
+_TARGET=   ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
+.endif
+# Legacy names, for a transition period mips:mips -  mipsel:mips
+.if defined(TARGET)  defined(TARGET_ARCH)  \
+${TARGET_ARCH} == mips  ${TARGET} == mips
+.warning TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb
+.if defined(TARGET_BIG_ENDIAN)
+_TARGET_ARCH=mipseb
+.else
+_TARGET_ARCH=mipsel
+.endif
+.endif
+# arm with TARGET_BIG_ENDIAN -  armeb
+.if defined(TARGET_ARCH)  ${TARGET_ARCH} == arm  
defined(TARGET_BIG_ENDIAN)
+.warning TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  use armeb
+_TARGET_ARCH=armeb
+.endif
+.if defined(TARGET)  !defined(_TARGET)
+_TARGET=${TARGET}
+.endif
+.if defined(TARGET_ARCH)  !defined(_TARGET_ARCH)
+_TARGET_ARCH=${TARGET_ARCH}
+.endif
+# Otherwise, default to current machine type and architecture.
+_TARGET?=  ${MACHINE}
+_TARGET_ARCH?= ${MACHINE_ARCH}
+
  #
  # Make sure we have an up-to-date make(1). Only world and buildworld
  # should do this as those are the initial targets used for upgrades.
@@ -173,8 +205,7 @@ cleanworld:
  #

  ${TGTS}:
-   ${_+_}@cd ${.CURDIR}; \
-   ${_MAKE} ${.TARGET}
+   ${_+_}cd ${.CURDIR}; ${_MAKE} TARGET=${_TARGET} 
TARGET_ARCH=${_TARGET_ARCH} ${.TARGET}

  # Set a reasonable default
  .MAIN: all

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Jan 31 11:50:11 2011(r218129)
+++ head/Makefile.inc1  Mon Jan 31 15:17:47 2011(r218130)
@@ -116,32 +116,6 @@ VERSION!=  uname -srp
  VERSION+=  ${OSRELDATE}
  .endif

-# Guess machine architecture from machine type, and vice versa.
-.if !defined(TARGET_ARCH)  defined(TARGET)
-TARGET_ARCH=   ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
-.elif !defined(TARGET)  defined(TARGET_ARCH)  \
-${TARGET_ARCH} != ${MACHINE_ARCH}
-TARGET=${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
-.endif
-# Legacy names, for a transition period mips:mips -  mipsel:mips
-.if defined(TARGET)  defined(TARGET_ARCH)  \
-${TARGET_ARCH} == mips  ${TARGET} == mips
-.warning TARGET_ARCH of mips is deprecated in favor of mipsel or mipseb
-.if defined(TARGET_BIG_ENDIAN)
-TARGET_ARCH=mipseb
-.else
-TARGET_ARCH=mipsel
-.endif
-.endif
-# arm with TARGET_BIG_ENDIAN -  armeb
-.if defined(TARGET_ARCH)  ${TARGET_ARCH} == arm  
defined(TARGET_BIG_ENDIAN)
-.warning TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  use armeb
-TARGET_ARCH=armeb
-.endif
-# Otherwise, default to current machine type and architecture.
-TARGET?=   ${MACHINE}
-TARGET_ARCH?=  ${MACHINE_ARCH}
-
  KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips 
mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerpc 
powerpc64/powerpc sparc64 sparc64/sun4v
  .if ${TARGET} == ${TARGET_ARCH}
  _t=${TARGET}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Hello,

This breaks make world as used by ports tinderbox:

[rfarmer@turquoise] /usr/src# env DESTDIR=/tmp/world make -DNO_CLEAN world
--

make world started on Wed Feb  2 11:45:08 PST 2011

--
/usr/src/Makefile.inc1, line 120: Malformed conditional (${TARGET}
== ${TARGET_ARCH})
/usr/src/Makefile.inc1, line 122: if-less else
/usr/src/Makefile.inc1, line 124: if-less endif
/usr/src/Makefile.inc1, line 127: Unknown target :.
*** 

Re: svn commit: r218130 - head

2011-02-02 Thread Garrett Cooper
On Wed, Feb 2, 2011 at 3:34 PM, Warner Losh i...@bsdimp.com wrote:
 On 02/02/2011 12:52, Rob Farmer wrote:

 On Mon, Jan 31, 2011 at 7:17 AM, Warner Loshi...@freebsd.org  wrote:

 Author: imp
 Date: Mon Jan 31 15:17:47 2011
 New Revision: 218130
 URL: http://svn.freebsd.org/changeset/base/218130

 Log:
  Move the architecture guessing from Makefile.inc1 to Makefile.  We
  need to do this because variables specified on the command line
  override those specified in the Makefile.  This is why we also moved
  from TARGET to _TARGET in Makefile, and then set TARGET on the command
  line when we fork a submake with Makefile.inc1.

  This makes mips/mips work again, even without the workaround committed
 to
  lib/libc/Makefile.

 Modified:
  head/Makefile
  head/Makefile.inc1

 Modified: head/Makefile

 ==
 --- head/Makefile       Mon Jan 31 11:50:11 2011        (r218129)
 +++ head/Makefile       Mon Jan 31 15:17:47 2011        (r218130)
 @@ -126,6 +126,38 @@ BINMAKE= \
        -m ${.CURDIR}/share/mk
  _MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1

 +# Guess machine architecture from machine type, and vice versa.
 +.if !defined(TARGET_ARCH)  defined(TARGET)
 +_TARGET_ARCH=  ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
 +.elif !defined(TARGET)  defined(TARGET_ARCH)  \
 +    ${TARGET_ARCH} != ${MACHINE_ARCH}
 +_TARGET=               ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
 +.endif
 +# Legacy names, for a transition period mips:mips -  mipsel:mips
 +.if defined(TARGET)  defined(TARGET_ARCH)  \
 +    ${TARGET_ARCH} == mips  ${TARGET} == mips
 +.warning TARGET_ARCH of mips is deprecated in favor of mipsel or
 mipseb
 +.if defined(TARGET_BIG_ENDIAN)
 +_TARGET_ARCH=mipseb
 +.else
 +_TARGET_ARCH=mipsel
 +.endif
 +.endif
 +# arm with TARGET_BIG_ENDIAN -  armeb
 +.if defined(TARGET_ARCH)  ${TARGET_ARCH} == arm
  defined(TARGET_BIG_ENDIAN)
 +.warning TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  use
 armeb
 +_TARGET_ARCH=armeb
 +.endif
 +.if defined(TARGET)  !defined(_TARGET)
 +_TARGET=${TARGET}
 +.endif
 +.if defined(TARGET_ARCH)  !defined(_TARGET_ARCH)
 +_TARGET_ARCH=${TARGET_ARCH}
 +.endif
 +# Otherwise, default to current machine type and architecture.
 +_TARGET?=      ${MACHINE}
 +_TARGET_ARCH?= ${MACHINE_ARCH}
 +
  #
  # Make sure we have an up-to-date make(1). Only world and buildworld
  # should do this as those are the initial targets used for upgrades.
 @@ -173,8 +205,7 @@ cleanworld:
  #

  ${TGTS}:
 -       ${_+_}@cd ${.CURDIR}; \
 -               ${_MAKE} ${.TARGET}
 +       ${_+_}cd ${.CURDIR}; ${_MAKE} TARGET=${_TARGET}
 TARGET_ARCH=${_TARGET_ARCH} ${.TARGET}

  # Set a reasonable default
  .MAIN: all

 Modified: head/Makefile.inc1

 ==
 --- head/Makefile.inc1  Mon Jan 31 11:50:11 2011        (r218129)
 +++ head/Makefile.inc1  Mon Jan 31 15:17:47 2011        (r218130)
 @@ -116,32 +116,6 @@ VERSION!=  uname -srp
  VERSION+=      ${OSRELDATE}
  .endif

 -# Guess machine architecture from machine type, and vice versa.
 -.if !defined(TARGET_ARCH)  defined(TARGET)
 -TARGET_ARCH=   ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
 -.elif !defined(TARGET)  defined(TARGET_ARCH)  \
 -    ${TARGET_ARCH} != ${MACHINE_ARCH}
 -TARGET=                ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
 -.endif
 -# Legacy names, for a transition period mips:mips -  mipsel:mips
 -.if defined(TARGET)  defined(TARGET_ARCH)  \
 -    ${TARGET_ARCH} == mips  ${TARGET} == mips
 -.warning TARGET_ARCH of mips is deprecated in favor of mipsel or
 mipseb
 -.if defined(TARGET_BIG_ENDIAN)
 -TARGET_ARCH=mipseb
 -.else
 -TARGET_ARCH=mipsel
 -.endif
 -.endif
 -# arm with TARGET_BIG_ENDIAN -  armeb
 -.if defined(TARGET_ARCH)  ${TARGET_ARCH} == arm
  defined(TARGET_BIG_ENDIAN)
 -.warning TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  use
 armeb
 -TARGET_ARCH=armeb
 -.endif
 -# Otherwise, default to current machine type and architecture.
 -TARGET?=       ${MACHINE}
 -TARGET_ARCH?=  ${MACHINE_ARCH}
 -
  KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips
 mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips
 powerpc powerpc64/powerpc sparc64 sparc64/sun4v
  .if ${TARGET} == ${TARGET_ARCH}
  _t=            ${TARGET}
 ___
 svn-src-head@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-head
 To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org

 Hello,

 This breaks make world as used by ports tinderbox:

 [rfarmer@turquoise] /usr/src# env DESTDIR=/tmp/world make -DNO_CLEAN world
 --

 make world started on Wed Feb  2 11:45:08 PST 2011

 --
 /usr/src/Makefile.inc1, line 120: Malformed conditional (${TARGET}
 == 

svn commit: r218206 - head

2011-02-02 Thread Warner Losh
Author: imp
Date: Wed Feb  2 23:59:24 2011
New Revision: 218206
URL: http://svn.freebsd.org/changeset/base/218206

Log:
  Setting TARGET and TARGET_ARCH needs to be done in _MAKE, not in the
  TGTS rule as _MAKE is used elsewhere.  This should fix make world.

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Wed Feb  2 22:03:18 2011(r218205)
+++ head/Makefile   Wed Feb  2 23:59:24 2011(r218206)
@@ -124,7 +124,7 @@ MAKEPATH=   ${MAKEOBJDIRPREFIX}${.CURDIR}/
 BINMAKE= \
`if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo 
${MAKE}; fi` \
-m ${.CURDIR}/share/mk
-_MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1
+_MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1 TARGET=${_TARGET} 
TARGET_ARCH=${_TARGET_ARCH}
 
 # Guess machine architecture from machine type, and vice versa.
 .if !defined(TARGET_ARCH)  defined(TARGET)
@@ -205,7 +205,7 @@ cleanworld:
 #
 
 ${TGTS}:
-   ${_+_}cd ${.CURDIR}; ${_MAKE} TARGET=${_TARGET} 
TARGET_ARCH=${_TARGET_ARCH} ${.TARGET}
+   ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
 
 # Set a reasonable default
 .MAIN: all
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r218130 - head

2011-02-02 Thread Warner Losh

Rob,

r218206 should fix the problem.  Sorry for the hassle.

Warner

On 02/02/2011 16:34, Warner Losh wrote:

On 02/02/2011 12:52, Rob Farmer wrote:

On Mon, Jan 31, 2011 at 7:17 AM, Warner Loshi...@freebsd.org  wrote:

Author: imp
Date: Mon Jan 31 15:17:47 2011
New Revision: 218130
URL: http://svn.freebsd.org/changeset/base/218130

Log:
  Move the architecture guessing from Makefile.inc1 to Makefile.  We
  need to do this because variables specified on the command line
  override those specified in the Makefile.  This is why we also moved
  from TARGET to _TARGET in Makefile, and then set TARGET on the 
command

  line when we fork a submake with Makefile.inc1.

  This makes mips/mips work again, even without the workaround 
committed to

  lib/libc/Makefile.

Modified:
  head/Makefile
  head/Makefile.inc1

Modified: head/Makefile
== 


--- head/Makefile   Mon Jan 31 11:50:11 2011(r218129)
+++ head/Makefile   Mon Jan 31 15:17:47 2011(r218130)
@@ -126,6 +126,38 @@ BINMAKE= \
-m ${.CURDIR}/share/mk
  _MAKE= PATH=${PATH} ${BINMAKE} -f Makefile.inc1

+# Guess machine architecture from machine type, and vice versa.
+.if !defined(TARGET_ARCH)  defined(TARGET)
+_TARGET_ARCH=  ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
+.elif !defined(TARGET)  defined(TARGET_ARCH)  \
+${TARGET_ARCH} != ${MACHINE_ARCH}
+_TARGET=   ${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
+.endif
+# Legacy names, for a transition period mips:mips -  mipsel:mips
+.if defined(TARGET)  defined(TARGET_ARCH)  \
+${TARGET_ARCH} == mips  ${TARGET} == mips
+.warning TARGET_ARCH of mips is deprecated in favor of mipsel or 
mipseb

+.if defined(TARGET_BIG_ENDIAN)
+_TARGET_ARCH=mipseb
+.else
+_TARGET_ARCH=mipsel
+.endif
+.endif
+# arm with TARGET_BIG_ENDIAN -  armeb
+.if defined(TARGET_ARCH)  ${TARGET_ARCH} == arm  
defined(TARGET_BIG_ENDIAN)
+.warning TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  
use armeb

+_TARGET_ARCH=armeb
+.endif
+.if defined(TARGET)  !defined(_TARGET)
+_TARGET=${TARGET}
+.endif
+.if defined(TARGET_ARCH)  !defined(_TARGET_ARCH)
+_TARGET_ARCH=${TARGET_ARCH}
+.endif
+# Otherwise, default to current machine type and architecture.
+_TARGET?=  ${MACHINE}
+_TARGET_ARCH?= ${MACHINE_ARCH}
+
  #
  # Make sure we have an up-to-date make(1). Only world and buildworld
  # should do this as those are the initial targets used for upgrades.
@@ -173,8 +205,7 @@ cleanworld:
  #

  ${TGTS}:
-   ${_+_}@cd ${.CURDIR}; \
-   ${_MAKE} ${.TARGET}
+   ${_+_}cd ${.CURDIR}; ${_MAKE} TARGET=${_TARGET} 
TARGET_ARCH=${_TARGET_ARCH} ${.TARGET}


  # Set a reasonable default
  .MAIN: all

Modified: head/Makefile.inc1
== 


--- head/Makefile.inc1  Mon Jan 31 11:50:11 2011(r218129)
+++ head/Makefile.inc1  Mon Jan 31 15:17:47 2011(r218130)
@@ -116,32 +116,6 @@ VERSION!=  uname -srp
  VERSION+=  ${OSRELDATE}
  .endif

-# Guess machine architecture from machine type, and vice versa.
-.if !defined(TARGET_ARCH)  defined(TARGET)
-TARGET_ARCH=   ${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
-.elif !defined(TARGET)  defined(TARGET_ARCH)  \
-${TARGET_ARCH} != ${MACHINE_ARCH}
-TARGET=${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
-.endif
-# Legacy names, for a transition period mips:mips -  mipsel:mips
-.if defined(TARGET)  defined(TARGET_ARCH)  \
-${TARGET_ARCH} == mips  ${TARGET} == mips
-.warning TARGET_ARCH of mips is deprecated in favor of mipsel or 
mipseb

-.if defined(TARGET_BIG_ENDIAN)
-TARGET_ARCH=mipseb
-.else
-TARGET_ARCH=mipsel
-.endif
-.endif
-# arm with TARGET_BIG_ENDIAN -  armeb
-.if defined(TARGET_ARCH)  ${TARGET_ARCH} == arm  
defined(TARGET_BIG_ENDIAN)
-.warning TARGET_ARCH of arm with TARGET_BIG_ENDIAN is deprecated.  
use armeb

-TARGET_ARCH=armeb
-.endif
-# Otherwise, default to current machine type and architecture.
-TARGET?=   ${MACHINE}
-TARGET_ARCH?=  ${MACHINE_ARCH}
-
  KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips 
mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips 
mipsn32eb/mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v

  .if ${TARGET} == ${TARGET_ARCH}
  _t=${TARGET}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Hello,

This breaks make world as used by ports tinderbox:

[rfarmer@turquoise] /usr/src# env DESTDIR=/tmp/world make -DNO_CLEAN 
world

--

make world started on Wed Feb  2 11:45:08 PST 2011

--
/usr/src/Makefile.inc1, line 120: Malformed conditional (${TARGET}
== ${TARGET_ARCH})

svn commit: r218207 - head/sys/dev/aac

2011-02-02 Thread Ed Maste
Author: emaste
Date: Thu Feb  3 02:14:53 2011
New Revision: 218207
URL: http://svn.freebsd.org/changeset/base/218207

Log:
  Revert part of r173264.  Both aac_ioctl_sendfib and aac_ioctl_send_raw_srb
  make use of the aac_ioctl_event callback, if aac_alloc_command fails.  This
  can end up in an infinite loop in the while loop in aac_release_command.
  
  Further investigation into the issue mentioned by Scott Long [1] will be
  necessary.
  
  [1] 
http://lists.freebsd.org/pipermail/freebsd-current/2007-October/078740.html

Modified:
  head/sys/dev/aac/aac.c

Modified: head/sys/dev/aac/aac.c
==
--- head/sys/dev/aac/aac.c  Wed Feb  2 23:59:24 2011(r218206)
+++ head/sys/dev/aac/aac.c  Thu Feb  3 02:14:53 2011(r218207)
@@ -1415,11 +1415,7 @@ aac_release_command(struct aac_command *
 
aac_enqueue_free(cm);
 
-   /*
-* Dequeue all events so that there's no risk of events getting
-* stranded.
-*/
-   while ((event = TAILQ_FIRST(sc-aac_ev_cmfree)) != NULL) {
+   if ((event = TAILQ_FIRST(sc-aac_ev_cmfree)) != NULL) {
TAILQ_REMOVE(sc-aac_ev_cmfree, event, ev_links);
event-ev_callback(sc, event, event-ev_arg);
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org