svn commit: r289279 - in head/sys: kern vm

2015-10-13 Thread Jeff Roberson
Author: jeff
Date: Wed Oct 14 02:10:07 2015
New Revision: 289279
URL: https://svnweb.freebsd.org/changeset/base/289279

Log:
  Parallelize the buffer cache and rewrite getnewbuf().  This results in a
  8x performance improvement in a micro benchmark on a 4 socket machine.
  
   - Get buffer headers from a per-cpu uma cache that sits in from of the
 free queue.
   - Use a per-cpu quantum cache in vmem to eliminate contention for kva.
   - Use multiple clean queues according to buffer cache size to eliminate
 clean queue lock contention.
   - Introduce a bufspace daemon that attempts to prevent getnewbuf() callers
 from blocking or doing direct recycling.
   - Close some bufspace allocation races that could lead to endless
 recycling.
   - Further the transition to a more modern style of small functions grouped
 by prefix in order to improve growing complexity.
  
  Sponsored by: EMC / Isilon
  Reviewed by:  kib
  Tested by:pho

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/vm/vm_init.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Wed Oct 14 00:43:29 2015(r289278)
+++ head/sys/kern/vfs_bio.c Wed Oct 14 02:10:07 2015(r289279)
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -100,6 +101,7 @@ caddr_t unmapped_buf;
 
 /* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */
 struct proc *bufdaemonproc;
+struct proc *bufspacedaemonproc;
 
 static int inmem(struct vnode *vp, daddr_t blkno);
 static void vm_hold_free_pages(struct buf *bp, int newbsize);
@@ -116,11 +118,18 @@ static void vfs_vmio_extend(struct buf *
 static int vfs_bio_clcheck(struct vnode *vp, int size,
daddr_t lblkno, daddr_t blkno);
 static int buf_flush(struct vnode *vp, int);
+static int buf_recycle(bool);
+static int buf_scan(bool);
 static int flushbufqueues(struct vnode *, int, int);
 static void buf_daemon(void);
 static void bremfreel(struct buf *bp);
 static __inline void bd_wakeup(void);
 static int sysctl_runningspace(SYSCTL_HANDLER_ARGS);
+static void bufkva_reclaim(vmem_t *, int);
+static void bufkva_free(struct buf *);
+static int buf_import(void *, void **, int, int);
+static void buf_release(void *, void **, int);
+
 #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
 defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
 static int sysctl_bufspace(SYSCTL_HANDLER_ARGS);
@@ -145,23 +154,23 @@ static long bufkvaspace;
 SYSCTL_LONG(_vfs, OID_AUTO, bufkvaspace, CTLFLAG_RD, , 0,
 "Kernel virtual memory used for buffers");
 static long maxbufspace;
-SYSCTL_LONG(_vfs, OID_AUTO, maxbufspace, CTLFLAG_RD, , 0,
-"Maximum allowed value of bufspace (including buf_daemon)");
+SYSCTL_LONG(_vfs, OID_AUTO, maxbufspace, CTLFLAG_RW, , 0,
+"Maximum allowed value of bufspace (including metadata)");
 static long bufmallocspace;
 SYSCTL_LONG(_vfs, OID_AUTO, bufmallocspace, CTLFLAG_RD, , 0,
 "Amount of malloced memory for buffers");
 static long maxbufmallocspace;
-SYSCTL_LONG(_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW, , 
0,
-"Maximum amount of malloced memory for buffers");
+SYSCTL_LONG(_vfs, OID_AUTO, maxmallocbufspace, CTLFLAG_RW, ,
+0, "Maximum amount of malloced memory for buffers");
 static long lobufspace;
-SYSCTL_LONG(_vfs, OID_AUTO, lobufspace, CTLFLAG_RD, , 0,
+SYSCTL_LONG(_vfs, OID_AUTO, lobufspace, CTLFLAG_RW, , 0,
 "Minimum amount of buffers we want to have");
 long hibufspace;
-SYSCTL_LONG(_vfs, OID_AUTO, hibufspace, CTLFLAG_RD, , 0,
-"Maximum allowed value of bufspace (excluding buf_daemon)");
-static int bufreusecnt;
-SYSCTL_INT(_vfs, OID_AUTO, bufreusecnt, CTLFLAG_RW, , 0,
-"Number of times we have reused a buffer");
+SYSCTL_LONG(_vfs, OID_AUTO, hibufspace, CTLFLAG_RW, , 0,
+"Maximum allowed value of bufspace (excluding metadata)");
+long bufspacethresh;
+SYSCTL_LONG(_vfs, OID_AUTO, bufspacethresh, CTLFLAG_RW, ,
+0, "Bufspace consumed before waking the daemon to free some");
 static int buffreekvacnt;
 SYSCTL_INT(_vfs, OID_AUTO, buffreekvacnt, CTLFLAG_RW, , 0,
 "Number of times we have freed the KVA space from some buffer");
@@ -205,10 +214,10 @@ SYSCTL_INT(_vfs, OID_AUTO, numfreebuffer
 "Number of free buffers");
 static int lofreebuffers;
 SYSCTL_INT(_vfs, OID_AUTO, lofreebuffers, CTLFLAG_RW, , 0,
-   "XXX Unused");
+   "Target number of free buffers");
 static int hifreebuffers;
 SYSCTL_INT(_vfs, OID_AUTO, hifreebuffers, CTLFLAG_RW, , 0,
-   "XXX Complicatedly unused");
+   "Threshold for clean buffer recycling");
 static int getnewbufcalls;
 SYSCTL_INT(_vfs, OID_AUTO, getnewbufcalls, CTLFLAG_RW, , 0,
"Number of calls to getnewbuf");
@@ -219,6 +228,9 @@ static int mappingrestarts;
 SYSCTL_INT(_vfs, OID_AUTO, mappingrestarts, CTLFLAG_RW, , 0,
 "Number of times getblk has had to restart a buffer mapping for "

svn commit: r289280 - head/sys/dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Wed Oct 14 02:14:15 2015
New Revision: 289280
URL: https://svnweb.freebsd.org/changeset/base/289280

Log:
  NTB: MFV 78958433: Enable Snoop on Primary Side
  
  Enable Snoop from Primary to Secondary side on BAR23 and BAR45 on all
  TLPs.  Previously, Snoop was only enabled from Secondary to Primary
  side.  This can have a performance improvement on some workloads.
  
  Also, make the code more obvious about how the link is being enabled.
  
  Authored by:  Jon Mason
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_regs.h

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Oct 14 02:10:07 2015
(r289279)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Oct 14 02:14:15 2015
(r289280)
@@ -1050,12 +1050,18 @@ ntb_handle_link_event(struct ntb_softc *
 static void
 ntb_hw_link_up(struct ntb_softc *ntb)
 {
+   uint32_t cntl;
 
-   if (ntb->conn_type == NTB_CONN_TRANSPARENT)
+   if (ntb->conn_type == NTB_CONN_TRANSPARENT) {
ntb_handle_link_event(ntb, NTB_LINK_UP);
-   else
-   ntb_reg_write(4, ntb->reg_ofs.lnk_cntl,
-   NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP);
+   return;
+   }
+
+   cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl);
+   cntl &= ~(NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK);
+   cntl |= NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP;
+   cntl |= NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP;
+   ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl);
 }
 
 static void
@@ -1069,8 +1075,9 @@ ntb_hw_link_down(struct ntb_softc *ntb)
}
 
cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl);
-   cntl &= ~(NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP);
-   cntl |= NTB_CNTL_LINK_DISABLE;
+   cntl &= ~(NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP);
+   cntl &= ~(NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP);
+   cntl |= NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK;
ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl);
 }
 

Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h
==
--- head/sys/dev/ntb/ntb_hw/ntb_regs.h  Wed Oct 14 02:10:07 2015
(r289279)
+++ head/sys/dev/ntb/ntb_hw/ntb_regs.h  Wed Oct 14 02:14:15 2015
(r289280)
@@ -116,11 +116,13 @@
 #define SOC_LTSSMSTATEJMP_FORCEDETECT  (1 << 2)
 #define SOC_IBIST_ERR_OFLOW0x7fff7fff
 
-#define NTB_CNTL_CFG_LOCK  (1 << 0)
-#define NTB_CNTL_LINK_DISABLE  (1 << 1)
-#define NTB_CNTL_BAR23_SNOOP   (1 << 2)
-#define NTB_CNTL_BAR45_SNOOP   (1 << 6)
-#define SOC_CNTL_LINK_DOWN (1 << 16)
+#define NTB_CNTL_CFG_LOCK  (1 << 0)
+#define NTB_CNTL_LINK_DISABLE  (1 << 1)
+#define NTB_CNTL_S2P_BAR23_SNOOP   (1 << 2)
+#define NTB_CNTL_P2S_BAR23_SNOOP   (1 << 4)
+#define NTB_CNTL_S2P_BAR45_SNOOP   (1 << 6)
+#define NTB_CNTL_P2S_BAR45_SNOOP   (1 << 8)
+#define SOC_CNTL_LINK_DOWN (1 << 16)
 
 #define XEON_PBAR23SZ_OFFSET   0x00d0
 #define XEON_PBAR45SZ_OFFSET   0x00d1
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289281 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Wed Oct 14 02:14:45 2015
New Revision: 289281
URL: https://svnweb.freebsd.org/changeset/base/289281

Log:
  NTB: MFV e8aeb60c: Disable interrupts and poll under high load
  
  Authored by:  Jon Mason
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.h

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cWed Oct 14 02:14:15 2015
(r289280)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Oct 14 02:14:45 2015
(r289281)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -249,9 +250,8 @@ static int ntb_process_tx(struct ntb_tra
 static void ntb_tx_copy_task(struct ntb_transport_qp *qp,
 struct ntb_queue_entry *entry, void *offset);
 static void ntb_qp_full(void *arg);
-static void ntb_transport_rxc_db(void *data, int db_num);
+static int ntb_transport_rxc_db(void *arg, int dummy);
 static void ntb_rx_pendq_full(void *arg);
-static void ntb_transport_rx(struct ntb_transport_qp *qp);
 static int ntb_process_rxc(struct ntb_transport_qp *qp);
 static void ntb_rx_copy_task(struct ntb_transport_qp *qp,
 struct ntb_queue_entry *entry, void *offset);
@@ -840,24 +840,17 @@ ntb_qp_full(void *arg)
 
 /* Transport Rx */
 static void
-ntb_transport_rxc_db(void *data, int db_num)
-{
-   struct ntb_transport_qp *qp = data;
-
-   ntb_transport_rx(qp);
-}
-
-static void
 ntb_rx_pendq_full(void *arg)
 {
 
CTR0(KTR_NTB, "RX: ntb_rx_pendq_full callout");
-   ntb_transport_rx(arg);
+   ntb_transport_rxc_db(arg, 0);
 }
 
-static void
-ntb_transport_rx(struct ntb_transport_qp *qp)
+static int
+ntb_transport_rxc_db(void *arg, int dummy __unused)
 {
+   struct ntb_transport_qp *qp = arg;
uint64_t i;
int rc;
 
@@ -867,7 +860,7 @@ ntb_transport_rx(struct ntb_transport_qp
 */
mtx_lock(>transport->rx_lock);
CTR0(KTR_NTB, "RX: transport_rx");
-   for (i = 0; i < qp->rx_max_entry; i++) {
+   for (i = 0; i < MIN(qp->rx_max_entry, INT_MAX); i++) {
rc = ntb_process_rxc(qp);
if (rc != 0) {
CTR0(KTR_NTB, "RX: process_rxc failed");
@@ -875,6 +868,8 @@ ntb_transport_rx(struct ntb_transport_qp
}
}
mtx_unlock(>transport->rx_lock);
+
+   return ((int)i);
 }
 
 static int

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Oct 14 02:14:15 2015
(r289280)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Oct 14 02:14:45 2015
(r289281)
@@ -109,6 +109,7 @@ struct ntb_db_cb {
unsigned intdb_num;
void*data;
struct ntb_softc*ntb;
+   struct callout  irq_work;
 };
 
 struct ntb_softc {
@@ -204,6 +205,9 @@ static void handle_soc_irq(void *arg);
 static void handle_xeon_irq(void *arg);
 static void handle_xeon_event_irq(void *arg);
 static void ntb_handle_legacy_interrupt(void *arg);
+static void ntb_irq_work(void *arg);
+static void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx);
+static void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx);
 static int ntb_create_callbacks(struct ntb_softc *ntb, int num_vectors);
 static void ntb_free_callbacks(struct ntb_softc *ntb);
 static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id);
@@ -580,6 +584,26 @@ ntb_teardown_interrupts(struct ntb_softc
 }
 
 static void
+mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx)
+{
+   unsigned long mask;
+
+   mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask);
+   mask |= 1 << (idx * ntb->bits_per_vector);
+   ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask);
+}
+
+static void
+unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx)
+{
+   unsigned long mask;
+
+   mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask);
+   mask &= ~(1 << (idx * ntb->bits_per_vector));
+   ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask);
+}
+
+static void
 handle_soc_irq(void *arg)
 {
struct ntb_db_cb *db_cb = arg;
@@ -587,8 +611,10 @@ handle_soc_irq(void *arg)
 
ntb_reg_write(8, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num);
 
-   if (db_cb->callback != NULL)
-   db_cb->callback(db_cb->data, db_cb->db_num);
+   if (db_cb->callback != NULL) {
+   mask_ldb_interrupt(ntb, db_cb->db_num);
+   callout_reset(_cb->irq_work, 0, ntb_irq_work, db_cb);
+   }
 }
 
 static void
@@ -607,8 +633,10 @@ handle_xeon_irq(void *arg)
((1 << ntb->bits_per_vector) - 1) <<
(db_cb->db_num * ntb->bits_per_vector));
 
-   if 

svn commit: r289283 - head/share/man/man4

2015-10-13 Thread Adrian Chadd
Author: adrian
Date: Wed Oct 14 02:43:04 2015
New Revision: 289283
URL: https://svnweb.freebsd.org/changeset/base/289283

Log:
  rsu(4) manpage updates: add me, add 802.11n support, update caveats.
  
  * Add that I indeed added 802.11n support.
  * Update caveats - we support 1x1, 1x2 and 2x2 operation now, but
there's no transmit aggregation support.

Modified:
  head/share/man/man4/rsu.4

Modified: head/share/man/man4/rsu.4
==
--- head/share/man/man4/rsu.4   Wed Oct 14 02:37:30 2015(r289282)
+++ head/share/man/man4/rsu.4   Wed Oct 14 02:43:04 2015(r289283)
@@ -175,7 +175,10 @@ driver was written by
 .An Damien Bergamini Aq Mt dam...@openbsd.org
 and ported by
 .An Rui Paulo Aq Mt rpa...@freebsd.org .
+The 802.11n support was added by
+.An Adrian Chadd Aq Mt adr...@freebsd.org .
 .Sh CAVEATS
 The
 .Nm
-driver only supports 1T1R 802.11n operation.
+driver currently does not support 802.11n transmit aggregation,
+either A-MSDU or A-MPDU.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289288 - stable/10/sys/netinet

2015-10-13 Thread Hiren Panchasara
Author: hiren
Date: Wed Oct 14 05:29:33 2015
New Revision: 289288
URL: https://svnweb.freebsd.org/changeset/base/289288

Log:
  MFC r288914
  Add a comment specifying how we implement rfc3042.

Modified:
  stable/10/sys/netinet/tcp_input.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/tcp_input.c
==
--- stable/10/sys/netinet/tcp_input.c   Wed Oct 14 05:16:56 2015
(r289287)
+++ stable/10/sys/netinet/tcp_input.c   Wed Oct 14 05:29:33 2015
(r289288)
@@ -2523,6 +2523,16 @@ tcp_do_segment(struct mbuf *m, struct tc
tp->snd_nxt = onxt;
goto drop;
} else if (V_tcp_do_rfc3042) {
+   /*
+* Process first and second duplicate
+* ACKs. Each indicates a segment
+* leaving the network, creating room
+* for more. Make sure we can send a
+* packet on reception of each duplicate
+* ACK by increasing snd_cwnd by one
+* segment. Restore the original
+* snd_cwnd after packet transmission.
+*/
cc_ack_received(tp, th, CC_DUPACK);
u_long oldcwnd = tp->snd_cwnd;
tcp_seq oldsndmax = tp->snd_max;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289289 - head/share/mk

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 14 05:50:16 2015
New Revision: 289289
URL: https://svnweb.freebsd.org/changeset/base/289289

Log:
  Fix support for building a PROG_CXX, and PROG, directly.
  
  For example in lib/atf/libatf-c++/tests/detail it is now possible to
  run 'make application_test'.  This was intended to worked for PROGS,
  but lacked support for PROGS_CXX.
  
  Also fix redefining the main PROG target to recurse.  This isn't needed
  since the main process is setting PROG/PROG_CXX to handle it directly
  via bsd.prog.mk.
  
  MFC after:3 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Wed Oct 14 05:29:33 2015(r289288)
+++ head/share/mk/bsd.progs.mk  Wed Oct 14 05:50:16 2015(r289289)
@@ -31,6 +31,9 @@ UPDATE_DEPENDFILE_PROG = ${PROGS:[1]}
 # They may have asked us to build just one
 .for t in ${PROGS}
 .if make($t)
+.if ${PROGS_CXX:M${t}}
+PROG_CXX ?= $t
+.endif
 PROG ?= $t
 .endif
 .endfor
@@ -61,7 +64,7 @@ UPDATE_DEPENDFILE ?= yes
 UPDATE_DEPENDFILE ?= NO
 
 # prog.mk will do the rest
-.else
+.else # !defined(PROG)
 all: ${PROGS}
 
 # We cannot capture dependencies for meta mode here
@@ -80,7 +83,7 @@ $v =
 # handle being called [bsd.]progs.mk
 .include 
 
-.if !empty(PROGS) && !defined(_RECURSING_PROGS)
+.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)
 # tell progs.mk we might want to install things
 PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install
 
@@ -130,4 +133,4 @@ $p.$t: .PHONY .MAKE
 .for t in ${PROGS_TARGETS:O:u}
 $t: ${PROGS:%=%.$t}
 .endfor
-.endif
+.endif # !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289276 - in head/sys: conf kern netinet sys

2015-10-13 Thread Bryan Drewery
On 10/13/2015 7:33 PM, Hiren Panchasara wrote:
> On 10/13/15 at 06:58P, Bryan Drewery wrote:
>> On 10/13/2015 5:35 PM, Hiren Panchasara wrote:
>>> Author: hiren
>>> Date: Wed Oct 14 00:35:37 2015
>>> New Revision: 289276
>>> URL: https://svnweb.freebsd.org/changeset/base/289276
>>>
>>> Log:
>>>   There are times when it would be really nice to have a record of the last 
>>> few
>>>   packets and/or state transitions from each TCP socket. That would help 
>>> with
>>>   narrowing down certain problems we see in the field that are hard to 
>>> reproduce
>>>   without understanding the history of how we got into a certain state. This
>>>   change provides just that.
>>>   
>>>   It saves copies of the last N packets in a list in the tcpcb. When the 
>>> tcpcb is
>>>   destroyed, the list is freed. I thought this was likely to be more
>>>   performance-friendly than saving copies of the tcpcb. Plus, with the 
>>> packets,
>>>   you should be able to reverse-engineer what happened to the tcpcb.
>>>   
>>>   To enable the feature, you will need to compile a kernel with the TCPPCAP
>>>   option. Even then, the feature defaults to being deactivated. You can 
>>> activate
>>>   it by setting a positive value for the number of captured packets. You 
>>> can do
>>>   that on either a global basis or on a per-socket basis (via a setsockopt 
>>> call).
>>>   
>>>   There is no way to get the packets out of the kernel other than using 
>>> kmem or
>>>   getting a coredump. I thought that would help some of the legal/privacy 
>>> concerns
>>>   regarding such a feature. However, it should be possible to add a future 
>>> effort
>>>   to export them in PCAP format.
>>>   
>>>   I tested this at low scale, and found that there were no mbuf leaks and 
>>> the peak
>>>   mbuf usage appeared to be unchanged with and without the feature.
>>>   
>>>   The main performance concern I can envision is the number of mbufs that 
>>> would be
>>>   used on systems with a large number of sockets. If you save five packets 
>>> per
>>>   direction per socket and have 3,000 sockets, that will consume at least 
>>> 30,000
>>>   mbufs just to keep these packets. I tried to reduce the concerns 
>>> associated with
>>>   this by limiting the number of clusters (not mbufs) that could be used 
>>> for this
>>>   feature. Again, in my testing, that appears to work correctly.
>>>   
>>>   Differential Revision:D3100
>>
>> You're supposed to use the full URL here which will auto close the review.
> 
> Okay. It did pick up the commit though. What more does it need to know? 
>>

Hm true. It seems that it will auto-close if you use the full URL only.

I swear a decision was made on the "proper" way to relate these, but the
fact that both methods touch the system and act different is odd.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r289285 - vendor/wpa/2.5

2015-10-13 Thread Rui Paulo
Author: rpaulo
Date: Wed Oct 14 04:32:55 2015
New Revision: 289285
URL: https://svnweb.freebsd.org/changeset/base/289285

Log:
  Tag wpa_supplicant/hostapd 2.5.

Added:
 - copied from r289284, vendor/wpa/dist/
Directory Properties:
  vendor/wpa/2.5/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289286 - head/share/mk

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 14 04:42:05 2015
New Revision: 289286
URL: https://svnweb.freebsd.org/changeset/base/289286

Log:
  Follow-up r288218 by ensuring common objects are built before recursing.
  
  Some example where this is a problem:
lib/atf/libatf-c++/tests/Makefile:SRCS.${_T}=   ${_T}.cpp test_helpers.cpp
lib/atf/libatf-c++/tests/detail/Makefile:SRCS.${_T}=${_T}.cpp 
test_helpers.cpp
lib/atf/libatf-c/tests/Makefile:SRCS.${_T}= ${_T}.c test_helpers.c
lib/atf/libatf-c/tests/detail/Makefile:SRCS.${_T}=  ${_T}.c 
test_helpers.c
lib/libpam/libpam/tests/Makefile:SRCS.${test} = ${test}.c ${COMMONSRC}
  
  A similar change may be needed for FILES, SCRIPTS, or INCS, but for now stay
  with just SRCS.
  
  Reported by:  rodrigc
  MFC after:3 weeks
  X-MFC-With:   r288218
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Wed Oct 14 04:32:55 2015(r289285)
+++ head/share/mk/bsd.progs.mk  Wed Oct 14 04:42:05 2015(r289286)
@@ -84,6 +84,25 @@ $v =
 # tell progs.mk we might want to install things
 PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install
 
+# Find common sources among the PROGS and depend on them before building
+# anything.  This allows parallelization without them each fighting over
+# the same objects.
+_PROGS_COMMON_SRCS=
+_PROGS_ALL_SRCS=
+.for p in ${PROGS}
+.for s in ${SRCS.${p}}
+.if ${_PROGS_ALL_SRCS:M${s}} && !${_PROGS_COMMON_SRCS:M${s}}
+_PROGS_COMMON_SRCS+=   ${s}
+.else
+_PROGS_ALL_SRCS+=  ${s}
+.endif
+.endfor
+.endfor
+.if !empty(_PROGS_COMMON_SRCS)
+_PROGS_COMMON_OBJS=${_PROGS_COMMON_SRCS:N*.h:R:S/$/.o/g}
+${PROGS}: ${_PROGS_COMMON_OBJS}
+.endif
+
 .for p in ${PROGS}
 .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p)
 # bsd.prog.mk may need to know this
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289282 - head/share/mk

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 14 02:37:30 2015
New Revision: 289282
URL: https://svnweb.freebsd.org/changeset/base/289282

Log:
  Replace the out-of-place includes/files/config handling in bsd.subdir.mk with
  more typical ALL_SUBDIR_TARGETS entries and target hooks in bsd.incs.mk,
  bsd.files.mk and bsd.confs.mk.
  
  This allows the targets to be NOPs if unneeded and still work with the
  shortcut 'make includes' to build and then install in a parallel-safe manner.
  
  Sort and re-indent the ALL_SUBDIR_TARGETS with the new entries.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.confs.mk
  head/share/mk/bsd.files.mk
  head/share/mk/bsd.incs.mk
  head/share/mk/bsd.subdir.mk

Modified: head/share/mk/bsd.confs.mk
==
--- head/share/mk/bsd.confs.mk  Wed Oct 14 02:14:45 2015(r289281)
+++ head/share/mk/bsd.confs.mk  Wed Oct 14 02:37:30 2015(r289282)
@@ -84,4 +84,7 @@ STAGE_TARGETS+= stage_config
 .endif
 .endif
 
+config: buildconfig installconfig
+.ORDER: buildconfig installconfig
+
 .endif # ${MK_INCLUDES} != "no"

Modified: head/share/mk/bsd.files.mk
==
--- head/share/mk/bsd.files.mk  Wed Oct 14 02:14:45 2015(r289281)
+++ head/share/mk/bsd.files.mk  Wed Oct 14 02:37:30 2015(r289282)
@@ -94,4 +94,7 @@ buildfiles: stage_as
 .endif
 .endif
 
+files: buildfiles installfiles
+.ORDER: buildfiles installfiles
+
 .endif # !target()

Modified: head/share/mk/bsd.incs.mk
==
--- head/share/mk/bsd.incs.mk   Wed Oct 14 02:14:45 2015(r289281)
+++ head/share/mk/bsd.incs.mk   Wed Oct 14 02:37:30 2015(r289282)
@@ -99,4 +99,7 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS}
 .endif
 .endif
 
+includes: buildincludes installincludes
+.ORDER: buildincludes installincludes
+
 .endif # ${MK_INCLUDES} != "no"

Modified: head/share/mk/bsd.subdir.mk
==
--- head/share/mk/bsd.subdir.mk Wed Oct 14 02:14:45 2015(r289281)
+++ head/share/mk/bsd.subdir.mk Wed Oct 14 02:37:30 2015(r289282)
@@ -32,9 +32,12 @@
 .if !target()
 :
 
-ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \
-   cleanilinks cleanobj depend distribute lint maninstall manlint obj \
-   objlink realinstall regress tags ${SUBDIR_TARGETS}
+ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \
+   checkdpadd clean cleandepend cleandir cleanilinks \
+   cleanobj config depend distribute files includes \
+   installconfig installfiles installincludes lint \
+   maninstall manlint obj objlink realinstall regress tags \
+   ${SUBDIR_TARGETS}
 
 .include 
 
@@ -123,23 +126,6 @@ _sub.${__target}: _SUBDIR
 .endif
 .endfor
 
-# This is to support 'make includes' calling 'make buildincludes' and
-# 'make installincludes' in the proper order, and to support these
-# targets as SUBDIR_TARGETS.
-.for __target in files includes config
-.for __stage in build install
-${__stage}${__target}:
-.if make(${__stage}${__target})
-${__stage}${__target}: _sub.${__stage}${__target}
-_sub.${__stage}${__target}: _SUBDIR
-.endif
-.endfor
-.if !target(${__target})
-${__target}: .MAKE
-   ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} 
install${__target}
-.endif
-.endfor
-
 .endif
 
 .if !target(install)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289287 - head/share/man/man4

2015-10-13 Thread Adrian Chadd
Author: adrian
Date: Wed Oct 14 05:16:56 2015
New Revision: 289287
URL: https://svnweb.freebsd.org/changeset/base/289287

Log:
  Fix date.
  
  Noticed by:   bdrewery

Modified:
  head/share/man/man4/rsu.4

Modified: head/share/man/man4/rsu.4
==
--- head/share/man/man4/rsu.4   Wed Oct 14 04:42:05 2015(r289286)
+++ head/share/man/man4/rsu.4   Wed Oct 14 05:16:56 2015(r289287)
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd November 19, 2014
+.Dd October 13, 2015
 .Dt RSU 4
 .Os
 .Sh NAME
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289284 - in vendor/wpa/dist: hostapd hs20/client patches src src/ap src/common src/crypto src/drivers src/eap_common src/eap_peer src/eap_server src/eapol_auth src/eapol_supp src/fst s...

2015-10-13 Thread Rui Paulo
Author: rpaulo
Date: Wed Oct 14 04:30:17 2015
New Revision: 289284
URL: https://svnweb.freebsd.org/changeset/base/289284

Log:
  Import wpa_supplicant/hostapd 2.5.
  
  Major changes: bunch of CVEs fixed, tab completion for wpa_cli and
  misc bug fixes.

Added:
  vendor/wpa/dist/patches/openssl-0.9.8zf-tls-extensions.patch
  vendor/wpa/dist/src/crypto/sha384-prf.c   (contents, props changed)
  vendor/wpa/dist/src/fst/
  vendor/wpa/dist/src/fst/Makefile   (contents, props changed)
  vendor/wpa/dist/src/fst/fst.c   (contents, props changed)
  vendor/wpa/dist/src/fst/fst.h   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_ctrl_aux.c   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_ctrl_aux.h   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_ctrl_defs.h   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_ctrl_iface.c   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_ctrl_iface.h   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_defs.h   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_group.c   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_group.h   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_iface.c   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_iface.h   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_internal.h   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_session.c   (contents, props changed)
  vendor/wpa/dist/src/fst/fst_session.h   (contents, props changed)
  vendor/wpa/dist/wpa_supplicant/eapol_test.py   (contents, props changed)
  vendor/wpa/dist/wpa_supplicant/p2p_supplicant_sd.c   (contents, props changed)
Deleted:
  vendor/wpa/dist/src/crypto/crypto_cryptoapi.c
  vendor/wpa/dist/src/crypto/tls_schannel.c
Modified:
  vendor/wpa/dist/hostapd/ChangeLog
  vendor/wpa/dist/hostapd/Makefile
  vendor/wpa/dist/hostapd/config_file.c
  vendor/wpa/dist/hostapd/config_file.h
  vendor/wpa/dist/hostapd/ctrl_iface.c
  vendor/wpa/dist/hostapd/defconfig
  vendor/wpa/dist/hostapd/hlr_auc_gw.c
  vendor/wpa/dist/hostapd/hlr_auc_gw.milenage_db
  vendor/wpa/dist/hostapd/hostapd.conf
  vendor/wpa/dist/hostapd/hostapd_cli.c
  vendor/wpa/dist/hostapd/main.c
  vendor/wpa/dist/hs20/client/Makefile
  vendor/wpa/dist/hs20/client/osu_client.c
  vendor/wpa/dist/hs20/client/spp_client.c
  vendor/wpa/dist/src/Makefile
  vendor/wpa/dist/src/ap/Makefile
  vendor/wpa/dist/src/ap/accounting.c
  vendor/wpa/dist/src/ap/acs.c
  vendor/wpa/dist/src/ap/ap_config.c
  vendor/wpa/dist/src/ap/ap_config.h
  vendor/wpa/dist/src/ap/ap_drv_ops.c
  vendor/wpa/dist/src/ap/ap_drv_ops.h
  vendor/wpa/dist/src/ap/ap_list.c
  vendor/wpa/dist/src/ap/ap_list.h
  vendor/wpa/dist/src/ap/authsrv.c
  vendor/wpa/dist/src/ap/beacon.c
  vendor/wpa/dist/src/ap/beacon.h
  vendor/wpa/dist/src/ap/ctrl_iface_ap.c
  vendor/wpa/dist/src/ap/dfs.c
  vendor/wpa/dist/src/ap/drv_callbacks.c
  vendor/wpa/dist/src/ap/eap_user_db.c
  vendor/wpa/dist/src/ap/hostapd.c
  vendor/wpa/dist/src/ap/hostapd.h
  vendor/wpa/dist/src/ap/hw_features.c
  vendor/wpa/dist/src/ap/hw_features.h
  vendor/wpa/dist/src/ap/ieee802_11.c
  vendor/wpa/dist/src/ap/ieee802_11.h
  vendor/wpa/dist/src/ap/ieee802_11_auth.c
  vendor/wpa/dist/src/ap/ieee802_11_auth.h
  vendor/wpa/dist/src/ap/ieee802_11_ht.c
  vendor/wpa/dist/src/ap/ieee802_11_vht.c
  vendor/wpa/dist/src/ap/ieee802_1x.c
  vendor/wpa/dist/src/ap/ieee802_1x.h
  vendor/wpa/dist/src/ap/ndisc_snoop.c
  vendor/wpa/dist/src/ap/sta_info.c
  vendor/wpa/dist/src/ap/sta_info.h
  vendor/wpa/dist/src/ap/utils.c
  vendor/wpa/dist/src/ap/vlan_init.c
  vendor/wpa/dist/src/ap/vlan_init.h
  vendor/wpa/dist/src/ap/vlan_util.c
  vendor/wpa/dist/src/ap/wmm.c
  vendor/wpa/dist/src/ap/wpa_auth.c
  vendor/wpa/dist/src/ap/wpa_auth.h
  vendor/wpa/dist/src/ap/wpa_auth_ft.c
  vendor/wpa/dist/src/ap/wpa_auth_glue.c
  vendor/wpa/dist/src/ap/wpa_auth_i.h
  vendor/wpa/dist/src/ap/wpa_auth_ie.c
  vendor/wpa/dist/src/ap/wps_hostapd.c
  vendor/wpa/dist/src/ap/x_snoop.c
  vendor/wpa/dist/src/common/Makefile
  vendor/wpa/dist/src/common/common_module_tests.c
  vendor/wpa/dist/src/common/defs.h
  vendor/wpa/dist/src/common/hw_features_common.c
  vendor/wpa/dist/src/common/hw_features_common.h
  vendor/wpa/dist/src/common/ieee802_11_common.c
  vendor/wpa/dist/src/common/ieee802_11_common.h
  vendor/wpa/dist/src/common/ieee802_11_defs.h
  vendor/wpa/dist/src/common/privsep_commands.h
  vendor/wpa/dist/src/common/qca-vendor.h
  vendor/wpa/dist/src/common/sae.c
  vendor/wpa/dist/src/common/sae.h
  vendor/wpa/dist/src/common/version.h
  vendor/wpa/dist/src/common/wpa_common.c
  vendor/wpa/dist/src/common/wpa_common.h
  vendor/wpa/dist/src/common/wpa_ctrl.c
  vendor/wpa/dist/src/common/wpa_ctrl.h
  vendor/wpa/dist/src/crypto/crypto.h
  vendor/wpa/dist/src/crypto/crypto_module_tests.c
  vendor/wpa/dist/src/crypto/crypto_openssl.c
  vendor/wpa/dist/src/crypto/dh_groups.c
  vendor/wpa/dist/src/crypto/fips_prf_openssl.c
  vendor/wpa/dist/src/crypto/ms_funcs.c
  

Re: svn commit: r289281 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-10-13 Thread Conrad Meyer
This catches us up to Linux @ Nov 26, 2013, modulo earlier caveats.

Best,
Conrad

On Tue, Oct 13, 2015 at 7:14 PM, Conrad E. Meyer  wrote:
> Author: cem
> Date: Wed Oct 14 02:14:45 2015
> New Revision: 289281
> URL: https://svnweb.freebsd.org/changeset/base/289281
>
> Log:
>   NTB: MFV e8aeb60c: Disable interrupts and poll under high load
>
>   Authored by:  Jon Mason
>   Obtained from:Linux (Dual BSD/GPL driver)
>   Sponsored by: EMC / Isilon Storage Division
>
> Modified:
>   head/sys/dev/ntb/if_ntb/if_ntb.c
>   head/sys/dev/ntb/ntb_hw/ntb_hw.c
>   head/sys/dev/ntb/ntb_hw/ntb_hw.h
>
> Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
> ==
> --- head/sys/dev/ntb/if_ntb/if_ntb.cWed Oct 14 02:14:15 2015
> (r289280)
> +++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Oct 14 02:14:45 2015
> (r289281)
> @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -249,9 +250,8 @@ static int ntb_process_tx(struct ntb_tra
>  static void ntb_tx_copy_task(struct ntb_transport_qp *qp,
>  struct ntb_queue_entry *entry, void *offset);
>  static void ntb_qp_full(void *arg);
> -static void ntb_transport_rxc_db(void *data, int db_num);
> +static int ntb_transport_rxc_db(void *arg, int dummy);
>  static void ntb_rx_pendq_full(void *arg);
> -static void ntb_transport_rx(struct ntb_transport_qp *qp);
>  static int ntb_process_rxc(struct ntb_transport_qp *qp);
>  static void ntb_rx_copy_task(struct ntb_transport_qp *qp,
>  struct ntb_queue_entry *entry, void *offset);
> @@ -840,24 +840,17 @@ ntb_qp_full(void *arg)
>
>  /* Transport Rx */
>  static void
> -ntb_transport_rxc_db(void *data, int db_num)
> -{
> -   struct ntb_transport_qp *qp = data;
> -
> -   ntb_transport_rx(qp);
> -}
> -
> -static void
>  ntb_rx_pendq_full(void *arg)
>  {
>
> CTR0(KTR_NTB, "RX: ntb_rx_pendq_full callout");
> -   ntb_transport_rx(arg);
> +   ntb_transport_rxc_db(arg, 0);
>  }
>
> -static void
> -ntb_transport_rx(struct ntb_transport_qp *qp)
> +static int
> +ntb_transport_rxc_db(void *arg, int dummy __unused)
>  {
> +   struct ntb_transport_qp *qp = arg;
> uint64_t i;
> int rc;
>
> @@ -867,7 +860,7 @@ ntb_transport_rx(struct ntb_transport_qp
>  */
> mtx_lock(>transport->rx_lock);
> CTR0(KTR_NTB, "RX: transport_rx");
> -   for (i = 0; i < qp->rx_max_entry; i++) {
> +   for (i = 0; i < MIN(qp->rx_max_entry, INT_MAX); i++) {
> rc = ntb_process_rxc(qp);
> if (rc != 0) {
> CTR0(KTR_NTB, "RX: process_rxc failed");
> @@ -875,6 +868,8 @@ ntb_transport_rx(struct ntb_transport_qp
> }
> }
> mtx_unlock(>transport->rx_lock);
> +
> +   return ((int)i);
>  }
>
>  static int
>
> Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
> ==
> --- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Oct 14 02:14:15 2015
> (r289280)
> +++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Oct 14 02:14:45 2015
> (r289281)
> @@ -109,6 +109,7 @@ struct ntb_db_cb {
> unsigned intdb_num;
> void*data;
> struct ntb_softc*ntb;
> +   struct callout  irq_work;
>  };
>
>  struct ntb_softc {
> @@ -204,6 +205,9 @@ static void handle_soc_irq(void *arg);
>  static void handle_xeon_irq(void *arg);
>  static void handle_xeon_event_irq(void *arg);
>  static void ntb_handle_legacy_interrupt(void *arg);
> +static void ntb_irq_work(void *arg);
> +static void mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx);
> +static void unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx);
>  static int ntb_create_callbacks(struct ntb_softc *ntb, int num_vectors);
>  static void ntb_free_callbacks(struct ntb_softc *ntb);
>  static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id);
> @@ -580,6 +584,26 @@ ntb_teardown_interrupts(struct ntb_softc
>  }
>
>  static void
> +mask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx)
> +{
> +   unsigned long mask;
> +
> +   mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask);
> +   mask |= 1 << (idx * ntb->bits_per_vector);
> +   ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask);
> +}
> +
> +static void
> +unmask_ldb_interrupt(struct ntb_softc *ntb, unsigned int idx)
> +{
> +   unsigned long mask;
> +
> +   mask = ntb_reg_read(2, ntb->reg_ofs.ldb_mask);
> +   mask &= ~(1 << (idx * ntb->bits_per_vector));
> +   ntb_reg_write(2, ntb->reg_ofs.ldb_mask, mask);
> +}
> +
> +static void
>  handle_soc_irq(void *arg)
>  {
> struct ntb_db_cb *db_cb = arg;
> @@ -587,8 +611,10 @@ handle_soc_irq(void *arg)
>
> ntb_reg_write(8, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num);
>
> -   if (db_cb->callback != NULL)
> 

Re: svn commit: r289283 - head/share/man/man4

2015-10-13 Thread Bryan Drewery

> On Oct 13, 2015, at 19:43, Adrian Chadd  wrote:
> 
> Author: adrian
> Date: Wed Oct 14 02:43:04 2015
> New Revision: 289283
> URL: https://svnweb.freebsd.org/changeset/base/289283
> 
> Log:
>  rsu(4) manpage updates: add me, add 802.11n support, update caveats.

Forgot .Dd

> 
>  * Add that I indeed added 802.11n support.
>  * Update caveats - we support 1x1, 1x2 and 2x2 operation now, but
>there's no transmit aggregation support.
> 
> Modified:
>  head/share/man/man4/rsu.4
> 
> Modified: head/share/man/man4/rsu.4
> ==
> --- head/share/man/man4/rsu.4Wed Oct 14 02:37:30 2015(r289282)
> +++ head/share/man/man4/rsu.4Wed Oct 14 02:43:04 2015(r289283)
> @@ -175,7 +175,10 @@ driver was written by
> .An Damien Bergamini Aq Mt dam...@openbsd.org
> and ported by
> .An Rui Paulo Aq Mt rpa...@freebsd.org .
> +The 802.11n support was added by
> +.An Adrian Chadd Aq Mt adr...@freebsd.org .
> .Sh CAVEATS
> The
> .Nm
> -driver only supports 1T1R 802.11n operation.
> +driver currently does not support 802.11n transmit aggregation,
> +either A-MSDU or A-MPDU.
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289276 - in head/sys: conf kern netinet sys

2015-10-13 Thread Hiren Panchasara
On 10/13/15 at 06:58P, Bryan Drewery wrote:
> On 10/13/2015 5:35 PM, Hiren Panchasara wrote:
> > Author: hiren
> > Date: Wed Oct 14 00:35:37 2015
> > New Revision: 289276
> > URL: https://svnweb.freebsd.org/changeset/base/289276
> > 
> > Log:
> >   There are times when it would be really nice to have a record of the last 
> > few
> >   packets and/or state transitions from each TCP socket. That would help 
> > with
> >   narrowing down certain problems we see in the field that are hard to 
> > reproduce
> >   without understanding the history of how we got into a certain state. This
> >   change provides just that.
> >   
> >   It saves copies of the last N packets in a list in the tcpcb. When the 
> > tcpcb is
> >   destroyed, the list is freed. I thought this was likely to be more
> >   performance-friendly than saving copies of the tcpcb. Plus, with the 
> > packets,
> >   you should be able to reverse-engineer what happened to the tcpcb.
> >   
> >   To enable the feature, you will need to compile a kernel with the TCPPCAP
> >   option. Even then, the feature defaults to being deactivated. You can 
> > activate
> >   it by setting a positive value for the number of captured packets. You 
> > can do
> >   that on either a global basis or on a per-socket basis (via a setsockopt 
> > call).
> >   
> >   There is no way to get the packets out of the kernel other than using 
> > kmem or
> >   getting a coredump. I thought that would help some of the legal/privacy 
> > concerns
> >   regarding such a feature. However, it should be possible to add a future 
> > effort
> >   to export them in PCAP format.
> >   
> >   I tested this at low scale, and found that there were no mbuf leaks and 
> > the peak
> >   mbuf usage appeared to be unchanged with and without the feature.
> >   
> >   The main performance concern I can envision is the number of mbufs that 
> > would be
> >   used on systems with a large number of sockets. If you save five packets 
> > per
> >   direction per socket and have 3,000 sockets, that will consume at least 
> > 30,000
> >   mbufs just to keep these packets. I tried to reduce the concerns 
> > associated with
> >   this by limiting the number of clusters (not mbufs) that could be used 
> > for this
> >   feature. Again, in my testing, that appears to work correctly.
> >   
> >   Differential Revision:D3100
> 
> You're supposed to use the full URL here which will auto close the review.

Okay. It did pick up the commit though. What more does it need to know? 
> 
> I also replied to the review with style findings just now.
>
I'll ask Jonathan to look at it.

Cheers,
Hiren


pgpbPlapt3Owh.pgp
Description: PGP signature


svn commit: r289216 - in stable/9/sys/dev/usb: . serial

2015-10-13 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 13 08:16:17 2015
New Revision: 289216
URL: https://svnweb.freebsd.org/changeset/base/289216

Log:
  MFC r287592 and r287616:
  Add new USB ID.
  
  PR:   202968

Modified:
  stable/9/sys/dev/usb/serial/u3g.c
  stable/9/sys/dev/usb/usbdevs
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/serial/u3g.c
==
--- stable/9/sys/dev/usb/serial/u3g.c   Tue Oct 13 08:14:36 2015
(r289215)
+++ stable/9/sys/dev/usb/serial/u3g.c   Tue Oct 13 08:16:17 2015
(r289216)
@@ -316,6 +316,7 @@ static const STRUCT_USB_HOST_ID u3g_devs
U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, E392, U3GINIT_HUAWEISCSI),
+   U3G_DEV(HUAWEI, ME909U, U3GINIT_HUAWEISCSI2),
U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI),
U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI),

Modified: stable/9/sys/dev/usb/usbdevs
==
--- stable/9/sys/dev/usb/usbdevsTue Oct 13 08:14:36 2015
(r289215)
+++ stable/9/sys/dev/usb/usbdevsTue Oct 13 08:16:17 2015
(r289216)
@@ -2365,6 +2365,7 @@ product HUAWEI K3765_INIT 0x1520  K3765 I
 product HUAWEI K4505_INIT  0x1521  K4505 Initial
 product HUAWEI K3772_INIT  0x1526  K3772 Initial
 product HUAWEI E3272_INIT  0x155b  LTE modem initial
+product HUAWEI ME909U  0x1573  LTE modem
 product HUAWEI R215_INIT   0x1582  LTE modem initial
 product HUAWEI R2150x1588  LTE modem
 product HUAWEI ETS2055 0x1803  CDMA modem
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289215 - in stable/10/sys/dev/usb: . serial

2015-10-13 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 13 08:14:36 2015
New Revision: 289215
URL: https://svnweb.freebsd.org/changeset/base/289215

Log:
  MFC r287592 and r287616:
  Add new USB ID.
  
  PR:   202968

Modified:
  stable/10/sys/dev/usb/serial/u3g.c
  stable/10/sys/dev/usb/usbdevs
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/u3g.c
==
--- stable/10/sys/dev/usb/serial/u3g.c  Tue Oct 13 08:10:21 2015
(r289214)
+++ stable/10/sys/dev/usb/serial/u3g.c  Tue Oct 13 08:14:36 2015
(r289215)
@@ -316,6 +316,7 @@ static const STRUCT_USB_HOST_ID u3g_devs
U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, E392, U3GINIT_HUAWEISCSI),
+   U3G_DEV(HUAWEI, ME909U, U3GINIT_HUAWEISCSI2),
U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI),
U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI),
U3G_DEV(HUAWEI, E1820, U3GINIT_HUAWEISCSI),

Modified: stable/10/sys/dev/usb/usbdevs
==
--- stable/10/sys/dev/usb/usbdevs   Tue Oct 13 08:10:21 2015
(r289214)
+++ stable/10/sys/dev/usb/usbdevs   Tue Oct 13 08:14:36 2015
(r289215)
@@ -2365,6 +2365,7 @@ product HUAWEI K3765_INIT 0x1520  K3765 I
 product HUAWEI K4505_INIT  0x1521  K4505 Initial
 product HUAWEI K3772_INIT  0x1526  K3772 Initial
 product HUAWEI E3272_INIT  0x155b  LTE modem initial
+product HUAWEI ME909U  0x1573  LTE modem
 product HUAWEI R215_INIT   0x1582  LTE modem initial
 product HUAWEI R2150x1588  LTE modem
 product HUAWEI ETS2055 0x1803  CDMA modem
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289213 - stable/10/share/man/man4

2015-10-13 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 13 08:09:16 2015
New Revision: 289213
URL: https://svnweb.freebsd.org/changeset/base/289213

Log:
  MFC r288273:
  Fix spelling.
  
  PR:   203249

Modified:
  stable/10/share/man/man4/usb_quirk.4
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/usb_quirk.4
==
--- stable/10/share/man/man4/usb_quirk.4Tue Oct 13 06:14:03 2015
(r289212)
+++ stable/10/share/man/man4/usb_quirk.4Tue Oct 13 08:09:16 2015
(r289213)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 24, 2015
+.Dd September 26, 2015
 .Dt USB_QUIRK 4
 .Os
 .Sh NAME
@@ -193,9 +193,10 @@ The value is a string whose format is:
 Installs the quirks
 .Ic UQ_QUIRK,...
 for all USB devices matching
-.Ic VendorId ,
+.Ic VendorId
+and
 .Ic ProductId
-and has a hardware revision between and including
+which have a hardware revision between and including
 .Ic LowRevision
 and
 .Ic HighRevision .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289214 - stable/9/share/man/man4

2015-10-13 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 13 08:10:21 2015
New Revision: 289214
URL: https://svnweb.freebsd.org/changeset/base/289214

Log:
  MFC r288273:
  Fix spelling.
  
  PR:   203249

Modified:
  stable/9/share/man/man4/usb_quirk.4
Directory Properties:
  stable/9/share/   (props changed)
  stable/9/share/man/   (props changed)
  stable/9/share/man/man4/   (props changed)

Modified: stable/9/share/man/man4/usb_quirk.4
==
--- stable/9/share/man/man4/usb_quirk.4 Tue Oct 13 08:09:16 2015
(r289213)
+++ stable/9/share/man/man4/usb_quirk.4 Tue Oct 13 08:10:21 2015
(r289214)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 24, 2015
+.Dd September 26, 2015
 .Dt USB_QUIRK 4
 .Os
 .Sh NAME
@@ -193,9 +193,10 @@ The value is a string whose format is:
 Installs the quirks
 .Ic UQ_QUIRK,...
 for all USB devices matching
-.Ic VendorId ,
+.Ic VendorId
+and
 .Ic ProductId
-and has a hardware revision between and including
+which have a hardware revision between and including
 .Ic LowRevision
 and
 .Ic HighRevision .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289217 - stable/9/usr.bin/usbhidaction

2015-10-13 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 13 08:19:21 2015
New Revision: 289217
URL: https://svnweb.freebsd.org/changeset/base/289217

Log:
  MFC r288335:
  Store PID after becoming a daemon() and not before to ensure the
  correct PID gets written to the PID file.
  
  PR:   203252

Modified:
  stable/9/usr.bin/usbhidaction/usbhidaction.c
Directory Properties:
  stable/9/usr.bin/   (props changed)
  stable/9/usr.bin/usbhidaction/   (props changed)

Modified: stable/9/usr.bin/usbhidaction/usbhidaction.c
==
--- stable/9/usr.bin/usbhidaction/usbhidaction.cTue Oct 13 08:16:17 
2015(r289216)
+++ stable/9/usr.bin/usbhidaction/usbhidaction.cTue Oct 13 08:19:21 
2015(r289217)
@@ -166,17 +166,15 @@ main(int argc, char **argv)
 
if (demon) {
fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH);
-   if (fp >= 0) {
-   sz1 = snprintf(buf, sizeof buf, "%ld\n", 
-   (long)getpid());
-   if (sz1 > sizeof buf)
-   sz1 = sizeof buf;
-   write(fp, buf, sz1);
-   close(fp);
-   } else
+   if (fp < 0)
err(1, "%s", pidfile);
if (daemon(0, 0) < 0)
err(1, "daemon()");
+   snprintf(buf, sizeof(buf), "%ld\n", (long)getpid());
+   sz1 = strlen(buf);
+   if (write(fp, buf, sz1) < 0)
+   err(1, "%s", pidfile);
+   close(fp);
isdemon = 1;
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289218 - stable/10/usr.bin/usbhidaction

2015-10-13 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 13 08:21:15 2015
New Revision: 289218
URL: https://svnweb.freebsd.org/changeset/base/289218

Log:
  MFC r288335:
  Store PID after becoming a daemon() and not before to ensure the
  correct PID gets written to the PID file.
  
  PR:   203252

Modified:
  stable/10/usr.bin/usbhidaction/usbhidaction.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/usbhidaction/usbhidaction.c
==
--- stable/10/usr.bin/usbhidaction/usbhidaction.c   Tue Oct 13 08:19:21 
2015(r289217)
+++ stable/10/usr.bin/usbhidaction/usbhidaction.c   Tue Oct 13 08:21:15 
2015(r289218)
@@ -166,17 +166,15 @@ main(int argc, char **argv)
 
if (demon) {
fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH);
-   if (fp >= 0) {
-   sz1 = snprintf(buf, sizeof buf, "%ld\n", 
-   (long)getpid());
-   if (sz1 > sizeof buf)
-   sz1 = sizeof buf;
-   write(fp, buf, sz1);
-   close(fp);
-   } else
+   if (fp < 0)
err(1, "%s", pidfile);
if (daemon(0, 0) < 0)
err(1, "daemon()");
+   snprintf(buf, sizeof(buf), "%ld\n", (long)getpid());
+   sz1 = strlen(buf);
+   if (write(fp, buf, sz1) < 0)
+   err(1, "%s", pidfile);
+   close(fp);
isdemon = 1;
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289219 - head/sys/dev/isp

2015-10-13 Thread Alexander Motin
Author: mav
Date: Tue Oct 13 11:02:56 2015
New Revision: 289219
URL: https://svnweb.freebsd.org/changeset/base/289219

Log:
  Export bunch of state variables as sysctls.

Modified:
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/ispvar.h

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Tue Oct 13 08:21:15 2015
(r289218)
+++ head/sys/dev/isp/isp_freebsd.c  Tue Oct 13 11:02:56 2015
(r289219)
@@ -205,30 +205,55 @@ isp_attach_chan(ispsoftc_t *isp, struct 
cam_sim_free(fc->sim, FALSE);
return (ENOMEM);
}
-   ISP_FC_PC(isp, chan)->num_threads += 1;
+   fc->num_threads += 1;
 #ifdef ISP_INTERNAL_TARGET
ISP_SET_PC(isp, chan, proc_active, 1);
if (THREAD_CREATE(isp_target_thread_fc, fc, >target_proc, 
0, 0, "%s: isp_test_tgt%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) {
ISP_SET_PC(isp, chan, proc_active, 0);
isp_prt(isp, ISP_LOGERR, "cannot create test target 
thread");
}
-   ISP_FC_PC(isp, chan)->num_threads += 1;
+   fc->num_threads += 1;
 #endif
if (chan > 0) {
snprintf(name, sizeof(name), "chan%d", chan);
tree = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(tree),
OID_AUTO, name, CTLFLAG_RW, 0, "Virtual channel");
}
-   SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwnn", 
CTLFLAG_RD, (isp, chan)->isp_wwnn, "World Wide Node Name");
-   SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwpn", 
CTLFLAG_RD, (isp, chan)->isp_wwpn, "World Wide Port Name");
-   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"loop_down_limit", CTLFLAG_RW, _FC_PC(isp, chan)->loop_down_limit, 0, "Loop 
Down Limit");
-   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"gone_device_time", CTLFLAG_RW, _FC_PC(isp, chan)->gone_device_time, 0, 
"Gone Device Time");
+   SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "wwnn", CTLFLAG_RD, >isp_wwnn,
+   "World Wide Node Name");
+   SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "wwpn", CTLFLAG_RD, >isp_wwpn,
+   "World Wide Port Name");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "loop_down_limit", CTLFLAG_RW, >loop_down_limit, 0,
+   "Loop Down Limit");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "gone_device_time", CTLFLAG_RW, >gone_device_time, 0,
+   "Gone Device Time");
 #if defined(ISP_TARGET_MODE) && defined(DEBUG)
-   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"inject_lost_data_frame", CTLFLAG_RW, _FC_PC(isp, 
chan)->inject_lost_data_frame, 0, "Cause a Lost Frame on a Read");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "inject_lost_data_frame", CTLFLAG_RW, 
>inject_lost_data_frame, 0,
+   "Cause a Lost Frame on a Read");
 #endif
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
"role", CTLTYPE_INT | CTLFLAG_RW, isp, chan,
isp_role_sysctl, "I", "Current role");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "speed", CTLFLAG_RD, >isp_gbspeed, 0,
+   "Connection speed in gigabits");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "linkstate", CTLFLAG_RD, >isp_linkstate, 0,
+   "Link state");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "fwstate", CTLFLAG_RD, >isp_fwstate, 0,
+   "Firmware state");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "loopstate", CTLFLAG_RD, >isp_loopstate, 0,
+   "Loop state");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "topo", CTLFLAG_RD, >isp_topo, 0,
+   "Connection topology");
}
return (0);
 }
@@ -5694,7 +5719,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
bus = va_arg(ap, int);
va_end(ap);
 
-   FCPARAM(isp, bus)->link_active = 0;
+   FCPARAM(isp, bus)->isp_linkstate = 0;
 
fc = ISP_FC_PC(isp, bus);
if (cmd == ISPASYNC_LOOP_DOWN && fc->ready) {
@@ -5727,7 +5752,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
 * Change Notify before activating the FC cleanup
 * thread to look at the state of the loop again.
 */
-   

svn commit: r289220 - head

2015-10-13 Thread Ed Maste
Author: emaste
Date: Tue Oct 13 12:51:44 2015
New Revision: 289220
URL: https://svnweb.freebsd.org/changeset/base/289220

Log:
  Rewrap UPDATING entry from r265422 to 80 columns

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Tue Oct 13 11:02:56 2015(r289219)
+++ head/UPDATING   Tue Oct 13 12:51:44 2015(r289220)
@@ -13,8 +13,8 @@ Items affecting the ports and packages s
 
 NOTE: FreeBSD has switched from gcc to clang. If you have trouble bootstrapping
 from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to
-the tip of head, and then rebuild without this option. The bootstrap process 
from
-older version of current across the gcc/clang cutover is a bit fragile.
+the tip of head, and then rebuild without this option. The bootstrap process
+from older version of current across the gcc/clang cutover is a bit fragile.
 
 NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
FreeBSD 11.x has many debugging features turned on, in both the kernel
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289233 - head/sys/dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 17:21:38 2015
New Revision: 289233
URL: https://svnweb.freebsd.org/changeset/base/289233

Log:
  NTB: Update pci ids
  
  Add JSF, HSX, BDX ids; add two additional Xeon errata flags while we're
  here.
  
  Obtained from:Linux
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.h

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 17:20:47 2015
(r289232)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 17:21:38 2015
(r289233)
@@ -199,11 +199,23 @@ static int ntb_check_link_status(struct 
 static void save_bar_parameters(struct ntb_pci_bar_info *bar);
 
 static struct ntb_hw_info pci_ids[] = {
-   { 0x3C0D8086, "Xeon E5/Core i7 Non-Transparent Bridge B2B", NTB_XEON,
-   NTB_REGS_THRU_MW },
{ 0x0C4E8086, "Atom Processor S1200 NTB Primary B2B", NTB_SOC, 0 },
-   { 0x0E0D8086, "Xeon E5 V2 Non-Transparent Bridge B2B", NTB_XEON,
-   NTB_REGS_THRU_MW | NTB_BAR_SIZE_4K },
+
+   /* XXX: PS/SS IDs left out until they are supported. */
+   { 0x37258086, "JSF Xeon C35xx/C55xx Non-Transparent Bridge B2B",
+   NTB_XEON, NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 },
+   { 0x3C0D8086, "SNB Xeon E5/Core i7 Non-Transparent Bridge B2B",
+   NTB_XEON, NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 },
+   { 0x0E0D8086, "IVT Xeon E5 V2 Non-Transparent Bridge B2B", NTB_XEON,
+   NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP
+   | NTB_BAR_SIZE_4K },
+   { 0x2F0D8086, "HSX Xeon E5 V3 Non-Transparent Bridge B2B", NTB_XEON,
+   NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP
+   },
+   { 0x6F0D8086, "BDX Xeon E5 V4 Non-Transparent Bridge B2B", NTB_XEON,
+   NTB_REGS_THRU_MW | NTB_B2BDOORBELL_BIT14 | NTB_SB01BASE_LOCKUP
+   },
+
{ 0x, NULL, NTB_SOC, 0 }
 };
 

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.hTue Oct 13 17:20:47 2015
(r289232)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.hTue Oct 13 17:21:38 2015
(r289233)
@@ -74,7 +74,10 @@ bool ntb_query_link_status(struct ntb_so
 device_t ntb_get_device(struct ntb_softc *ntb);
 
 #define NTB_BAR_SIZE_4K(1 << 0)
+/* REGS_THRU_MW is the equivalent of Linux's NTB_HWERR_SDOORBELL_LOCKUP */
 #define NTB_REGS_THRU_MW   (1 << 1)
+#define NTB_SB01BASE_LOCKUP(1 << 2)
+#define NTB_B2BDOORBELL_BIT14  (1 << 3)
 bool ntb_has_feature(struct ntb_softc *, uint64_t);
 
 #endif /* _NTB_HW_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289229 - in head: sbin/mount share/man/man5

2015-10-13 Thread Garrett Cooper
Author: ngie
Date: Tue Oct 13 17:14:27 2015
New Revision: 289229
URL: https://svnweb.freebsd.org/changeset/base/289229

Log:
  Replace references to /dev/acd0 with /dev/cd0
  
  atapicd(4) was replaced by cd(4) with the atacam work done by
  mav@ and then removed in r249083
  
  X-MFC to: stable/10
  MFC after: 2 weeks

Modified:
  head/sbin/mount/mount.8
  head/share/man/man5/devfs.conf.5
Directory Properties:
  head/   (props changed)

Modified: head/sbin/mount/mount.8
==
--- head/sbin/mount/mount.8 Tue Oct 13 17:09:07 2015(r289228)
+++ head/sbin/mount/mount.8 Tue Oct 13 17:14:27 2015(r289229)
@@ -28,7 +28,7 @@
 .\" @(#)mount.88.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd December 3, 2014
+.Dd October 13, 2015
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -189,7 +189,7 @@ to use the specified program to mount th
 directly.
 For example:
 .Bd -literal
-mount -t foofs -o mountprog=/mydir/fooprog /dev/acd0 /mnt
+mount -t foofs -o mountprog=/mydir/fooprog /dev/cd0 /mnt
 .Ed
 .It Cm multilabel
 Enable multi-label Mandatory Access Control, or MAC, on the specified file

Modified: head/share/man/man5/devfs.conf.5
==
--- head/share/man/man5/devfs.conf.5Tue Oct 13 17:09:07 2015
(r289228)
+++ head/share/man/man5/devfs.conf.5Tue Oct 13 17:14:27 2015
(r289229)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 17, 2005
+.Dd October 13, 2015
 .Dt DEVFS.CONF 5
 .Os
 .Sh NAME
@@ -109,9 +109,9 @@ linkcd0 cdrom
 .Pp
 Similarly, to link
 .Pa /dev/cdrom
-to the first ATAPI CD-ROM device, the following action may be used:
+to the first SCSI CD-ROM device, the following action may be used:
 .Bd -literal -offset indent
-link   acd0cdrom
+link   cd0 cdrom
 .Ed
 .Pp
 To set the owner of a device, the
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289234 - in head/sys: conf dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 17:22:23 2015
New Revision: 289234
URL: https://svnweb.freebsd.org/changeset/base/289234

Log:
  NTB: Enable 32-bit support
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/conf/files.i386
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Tue Oct 13 17:21:38 2015(r289233)
+++ head/sys/conf/files.i386Tue Oct 13 17:22:23 2015(r289234)
@@ -269,6 +269,8 @@ dev/le/if_le_isa.c  optional le isa
 dev/mse/mse.c  optional mse
 dev/mse/mse_isa.c  optional mse isa
 dev/nfe/if_nfe.c   optional nfe pci
+dev/ntb/if_ntb/if_ntb.coptional if_ntb
+dev/ntb/ntb_hw/ntb_hw.coptional if_ntb | ntb_hw
 dev/nvd/nvd.c  optional nvd nvme
 dev/nvme/nvme.coptional nvme
 dev/nvme/nvme_ctrlr.c  optional nvme

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 17:21:38 2015
(r289233)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 17:22:23 2015
(r289234)
@@ -152,6 +152,26 @@ struct ntb_softc {
uint8_t link_speed;
 };
 
+#ifdef __i386__
+static __inline uint64_t
+bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t handle,
+bus_size_t offset)
+{
+
+   return (bus_space_read_4(tag, handle, offset) |
+   ((uint64_t)bus_space_read_4(tag, handle, offset + 4)) << 32);
+}
+
+static __inline void
+bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t handle,
+bus_size_t offset, uint64_t val)
+{
+
+   bus_space_write_4(tag, handle, offset, val);
+   bus_space_write_4(tag, handle, offset + 4, val >> 32);
+}
+#endif
+
 #define ntb_bar_read(SIZE, bar, offset) \
bus_space_read_ ## SIZE (ntb->bar_info[(bar)].pci_bus_tag, \
ntb->bar_info[(bar)].pci_bus_handle, (offset))
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289225 - head/usr.sbin/makefs/ffs

2015-10-13 Thread Sean Bruno
Author: sbruno
Date: Tue Oct 13 17:00:14 2015
New Revision: 289225
URL: https://svnweb.freebsd.org/changeset/base/289225

Log:
  makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be 
easily
  checked with dumpfs(8). This may lead to other problems, f.e. geom_label 
kernel
  module sanity checks do not like zero fs_old_size value and skips such UFS1
  file system while tasting (fs_old_size derives from sblock.fs_providersize).
  
  PR:   203704
  Submitted by: eu...@grosbein.net
  Reviewed by:  marcel

Modified:
  head/usr.sbin/makefs/ffs/mkfs.c

Modified: head/usr.sbin/makefs/ffs/mkfs.c
==
--- head/usr.sbin/makefs/ffs/mkfs.c Tue Oct 13 16:51:12 2015
(r289224)
+++ head/usr.sbin/makefs/ffs/mkfs.c Tue Oct 13 17:00:14 2015
(r289225)
@@ -248,7 +248,8 @@ ffs_mkfs(const char *fsys, const fsinfo_
exit(21);
}
sblock.fs_fsbtodb = ilog2(sblock.fs_fsize / sectorsize);
-   sblock.fs_size = fssize = dbtofsb(, fssize);
+   sblock.fs_size = sblock.fs_providersize = fssize =
+   dbtofsb(, fssize);
 
if (Oflag <= 1) {
sblock.fs_magic = FS_UFS1_MAGIC;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289232 - head/sys/dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 17:20:47 2015
New Revision: 289232
URL: https://svnweb.freebsd.org/changeset/base/289232

Log:
  NTB: MFV 113bf1c9: BWD Link Recovery
  
  The BWD NTB device will drop the link if an error is encountered on the
  point-to-point PCI bridge.  The link will stay down until all errors are
  cleared and the link is re-established.  On link down, check to see if
  the error is detected, if so do the necessary housekeeping to try and
  recover from the error and reestablish the link.
  
  There is a potential race between the 2 NTB devices recovering at the
  same time.  If the times are synchronized, the link will not recover and
  the driver will be stuck in this loop forever.  Add a random interval to
  the recovery time to prevent this race.
  
  Authored by:  Jon Mason
  Obtained from:Linux
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 17:20:05 2015
(r289231)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 17:20:47 2015
(r289232)
@@ -896,6 +896,7 @@ ntb_handle_heartbeat(void *arg)
if (rc != 0)
device_printf(ntb->device,
"Error determining link status\n");
+
/* Check to see if a link error is the cause of the link down */
if (ntb->link_status == NTB_LINK_DOWN) {
status32 = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET);
@@ -995,7 +996,15 @@ recover_soc_link(void *arg)
uint16_t status16;
 
soc_perform_link_restart(ntb);
-   pause("Link", SOC_LINK_RECOVERY_TIME * hz / 1000);
+
+   /*
+* There is a potential race between the 2 NTB devices recovering at
+* the same time.  If the times are the same, the link will not recover
+* and the driver will be stuck in this loop forever.  Add a random
+* interval to the recovery time to prevent this race.
+*/
+   status32 = arc4random() % SOC_LINK_RECOVERY_TIME;
+   pause("Link", (SOC_LINK_RECOVERY_TIME + status32) * hz / 1000);
 
status32 = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET);
if ((status32 & SOC_LTSSMSTATEJMP_FORCEDETECT) != 0)
@@ -1005,12 +1014,17 @@ recover_soc_link(void *arg)
if ((status32 & SOC_IBIST_ERR_OFLOW) != 0)
goto retry;
 
+   status32 = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl);
+   if ((status32 & SOC_CNTL_LINK_DOWN) != 0)
+   goto out;
+
status16 = ntb_reg_read(2, ntb->reg_ofs.lnk_stat);
width = (status16 & NTB_LINK_WIDTH_MASK) >> 4;
speed = (status16 & NTB_LINK_SPEED_MASK);
if (ntb->link_width != width || ntb->link_speed != speed)
goto retry;
 
+out:
callout_reset(>heartbeat_timer, NTB_HB_TIMEOUT * hz,
ntb_handle_heartbeat, ntb);
return;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289238 - head/sys/dev/ixgbe

2015-10-13 Thread Sean Bruno
Author: sbruno
Date: Tue Oct 13 17:34:18 2015
New Revision: 289238
URL: https://svnweb.freebsd.org/changeset/base/289238

Log:
  Add support for sysctl knobs to live tune the per interrupt rx/tx packet
  processing limits in ixgbe(4)
  
  Differential Revision:https://reviews.freebsd.org/D3719
  Submitted by: jason wolfe (j-nitrology.com)
  MFC after:2 weeks

Modified:
  head/sys/dev/ixgbe/if_ix.c
  head/sys/dev/ixgbe/if_ixv.c
  head/sys/dev/ixgbe/ix_txrx.c
  head/sys/dev/ixgbe/ixgbe.h

Modified: head/sys/dev/ixgbe/if_ix.c
==
--- head/sys/dev/ixgbe/if_ix.c  Tue Oct 13 17:31:11 2015(r289237)
+++ head/sys/dev/ixgbe/if_ix.c  Tue Oct 13 17:34:18 2015(r289238)
@@ -170,6 +170,8 @@ static void ixgbe_add_device_sysctls(str
 static void ixgbe_add_hw_stats(struct adapter *);
 
 /* Sysctl handlers */
+static voidixgbe_set_sysctl_value(struct adapter *, const char *,
+   const char *, int *, int);
 static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS);
 static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS);
 static int ixgbe_sysctl_thermal_test(SYSCTL_HANDLER_ARGS);
@@ -461,6 +463,15 @@ ixgbe_attach(device_t dev)
goto err_out;
}
 
+   /* Sysctls for limiting the amount of work done in the taskqueues */
+   ixgbe_set_sysctl_value(adapter, "rx_processing_limit",
+   "max number of rx packets to process",
+   >rx_process_limit, ixgbe_rx_process_limit);
+
+   ixgbe_set_sysctl_value(adapter, "tx_processing_limit",
+   "max number of tx packets to process",
+   >tx_process_limit, ixgbe_tx_process_limit);
+
/* Do descriptor calc and sanity checks */
if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 ||
ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) {
@@ -2877,9 +2888,6 @@ ixgbe_initialize_transmit_units(struct a
/* Cache the tail address */
txr->tail = IXGBE_TDT(j);
 
-   /* Set the processing limit */
-   txr->process_limit = ixgbe_tx_process_limit;
-
/* Disable Head Writeback */
switch (hw->mac.type) {
case ixgbe_mac_82598EB:
@@ -3136,9 +3144,6 @@ ixgbe_initialize_receive_units(struct ad
IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0);
IXGBE_WRITE_REG(hw, IXGBE_RDT(j), 0);
 
-   /* Set the processing limit */
-   rxr->process_limit = ixgbe_rx_process_limit;
-
/* Set the driver rx tail address */
rxr->tail =  IXGBE_RDT(rxr->me);
}
@@ -4458,6 +4463,16 @@ ixgbe_add_hw_stats(struct adapter *adapt
"1024-1522 byte frames transmitted");
 }
 
+static void
+ixgbe_set_sysctl_value(struct adapter *adapter, const char *name,
+const char *description, int *limit, int value)
+{
+   *limit = value;
+   SYSCTL_ADD_INT(device_get_sysctl_ctx(adapter->dev),
+   SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)),
+   OID_AUTO, name, CTLFLAG_RW, limit, value, description);
+}
+
 /*
 ** Set flow control using sysctl:
 ** Flow control values:

Modified: head/sys/dev/ixgbe/if_ixv.c
==
--- head/sys/dev/ixgbe/if_ixv.c Tue Oct 13 17:31:11 2015(r289237)
+++ head/sys/dev/ixgbe/if_ixv.c Tue Oct 13 17:34:18 2015(r289238)
@@ -115,6 +115,8 @@ static void ixv_save_stats(struct adapte
 static voidixv_init_stats(struct adapter *);
 static voidixv_update_stats(struct adapter *);
 static voidixv_add_stats_sysctls(struct adapter *);
+static voidixv_set_sysctl_value(struct adapter *, const char *,
+   const char *, int *, int);
 
 /* The MSI/X Interrupt handlers */
 static voidixv_msix_que(void *);
@@ -325,6 +327,15 @@ ixv_attach(device_t dev)
goto err_out;
}
 
+   /* Sysctls for limiting the amount of work done in the taskqueues */
+   ixv_set_sysctl_value(adapter, "rx_processing_limit",
+   "max number of rx packets to process",
+   >rx_process_limit, ixv_rx_process_limit);
+
+   ixv_set_sysctl_value(adapter, "tx_processing_limit",
+   "max number of tx packets to process",
+   >tx_process_limit, ixv_tx_process_limit);
+
/* Do descriptor calc and sanity checks */
if (((ixv_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 ||
ixv_txd < MIN_TXD || ixv_txd > MAX_TXD) {
@@ -1600,9 +1611,6 @@ ixv_initialize_transmit_units(struct ada
/* Set Tx Tail register */
txr->tail = IXGBE_VFTDT(i);
 
-   /* Set the processing limit */
-   txr->process_limit = ixv_tx_process_limit;
-
/* Set Ring parameters */
IXGBE_WRITE_REG(hw, IXGBE_VFTDBAL(i),
   (tdba & 

svn commit: r289257 - head/sys/dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 19:45:29 2015
New Revision: 289257
URL: https://svnweb.freebsd.org/changeset/base/289257

Log:
  NTB: (partial) MFV ed6c24ed: NTB-RP support
  
  This commit does not actually add NTB-RP support.  Mostly it serves to
  shuffle code around to match the Linux driver.  Original Linux commit
  log follows:
  
  Add support for Non-Transparent Bridge connected to a PCI-E Root Port on
  the remote system (also known as NTB-RP mode).  This allows for a NTB
  enabled system to be connected to a non-NTB enabled system/slot.
  
  Modifications to the registers and BARs/MWs on the Secondary side by the
  remote system are reflected into registers on the Primary side for the
  local system.  Similarly, modifications of registers and BARs/MWs on
  Primary side by the local system are reflected into registers on the
  Secondary side for the Remote System.  This allows communication between
  the 2 sides via these registers and BARs/MWs.
  
  Note: there is not a fix for the Xeon Errata (that was already worked
  around in NTB-B2B mode) for NTB-RP mode.  Due to this limitation, NTB-RP
  will not work on the Secondary side with the Xeon Errata workaround
  enabled.  To get around this, disable the workaround via the
  xeon_errata_workaround=0 modparm.  However, this can cause the hang
  described in the errata.
  
  Authored by:  Jon Mason
  Obtained from:Linux
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_regs.h

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 19:44:36 2015
(r289256)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 19:45:29 2015
(r289257)
@@ -709,17 +709,6 @@ ntb_setup_xeon(struct ntb_softc *ntb)
val = pci_read_config(ntb->device, NTB_PPD_OFFSET, 1);
 
connection_type = val & XEON_PPD_CONN_TYPE;
-   switch (connection_type) {
-   case NTB_CONN_B2B:
-   ntb->conn_type = NTB_CONN_B2B;
-   break;
-   case NTB_CONN_CLASSIC:
-   case NTB_CONN_RP:
-   default:
-   device_printf(ntb->device, "Connection type %d not supported\n",
-   connection_type);
-   return (ENXIO);
-   }
 
if ((val & XEON_PPD_DEV_TYPE) != 0)
ntb->dev_type = NTB_DEV_USD;
@@ -728,12 +717,42 @@ ntb_setup_xeon(struct ntb_softc *ntb)
 
ntb->reg_ofs.ldb= XEON_PDOORBELL_OFFSET;
ntb->reg_ofs.ldb_mask   = XEON_PDBMSK_OFFSET;
+   ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET;
ntb->reg_ofs.bar2_xlat  = XEON_SBAR2XLAT_OFFSET;
ntb->reg_ofs.bar4_xlat  = XEON_SBAR4XLAT_OFFSET;
-   ntb->reg_ofs.lnk_cntl   = XEON_NTBCNTL_OFFSET;
-   ntb->reg_ofs.lnk_stat   = XEON_LINK_STATUS_OFFSET;
-   ntb->reg_ofs.spad_local = XEON_SPAD_OFFSET;
-   ntb->reg_ofs.spci_cmd   = XEON_PCICMD_OFFSET;
+
+   switch (connection_type) {
+   case NTB_CONN_B2B:
+   ntb->conn_type = NTB_CONN_B2B;
+
+   /*
+* reg_ofs.rdb and reg_ofs.spad_remote are effectively ignored
+* with the NTB_REGS_THRU_MW errata mode enabled.  (See
+* ntb_ring_doorbell() and ntb_read/write_remote_spad().)
+*/
+   ntb->reg_ofs.rdb = XEON_B2B_DOORBELL_OFFSET;
+   ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET;
+
+   ntb->limits.max_spads= XEON_MAX_SPADS;
+   break;
+
+   case NTB_CONN_RP:
+   /*
+* Every Xeon today needs NTB_REGS_THRU_MW, so punt on RP for
+* now.
+*/
+   KASSERT(HAS_FEATURE(NTB_REGS_THRU_MW),
+   ("Xeon without MW errata unimplemented"));
+   device_printf(ntb->device,
+   "NTB-RP disabled to due hardware errata.\n");
+   return (ENXIO);
+
+   case NTB_CONN_TRANSPARENT:
+   default:
+   device_printf(ntb->device, "Connection type %d not supported\n",
+   connection_type);
+   return (ENXIO);
+   }
 
/*
 * There is a Xeon hardware errata related to writes to SDOORBELL or
@@ -757,15 +776,9 @@ ntb_setup_xeon(struct ntb_softc *ntb)
ntb_reg_write(8, XEON_PBAR4LMT_OFFSET, 0);
 
 
-   if (ntb->conn_type == NTB_CONN_B2B) {
-   ntb->reg_ofs.rdb = XEON_B2B_DOORBELL_OFFSET;
-   ntb->reg_ofs.spad_remote = XEON_B2B_SPAD_OFFSET;
-   ntb->limits.max_spads= XEON_MAX_SPADS;
-   } else {
-   ntb->reg_ofs.rdb = XEON_SDOORBELL_OFFSET;
-   ntb->reg_ofs.spad_remote = XEON_SPAD_OFFSET;
-   ntb->limits.max_spads= XEON_MAX_COMPAT_SPADS;
-   }
+   ntb->reg_ofs.lnk_cntl= XEON_NTBCNTL_OFFSET;
+   

svn commit: r289255 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 19:44:25 2015
New Revision: 289255
URL: https://svnweb.freebsd.org/changeset/base/289255

Log:
  NTB: MFV 49793889: Rename Variables for NTB-RP
  
  Many variable names in the NTB driver refer to the primary or secondary
  side.  However, these variables will be used to access the reverse case
  when in NTB-RP mode.  Make these names more generic in anticipation of
  NTB-RP support.
  
  Authored by:  Jon Mason
  Obtained from:Linux
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.h

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 13 19:42:57 2015
(r289254)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 13 19:44:25 2015
(r289255)
@@ -809,7 +809,7 @@ ntb_tx_copy_task(struct ntb_transport_qp
/* TODO: replace with bus_space_write */
hdr->flags = entry->flags | IF_NTB_DESC_DONE_FLAG;
 
-   ntb_ring_sdb(qp->ntb, qp->qp_num);
+   ntb_ring_doorbell(qp->ntb, qp->qp_num);
 
/* 
 * The entry length can only be zero if the packet is intended to be a

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 19:42:57 2015
(r289254)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 19:44:25 2015
(r289255)
@@ -133,11 +133,11 @@ struct ntb_softc {
uint8_t msix_cnt;
} limits;
struct {
-   uint32_t pdb;
-   uint32_t pdb_mask;
-   uint32_t sdb;
-   uint32_t sbar2_xlat;
-   uint32_t sbar4_xlat;
+   uint32_t ldb;
+   uint32_t ldb_mask;
+   uint32_t rdb;
+   uint32_t bar2_xlat;
+   uint32_t bar4_xlat;
uint32_t spad_remote;
uint32_t spad_local;
uint32_t lnk_cntl;
@@ -476,9 +476,9 @@ ntb_setup_interrupts(struct ntb_softc *n
 * Interrupt.  The rest will be unmasked as callbacks are registered.
 */
if (ntb->type == NTB_SOC)
-   ntb_reg_write(8, ntb->reg_ofs.pdb_mask, ~0);
+   ntb_reg_write(8, ntb->reg_ofs.ldb_mask, ~0);
else
-   ntb_reg_write(2, ntb->reg_ofs.pdb_mask,
+   ntb_reg_write(2, ntb->reg_ofs.ldb_mask,
~(1 << ntb->limits.max_db_bits));
 
num_vectors = MIN(pci_msix_count(ntb->device),
@@ -578,7 +578,7 @@ handle_soc_irq(void *arg)
struct ntb_db_cb *db_cb = arg;
struct ntb_softc *ntb = db_cb->ntb;
 
-   ntb_reg_write(8, ntb->reg_ofs.pdb, (uint64_t) 1 << db_cb->db_num);
+   ntb_reg_write(8, ntb->reg_ofs.ldb, (uint64_t) 1 << db_cb->db_num);
 
if (db_cb->callback != NULL)
db_cb->callback(db_cb->data, db_cb->db_num);
@@ -596,7 +596,7 @@ handle_xeon_irq(void *arg)
 * vectors, with the 4th having a single bit for link
 * interrupts.
 */
-   ntb_reg_write(2, ntb->reg_ofs.pdb,
+   ntb_reg_write(2, ntb->reg_ofs.ldb,
((1 << ntb->bits_per_vector) - 1) <<
(db_cb->db_num * ntb->bits_per_vector));
 
@@ -616,7 +616,7 @@ handle_xeon_event_irq(void *arg)
device_printf(ntb->device, "Error determining link status\n");
 
/* bit 15 is always the link bit */
-   ntb_reg_write(2, ntb->reg_ofs.pdb, 1 << ntb->limits.max_db_bits);
+   ntb_reg_write(2, ntb->reg_ofs.ldb, 1 << ntb->limits.max_db_bits);
 }
 
 static void
@@ -624,28 +624,28 @@ ntb_handle_legacy_interrupt(void *arg)
 {
struct ntb_softc *ntb = arg;
unsigned int i = 0;
-   uint64_t pdb64;
-   uint16_t pdb16;
+   uint64_t ldb64;
+   uint16_t ldb16;
 
if (ntb->type == NTB_SOC) {
-   pdb64 = ntb_reg_read(8, ntb->reg_ofs.pdb);
+   ldb64 = ntb_reg_read(8, ntb->reg_ofs.ldb);
 
-   while (pdb64) {
-   i = ffs(pdb64);
-   pdb64 &= pdb64 - 1;
+   while (ldb64) {
+   i = ffs(ldb64);
+   ldb64 &= ldb64 - 1;
handle_soc_irq(>db_cb[i]);
}
} else {
-   pdb16 = ntb_reg_read(2, ntb->reg_ofs.pdb);
+   ldb16 = ntb_reg_read(2, ntb->reg_ofs.ldb);
 
-   if ((pdb16 & XEON_DB_HW_LINK) != 0) {
+   if ((ldb16 & XEON_DB_HW_LINK) != 0) {
handle_xeon_event_irq(ntb);
-   pdb16 &= ~XEON_DB_HW_LINK;
+   ldb16 &= ~XEON_DB_HW_LINK;
}
 
-   while (pdb16 != 0) {
-   i = ffs(pdb16);
-   pdb16 &= pdb16 - 1;
+   while (ldb16 != 0) {
+  

svn commit: r289262 - head/usr.sbin/config

2015-10-13 Thread Rui Paulo
Author: rpaulo
Date: Tue Oct 13 20:25:03 2015
New Revision: 289262
URL: https://svnweb.freebsd.org/changeset/base/289262

Log:
  Fix two memory leaks in config(8).
  
  PR:   202145
  Submitted by: Kurt Lidl 

Modified:
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/mkmakefile.c
==
--- head/usr.sbin/config/mkmakefile.c   Tue Oct 13 20:24:57 2015
(r289261)
+++ head/usr.sbin/config/mkmakefile.c   Tue Oct 13 20:25:03 2015
(r289262)
@@ -623,6 +623,7 @@ do_xxfiles(char *tag, FILE *fp)
slen = strlen(suff);
 
fprintf(fp, "%sFILES=", SUFF);
+   free(SUFF);
lpos = 8;
STAILQ_FOREACH(tp, , f_next)
if (tp->f_type != NODEPEND) {
@@ -641,6 +642,7 @@ do_xxfiles(char *tag, FILE *fp)
fprintf(fp, "%s ", tp->f_fn);
lpos += len + 1;
}
+   free(suff);
if (lpos != 8)
putc('\n', fp);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289253 - head/share/mk

2015-10-13 Thread Garrett Cooper


> On Oct 13, 2015, at 12:11, Bryan Drewery  wrote:
> 
> Author: bdrewery
> Date: Tue Oct 13 19:11:22 2015
> New Revision: 289253
> URL: https://svnweb.freebsd.org/changeset/base/289253
> 
> Log:
>  bsd.subdir.mk: Handle cleanobj.
> 
>  Before this, the target was unknown.  Now it will recurse on subdirs and run
>  the target in the current directory.  It is required to recurse as there
>  may be subdirs that have objs in their directory or in the object directory,
>  so it is not enough to just delete the objdir of the subdir parent.
> 
>  MFC after:2 weeks
>  Sponsored by:EMC / Isilon Storage Division
> 
> Modified:
>  head/share/mk/bsd.subdir.mk
> 
> Modified: head/share/mk/bsd.subdir.mk
> ==
> --- head/share/mk/bsd.subdir.mkTue Oct 13 18:56:50 2015(r289252)
> +++ head/share/mk/bsd.subdir.mkTue Oct 13 19:11:22 2015(r289253)
> @@ -86,7 +86,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
> # Work around parsing of .if nested in .for by putting .WAIT string into a 
> var.
> __wait= .WAIT
> .for __target in all all-man checkdpadd clean cleandepend cleandir \
> -cleanilinks depend distribute lint maninstall manlint obj objlink \
> +cleanilinks cleanobj depend distribute lint maninstall manlint obj 
> objlink \
> realinstall regress tags ${SUBDIR_TARGETS}
> .ifdef SUBDIR_PARALLEL
> __subdir_targets=
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289254 - head/share/mk

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 19:42:57 2015
New Revision: 289254
URL: https://svnweb.freebsd.org/changeset/base/289254

Log:
  bsd.subdir.mk: Move all of the targets into ALL_SUBDIR_TARGETS.
  
  Also improve documentation.
  
  The SUBDIR_TARGETS variable should really be named LOCAL_SUBDIR_TARGETS, but
  renaming it may be a surprise for downstream vendors who use this variable.
  
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.subdir.mk

Modified: head/share/mk/bsd.subdir.mk
==
--- head/share/mk/bsd.subdir.mk Tue Oct 13 19:11:22 2015(r289253)
+++ head/share/mk/bsd.subdir.mk Tue Oct 13 19:42:57 2015(r289254)
@@ -25,14 +25,17 @@
 #  This is a variant of install, which will
 #  put the stuff into the right "distribution".
 #
-#  afterinstall, all, all-man, beforeinstall, checkdpadd, clean,
-#  cleandepend, cleandir, cleanilinks depend, install, lint,
-#  maninstall, manlint, obj, objlink, realinstall, regress, tags
+#  See ALL_SUBDIR_TARGETS for list of targets that will recurse.
+#  Custom targets can be added to SUBDIR_TARGETS in src.conf.
 #
 
 .if !target()
 :
 
+ALL_SUBDIR_TARGETS= all all-man checkdpadd clean cleandepend cleandir \
+   cleanilinks cleanobj depend distribute lint maninstall manlint obj \
+   objlink realinstall regress tags ${SUBDIR_TARGETS}
+
 .include 
 
 .if !defined(NEED_SUBDIR)
@@ -85,9 +88,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
 
 # Work around parsing of .if nested in .for by putting .WAIT string into a var.
 __wait= .WAIT
-.for __target in all all-man checkdpadd clean cleandepend cleandir \
-cleanilinks cleanobj depend distribute lint maninstall manlint obj objlink 
\
-realinstall regress tags ${SUBDIR_TARGETS}
+.for __target in ${ALL_SUBDIR_TARGETS}
 .ifdef SUBDIR_PARALLEL
 __subdir_targets=
 .for __dir in ${SUBDIR}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289258 - head/sys/dev/ioat

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 19:46:12 2015
New Revision: 289258
URL: https://svnweb.freebsd.org/changeset/base/289258

Log:
  ioat: Use correct macro, fix build on i386
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ioat/ioat_internal.h

Modified: head/sys/dev/ioat/ioat_internal.h
==
--- head/sys/dev/ioat/ioat_internal.h   Tue Oct 13 19:45:29 2015
(r289257)
+++ head/sys/dev/ioat/ioat_internal.h   Tue Oct 13 19:46:12 2015
(r289258)
@@ -65,7 +65,7 @@ ioat_bus_space_write_8_lower_first(bus_s
bus_space_write_4(tag, handle, offset + 4, val >> 32);
 }
 
-#ifdef i386
+#ifdef __i386__
 #define ioat_bus_space_read_8 ioat_bus_space_read_8_lower_first
 #define ioat_bus_space_write_8 ioat_bus_space_write_8_lower_first
 #else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289253 - head/share/mk

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 19:11:22 2015
New Revision: 289253
URL: https://svnweb.freebsd.org/changeset/base/289253

Log:
  bsd.subdir.mk: Handle cleanobj.
  
  Before this, the target was unknown.  Now it will recurse on subdirs and run
  the target in the current directory.  It is required to recurse as there
  may be subdirs that have objs in their directory or in the object directory,
  so it is not enough to just delete the objdir of the subdir parent.
  
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.subdir.mk

Modified: head/share/mk/bsd.subdir.mk
==
--- head/share/mk/bsd.subdir.mk Tue Oct 13 18:56:50 2015(r289252)
+++ head/share/mk/bsd.subdir.mk Tue Oct 13 19:11:22 2015(r289253)
@@ -86,7 +86,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
 # Work around parsing of .if nested in .for by putting .WAIT string into a var.
 __wait= .WAIT
 .for __target in all all-man checkdpadd clean cleandepend cleandir \
-cleanilinks depend distribute lint maninstall manlint obj objlink \
+cleanilinks cleanobj depend distribute lint maninstall manlint obj objlink 
\
 realinstall regress tags ${SUBDIR_TARGETS}
 .ifdef SUBDIR_PARALLEL
 __subdir_targets=
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289259 - head/sys/dev/ntb/if_ntb

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 19:46:54 2015
New Revision: 289259
URL: https://svnweb.freebsd.org/changeset/base/289259

Log:
  if_ntb: Fix build on i386
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 13 19:46:12 2015
(r289258)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 13 19:46:54 2015
(r289259)
@@ -1047,7 +1047,7 @@ ntb_transport_link_work(void *arg)
/* send the local info, in the opposite order of the way we read it */
for (i = 0; i < num_mw; i++) {
rc = ntb_write_remote_spad(ntb, IF_NTB_MW0_SZ_HIGH + (i * 2),
-   ntb_get_mw_size(ntb, i) >> 32);
+   (uint64_t)ntb_get_mw_size(ntb, i) >> 32);
if (rc != 0)
goto out;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289239 - head/usr.bin/truss

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:23:51 2015
New Revision: 289239
URL: https://svnweb.freebsd.org/changeset/base/289239

Log:
  Simplify syscall generation and ABI source file handling for the build.
  
  This is to make the Makefile more easily extendable for new ABIs.
  
  This also makes several other subtle changes:
-  The build now is given a list of ABIs to use based on the MACHINE_ARCH or
   MACHINE_CPUARCH.  These ABIs have a related path in sys/ that is used
   to generate their syscalls.  For each ABI to build check for a
   ABI.c, MACHINE_ARCH-ABI.c, or a MACHINE_CPUARCH-ABI.c.  This matches
   the old behavior needed for archs such as powerpc* and mips*.
-  The ABI source file selection allows for simpler assignment of common
   ABIs such as "fbsd32" from sys/compat/freebsd32, or cloudabi64.
- Expand 'fbsd' to 'freebsd' everywhere for consistency.
-  Split out the powerpc-fbsd.c file into a powerpc64-freebsd32.c to be more
   like the amd64-freebsd32.c file and to more easily allow the 
auto-generation
   of ABI handling to work.
-  Rename 'syscalls.h' to 'fbsd_syscalls.h' to lessen the ambiguity and
   avoid confusion with syscall.h (such as in r288997).
-  For non-native syscall header files, they are now renamed to be
   ABI_syscalls.h, where ABI is what ABI the Makefile is building.
-  Remove all of the makesyscalls config files.  The "native" one being
   name i386.conf was a long outstanding bug.  They were all the same
   except for the data they generated, so now it is just auto-generated
   as a build artifact.
-  The syscalls array is now fixed to be static in the syscalls header to
   remove the compiler warning about non-extern.  This was worked around
   in the aarch64-fbsd.c file but not the others.
-  All syscall table names are now just 'syscallnames' since they don't
   need to be different as they are all static in their own ABI files.  The
   alternative is to name them ABI_syscallnames which does not seem
   necessary.
  
  Reviewed by:  ed, jhb
  MFC after:3 weeks
  Differential Revision:https://reviews.freebsd.org/D3851

Added:
  head/usr.bin/truss/aarch64-freebsd.c
 - copied, changed from r289238, head/usr.bin/truss/aarch64-fbsd.c
  head/usr.bin/truss/amd64-freebsd.c
 - copied, changed from r289057, head/usr.bin/truss/amd64-fbsd.c
  head/usr.bin/truss/amd64-freebsd32.c
 - copied, changed from r289057, head/usr.bin/truss/amd64-fbsd32.c
  head/usr.bin/truss/arm-freebsd.c
 - copied, changed from r289057, head/usr.bin/truss/arm-fbsd.c
  head/usr.bin/truss/i386-freebsd.c
 - copied, changed from r289057, head/usr.bin/truss/i386-fbsd.c
  head/usr.bin/truss/makesyscallsconf.sh   (contents, props changed)
  head/usr.bin/truss/mips-freebsd.c
 - copied, changed from r289057, head/usr.bin/truss/mips-fbsd.c
  head/usr.bin/truss/powerpc-freebsd.c
 - copied, changed from r289057, head/usr.bin/truss/powerpc-fbsd.c
  head/usr.bin/truss/powerpc64-freebsd.c
 - copied, changed from r289057, head/usr.bin/truss/powerpc64-fbsd.c
  head/usr.bin/truss/powerpc64-freebsd32.c
 - copied, changed from r289057, head/usr.bin/truss/powerpc-fbsd.c
  head/usr.bin/truss/sparc64-freebsd.c
 - copied, changed from r289057, head/usr.bin/truss/sparc64-fbsd.c
Deleted:
  head/usr.bin/truss/aarch64-fbsd.c
  head/usr.bin/truss/amd64-fbsd.c
  head/usr.bin/truss/amd64-fbsd32.c
  head/usr.bin/truss/amd64cloudabi64.conf
  head/usr.bin/truss/amd64linux32.conf
  head/usr.bin/truss/arm-fbsd.c
  head/usr.bin/truss/fbsd32.conf
  head/usr.bin/truss/i386-fbsd.c
  head/usr.bin/truss/i386.conf
  head/usr.bin/truss/i386linux.conf
  head/usr.bin/truss/mips-fbsd.c
  head/usr.bin/truss/powerpc-fbsd.c
  head/usr.bin/truss/powerpc64-fbsd.c
  head/usr.bin/truss/sparc64-fbsd.c
Modified:
  head/usr.bin/truss/Makefile
  head/usr.bin/truss/Makefile.depend.amd64
  head/usr.bin/truss/amd64-cloudabi64.c
  head/usr.bin/truss/amd64-linux32.c
  head/usr.bin/truss/i386-linux.c

Modified: head/usr.bin/truss/Makefile
==
--- head/usr.bin/truss/Makefile Tue Oct 13 17:34:18 2015(r289238)
+++ head/usr.bin/truss/Makefile Tue Oct 13 18:23:51 2015(r289239)
@@ -2,87 +2,64 @@
 
 NO_WERROR=
 PROG=  truss
-SRCS=  main.c setup.c syscalls.c syscalls.h ioctl.c
-
-.if exists(${.CURDIR}/${MACHINE_ARCH}-fbsd.c)
-SRCS+= ${MACHINE_ARCH}-fbsd.c
-.else
-SRCS+= ${MACHINE_CPUARCH}-fbsd.c
-.endif
+SRCS=  main.c setup.c syscalls.c ioctl.c
 
 .PATH: ${.CURDIR:H}/kdump
 SRCS+= utrace.c
 
 CFLAGS+= -I${.CURDIR} -I. -I${.CURDIR}/../../sys
-CLEANFILES= syscalls.master syscalls.h ioctl.c
-
-.SUFFIXES: .master
-
-syscalls.master:   ${.CURDIR}/../../sys/kern/syscalls.master
-   cat ${.ALLSRC} > syscalls.master
-
-syscalls.h:syscalls.master
-   /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh syscalls.master \
-   

svn commit: r289240 - head/sys/netinet

2015-10-13 Thread Michael Tuexen
Author: tuexen
Date: Tue Oct 13 18:27:55 2015
New Revision: 289240
URL: https://svnweb.freebsd.org/changeset/base/289240

Log:
  Fix the timeout for INIT retransmissions in the case where RTO_MIN is
  smaller than RTO_INITIAL.
  
  MFC after:1 week

Modified:
  head/sys/netinet/sctp_timer.c

Modified: head/sys/netinet/sctp_timer.c
==
--- head/sys/netinet/sctp_timer.c   Tue Oct 13 18:23:51 2015
(r289239)
+++ head/sys/netinet/sctp_timer.c   Tue Oct 13 18:27:55 2015
(r289240)
@@ -408,7 +408,11 @@ sctp_backoff_on_timeout(struct sctp_tcb 
 int num_marked, int num_abandoned)
 {
if (net->RTO == 0) {
-   net->RTO = stcb->asoc.minrto;
+   if (net->RTO_measured) {
+   net->RTO = stcb->asoc.minrto;
+   } else {
+   net->RTO = stcb->asoc.initial_rto;
+   }
}
net->RTO <<= 1;
if (net->RTO > stcb->asoc.maxrto) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289243 - stable/9/gnu/usr.bin/binutils/ld

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:34:22 2015
New Revision: 289243
URL: https://svnweb.freebsd.org/changeset/base/289243

Log:
  MFC r288230,r288233:
  
r288230:
  Fix emulation ldscripts not being installed since r131832.
r288233:
  Fix subdir -j build after r287983 by adding missing dependencies.

Modified:
  stable/9/gnu/usr.bin/binutils/ld/Makefile
  stable/9/gnu/usr.bin/binutils/ld/Makefile.amd64
  stable/9/gnu/usr.bin/binutils/ld/Makefile.mips
  stable/9/gnu/usr.bin/binutils/ld/Makefile.powerpc64
  stable/9/gnu/usr.bin/binutils/ld/Makefile.sparc64
Directory Properties:
  stable/9/gnu/usr.bin/binutils/   (props changed)

Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile
==
--- stable/9/gnu/usr.bin/binutils/ld/Makefile   Tue Oct 13 18:32:47 2015
(r289242)
+++ stable/9/gnu/usr.bin/binutils/ld/Makefile   Tue Oct 13 18:34:22 2015
(r289243)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
+ELF_SCR_EXT=   x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw
 .include "../Makefile.inc0"
 .include 
 
@@ -46,9 +47,9 @@ CLEANFILES+=  ldemul-list.h stringify.sed
 
 HOST=  ${TARGET_TUPLE}
 LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\"
-ELF_SCR_EXT=   x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+=${NATIVE_EMULATION}.${ext}
+ldscripts/${NATIVE_EMULATION}.${ext}: e${NATIVE_EMULATION}.c
 .endfor
 
 EMXFR=

Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile.amd64
==
--- stable/9/gnu/usr.bin/binutils/ld/Makefile.amd64 Tue Oct 13 18:32:47 
2015(r289242)
+++ stable/9/gnu/usr.bin/binutils/ld/Makefile.amd64 Tue Oct 13 18:34:22 
2015(r289243)
@@ -16,6 +16,7 @@ _i386_path=   \"${TOOLS_PREFIX}/usr/lib32\
 EMS+=  ${X86_EMULATION}
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+=${X86_EMULATION}.${ext}
+ldscripts/${X86_EMULATION}.${ext}: e${X86_EMULATION}.c
 .endfor
 
 SRCS+= e${X86_EMULATION}.c

Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile.mips
==
--- stable/9/gnu/usr.bin/binutils/ld/Makefile.mips  Tue Oct 13 18:32:47 
2015(r289242)
+++ stable/9/gnu/usr.bin/binutils/ld/Makefile.mips  Tue Oct 13 18:34:22 
2015(r289243)
@@ -22,6 +22,7 @@ EMS+= ${abi}
 #.endif
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+= ${abi}.${ext}
+ldscripts/${abi}.${ext}: e${abi}.c
 .endfor
 SRCS+= e${abi}.c 
 CLEANFILES+=   e${abi}.c

Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile.powerpc64
==
--- stable/9/gnu/usr.bin/binutils/ld/Makefile.powerpc64 Tue Oct 13 18:32:47 
2015(r289242)
+++ stable/9/gnu/usr.bin/binutils/ld/Makefile.powerpc64 Tue Oct 13 18:34:22 
2015(r289243)
@@ -16,6 +16,7 @@ _ppc32_path=  \"${TOOLS_PREFIX}/usr/lib32
 EMS+=  ${PPC32_EMULATION}
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+=${PPC32_EMULATION}.${ext}
+ldscripts/${PPC32_EMULATION}.${ext}: e${PPC32_EMULATION}.c
 .endfor
 
 SRCS+= e${PPC32_EMULATION}.c

Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile.sparc64
==
--- stable/9/gnu/usr.bin/binutils/ld/Makefile.sparc64   Tue Oct 13 18:32:47 
2015(r289242)
+++ stable/9/gnu/usr.bin/binutils/ld/Makefile.sparc64   Tue Oct 13 18:34:22 
2015(r289243)
@@ -17,6 +17,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT
 EMS+=  elf${BITS}_sparc
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+=elf${BITS}_sparc.${ext}
+ldscripts/elf${BITS}_sparc.${ext}: eelf${BITS}_sparc.c
 .endfor
 
 SRCS+= eelf${BITS}_sparc.c
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289247 - stable/10/sbin/ipf

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:43:49 2015
New Revision: 289247
URL: https://svnweb.freebsd.org/changeset/base/289247

Log:
  MFC r288249:
  
Add SUBDIR_PARALLEL.

Modified:
  stable/10/sbin/ipf/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/ipf/Makefile
==
--- stable/10/sbin/ipf/Makefile Tue Oct 13 18:42:44 2015(r289246)
+++ stable/10/sbin/ipf/Makefile Tue Oct 13 18:43:49 2015(r289247)
@@ -1,6 +1,7 @@
 #  $FreeBSD$
 
-SUBDIR=libipf
+SUBDIR=libipf .WAIT
 SUBDIR+=   ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend
+SUBDIR_PARALLEL=
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289252 - in stable/10: kerberos5 kerberos5/lib kerberos5/libexec kerberos5/tools kerberos5/usr.bin kerberos5/usr.sbin usr.bin/svn usr.sbin/amd usr.sbin/bsdinstall usr.sbin/fifolog usr....

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:56:50 2015
New Revision: 289252
URL: https://svnweb.freebsd.org/changeset/base/289252

Log:
  MFC r288266:
  
Add more SUBDIR_PARALLEL.

Modified:
  stable/10/kerberos5/Makefile
  stable/10/kerberos5/lib/Makefile
  stable/10/kerberos5/libexec/Makefile
  stable/10/kerberos5/tools/Makefile
  stable/10/kerberos5/usr.bin/Makefile
  stable/10/kerberos5/usr.sbin/Makefile
  stable/10/usr.bin/svn/Makefile
  stable/10/usr.sbin/amd/Makefile
  stable/10/usr.sbin/bsdinstall/Makefile
  stable/10/usr.sbin/fifolog/Makefile
  stable/10/usr.sbin/lpr/Makefile
  stable/10/usr.sbin/pc-sysinstall/Makefile
  stable/10/usr.sbin/unbound/Makefile
  stable/10/usr.sbin/wpa/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/kerberos5/Makefile
==
--- stable/10/kerberos5/MakefileTue Oct 13 18:52:56 2015
(r289251)
+++ stable/10/kerberos5/MakefileTue Oct 13 18:56:50 2015
(r289252)
@@ -1,6 +1,8 @@
 # $FreeBSD$
 
-SUBDIR=doc lib libexec tools usr.bin usr.sbin
+SUBDIR=lib .WAIT \
+   doc libexec tools usr.bin usr.sbin
+SUBDIR_PARALLEL=
 
 # These are the programs which depend on Kerberos.
 KPROGS=lib/libpam \

Modified: stable/10/kerberos5/lib/Makefile
==
--- stable/10/kerberos5/lib/MakefileTue Oct 13 18:52:56 2015
(r289251)
+++ stable/10/kerberos5/lib/MakefileTue Oct 13 18:56:50 2015
(r289252)
@@ -5,4 +5,6 @@ SUBDIR= libasn1 libgssapi_krb5 libgssapi
libheimntlm libhx509 libkadm5clnt libkadm5srv libkafs5 libkrb5 \
libroken libsl libvers libkdc libwind libheimsqlite libheimbase 
libheimipcc libheimipcs
 
+SUBDIR_DEPEND_libkafs5=libkrb5
+
 .include 

Modified: stable/10/kerberos5/libexec/Makefile
==
--- stable/10/kerberos5/libexec/MakefileTue Oct 13 18:52:56 2015
(r289251)
+++ stable/10/kerberos5/libexec/MakefileTue Oct 13 18:56:50 2015
(r289252)
@@ -2,5 +2,6 @@
 
 SUBDIR=digest-service ipropd-master ipropd-slave hprop hpropd kadmind 
kdc \
kdigest kfd kimpersonate kpasswdd kcm
+SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/kerberos5/tools/Makefile
==
--- stable/10/kerberos5/tools/Makefile  Tue Oct 13 18:52:56 2015
(r289251)
+++ stable/10/kerberos5/tools/Makefile  Tue Oct 13 18:56:50 2015
(r289252)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
 SUBDIR=make-roken asn1_compile slc
+SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/kerberos5/usr.bin/Makefile
==
--- stable/10/kerberos5/usr.bin/MakefileTue Oct 13 18:52:56 2015
(r289251)
+++ stable/10/kerberos5/usr.bin/MakefileTue Oct 13 18:56:50 2015
(r289252)
@@ -2,5 +2,6 @@
 
 SUBDIR=hxtool kadmin kcc kdestroy kgetcred kf kinit kpasswd 
krb5-config ksu \
string2key verify_krb5_conf
+SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/kerberos5/usr.sbin/Makefile
==
--- stable/10/kerberos5/usr.sbin/Makefile   Tue Oct 13 18:52:56 2015
(r289251)
+++ stable/10/kerberos5/usr.sbin/Makefile   Tue Oct 13 18:56:50 2015
(r289252)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
 SUBDIR=iprop-log kstash ktutil
+SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/usr.bin/svn/Makefile
==
--- stable/10/usr.bin/svn/Makefile  Tue Oct 13 18:52:56 2015
(r289251)
+++ stable/10/usr.bin/svn/Makefile  Tue Oct 13 18:56:50 2015
(r289252)
@@ -1,5 +1,8 @@
 # $FreeBSD$
 
-SUBDIR = lib svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion 
svnmucc svnrdump
+SUBDIR = lib .WAIT \
+svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion \
+svnmucc svnrdump
+SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/usr.sbin/amd/Makefile
==
--- stable/10/usr.sbin/amd/Makefile Tue Oct 13 18:52:56 2015
(r289251)
+++ stable/10/usr.sbin/amd/Makefile Tue Oct 13 18:56:50 2015
(r289252)
@@ -5,7 +5,9 @@
 #
 # $FreeBSD$
 
-SUBDIR= include libamu amd amq doc fixmount fsinfo hlfsd mk-amd-map pawd \
+SUBDIR= include libamu .WAIT \
+   amd amq doc fixmount fsinfo hlfsd mk-amd-map pawd \
scripts wire-test
+SUBDIR_PARALLEL=
 
 .include 

Modified: stable/10/usr.sbin/bsdinstall/Makefile
==
--- stable/10/usr.sbin/bsdinstall/Makefile  Tue Oct 13 18:52:56 2015
(r289251)
+++ 

svn commit: r289221 - head/contrib/llvm/lib/Target/X86

2015-10-13 Thread Dimitry Andric
Author: dim
Date: Tue Oct 13 16:24:22 2015
New Revision: 289221
URL: https://svnweb.freebsd.org/changeset/base/289221

Log:
  Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio):
  
[x86] Fix wrong lowering of vsetcc nodes (PR25080).
  
Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
assumption that for non-AVX512 targets, the source type and destination type
of a type-legalized setcc node were always the same type.
  
This assumption was unfortunately incorrect; the type legalizer is not 
always
able to promote the return type of a setcc to the same type as the first
operand of a setcc.
  
In the case of a vsetcc node, the legalizer firstly checks if the first 
input
operand has a legal type. If so, then it promotes the return type of the 
vsetcc
to that same type. Otherwise, the return type is promoted to the 'next legal
type', which, for vectors of MVT::i1 is always a 128-bit integer vector 
type.
  
Example (-mattr=+avx):
  
  %0 = trunc <8 x i32> %a to <8 x i23>
  %1 = icmp eq <8 x i23> %0, zeroinitializer
  
The initial selection dag for the code above is:
  
v8i1 = setcc t5, t7, seteq:ch
  t5: v8i23 = truncate t2
t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
t7: v8i32 = build_vector of all zeroes.
  
The type legalizer would firstly check if 't5' has a legal type. If so, 
then it
would reuse that same type to promote the return type of the setcc node.
Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be 
used to
promote the return type of the setcc node. Consequently, the setcc return 
type
is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to 
the
following dag node:
  v8i16 = setcc t32, t25, seteq:ch
  
  where t32 and t25 are now values of type v8i32.
  
Before this patch, function LowerVSETCC would have wrongly expanded the 
setcc
to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
instruction. In our case, ISel would have matched a VPCMPEQWrr:
  t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25
  
However, t36 and t25 are both VR256, while the result type is instead of 
class
VR128. This inconsistency ended up causing the insertion of COPY 
instructions
like this:
  %vreg7 = COPY %vreg3; VR128:%vreg7 VR256:%vreg3
  
Which is an invalid full copy (not a sub register copy).
Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg 
copy
instruction" in the attempt to expand the malformed pseudo COPY 
instructions.
  
This patch fixes the problem adding the missing logic in LowerVSETCC to 
handle
the corner case of a setcc with 128-bit return type and 256-bit operand 
type.
  
This problem was originally reported by Dimitry as PR25080. It has been 
latent
for a very long time. I have added the minimal reproducible from that 
bugzilla
as test setcc-lowering.ll.
  
Differential Revision: http://reviews.llvm.org/D13660
  
  This should fix the "Cannot emit physreg copy instruction" errors when
  compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set
  to a CPU supporting AVX (e.g. sandybridge, ivybridge).

Modified:
  head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp

Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
==
--- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppTue Oct 13 
12:51:44 2015(r289220)
+++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppTue Oct 13 
16:24:22 2015(r289221)
@@ -13573,6 +13573,35 @@ static SDValue LowerVSETCC(SDValue Op, c
DAG.getConstant(SSECC, dl, MVT::i8));
   }
 
+  MVT VTOp0 = Op0.getSimpleValueType();
+  assert(VTOp0 == Op1.getSimpleValueType() &&
+ "Expected operands with same type!");
+  assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() &&
+ "Invalid number of packed elements for source and destination!");
+
+  if (VT.is128BitVector() && VTOp0.is256BitVector()) {
+// On non-AVX512 targets, a vector of MVT::i1 is promoted by the type
+// legalizer to a wider vector type.  In the case of 'vsetcc' nodes, the
+// legalizer firstly checks if the first operand in input to the setcc has
+// a legal type. If so, then it promotes the return type to that same type.
+// Otherwise, the return type is promoted to the 'next legal type' which,
+// for a vector of MVT::i1 is always a 128-bit integer vector type.
+//
+// We reach this code only if the following two conditions are met:
+// 1. Both return type and operand type have been promoted to wider types
+//by the type legalizer.
+// 2. The original operand type has been promoted to a 256-bit vector.
+//
+// Note that condition 2. only applies for AVX targets.
+SDValue NewOp 

svn commit: r289222 - head/contrib/llvm/patches

2015-10-13 Thread Dimitry Andric
Author: dim
Date: Tue Oct 13 16:25:02 2015
New Revision: 289222
URL: https://svnweb.freebsd.org/changeset/base/289222

Log:
  Add llvm patch corresponding to r289221.

Added:
  head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff

Added: head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff  Tue Oct 
13 16:25:02 2015(r289222)
@@ -0,0 +1,142 @@
+Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio):
+
+  [x86] Fix wrong lowering of vsetcc nodes (PR25080).
+
+  Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
+  assumption that for non-AVX512 targets, the source type and destination type
+  of a type-legalized setcc node were always the same type.
+
+  This assumption was unfortunately incorrect; the type legalizer is not always
+  able to promote the return type of a setcc to the same type as the first
+  operand of a setcc.
+
+  In the case of a vsetcc node, the legalizer firstly checks if the first input
+  operand has a legal type. If so, then it promotes the return type of the 
vsetcc
+  to that same type. Otherwise, the return type is promoted to the 'next legal
+  type', which, for vectors of MVT::i1 is always a 128-bit integer vector type.
+
+  Example (-mattr=+avx):
+
+%0 = trunc <8 x i32> %a to <8 x i23>
+%1 = icmp eq <8 x i23> %0, zeroinitializer
+
+  The initial selection dag for the code above is:
+
+  v8i1 = setcc t5, t7, seteq:ch
+t5: v8i23 = truncate t2
+  t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
+  t7: v8i32 = build_vector of all zeroes.
+
+  The type legalizer would firstly check if 't5' has a legal type. If so, then 
it
+  would reuse that same type to promote the return type of the setcc node.
+  Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used 
to
+  promote the return type of the setcc node. Consequently, the setcc return 
type
+  is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the
+  following dag node:
+v8i16 = setcc t32, t25, seteq:ch
+
+where t32 and t25 are now values of type v8i32.
+
+  Before this patch, function LowerVSETCC would have wrongly expanded the setcc
+  to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
+  instruction. In our case, ISel would have matched a VPCMPEQWrr:
+t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25
+
+  However, t36 and t25 are both VR256, while the result type is instead of 
class
+  VR128. This inconsistency ended up causing the insertion of COPY instructions
+  like this:
+%vreg7 = COPY %vreg3; VR128:%vreg7 VR256:%vreg3
+
+  Which is an invalid full copy (not a sub register copy).
+  Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg 
copy
+  instruction" in the attempt to expand the malformed pseudo COPY instructions.
+
+  This patch fixes the problem adding the missing logic in LowerVSETCC to 
handle
+  the corner case of a setcc with 128-bit return type and 256-bit operand type.
+
+  This problem was originally reported by Dimitry as PR25080. It has been 
latent
+  for a very long time. I have added the minimal reproducible from that 
bugzilla
+  as test setcc-lowering.ll.
+
+  Differential Revision: http://reviews.llvm.org/D13660
+
+This should fix the "Cannot emit physreg copy instruction" errors when
+compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set
+to a CPU supporting AVX (e.g. sandybridge, ivybridge).
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/289221
+
+Index: lib/Target/X86/X86ISelLowering.cpp
+===
+--- lib/Target/X86/X86ISelLowering.cpp
 lib/Target/X86/X86ISelLowering.cpp
+@@ -13573,6 +13573,35 @@ static SDValue LowerVSETCC(SDValue Op, const X86Su
+DAG.getConstant(SSECC, dl, MVT::i8));
+   }
+ 
++  MVT VTOp0 = Op0.getSimpleValueType();
++  assert(VTOp0 == Op1.getSimpleValueType() &&
++ "Expected operands with same type!");
++  assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() &&
++ "Invalid number of packed elements for source and destination!");
++
++  if (VT.is128BitVector() && VTOp0.is256BitVector()) {
++// On non-AVX512 targets, a vector of MVT::i1 is promoted by the type
++// legalizer to a wider vector type.  In the case of 'vsetcc' nodes, the
++// legalizer firstly checks if the first operand in input to the setcc has
++// a legal type. If so, then it promotes the return type to that same 
type.
++// Otherwise, the return type is promoted to the 'next legal type' which,
++// for a vector of MVT::i1 is always a 128-bit integer vector type.
++//
++// We reach this code only if the following two conditions are met:
++

svn commit: r289231 - head/sys/dev/ixl

2015-10-13 Thread Sean Bruno
Author: sbruno
Date: Tue Oct 13 17:20:05 2015
New Revision: 289231
URL: https://svnweb.freebsd.org/changeset/base/289231

Log:
  ixl(4): Remove compile warning for unused function.
  
  sys/dev/ixl/if_ixl.c:4377:1: warning: unused function 'ixl_debug_info' 
[-Wunused-function]
  ixl_debug_info(SYSCTL_HANDLER_ARGS)
  
  Differential Revision:https://reviews.freebsd.org/D3718
  Submitted by: bz

Modified:
  head/sys/dev/ixl/if_ixl.c

Modified: head/sys/dev/ixl/if_ixl.c
==
--- head/sys/dev/ixl/if_ixl.c   Tue Oct 13 17:18:26 2015(r289230)
+++ head/sys/dev/ixl/if_ixl.c   Tue Oct 13 17:20:05 2015(r289231)
@@ -160,8 +160,10 @@ static voidixl_free_mac_filters(struct 
 
 
 /* Sysctl debug interface */
+#ifdef IXL_DEBUG_SYSCTL
 static int ixl_debug_info(SYSCTL_HANDLER_ARGS);
 static voidixl_print_debug_info(struct ixl_pf *);
+#endif
 
 /* The MSI/X Interrupt handlers */
 static voidixl_intr(void *);
@@ -4373,6 +4375,7 @@ ixl_do_adminq(void *context, int pending
IXL_PF_UNLOCK(pf);
 }
 
+#ifdef IXL_DEBUG_SYSCTL
 static int
 ixl_debug_info(SYSCTL_HANDLER_ARGS)
 {
@@ -4437,6 +4440,7 @@ ixl_print_debug_info(struct ixl_pf *pf)
reg = rd32(hw, I40E_GLPRT_MLFC(hw->port));
 printf("mac local fault = %x\n", reg);
 }
+#endif
 
 /**
  * Update VSI-specific ethernet statistics counters.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289241 - stable/10/gnu/usr.bin/binutils/ld

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:31:23 2015
New Revision: 289241
URL: https://svnweb.freebsd.org/changeset/base/289241

Log:
  MFC r288230,r288233:
  
r288230:
  Fix emulation ldscripts not being installed since r131832.
r288233:
  Fix subdir -j build after r287983 by adding missing dependencies.

Modified:
  stable/10/gnu/usr.bin/binutils/ld/Makefile
  stable/10/gnu/usr.bin/binutils/ld/Makefile.amd64
  stable/10/gnu/usr.bin/binutils/ld/Makefile.mips
  stable/10/gnu/usr.bin/binutils/ld/Makefile.powerpc64
  stable/10/gnu/usr.bin/binutils/ld/Makefile.sparc64
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile
==
--- stable/10/gnu/usr.bin/binutils/ld/Makefile  Tue Oct 13 18:27:55 2015
(r289240)
+++ stable/10/gnu/usr.bin/binutils/ld/Makefile  Tue Oct 13 18:31:23 2015
(r289241)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
+ELF_SCR_EXT=   x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw
 .include "../Makefile.inc0"
 .include 
 
@@ -51,9 +52,9 @@ CLEANFILES+=  ldemul-list.h stringify.sed
 
 HOST=  ${TARGET_TUPLE}
 LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\"
-ELF_SCR_EXT=   x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+=${NATIVE_EMULATION}.${ext}
+ldscripts/${NATIVE_EMULATION}.${ext}: e${NATIVE_EMULATION}.c
 .endfor
 
 EMXFR=

Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile.amd64
==
--- stable/10/gnu/usr.bin/binutils/ld/Makefile.amd64Tue Oct 13 18:27:55 
2015(r289240)
+++ stable/10/gnu/usr.bin/binutils/ld/Makefile.amd64Tue Oct 13 18:31:23 
2015(r289241)
@@ -16,6 +16,7 @@ _i386_path=   \"${TOOLS_PREFIX}/usr/lib32\
 EMS+=  ${X86_EMULATION}
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+=${X86_EMULATION}.${ext}
+ldscripts/${X86_EMULATION}.${ext}: e${X86_EMULATION}.c
 .endfor
 
 SRCS+= e${X86_EMULATION}.c

Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile.mips
==
--- stable/10/gnu/usr.bin/binutils/ld/Makefile.mips Tue Oct 13 18:27:55 
2015(r289240)
+++ stable/10/gnu/usr.bin/binutils/ld/Makefile.mips Tue Oct 13 18:31:23 
2015(r289241)
@@ -22,6 +22,7 @@ EMS+= ${abi}
 #.endif
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+= ${abi}.${ext}
+ldscripts/${abi}.${ext}: e${abi}.c
 .endfor
 SRCS+= e${abi}.c 
 CLEANFILES+=   e${abi}.c

Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile.powerpc64
==
--- stable/10/gnu/usr.bin/binutils/ld/Makefile.powerpc64Tue Oct 13 
18:27:55 2015(r289240)
+++ stable/10/gnu/usr.bin/binutils/ld/Makefile.powerpc64Tue Oct 13 
18:31:23 2015(r289241)
@@ -16,6 +16,7 @@ _ppc32_path=  \"${TOOLS_PREFIX}/usr/lib32
 EMS+=  ${PPC32_EMULATION}
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+=${PPC32_EMULATION}.${ext}
+ldscripts/${PPC32_EMULATION}.${ext}: e${PPC32_EMULATION}.c
 .endfor
 
 SRCS+= e${PPC32_EMULATION}.c

Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile.sparc64
==
--- stable/10/gnu/usr.bin/binutils/ld/Makefile.sparc64  Tue Oct 13 18:27:55 
2015(r289240)
+++ stable/10/gnu/usr.bin/binutils/ld/Makefile.sparc64  Tue Oct 13 18:31:23 
2015(r289241)
@@ -17,6 +17,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT
 EMS+=  elf${BITS}_sparc
 .for ext in ${ELF_SCR_EXT}
 LDSCRIPTS+=elf${BITS}_sparc.${ext}
+ldscripts/elf${BITS}_sparc.${ext}: eelf${BITS}_sparc.c
 .endfor
 
 SRCS+= eelf${BITS}_sparc.c
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289245 - in stable/10/sbin/ipf: . iptest rules

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:40:46 2015
New Revision: 289245
URL: https://svnweb.freebsd.org/changeset/base/289245

Log:
  MFC r288248:
  
Remove disconnected directories.

Deleted:
  stable/10/sbin/ipf/iptest/
  stable/10/sbin/ipf/rules/
Modified:
  stable/10/sbin/ipf/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/ipf/Makefile
==
--- stable/10/sbin/ipf/Makefile Tue Oct 13 18:34:58 2015(r289244)
+++ stable/10/sbin/ipf/Makefile Tue Oct 13 18:40:46 2015(r289245)
@@ -1,8 +1,6 @@
 #  $FreeBSD$
 
-#.WAIT
 SUBDIR=libipf
 SUBDIR+=   ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend
-#SUBDIR+=  ipsend iptest rules
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289249 - stable/10/etc/rc.d

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:46:11 2015
New Revision: 289249
URL: https://svnweb.freebsd.org/changeset/base/289249

Log:
  MFC r288390:
  
When stopping ugidfw, it is not enough to just try unloading the module.  If
the module is built-in to the kernel then the kldunload will fail.  Rather
than do this just check if there are rules and then remove them all.
  
  Relnotes: yes

Modified:
  stable/10/etc/rc.d/ugidfw
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/ugidfw
==
--- stable/10/etc/rc.d/ugidfw   Tue Oct 13 18:44:55 2015(r289248)
+++ stable/10/etc/rc.d/ugidfw   Tue Oct 13 18:46:11 2015(r289249)
@@ -3,6 +3,7 @@
 # $FreeBSD$
 
 # PROVIDE: ugidfw
+# REQUIRE: FILESYSTEMS
 # BEFORE: LOGIN
 # KEYWORD: nojail shutdown
 
@@ -33,9 +34,17 @@ ugidfw_start()
 
 ugidfw_stop()
 {
+   local rulecount
+
# Disable the policy
#
-   kldunload mac_bsdextended
+   # Check for the existence of rules and flush them if needed.
+   rulecount=$(sysctl -in security.mac.bsdextended.rule_count)
+   if [ ${rulecount:-0} -gt 0 ]; then
+   ugidfw list | sed -n '2,$p' | cut -d ' ' -f 1 | sort -r -n |
+   xargs -n 1 ugidfw remove
+   echo "MAC bsdextended rules flushed."
+   fi
 }
 
 load_rc_config $name
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289248 - stable/10

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:44:55 2015
New Revision: 289248
URL: https://svnweb.freebsd.org/changeset/base/289248

Log:
  MFC r288391:
  
Fix the .MAKE added in r251750 to properly support the historical -n -n.

Modified:
  stable/10/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile
==
--- stable/10/Makefile  Tue Oct 13 18:43:49 2015(r289247)
+++ stable/10/Makefile  Tue Oct 13 18:44:55 2015(r289248)
@@ -245,9 +245,9 @@ cleanworld:
 # Handle the user-driven targets, using the source relative mk files.
 #
 
-.if empty(.MAKEFLAGS:M-n)
+.if !(!empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n")
 # skip this for -n to avoid changing previous behavior of 
-# 'make -n buildworld' etc.
+# 'make -n buildworld' etc.  Using -n -n will run it.
 ${TGTS}: .MAKE
 tinderbox toolchains kernel-toolchains: .MAKE
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289250 - stable/9/etc/rc.d

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:47:05 2015
New Revision: 289250
URL: https://svnweb.freebsd.org/changeset/base/289250

Log:
  MFC r288390:
  
When stopping ugidfw, it is not enough to just try unloading the module.  If
the module is built-in to the kernel then the kldunload will fail.  Rather
than do this just check if there are rules and then remove them all.
  
  Relnotes: yes

Modified:
  stable/9/etc/rc.d/ugidfw
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/etc/rc.d/   (props changed)

Modified: stable/9/etc/rc.d/ugidfw
==
--- stable/9/etc/rc.d/ugidfwTue Oct 13 18:46:11 2015(r289249)
+++ stable/9/etc/rc.d/ugidfwTue Oct 13 18:47:05 2015(r289250)
@@ -3,6 +3,7 @@
 # $FreeBSD$
 
 # PROVIDE: ugidfw
+# REQUIRE: FILESYSTEMS
 # BEFORE: LOGIN
 # KEYWORD: nojail shutdown
 
@@ -33,9 +34,17 @@ ugidfw_start()
 
 ugidfw_stop()
 {
+   local rulecount
+
# Disable the policy
#
-   kldunload mac_bsdextended
+   # Check for the existence of rules and flush them if needed.
+   rulecount=$(sysctl -in security.mac.bsdextended.rule_count)
+   if [ ${rulecount:-0} -gt 0 ]; then
+   ugidfw list | sed -n '2,$p' | cut -d ' ' -f 1 | sort -r -n |
+   xargs -n 1 ugidfw remove
+   echo "MAC bsdextended rules flushed."
+   fi
 }
 
 load_rc_config $name
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289242 - stable/10/gnu/usr.bin/binutils/ld

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:32:47 2015
New Revision: 289242
URL: https://svnweb.freebsd.org/changeset/base/289242

Log:
  MFC r287983,r288075:
  
r287983:
  Replace afterinstall: hack with FILES mechanism.
r288075:
  Use SHAREOWN/SHAREMODE/SHAREGRP rather than LIB* as these are plain ASCII
  scripts that the linker can load rather than binary library objects.

Modified:
  stable/10/gnu/usr.bin/binutils/ld/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/gnu/usr.bin/binutils/ld/Makefile
==
--- stable/10/gnu/usr.bin/binutils/ld/Makefile  Tue Oct 13 18:31:23 2015
(r289241)
+++ stable/10/gnu/usr.bin/binutils/ld/Makefile  Tue Oct 13 18:32:47 2015
(r289242)
@@ -50,6 +50,9 @@ LDADD=${DPADD}
 CLEANDIRS+=ldscripts
 CLEANFILES+=   ldemul-list.h stringify.sed
 
+FILES= ${LDSCRIPTS:S|^|ldscripts/|}
+FILESDIR=  ${SCRIPTDIR}
+
 HOST=  ${TARGET_TUPLE}
 LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\"
 .for ext in ${ELF_SCR_EXT}
@@ -71,8 +74,4 @@ ldemul-list.h:
 stringify.sed:
ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET}
 
-afterinstall:
-   ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-   ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}
-
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289244 - stable/9/gnu/usr.bin/binutils/ld

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:34:58 2015
New Revision: 289244
URL: https://svnweb.freebsd.org/changeset/base/289244

Log:
  MFC r287983,r288075:
  
r287983:
  Replace afterinstall: hack with FILES mechanism.
r288075:
  Use SHAREOWN/SHAREMODE/SHAREGRP rather than LIB* as these are plain ASCII
  scripts that the linker can load rather than binary library objects.

Modified:
  stable/9/gnu/usr.bin/binutils/ld/Makefile
Directory Properties:
  stable/9/gnu/usr.bin/binutils/   (props changed)

Modified: stable/9/gnu/usr.bin/binutils/ld/Makefile
==
--- stable/9/gnu/usr.bin/binutils/ld/Makefile   Tue Oct 13 18:34:22 2015
(r289243)
+++ stable/9/gnu/usr.bin/binutils/ld/Makefile   Tue Oct 13 18:34:58 2015
(r289244)
@@ -45,6 +45,9 @@ LDADD=${DPADD}
 CLEANDIRS+=ldscripts
 CLEANFILES+=   ldemul-list.h stringify.sed
 
+FILES= ${LDSCRIPTS:S|^|ldscripts/|}
+FILESDIR=  ${SCRIPTDIR}
+
 HOST=  ${TARGET_TUPLE}
 LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\"
 .for ext in ${ELF_SCR_EXT}
@@ -66,8 +69,4 @@ ldemul-list.h:
 stringify.sed:
ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET}
 
-afterinstall:
-   ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-   ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}
-
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289246 - in stable/9/sbin/ipf: . iptest rules

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:42:44 2015
New Revision: 289246
URL: https://svnweb.freebsd.org/changeset/base/289246

Log:
  MFC r288248:
  
Remove disconnected directories.

Deleted:
  stable/9/sbin/ipf/iptest/
  stable/9/sbin/ipf/rules/
Modified:
  stable/9/sbin/ipf/Makefile
Directory Properties:
  stable/9/sbin/ipf/   (props changed)

Modified: stable/9/sbin/ipf/Makefile
==
--- stable/9/sbin/ipf/Makefile  Tue Oct 13 18:40:46 2015(r289245)
+++ stable/9/sbin/ipf/Makefile  Tue Oct 13 18:42:44 2015(r289246)
@@ -1,8 +1,6 @@
 #  $FreeBSD$
 
-#.WAIT
 SUBDIR=libipf
 SUBDIR+=   ipf ipfs ipfstat ipftest ipmon ipnat ippool ipresend
-#SUBDIR+=  ipsend iptest rules
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289251 - head/kerberos5/lib

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 13 18:52:56 2015
New Revision: 289251
URL: https://svnweb.freebsd.org/changeset/base/289251

Log:
  Partially revert r288266: Remove SUBDIR_PARALLEL from kerberos5/lib.
  
  I intended to remove this before committing r288266.  It works but is clearly
  wrong and working by accident due to the dependencies listed in the root
  Makefile.inc1 file.

Modified:
  head/kerberos5/lib/Makefile

Modified: head/kerberos5/lib/Makefile
==
--- head/kerberos5/lib/Makefile Tue Oct 13 18:47:05 2015(r289250)
+++ head/kerberos5/lib/Makefile Tue Oct 13 18:52:56 2015(r289251)
@@ -7,6 +7,5 @@ SUBDIR= libasn1 libgssapi_krb5 libgssapi
 
 SUBDIR+= libkafs5  # requires krb_err.h from libkrb5
 SUBDIR_DEPEND_libkafs5=libkrb5
-SUBDIR_PARALLEL=
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289265 - head/sys/dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 20:54:38 2015
New Revision: 289265
URL: https://svnweb.freebsd.org/changeset/base/289265

Log:
  NTB: MFV b1ef0043: Remove References of non-B2B BWD HW
  
  NTB-RP is not a supported configuration on BWD hardware.  Remove the
  code attempting to set it up.
  
  Authored by:  Jon Mason
  Obtained from:Linux (dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_regs.h

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 20:45:29 2015
(r289264)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 20:54:38 2015
(r289265)
@@ -810,10 +810,9 @@ ntb_setup_soc(struct ntb_softc *ntb)
case NTB_CONN_B2B:
ntb->conn_type = NTB_CONN_B2B;
break;
-   case NTB_CONN_RP:
default:
-   device_printf(ntb->device, "Connection type %d not supported\n",
-   connection_type);
+   device_printf(ntb->device,
+   "Unsupported NTB configuration (%d)\n", connection_type);
return (ENXIO);
}
 
@@ -828,23 +827,16 @@ ntb_setup_soc(struct ntb_softc *ntb)
 
ntb->reg_ofs.ldb = SOC_PDOORBELL_OFFSET;
ntb->reg_ofs.ldb_mask= SOC_PDBMSK_OFFSET;
+   ntb->reg_ofs.rdb = SOC_B2B_DOORBELL_OFFSET;
ntb->reg_ofs.bar2_xlat   = SOC_SBAR2XLAT_OFFSET;
ntb->reg_ofs.bar4_xlat   = SOC_SBAR4XLAT_OFFSET;
ntb->reg_ofs.lnk_cntl= SOC_NTBCNTL_OFFSET;
ntb->reg_ofs.lnk_stat= SOC_LINK_STATUS_OFFSET;
ntb->reg_ofs.spad_local  = SOC_SPAD_OFFSET;
+   ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET;
ntb->reg_ofs.spci_cmd= SOC_PCICMD_OFFSET;
 
-   if (ntb->conn_type == NTB_CONN_B2B) {
-   ntb->reg_ofs.rdb = SOC_B2B_DOORBELL_OFFSET;
-   ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET;
-   ntb->limits.max_spads= SOC_MAX_SPADS;
-   } else {
-   ntb->reg_ofs.rdb = SOC_PDOORBELL_OFFSET;
-   ntb->reg_ofs.spad_remote = SOC_SPAD_OFFSET;
-   ntb->limits.max_spads= SOC_MAX_COMPAT_SPADS;
-   }
-
+   ntb->limits.max_spads= SOC_MAX_SPADS;
ntb->limits.max_db_bits  = SOC_MAX_DB_BITS;
ntb->limits.msix_cnt = SOC_MSIX_CNT;
ntb->bits_per_vector = SOC_DB_BITS_PER_VEC;

Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h
==
--- head/sys/dev/ntb/ntb_hw/ntb_regs.h  Tue Oct 13 20:45:29 2015
(r289264)
+++ head/sys/dev/ntb/ntb_hw/ntb_regs.h  Tue Oct 13 20:54:38 2015
(r289265)
@@ -75,7 +75,6 @@
 
 #define SOC_MSIX_CNT   34
 #define SOC_MAX_SPADS  16
-#define SOC_MAX_COMPAT_SPADS   16
 #define SOC_MAX_DB_BITS34
 #define SOC_DB_BITS_PER_VEC1
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289266 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 20:55:21 2015
New Revision: 289266
URL: https://svnweb.freebsd.org/changeset/base/289266

Log:
  NTB: MFV f9a2cf89: Comment Fix
  
  Add "data" ntb_register_db_callback parameter description comment and
  correct poor speling.
  
  Authored by:  Jon Mason
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 13 20:54:38 2015
(r289265)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 13 20:55:21 2015
(r289266)
@@ -715,7 +715,7 @@ ntb_transport_link_up(struct ntb_transpo
  * @len: length of the data buffer
  *
  * Enqueue a new transmit buffer onto the transport queue from which a NTB
- * payload will be transmitted.  This assumes that a lock is behing held to
+ * payload will be transmitted.  This assumes that a lock is being held to
  * serialize access to the qp.
  *
  * RETURNS: An appropriate ERRNO error value on error, or zero for success.
@@ -1311,7 +1311,7 @@ ntb_qp_link_cleanup(struct ntb_transport
  *
  * Notify NTB transport layer of client's desire to no longer receive data on
  * transport queue specified.  It is the client's responsibility to ensure all
- * entries on queue are purged or otherwise handled appropraitely.
+ * entries on queue are purged or otherwise handled appropriately.
  */
 static void
 ntb_transport_link_down(struct ntb_transport_qp *qp)

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 20:54:38 2015
(r289265)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 20:55:21 2015
(r289266)
@@ -1140,6 +1140,7 @@ ntb_unregister_event_callback(struct ntb
  * ntb_register_db_callback() - register a callback for doorbell interrupt
  * @ntb: pointer to ntb_softc instance
  * @idx: doorbell index to register callback, zero based
+ * @data: pointer to be returned to caller with every callback
  * @func: callback function to register
  *
  * This function registers a callback function for the doorbell interrupt
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289266 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-10-13 Thread Conrad Meyer
On Tue, Oct 13, 2015 at 1:55 PM, Conrad E. Meyer  wrote:
> Author: cem
> Date: Tue Oct 13 20:55:21 2015
> New Revision: 289266
> URL: https://svnweb.freebsd.org/changeset/base/289266
>
> Log:
>   NTB: MFV f9a2cf89: Comment Fix

This catches us up to the dual-licensed BSD/GPL Linux driver as of Nov
14, 2013 (minus support for some Xeon configurations and minus I/OAT
DMA offload for if_ntb).

Best,
Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289253 - head/share/mk

2015-10-13 Thread Bryan Drewery
On 10/13/2015 1:37 PM, Garrett Cooper wrote:
> 
> 
>> On Oct 13, 2015, at 12:11, Bryan Drewery  wrote:
>>
>> Author: bdrewery
>> Date: Tue Oct 13 19:11:22 2015
>> New Revision: 289253
>> URL: https://svnweb.freebsd.org/changeset/base/289253
>>
>> Log:
>>  bsd.subdir.mk: Handle cleanobj.
>>
>>  Before this, the target was unknown.  Now it will recurse on subdirs and run
>>  the target in the current directory.  It is required to recurse as there
>>  may be subdirs that have objs in their directory or in the object directory,
>>  so it is not enough to just delete the objdir of the subdir parent.
>>
>>  MFC after:2 weeks
>>  Sponsored by:EMC / Isilon Storage Division
>>
>> Modified:
>>  head/share/mk/bsd.subdir.mk
>>
>> Modified: head/share/mk/bsd.subdir.mk
>> ==
>> --- head/share/mk/bsd.subdir.mkTue Oct 13 18:56:50 2015(r289252)
>> +++ head/share/mk/bsd.subdir.mkTue Oct 13 19:11:22 2015(r289253)
>> @@ -86,7 +86,7 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE
>> # Work around parsing of .if nested in .for by putting .WAIT string into a 
>> var.
>> __wait= .WAIT
>> .for __target in all all-man checkdpadd clean cleandepend cleandir \
>> -cleanilinks depend distribute lint maninstall manlint obj objlink \
>> +cleanilinks cleanobj depend distribute lint maninstall manlint obj 
>> objlink \
>> realinstall regress tags ${SUBDIR_TARGETS}
>> .ifdef SUBDIR_PARALLEL
>> __subdir_targets=
>>
> 

You sent no text...

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r289275 - head/tools/build/options

2015-10-13 Thread Ed Maste
Author: emaste
Date: Wed Oct 14 00:23:31 2015
New Revision: 289275
URL: https://svnweb.freebsd.org/changeset/base/289275

Log:
  Add WITHOUT_LLDB for src.conf(5)
  
  It will be enabled by default on certain architectures.

Added:
  head/tools/build/options/WITHOUT_LLDB   (contents, props changed)

Added: head/tools/build/options/WITHOUT_LLDB
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_LLDB   Wed Oct 14 00:23:31 2015
(r289275)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to not build the LLDB debugger.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289277 - head/share/mk

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 14 00:36:33 2015
New Revision: 289277
URL: https://svnweb.freebsd.org/changeset/base/289277

Log:
  Add a note about the mysterious files/includes/config block.
  
  This originated from r96668.

Modified:
  head/share/mk/bsd.subdir.mk

Modified: head/share/mk/bsd.subdir.mk
==
--- head/share/mk/bsd.subdir.mk Wed Oct 14 00:35:37 2015(r289276)
+++ head/share/mk/bsd.subdir.mk Wed Oct 14 00:36:33 2015(r289277)
@@ -123,6 +123,9 @@ _sub.${__target}: _SUBDIR
 .endif
 .endfor
 
+# This is to support 'make includes' calling 'make buildincludes' and
+# 'make installincludes' in the proper order, and to support these
+# targets as SUBDIR_TARGETS.
 .for __target in files includes config
 .for __stage in build install
 ${__stage}${__target}:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289276 - in head/sys: conf kern netinet sys

2015-10-13 Thread Hiren Panchasara
Author: hiren
Date: Wed Oct 14 00:35:37 2015
New Revision: 289276
URL: https://svnweb.freebsd.org/changeset/base/289276

Log:
  There are times when it would be really nice to have a record of the last few
  packets and/or state transitions from each TCP socket. That would help with
  narrowing down certain problems we see in the field that are hard to reproduce
  without understanding the history of how we got into a certain state. This
  change provides just that.
  
  It saves copies of the last N packets in a list in the tcpcb. When the tcpcb 
is
  destroyed, the list is freed. I thought this was likely to be more
  performance-friendly than saving copies of the tcpcb. Plus, with the packets,
  you should be able to reverse-engineer what happened to the tcpcb.
  
  To enable the feature, you will need to compile a kernel with the TCPPCAP
  option. Even then, the feature defaults to being deactivated. You can activate
  it by setting a positive value for the number of captured packets. You can do
  that on either a global basis or on a per-socket basis (via a setsockopt 
call).
  
  There is no way to get the packets out of the kernel other than using kmem or
  getting a coredump. I thought that would help some of the legal/privacy 
concerns
  regarding such a feature. However, it should be possible to add a future 
effort
  to export them in PCAP format.
  
  I tested this at low scale, and found that there were no mbuf leaks and the 
peak
  mbuf usage appeared to be unchanged with and without the feature.
  
  The main performance concern I can envision is the number of mbufs that would 
be
  used on systems with a large number of sockets. If you save five packets per
  direction per socket and have 3,000 sockets, that will consume at least 30,000
  mbufs just to keep these packets. I tried to reduce the concerns associated 
with
  this by limiting the number of clusters (not mbufs) that could be used for 
this
  feature. Again, in my testing, that appears to work correctly.
  
  Differential Revision:D3100
  Submitted by: Jonathan Looney 
  Reviewed by:  gnn, hiren

Added:
  head/sys/netinet/tcp_pcap.c   (contents, props changed)
  head/sys/netinet/tcp_pcap.h   (contents, props changed)
Modified:
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/conf/options
  head/sys/kern/uipc_mbuf.c
  head/sys/netinet/tcp.h
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_output.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_usrreq.c
  head/sys/netinet/tcp_var.h
  head/sys/sys/mbuf.h

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Wed Oct 14 00:23:31 2015(r289275)
+++ head/sys/conf/NOTES Wed Oct 14 00:35:37 2015(r289276)
@@ -960,6 +960,9 @@ device  lagg
 # for sockets with the SO_DEBUG option set, which can then be examined
 # using the trpt(8) utility.
 #
+# TCPPCAP enables code which keeps the last n packets sent and received
+# on a TCP socket.
+#
 # RADIX_MPATH provides support for equal-cost multi-path routing.
 #
 optionsMROUTING# Multicast routing
@@ -976,6 +979,7 @@ options IPFILTER_DEFAULT_BLOCK  #block a
 optionsIPSTEALTH   #support for stealth forwarding
 optionsPF_DEFAULT_TO_DROP  #drop everything by default
 optionsTCPDEBUG
+optionsTCPPCAP
 optionsRADIX_MPATH
 
 # The MBUF_STRESS_TEST option enables options which create

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed Oct 14 00:23:31 2015(r289275)
+++ head/sys/conf/files Wed Oct 14 00:35:37 2015(r289276)
@@ -3682,6 +3682,7 @@ netinet/tcp_input.c   optional inet | ine
 netinet/tcp_lro.c  optional inet | inet6
 netinet/tcp_output.c   optional inet | inet6
 netinet/tcp_offload.c  optional tcp_offload inet | tcp_offload inet6
+netinet/tcp_pcap.c optional tcppcap
 netinet/tcp_reass.coptional inet | inet6
 netinet/tcp_sack.c optional inet | inet6
 netinet/tcp_subr.c optional inet | inet6

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Wed Oct 14 00:23:31 2015(r289275)
+++ head/sys/conf/options   Wed Oct 14 00:35:37 2015(r289276)
@@ -436,6 +436,7 @@ ROUTETABLES opt_route.h
 RSSopt_rss.h
 SLIP_IFF_OPTS  opt_slip.h
 TCPDEBUG
+TCPPCAPopt_global.h
 SIFTR
 TCP_OFFLOADopt_inet.h # Enable code to dispatch TCP offloading
 TCP_SIGNATURE  opt_inet.h

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Wed Oct 14 00:23:31 2015(r289275)
+++ 

svn commit: r289278 - head/share/mk

2015-10-13 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 14 00:43:29 2015
New Revision: 289278
URL: https://svnweb.freebsd.org/changeset/base/289278

Log:
  Correct a comment in bsd.incs.mk forgotten in r274662 and copied into 
bsd.confs.mk.
  
  The bsd.confs.mk may be wrong but for now fix it.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.confs.mk
  head/share/mk/bsd.incs.mk

Modified: head/share/mk/bsd.confs.mk
==
--- head/share/mk/bsd.confs.mk  Wed Oct 14 00:36:33 2015(r289277)
+++ head/share/mk/bsd.confs.mk  Wed Oct 14 00:43:29 2015(r289278)
@@ -84,4 +84,4 @@ STAGE_TARGETS+= stage_config
 .endif
 .endif
 
-.endif # ${MK_TOOLCHAIN} != "no"
+.endif # ${MK_INCLUDES} != "no"

Modified: head/share/mk/bsd.incs.mk
==
--- head/share/mk/bsd.incs.mk   Wed Oct 14 00:36:33 2015(r289277)
+++ head/share/mk/bsd.incs.mk   Wed Oct 14 00:43:29 2015(r289278)
@@ -99,4 +99,4 @@ STAGE_SYMLINKS.INCS= ${INCSLINKS}
 .endif
 .endif
 
-.endif # ${MK_TOOLCHAIN} != "no"
+.endif # ${MK_INCLUDES} != "no"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289253 - head/share/mk

2015-10-13 Thread NGie Cooper
On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery  wrote:
...
>>> On Oct 13, 2015, at 12:11, Bryan Drewery  wrote:
>>>
>>> Author: bdrewery
>>> Date: Tue Oct 13 19:11:22 2015
>>> New Revision: 289253
>>> URL: https://svnweb.freebsd.org/changeset/base/289253
>>>
>>> Log:
>>>  bsd.subdir.mk: Handle cleanobj.
>>>
>>>  Before this, the target was unknown.  Now it will recurse on subdirs and 
>>> run
>>>  the target in the current directory.  It is required to recurse as there
>>>  may be subdirs that have objs in their directory or in the object 
>>> directory,
>>>  so it is not enough to just delete the objdir of the subdir parent.

...

> You sent no text...

Hit send on my phone by accident.

make cleanobj appears broken with bsd.progs.mk (maybe related to that
makefile snippet).

Generally speaking you could "access" cleanobj via the cleandir target.

Thanks,
-NGie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289253 - head/share/mk

2015-10-13 Thread Bryan Drewery
On 10/13/2015 4:30 PM, NGie Cooper wrote:
> On Tue, Oct 13, 2015 at 3:52 PM, Bryan Drewery  wrote:
>> On 10/13/2015 3:51 PM, NGie Cooper wrote:
>>> On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery  wrote:
>>> ...
>> On Oct 13, 2015, at 12:11, Bryan Drewery  wrote:
>>
>> Author: bdrewery
>> Date: Tue Oct 13 19:11:22 2015
>> New Revision: 289253
>> URL: https://svnweb.freebsd.org/changeset/base/289253
>>
>> Log:
>>  bsd.subdir.mk: Handle cleanobj.
>>
>>  Before this, the target was unknown.  Now it will recurse on subdirs 
>> and run
>>  the target in the current directory.  It is required to recurse as there
>>  may be subdirs that have objs in their directory or in the object 
>> directory,
>>  so it is not enough to just delete the objdir of the subdir parent.
>>>
>>> ...
>>>
 You sent no text...
>>>
>>> Hit send on my phone by accident.
>>>
>>> make cleanobj appears broken with bsd.progs.mk (maybe related to that
>>> makefile snippet).
>>
>> Can you elaborate? It seems fine to me.
> 
> (cd tests; make cleandir) # does not seem to clean up everything that
> was created, like before
> 

Specifically what is not cleaned?

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r289253 - head/share/mk

2015-10-13 Thread Bryan Drewery
On 10/13/2015 4:42 PM, NGie Cooper wrote:
> On Tue, Oct 13, 2015 at 4:37 PM, Bryan Drewery  wrote:
> ...
>> Specifically what is not cleaned?
> 
> Generated files.
> 
> I might come up with something more concrete in the next week or so.
> If not, feel free to ignore this email.
> 

You're telling me a commit I made a few hours ago broke something and
you can't be specific for a week?

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r289274 - head/sys/dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 23:43:06 2015
New Revision: 289274
URL: https://svnweb.freebsd.org/changeset/base/289274

Log:
  NTB: MFV 58b88920: Document HW errata
  
  Add a comment describing the necessary ordering of modifications to the
  NTB Limit and Base registers.
  
  Authored by:  Jon Mason
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 23:42:13 2015
(r289273)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 23:43:06 2015
(r289274)
@@ -764,6 +764,11 @@ ntb_setup_xeon(struct ntb_softc *ntb)
 * which may hang the system.  To workaround this use the second memory
 * window to access the interrupt and scratch pad registers on the
 * remote system.
+*
+* There is another HW errata on the limit registers -- they can only
+* be written when the base register is (?)4GB aligned and < 32-bit.
+* This should already be the case based on the driver defaults, but
+* write the limit registers first just in case.
 */
if (HAS_FEATURE(NTB_REGS_THRU_MW))
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289253 - head/share/mk

2015-10-13 Thread Bryan Drewery
On 10/13/2015 3:51 PM, NGie Cooper wrote:
> On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery  wrote:
> ...
 On Oct 13, 2015, at 12:11, Bryan Drewery  wrote:

 Author: bdrewery
 Date: Tue Oct 13 19:11:22 2015
 New Revision: 289253
 URL: https://svnweb.freebsd.org/changeset/base/289253

 Log:
  bsd.subdir.mk: Handle cleanobj.

  Before this, the target was unknown.  Now it will recurse on subdirs and 
 run
  the target in the current directory.  It is required to recurse as there
  may be subdirs that have objs in their directory or in the object 
 directory,
  so it is not enough to just delete the objdir of the subdir parent.
> 
> ...
> 
>> You sent no text...
> 
> Hit send on my phone by accident.
> 
> make cleanobj appears broken with bsd.progs.mk (maybe related to that
> makefile snippet).

Can you elaborate? It seems fine to me.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r289253 - head/share/mk

2015-10-13 Thread NGie Cooper
On Tue, Oct 13, 2015 at 3:52 PM, Bryan Drewery  wrote:
> On 10/13/2015 3:51 PM, NGie Cooper wrote:
>> On Tue, Oct 13, 2015 at 2:19 PM, Bryan Drewery  wrote:
>> ...
> On Oct 13, 2015, at 12:11, Bryan Drewery  wrote:
>
> Author: bdrewery
> Date: Tue Oct 13 19:11:22 2015
> New Revision: 289253
> URL: https://svnweb.freebsd.org/changeset/base/289253
>
> Log:
>  bsd.subdir.mk: Handle cleanobj.
>
>  Before this, the target was unknown.  Now it will recurse on subdirs and 
> run
>  the target in the current directory.  It is required to recurse as there
>  may be subdirs that have objs in their directory or in the object 
> directory,
>  so it is not enough to just delete the objdir of the subdir parent.
>>
>> ...
>>
>>> You sent no text...
>>
>> Hit send on my phone by accident.
>>
>> make cleanobj appears broken with bsd.progs.mk (maybe related to that
>> makefile snippet).
>
> Can you elaborate? It seems fine to me.

(cd tests; make cleandir) # does not seem to clean up everything that
was created, like before
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289270 -

2015-10-13 Thread Peter Wemm
Author: peter
Date: Tue Oct 13 23:30:54 2015
New Revision: 289270
URL: https://svnweb.freebsd.org/changeset/base/289270

Log:
  Add *.po to auto-props
  
  Submitted by: wblock

Modified:
Directory Properties:
  /   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289273 - head/sys/dev/ntb/if_ntb

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 23:42:13 2015
New Revision: 289273
URL: https://svnweb.freebsd.org/changeset/base/289273

Log:
  NTB: MFV fca4d518: Fix ntb_transport link down race
  
  A WARN_ON is being hit in ntb_qp_link_work due to the NTB transport link
  being down while the ntb qp link is still active.  This is caused by the
  transport link being brought down prior to the qp link worker thread
  being terminated.  To correct this, shutdown the qp's prior to bringing
  the transport link down.  Also, only call the qp worker thread if it is
  in interrupt context, otherwise call the function directly.
  
  Authored by:  Jon Mason
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 13 23:41:40 2015
(r289272)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 13 23:42:13 2015
(r289273)
@@ -519,7 +519,7 @@ ntb_transport_free(void *transport)
struct ntb_softc *ntb = nt->ntb;
int i;
 
-   nt->transport_link = NTB_LINK_DOWN;
+   ntb_transport_link_cleanup(nt);
 
callout_drain(>link_work);
 
@@ -1257,16 +1257,16 @@ ntb_transport_link_cleanup(struct ntb_ne
 {
int i;
 
-   if (nt->transport_link == NTB_LINK_DOWN)
-   callout_drain(>link_work);
-   else
-   nt->transport_link = NTB_LINK_DOWN;
-
/* Pass along the info to any clients */
for (i = 0; i < nt->max_qps; i++)
if (!test_bit(i, >qp_bitmap))
ntb_qp_link_down(>qps[i]);
 
+   if (nt->transport_link == NTB_LINK_DOWN)
+   callout_drain(>link_work);
+   else
+   nt->transport_link = NTB_LINK_DOWN;
+
/* 
 * The scratchpad registers keep the values if the remote side
 * goes down, blast them now to give them a sane value the next
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289272 - head/sys/dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 23:41:40 2015
New Revision: 289272
URL: https://svnweb.freebsd.org/changeset/base/289272

Log:
  NTB: MFV 9fec60c4: Fix NTB-RP Link Up
  
  The Xeon NTB-RP setup, the transparent side does not get a link up/down
  interrupt.  Since the presence of a NTB device on the transparent side
  means that we have a NTB link up, we can work around the lack of an
  interrupt by simply calling the link up function to notify the upper
  layers.
  
  Authored by:  Jon Mason
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 23:41:06 2015
(r289271)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 23:41:40 2015
(r289272)
@@ -207,13 +207,15 @@ static void ntb_handle_legacy_interrupt(
 static int ntb_create_callbacks(struct ntb_softc *ntb, int num_vectors);
 static void ntb_free_callbacks(struct ntb_softc *ntb);
 static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id);
-static int ntb_initialize_hw(struct ntb_softc *ntb);
 static int ntb_setup_xeon(struct ntb_softc *ntb);
 static int ntb_setup_soc(struct ntb_softc *ntb);
+static void ntb_teardown_xeon(struct ntb_softc *ntb);
 static void configure_soc_secondary_side_bars(struct ntb_softc *ntb);
 static void configure_xeon_secondary_side_bars(struct ntb_softc *ntb);
 static void ntb_handle_heartbeat(void *arg);
 static void ntb_handle_link_event(struct ntb_softc *ntb, int link_state);
+static void ntb_hw_link_down(struct ntb_softc *ntb);
+static void ntb_hw_link_up(struct ntb_softc *ntb);
 static void recover_soc_link(void *arg);
 static int ntb_check_link_status(struct ntb_softc *ntb);
 static void save_bar_parameters(struct ntb_pci_bar_info *bar);
@@ -301,7 +303,10 @@ ntb_attach(device_t device)
error = ntb_map_pci_bars(ntb);
if (error)
goto out;
-   error = ntb_initialize_hw(ntb);
+   if (ntb->type == NTB_SOC)
+   error = ntb_setup_soc(ntb);
+   else
+   error = ntb_setup_xeon(ntb);
if (error)
goto out;
error = ntb_setup_interrupts(ntb);
@@ -324,6 +329,8 @@ ntb_detach(device_t device)
ntb = DEVICE2SOFTC(device);
callout_drain(>heartbeat_timer);
callout_drain(>lr_timer);
+   if (ntb->type == NTB_XEON)
+   ntb_teardown_xeon(ntb);
ntb_teardown_interrupts(ntb);
ntb_unmap_pci_bar(ntb);
 
@@ -691,14 +698,11 @@ ntb_get_device_info(uint32_t device_id)
return (NULL);
 }
 
-static int
-ntb_initialize_hw(struct ntb_softc *ntb)
+static void
+ntb_teardown_xeon(struct ntb_softc *ntb)
 {
 
-   if (ntb->type == NTB_SOC)
-   return (ntb_setup_soc(ntb));
-   else
-   return (ntb_setup_xeon(ntb));
+   ntb_hw_link_down(ntb);
 }
 
 static int
@@ -805,8 +809,7 @@ ntb_setup_xeon(struct ntb_softc *ntb)
PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
 
/* Enable link training */
-   ntb_reg_write(4, ntb->reg_ofs.lnk_cntl,
-   NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP);
+   ntb_hw_link_up(ntb);
 
return (0);
 }
@@ -1040,6 +1043,33 @@ ntb_handle_link_event(struct ntb_softc *
 }
 
 static void
+ntb_hw_link_up(struct ntb_softc *ntb)
+{
+
+   if (ntb->conn_type == NTB_CONN_TRANSPARENT)
+   ntb_handle_link_event(ntb, NTB_LINK_UP);
+   else
+   ntb_reg_write(4, ntb->reg_ofs.lnk_cntl,
+   NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP);
+}
+
+static void
+ntb_hw_link_down(struct ntb_softc *ntb)
+{
+   uint32_t cntl;
+
+   if (ntb->conn_type == NTB_CONN_TRANSPARENT) {
+   ntb_handle_link_event(ntb, NTB_LINK_DOWN);
+   return;
+   }
+
+   cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl);
+   cntl &= ~(NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP);
+   cntl |= NTB_CNTL_LINK_DISABLE;
+   ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl);
+}
+
+static void
 recover_soc_link(void *arg)
 {
struct ntb_softc *ntb = arg;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289271 - head/sys/dev/ntb/ntb_hw

2015-10-13 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 13 23:41:06 2015
New Revision: 289271
URL: https://svnweb.freebsd.org/changeset/base/289271

Log:
  NTB: MFV c529aa30: Xeon Doorbell errata workaround
  
  Modifications to the 14th bit of the B2BDOORBELL register will not be
  mirrored to the remote system due to a hardware issue.  To get around
  the issue, shrink the number of available doorbell bits by 1.  The max
  number of doorbells was being used as a way to referencing the Link
  Doorbell bit.  Since this would no longer work, the driver must now
  explicitly reference that bit.
  
  This does not affect the xeon_errata_workaround case, as it is not using
  the b2bdoorbell register.
  
  Authored by:  Jon Mason
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_regs.h

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 23:30:54 2015
(r289270)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 13 23:41:06 2015
(r289271)
@@ -479,7 +479,7 @@ ntb_setup_interrupts(struct ntb_softc *n
ntb_reg_write(8, ntb->reg_ofs.ldb_mask, ~0);
else
ntb_reg_write(2, ntb->reg_ofs.ldb_mask,
-   ~(1 << ntb->limits.max_db_bits));
+   (uint16_t) ~(1 << XEON_LINK_DB));
 
num_vectors = MIN(pci_msix_count(ntb->device),
ntb->limits.max_db_bits);
@@ -616,7 +616,7 @@ handle_xeon_event_irq(void *arg)
device_printf(ntb->device, "Error determining link status\n");
 
/* bit 15 is always the link bit */
-   ntb_reg_write(2, ntb->reg_ofs.ldb, 1 << ntb->limits.max_db_bits);
+   ntb_reg_write(2, ntb->reg_ofs.ldb, 1 << XEON_LINK_DB);
 }
 
 static void
@@ -784,6 +784,19 @@ ntb_setup_xeon(struct ntb_softc *ntb)
ntb->limits.msix_cnt = XEON_MSIX_CNT;
ntb->bits_per_vector = XEON_DB_BITS_PER_VEC;
 
+   /*
+* HW Errata on bit 14 of b2bdoorbell register.  Writes will not be
+* mirrored to the remote system.  Shrink the number of bits by one,
+* since bit 14 is the last bit.
+*
+* On REGS_THRU_MW errata mode, we don't use the b2bdoorbell register
+* anyway.  Nor for non-B2B connection types.
+*/
+   if (HAS_FEATURE(NTB_B2BDOORBELL_BIT14) &&
+   !HAS_FEATURE(NTB_REGS_THRU_MW) &&
+   connection_type == NTB_CONN_B2B)
+   ntb->limits.max_db_bits = XEON_MAX_DB_BITS - 1;
+
configure_xeon_secondary_side_bars(ntb);
 
/* Enable Bus Master and Memory Space on the secondary side */

Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h
==
--- head/sys/dev/ntb/ntb_hw/ntb_regs.h  Tue Oct 13 23:30:54 2015
(r289270)
+++ head/sys/dev/ntb/ntb_hw/ntb_regs.h  Tue Oct 13 23:41:06 2015
(r289271)
@@ -38,6 +38,7 @@
 #define XEON_MAX_COMPAT_SPADS  16
 /* Reserve the uppermost bit for link interrupt */
 #define XEON_MAX_DB_BITS   15
+#define XEON_LINK_DB   15
 #define XEON_DB_BITS_PER_VEC   5
 
 #define XEON_DB_HW_LINK0x8000
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289253 - head/share/mk

2015-10-13 Thread NGie Cooper
On Tue, Oct 13, 2015 at 4:37 PM, Bryan Drewery  wrote:
...
> Specifically what is not cleaned?

Generated files.

I might come up with something more concrete in the next week or so.
If not, feel free to ignore this email.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289269 - head/usr.sbin/tzsetup

2015-10-13 Thread Xin LI
Author: delphij
Date: Tue Oct 13 22:55:17 2015
New Revision: 289269
URL: https://svnweb.freebsd.org/changeset/base/289269

Log:
  Use chroot(2) instead of using prefixes for files.
  
  Previously, the code prefixes the chroot path to actual file paths to
  simulate the effect.  This, however, will not work for tzset(3) which
  expects the current system have a working set of timezone data files,
  and that is not always the case.
  
  This changeset simplifies the handling of paths and use an actual
  chroot(2) call to implement the effect.
  
  PR:   bin/197313
  MFC after:2 weeks

Modified:
  head/usr.sbin/tzsetup/tzsetup.c

Modified: head/usr.sbin/tzsetup/tzsetup.c
==
--- head/usr.sbin/tzsetup/tzsetup.c Tue Oct 13 21:34:54 2015
(r289268)
+++ head/usr.sbin/tzsetup/tzsetup.c Tue Oct 13 22:55:17 2015
(r289269)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -944,23 +945,18 @@ main(int argc, char **argv)
if (argc - optind > 1)
usage();
 
-   if (chrootenv == NULL) {
-   strcpy(path_zonetab, _PATH_ZONETAB);
-   strcpy(path_iso3166, _PATH_ISO3166);
-   strcpy(path_zoneinfo, _PATH_ZONEINFO);
-   strcpy(path_localtime, _PATH_LOCALTIME);
-   strcpy(path_db, _PATH_DB);
-   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
-   } else {
-   sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB);
-   sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166);
-   sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO);
-   sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME);
-   sprintf(path_db, "%s/%s", chrootenv, _PATH_DB);
-   sprintf(path_wall_cmos_clock, "%s/%s", chrootenv,
-   _PATH_WALL_CMOS_CLOCK);
+   if (chrootenv != NULL) {
+   rv = chroot(chrootenv);
+   if (rv != 0)
+   err(EX_OSERR, "chroot to %s", chrootenv);
}
 
+   strcpy(path_zonetab, _PATH_ZONETAB);
+   strcpy(path_iso3166, _PATH_ISO3166);
+   strcpy(path_zoneinfo, _PATH_ZONEINFO);
+   strcpy(path_localtime, _PATH_LOCALTIME);
+   strcpy(path_db, _PATH_DB);
+   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
 
/* Override the user-supplied umask. */
(void)umask(S_IWGRP | S_IWOTH);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289277 - head/share/mk

2015-10-13 Thread Bryan Drewery
On 10/13/2015 5:36 PM, Bryan Drewery wrote:
> Author: bdrewery
> Date: Wed Oct 14 00:36:33 2015
> New Revision: 289277
> URL: https://svnweb.freebsd.org/changeset/base/289277
> 
> Log:
>   Add a note about the mysterious files/includes/config block.
>   
>   This originated from r96668.
> 

I'm actually testing a removal of this now.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r289276 - in head/sys: conf kern netinet sys

2015-10-13 Thread Bryan Drewery
On 10/13/2015 5:35 PM, Hiren Panchasara wrote:
> Author: hiren
> Date: Wed Oct 14 00:35:37 2015
> New Revision: 289276
> URL: https://svnweb.freebsd.org/changeset/base/289276
> 
> Log:
>   There are times when it would be really nice to have a record of the last 
> few
>   packets and/or state transitions from each TCP socket. That would help with
>   narrowing down certain problems we see in the field that are hard to 
> reproduce
>   without understanding the history of how we got into a certain state. This
>   change provides just that.
>   
>   It saves copies of the last N packets in a list in the tcpcb. When the 
> tcpcb is
>   destroyed, the list is freed. I thought this was likely to be more
>   performance-friendly than saving copies of the tcpcb. Plus, with the 
> packets,
>   you should be able to reverse-engineer what happened to the tcpcb.
>   
>   To enable the feature, you will need to compile a kernel with the TCPPCAP
>   option. Even then, the feature defaults to being deactivated. You can 
> activate
>   it by setting a positive value for the number of captured packets. You can 
> do
>   that on either a global basis or on a per-socket basis (via a setsockopt 
> call).
>   
>   There is no way to get the packets out of the kernel other than using kmem 
> or
>   getting a coredump. I thought that would help some of the legal/privacy 
> concerns
>   regarding such a feature. However, it should be possible to add a future 
> effort
>   to export them in PCAP format.
>   
>   I tested this at low scale, and found that there were no mbuf leaks and the 
> peak
>   mbuf usage appeared to be unchanged with and without the feature.
>   
>   The main performance concern I can envision is the number of mbufs that 
> would be
>   used on systems with a large number of sockets. If you save five packets per
>   direction per socket and have 3,000 sockets, that will consume at least 
> 30,000
>   mbufs just to keep these packets. I tried to reduce the concerns associated 
> with
>   this by limiting the number of clusters (not mbufs) that could be used for 
> this
>   feature. Again, in my testing, that appears to work correctly.
>   
>   Differential Revision:  D3100

You're supposed to use the full URL here which will auto close the review.

I also replied to the review with style findings just now.

>   Submitted by:   Jonathan Looney 
>   Reviewed by:gnn, hiren


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature