svn commit: r323637 - head/share/mk

2017-09-15 Thread Simon J. Gerraty
Author: sjg
Date: Sat Sep 16 05:42:27 2017
New Revision: 323637
URL: https://svnweb.freebsd.org/changeset/base/323637

Log:
  Use OBJS_SRCS_FILTER to control setting OBJS from SRCS
  
  Some makefiles do reachover builds.
  In some cases it is convenient to list subdirs of the distribution
  in SRCS.
  
  It is not very convenient, or always even desirable to have corresponding
  subdirs in .OBJDIR, so OBJS_SRCS_FILTER allows the makefile to choose.
  The default value 'R' matches existing practice.
  
  But a makefile can set OBJS_SRCS_FILTER= T (the R gets added by
  bsd.init.mk) to avoid the need for subdirs in .OBJDIR
  
  Differential Revision:https://reviews.freebsd.org/D12218
  Reviewed by:  bdrewery

Modified:
  head/share/mk/bsd.dep.mk
  head/share/mk/bsd.init.mk
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.prog.mk

Modified: head/share/mk/bsd.dep.mk
==
--- head/share/mk/bsd.dep.mkSat Sep 16 03:54:20 2017(r323636)
+++ head/share/mk/bsd.dep.mkSat Sep 16 05:42:27 2017(r323637)
@@ -101,7 +101,7 @@ _SKIP_DEPEND=   1
 CLEANFILES?=
 
 .for _S in ${SRCS:N*.[dhly]}
-OBJS_DEPEND_GUESS.${_S:R}.o+=  ${_S}
+OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.o+=${_S}
 .endfor
 
 # Lexical analyzers
@@ -180,7 +180,7 @@ DEPEND_MP?= -MP
 DEPEND_FILTER= C,/,_,g
 DEPENDSRCS=${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
 .if !empty(DEPENDSRCS)
-DEPENDOBJS+=   ${DEPENDSRCS:R:S,$,.o,}
+DEPENDOBJS+=   ${DEPENDSRCS:${OBJS_SRCS_FILTER:ts:}:S,$,.o,}
 .endif
 DEPENDFILES_OBJS=  ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
 .if defined(_SKIP_DEPEND)

Modified: head/share/mk/bsd.init.mk
==
--- head/share/mk/bsd.init.mk   Sat Sep 16 03:54:20 2017(r323636)
+++ head/share/mk/bsd.init.mk   Sat Sep 16 05:42:27 2017(r323637)
@@ -16,6 +16,10 @@ :
 .include 
 .MAIN: all
 
+# This is used in bsd.{dep,lib,prog}.mk as ${OBJS_SRCS_FILTER:ts:}
+# Some makefiles may want T as well to avoid nested objdirs.
+OBJS_SRCS_FILTER+= R
+
 # Handle INSTALL_AS_USER here to maximize the chance that
 # it has final authority over fooOWN and fooGRP.
 .if ${MK_INSTALL_AS_USER} != "no"

Modified: head/share/mk/bsd.lib.mk
==
--- head/share/mk/bsd.lib.mkSat Sep 16 03:54:20 2017(r323636)
+++ head/share/mk/bsd.lib.mkSat Sep 16 05:42:27 2017(r323637)
@@ -168,7 +168,7 @@ LDFLAGS+=   -Wl,--version-script=${VERSION_MAP}
 .endif
 
 .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME)
-OBJS+= ${SRCS:N*.h:R:S/$/.o/}
+OBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/}
 CLEANFILES+=   ${OBJS} ${STATICOBJS}
 .endif
 
@@ -437,13 +437,13 @@ lint: ${SRCS:M*.c}
 .if defined(LIB) && !empty(LIB)
 OBJS_DEPEND_GUESS+= ${SRCS:M*.h}
 .for _S in ${SRCS:N*.[hly]}
-OBJS_DEPEND_GUESS.${_S:R}.po+= ${_S}
+OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.po+=   ${_S}
 .endfor
 .endif
 .if defined(SHLIB_NAME) || \
 defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
 .for _S in ${SRCS:N*.[hly]}
-OBJS_DEPEND_GUESS.${_S:R}.pico+=   ${_S}
+OBJS_DEPEND_GUESS.${_S:${OBJS_SRCS_FILTER:ts:}}.pico+= ${_S}
 .endfor
 .endif
 

Modified: head/share/mk/bsd.prog.mk
==
--- head/share/mk/bsd.prog.mk   Sat Sep 16 03:54:20 2017(r323636)
+++ head/share/mk/bsd.prog.mk   Sat Sep 16 05:42:27 2017(r323637)
@@ -85,7 +85,7 @@ PROGNAME?=${PROG}
 
 .if defined(SRCS)
 
-OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
+OBJS+=  ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/g}
 
 .if target(beforelinking)
 beforelinking: ${OBJS}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r323635 - in head/sys: dev/bnxt dev/e1000 kern net sys

2017-09-15 Thread Ngie Cooper (yaneurabeya)

> On Sep 15, 2017, at 19:41, Stephen Hurd  wrote:
> 
> Author: shurd
> Date: Sat Sep 16 02:41:38 2017
> New Revision: 323635
> URL: https://svnweb.freebsd.org/changeset/base/323635
> 
> Log:
>  Revert r323516 (iflib rollup)
> 
>  This was really too big of a commit even if everything worked, but there
>  are multiple new issues introduced in the one huge commit, so it's not
>  worth keeping this until it's fixed.
> 
>  I'll work on splitting this up into logical chunks and introduce them one
>  at a time over the next week or two.

Thank you,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys

2017-09-15 Thread Bruce Evans

On Fri, 15 Sep 2017, Scott Long wrote:


On Sep 13, 2017, at 9:12 AM, Sean Bruno  wrote:


#blamebruno


A large burden.


Reviewed by:sbruno
Approved by:sbruno (mentor)
Sponsored by:Limelight Networks
Differential Revision:https://reviews.freebsd.org/D12235


*gasps at the LoC count and number of changed drivers*

Could someone please better break this up in the future..?


This ridiculous loc was due to the amount of restructuring needed to get
us back to being in sync with our development.  The future will not have
this big of a commit/change and should be more bite/fun sized.

The #blamebruno tag in the commit log was to indicate that this was not
something Stephen was doing on his own, but was something that I had
induced over the last few months during testing.


This breaks my system.  I prior to this commit, I had igb0 and igb1.  Now I
only have igb0, and it\xe2]x80\x99s like igb1 isn\xe2\x80\x99tt even trying to 
attach.  Unfortunately,
this breaks my nfsroot setup, so I need to roll back my tree.  Please let me
know if there\xe2\x80\x99ss anything I can provide to help debugging.


It gives lesser breakage here:
- with an old PCI em, an error that occur every few makeworlds over nfs now
  hang the hardware.  It used to be recovered from afger about 10 seconds.
  This only happened once.  I then applied my old fix which ignores the
  error better so as to recover from it immediately.  This seems to work as
  before.
- with a newer PCI-e em, throughput as measured by netblast is down by
  more that a factor of 2 since last month.

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


svn commit: r323635 - in head/sys: dev/bnxt dev/e1000 kern net sys

2017-09-15 Thread Stephen Hurd
Author: shurd
Date: Sat Sep 16 02:41:38 2017
New Revision: 323635
URL: https://svnweb.freebsd.org/changeset/base/323635

Log:
  Revert r323516 (iflib rollup)
  
  This was really too big of a commit even if everything worked, but there
  are multiple new issues introduced in the one huge commit, so it's not
  worth keeping this until it's fixed.
  
  I'll work on splitting this up into logical chunks and introduce them one
  at a time over the next week or two.
  
  Approved by:  sbruno (mentor)
  Sponsored by: Limelight Networks

Modified:
  head/sys/dev/bnxt/if_bnxt.c
  head/sys/dev/e1000/e1000_80003es2lan.c
  head/sys/dev/e1000/e1000_82571.c
  head/sys/dev/e1000/e1000_82575.c
  head/sys/dev/e1000/e1000_hw.h
  head/sys/dev/e1000/e1000_i210.c
  head/sys/dev/e1000/e1000_i210.h
  head/sys/dev/e1000/e1000_ich8lan.c
  head/sys/dev/e1000/e1000_mac.c
  head/sys/dev/e1000/e1000_mac.h
  head/sys/dev/e1000/e1000_osdep.h
  head/sys/dev/e1000/em_txrx.c
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_em.h
  head/sys/kern/subr_gtaskqueue.c
  head/sys/net/iflib.c
  head/sys/net/iflib.h
  head/sys/net/mp_ring.c
  head/sys/sys/gtaskqueue.h

Modified: head/sys/dev/bnxt/if_bnxt.c
==
--- head/sys/dev/bnxt/if_bnxt.c Sat Sep 16 02:32:00 2017(r323634)
+++ head/sys/dev/bnxt/if_bnxt.c Sat Sep 16 02:41:38 2017(r323635)
@@ -1640,8 +1640,7 @@ bnxt_msix_intr_assign(if_ctx_t ctx, int msix)
}
 
for (i=0; iscctx->isc_ntxqsets; i++)
-   /* TODO: Benchmark and see if tying to the RX irqs helps */
-   iflib_softirq_alloc_generic(ctx, -1, IFLIB_INTR_TX, NULL, i,
+   iflib_softirq_alloc_generic(ctx, i + 1, IFLIB_INTR_TX, NULL, i,
"tx_cp");
 
return rc;

Modified: head/sys/dev/e1000/e1000_80003es2lan.c
==
--- head/sys/dev/e1000/e1000_80003es2lan.c  Sat Sep 16 02:32:00 2017
(r323634)
+++ head/sys/dev/e1000/e1000_80003es2lan.c  Sat Sep 16 02:41:38 2017
(r323635)
@@ -59,6 +59,7 @@ static s32  e1000_reset_hw_80003es2lan(struct e1000_hw
 static s32  e1000_init_hw_80003es2lan(struct e1000_hw *hw);
 static s32  e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw);
 static void e1000_clear_hw_cntrs_80003es2lan(struct e1000_hw *hw);
+static s32  e1000_acquire_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask);
 static s32  e1000_cfg_kmrn_10_100_80003es2lan(struct e1000_hw *hw, u16 duplex);
 static s32  e1000_cfg_kmrn_1000_80003es2lan(struct e1000_hw *hw);
 static s32  e1000_cfg_on_link_up_80003es2lan(struct e1000_hw *hw);
@@ -67,6 +68,7 @@ static s32  e1000_read_kmrn_reg_80003es2lan(struct e10
 static s32  e1000_write_kmrn_reg_80003es2lan(struct e1000_hw *hw, u32 offset,
 u16 data);
 static void e1000_initialize_hw_bits_80003es2lan(struct e1000_hw *hw);
+static void e1000_release_swfw_sync_80003es2lan(struct e1000_hw *hw, u16 mask);
 static s32  e1000_read_mac_addr_80003es2lan(struct e1000_hw *hw);
 static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw);
 
@@ -297,7 +299,7 @@ static s32 e1000_acquire_phy_80003es2lan(struct e1000_
DEBUGFUNC("e1000_acquire_phy_80003es2lan");
 
mask = hw->bus.func ? E1000_SWFW_PHY1_SM : E1000_SWFW_PHY0_SM;
-   return e1000_acquire_swfw_sync(hw, mask);
+   return e1000_acquire_swfw_sync_80003es2lan(hw, mask);
 }
 
 /**
@@ -313,7 +315,7 @@ static void e1000_release_phy_80003es2lan(struct e1000
DEBUGFUNC("e1000_release_phy_80003es2lan");
 
mask = hw->bus.func ? E1000_SWFW_PHY1_SM : E1000_SWFW_PHY0_SM;
-   e1000_release_swfw_sync(hw, mask);
+   e1000_release_swfw_sync_80003es2lan(hw, mask);
 }
 
 /**
@@ -331,7 +333,7 @@ static s32 e1000_acquire_mac_csr_80003es2lan(struct e1
 
mask = E1000_SWFW_CSR_SM;
 
-   return e1000_acquire_swfw_sync(hw, mask);
+   return e1000_acquire_swfw_sync_80003es2lan(hw, mask);
 }
 
 /**
@@ -348,7 +350,7 @@ static void e1000_release_mac_csr_80003es2lan(struct e
 
mask = E1000_SWFW_CSR_SM;
 
-   e1000_release_swfw_sync(hw, mask);
+   e1000_release_swfw_sync_80003es2lan(hw, mask);
 }
 
 /**
@@ -363,14 +365,14 @@ static s32 e1000_acquire_nvm_80003es2lan(struct e1000_
 
DEBUGFUNC("e1000_acquire_nvm_80003es2lan");
 
-   ret_val = e1000_acquire_swfw_sync(hw, E1000_SWFW_EEP_SM);
+   ret_val = e1000_acquire_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM);
if (ret_val)
return ret_val;
 
ret_val = e1000_acquire_nvm_generic(hw);
 
if (ret_val)
-   e1000_release_swfw_sync(hw, E1000_SWFW_EEP_SM);
+   e1000_release_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM);
 
return ret_val;
 }
@@ -386,7 +388,78 @@ static void e1000_release_nvm_80003es2lan(struct e1000
DEBUGFUNC("e1000_release_nvm_80003es2lan");
 
 

svn commit: r323632 - head/contrib/elftoolchain/readelf

2017-09-15 Thread John Baldwin
Author: jhb
Date: Fri Sep 15 22:56:39 2017
New Revision: 323632
URL: https://svnweb.freebsd.org/changeset/base/323632

Log:
  Add missing newline after unknown MIPS-specific dynamic entries.
  
  Reviewed by:  emaste
  Sponsored by: DARPA / AFRL
  Differential Revision:https://reviews.freebsd.org/D12384

Modified:
  head/contrib/elftoolchain/readelf/readelf.c

Modified: head/contrib/elftoolchain/readelf/readelf.c
==
--- head/contrib/elftoolchain/readelf/readelf.c Fri Sep 15 22:55:15 2017
(r323631)
+++ head/contrib/elftoolchain/readelf/readelf.c Fri Sep 15 22:56:39 2017
(r323632)
@@ -2695,6 +2695,9 @@ dump_arch_dyn_val(struct readelf *re, GElf_Dyn *dyn)
case DT_MIPS_TIME_STAMP:
printf(" %s\n", timestamp(dyn->d_un.d_val));
break;
+   default:
+   printf("\n");
+   break;
}
break;
default:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323631 - head/usr.bin/getconf

2017-09-15 Thread John Baldwin
Author: jhb
Date: Fri Sep 15 22:55:15 2017
New Revision: 323631
URL: https://svnweb.freebsd.org/changeset/base/323631

Log:
  Add an -a flag to getconf.
  
  When -a is specified, the name and value of all system or path
  configuration values is reported to standard output.
  
  Reviewed by:  kib (earlier version)
  MFC after:1 week
  Sponsored by: Chelsio Communications
  Differential Revision:https://reviews.freebsd.org/D12373

Modified:
  head/usr.bin/getconf/confstr.gperf
  head/usr.bin/getconf/getconf.1
  head/usr.bin/getconf/getconf.c
  head/usr.bin/getconf/getconf.h
  head/usr.bin/getconf/pathconf.gperf
  head/usr.bin/getconf/sysconf.gperf

Modified: head/usr.bin/getconf/confstr.gperf
==
--- head/usr.bin/getconf/confstr.gperf  Fri Sep 15 22:40:57 2017
(r323630)
+++ head/usr.bin/getconf/confstr.gperf  Fri Sep 15 22:55:15 2017
(r323631)
@@ -68,3 +68,14 @@ find_confstr(const char *name, int *key)
}
return 0;
 }
+
+void
+foreach_confstr(void (*func)(const char *, int))
+{
+   const struct map *mp;
+
+   for (mp = wordlist; mp->name != NULL; mp++) {
+   if (mp->valid)
+   func(mp->name, mp->key);
+   }
+}

Modified: head/usr.bin/getconf/getconf.1
==
--- head/usr.bin/getconf/getconf.1  Fri Sep 15 22:40:57 2017
(r323630)
+++ head/usr.bin/getconf/getconf.1  Fri Sep 15 22:55:15 2017
(r323631)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 8, 2016
+.Dd September 15, 2017
 .Dt GETCONF 1
 .Os
 .Sh NAME
@@ -36,6 +36,9 @@
 .Nd retrieve standard configuration variables
 .Sh SYNOPSIS
 .Nm
+.Fl a
+.Op Ar file
+.Nm
 .Op Fl v Ar environment
 .Ar path_var
 .Ar file
@@ -45,20 +48,35 @@
 .Sh DESCRIPTION
 The
 .Nm
-utility prints the value of a
+utility prints the values of
 .Tn POSIX
 or
 .Tn X/Open
-path or system configuration variable to the standard output.
-If the specified variable is undefined, the string
+path or system configuration variables to the standard output.
+If a variable is undefined, the string
 .Dq Li undefined
 is output.
 .Pp
-The first form of the command, with two mandatory
+The first form of the command displays all of the path or system configuration
+variables to standard output.
+If
+.Ar file
+is provided,
+all path configuration variables are reported for
+.Ar file
+using
+.Xr pathconf 2 .
+Otherwise,
+all system configuration variables are reported using
+.Xr confstr 3
+and
+.Xr sysconf 3.
+.Pp
+The second form of the command, with two mandatory
 arguments, retrieves file- and file system-specific
 configuration variables using
 .Xr pathconf 2 .
-The second form, with a single argument, retrieves system
+The third form, with a single argument, retrieves system
 configuration variables using
 .Xr confstr 3
 and

Modified: head/usr.bin/getconf/getconf.c
==
--- head/usr.bin/getconf/getconf.c  Fri Sep 15 22:40:57 2017
(r323630)
+++ head/usr.bin/getconf/getconf.c  Fri Sep 15 22:55:15 2017
(r323631)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,6 +42,8 @@ __FBSDID("$FreeBSD$");
 
 #include "getconf.h"
 
+static voiddo_allsys(void);
+static voiddo_allpath(const char *path);
 static voiddo_confstr(const char *name, int key);
 static voiddo_sysconf(const char *name, int key);
 static voiddo_pathconf(const char *name, int key, const char *path);
@@ -49,7 +52,8 @@ static void
 usage(void)
 {
fprintf(stderr,
-"usage: getconf [-v prog_env] system_var\n"
+"usage: getconf -a [pathname]\n"
+"   getconf [-v prog_env] system_var\n"
 "   getconf [-v prog_env] path_var pathname\n");
exit(EX_USAGE);
 }
@@ -57,13 +61,18 @@ usage(void)
 int
 main(int argc, char **argv)
 {
+   bool aflag;
int c, key, valid;
const char *name, *vflag, *alt_path;
intmax_t limitval;
 
+   aflag = false;
vflag = NULL;
-   while ((c = getopt(argc, argv, "v:")) != -1) {
+   while ((c = getopt(argc, argv, "av:")) != -1) {
switch (c) {
+   case 'a':
+   aflag = true;
+   break;
case 'v':
vflag = optarg;
break;
@@ -73,6 +82,16 @@ main(int argc, char **argv)
}
}
 
+   if (aflag) {
+   if (vflag != NULL)
+   usage();
+   if (argv[optind] == NULL)
+   do_allsys();
+   else
+   do_allpath(argv[optind]);
+   return (0);
+   }
+
if ((name = argv[optind]) == NULL)
usage();
 
@@ -133,6 +152,77 @@ main(int argc, char **argv)
 

svn commit: r323630 - head/sys/dev/cxgbe/tom

2017-09-15 Thread John Baldwin
Author: jhb
Date: Fri Sep 15 22:40:57 2017
New Revision: 323630
URL: https://svnweb.freebsd.org/changeset/base/323630

Log:
  Avoid reusing the wrong buffer for a DDP AIO request.
  
  To optimize the case of ping-ponging between two buffers, the DDP code
  caches the last two buffers used keeping the pages wired and page pods
  stored in the NIC's RAM.  If a new aio_read() request uses one of the
  same buffers, then the work of holding pages, etc. can be avoided.
  However, the starting virtual address of an aio buffer was not saved,
  only the page count, length, and initial page offset.  Thus, an
  aio_read() request could match a different buffer in the address
  space.  (Earlier during development vm_fault_hold_quick_pages() was
  always called and the vm_page_t values were compared, but that was
  eventually removed without being adequately replaced.)  Fix by storing
  the starting virtual address and comparing that (along with other
  fields) to determine if a buffer can be reused.
  
  MFC after:3 days
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/tom/t4_ddp.c
  head/sys/dev/cxgbe/tom/t4_tom.h

Modified: head/sys/dev/cxgbe/tom/t4_ddp.c
==
--- head/sys/dev/cxgbe/tom/t4_ddp.c Fri Sep 15 20:58:52 2017
(r323629)
+++ head/sys/dev/cxgbe/tom/t4_ddp.c Fri Sep 15 22:40:57 2017
(r323630)
@@ -1277,7 +1277,8 @@ pscmp(struct pageset *ps, struct vmspace *vm, vm_offse
 int pgoff, int len)
 {
 
-   if (ps->npages != npages || ps->offset != pgoff || ps->len != len)
+   if (ps->start != start || ps->npages != npages ||
+   ps->offset != pgoff || ps->len != len)
return (1);
 
return (ps->vm != vm || ps->vm_timestamp != vm->vm_map.timestamp);
@@ -1378,6 +1379,7 @@ hold_aio(struct toepcb *toep, struct kaiocb *job, stru
ps->len = job->uaiocb.aio_nbytes;
atomic_add_int(>vm_refcnt, 1);
ps->vm = vm;
+   ps->start = start;
 
CTR5(KTR_CXGBE, "%s: tid %d, new pageset %p for job %p, npages %d",
__func__, toep->tid, ps, job, ps->npages);

Modified: head/sys/dev/cxgbe/tom/t4_tom.h
==
--- head/sys/dev/cxgbe/tom/t4_tom.h Fri Sep 15 20:58:52 2017
(r323629)
+++ head/sys/dev/cxgbe/tom/t4_tom.h Fri Sep 15 22:40:57 2017
(r323630)
@@ -112,6 +112,7 @@ struct pageset {
int len;
struct ppod_reservation prsv;
struct vmspace *vm;
+   vm_offset_t start;
u_int vm_timestamp;
 };
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys

2017-09-15 Thread Scott Long

> On Sep 13, 2017, at 9:12 AM, Sean Bruno  wrote:
> 
 #blamebruno
 
 Reviewed by:sbruno
 Approved by:sbruno (mentor)
 Sponsored by:Limelight Networks
 Differential Revision:https://reviews.freebsd.org/D12235
>>> 
>>> *gasps at the LoC count and number of changed drivers*
>>> 
>>> Could someone please better break this up in the future..?
>> 
>> Agreed. Down the road parsing out individual commits in this jumbo commit 
>> will be difficult to parse. IMO this may as well have simply been, import 
>> from https://github.com/mattmacy/networking/, just like Mr. Torvalds does 
>> at kernel.org. I expect to see a commit like this there but not here. Can 
>> we break this down to its functional commits?
>> 
>> 
> 
> 
> This ridiculous loc was due to the amount of restructuring needed to get
> us back to being in sync with our development.  The future will not have
> this big of a commit/change and should be more bite/fun sized.
> 
> The #blamebruno tag in the commit log was to indicate that this was not
> something Stephen was doing on his own, but was something that I had
> induced over the last few months during testing.
> 

This breaks my system.  I prior to this commit, I had igb0 and igb1.  Now I
only have igb0, and it’s like igb1 isn’t even trying to attach.  Unfortunately,
this breaks my nfsroot setup, so I need to roll back my tree.  Please let me
know if there’s anything I can provide to help debugging.

Scott


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

svn commit: r323629 - in head/sys/dev: mpr mps

2017-09-15 Thread Scott Long
Author: scottl
Date: Fri Sep 15 20:58:52 2017
New Revision: 323629
URL: https://svnweb.freebsd.org/changeset/base/323629

Log:
  Fix line wrap issues.
  
  Sponsored by: Netflix

Modified:
  head/sys/dev/mpr/mpr_pci.c
  head/sys/dev/mps/mps_pci.c

Modified: head/sys/dev/mpr/mpr_pci.c
==
--- head/sys/dev/mpr/mpr_pci.c  Fri Sep 15 20:46:51 2017(r323628)
+++ head/sys/dev/mpr/mpr_pci.c  Fri Sep 15 20:58:52 2017(r323629)
@@ -269,8 +269,8 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc)
msgs = min(msgs, MPR_MSIX_MAX);
msgs = min(msgs, 1);/* XXX */
if (msgs != 0) {
-   mpr_dprint(sc, MPR_INIT, "Attempting to allocate %d 
MSI-X "
-   "messages\n", msgs);
+   mpr_dprint(sc, MPR_INIT, "Attempting to allocate %d "
+   "MSI-X messages\n", msgs);
error = mpr_alloc_msix(sc, msgs);
}
}
@@ -279,8 +279,8 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc)
mpr_dprint(sc, MPR_INIT, "Counted %d MSI messages\n", msgs);
msgs = min(msgs, MPR_MSI_MAX);
if (msgs != 0) {
-   mpr_dprint(sc, MPR_INIT, "Attempting to allocated %d 
MSI "
-   "messages\n", MPR_MSI_MAX);
+   mpr_dprint(sc, MPR_INIT, "Attempting to allocated %d "
+   "MSI messages\n", MPR_MSI_MAX);
error = mpr_alloc_msi(sc, MPR_MSI_MAX);
}
}

Modified: head/sys/dev/mps/mps_pci.c
==
--- head/sys/dev/mps/mps_pci.c  Fri Sep 15 20:46:51 2017(r323628)
+++ head/sys/dev/mps/mps_pci.c  Fri Sep 15 20:58:52 2017(r323629)
@@ -254,8 +254,8 @@ mps_pci_alloc_interrupts(struct mps_softc *sc)
msgs = min(msgs, MPS_MSIX_MAX);
msgs = min(msgs, 1);/* XXX */
if (msgs != 0) {
-   mps_dprint(sc, MPS_INIT, "Attempting to allocate %d 
MSI-X "
-   "messages\n", msgs);
+   mps_dprint(sc, MPS_INIT, "Attempting to allocate %d "
+   "MSI-X messages\n", msgs);
error = mps_alloc_msix(sc, msgs);
}
}
@@ -264,8 +264,8 @@ mps_pci_alloc_interrupts(struct mps_softc *sc)
mps_dprint(sc, MPS_INIT, "Counted %d MSI messages\n", msgs);
msgs = min(msgs, MPS_MSI_MAX);
if (msgs != 0) {
-   mps_dprint(sc, MPS_INIT, "Attempting to allocate %d MSI 
"
-   "messages\n", MPS_MSI_MAX);
+   mps_dprint(sc, MPS_INIT, "Attempting to allocate %d "
+   "MSI messages\n", MPS_MSI_MAX);
error = mps_alloc_msi(sc, MPS_MSI_MAX);
}
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323628 - head/usr.bin/sockstat

2017-09-15 Thread Michael Tuexen
Author: tuexen
Date: Fri Sep 15 20:46:51 2017
New Revision: 323628
URL: https://svnweb.freebsd.org/changeset/base/323628

Log:
  Remove tailing whitespace.

Modified:
  head/usr.bin/sockstat/sockstat.c

Modified: head/usr.bin/sockstat/sockstat.c
==
--- head/usr.bin/sockstat/sockstat.cFri Sep 15 20:41:12 2017
(r323627)
+++ head/usr.bin/sockstat/sockstat.cFri Sep 15 20:46:51 2017
(r323628)
@@ -535,7 +535,7 @@ gather_sctp(void)
"address family %d not supported",
xraddr->address.sa.sa_family);
}
-   faddr->encaps_port = xraddr->encaps_port; 
+   faddr->encaps_port = xraddr->encaps_port;
faddr->state = xraddr->state;
faddr->next = NULL;
if (prev_faddr == NULL)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323627 - head/usr.sbin/tcpdrop

2017-09-15 Thread Michael Tuexen
Author: tuexen
Date: Fri Sep 15 20:41:12 2017
New Revision: 323627
URL: https://svnweb.freebsd.org/changeset/base/323627

Log:
  Remove empty line accidently introduced in r323626.

Modified:
  head/usr.sbin/tcpdrop/tcpdrop.8

Modified: head/usr.sbin/tcpdrop/tcpdrop.8
==
--- head/usr.sbin/tcpdrop/tcpdrop.8 Fri Sep 15 20:34:52 2017
(r323626)
+++ head/usr.sbin/tcpdrop/tcpdrop.8 Fri Sep 15 20:41:12 2017
(r323627)
@@ -175,7 +175,6 @@ LAST_ACK state use:
 .Xr sockstat 1 ,
 .Xr tcp 4 ,
 .Xr tcp_functions 9
-
 .Sh AUTHORS
 .An Markus Friedl Aq Mt mar...@openbsd.org
 .An Juli Mallett Aq Mt jmall...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r323493 - head/usr.sbin/tcpdrop

2017-09-15 Thread Michael Tuexen
> On 15. Sep 2017, at 10:10, Maxim Konovalov  wrote:
> 
> Hi Michael,
> 
> On Tue, 12 Sep 2017, 13:39-, Michael Tuexen wrote:
> 
>> Author: tuexen
>> Date: Tue Sep 12 13:39:44 2017
>> New Revision: 323493
>> URL: https://svnweb.freebsd.org/changeset/base/323493
>> 
>> Log:
>>  Allow TCP connections to be filtered by stack and state.
>> 
>>  Choose the command line options to be consistent with the ones of
>>  sockstat.
>> 
> Makes sense?
Yes. Also added a reference to TCP in r323626.

Thanks for the suggestion.

Best regards
Michael
> 
> Index: tcpdrop.8
> ===
> --- tcpdrop.8 (revision 323607)
> +++ tcpdrop.8 (working copy)
> @@ -172,7 +172,8 @@ LAST_ACK state use:
> .Ed
> .Sh SEE ALSO
> .Xr netstat 1 ,
> -.Xr sockstat 1
> +.Xr sockstat 1 ,
> +.Xr tcp_functions 9
> .Sh AUTHORS
> .An Markus Friedl Aq Mt mar...@openbsd.org
> .An Juli Mallett Aq Mt jmall...@freebsd.org
> 
> -- 
> Maxim Konovalov

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


svn commit: r323626 - head/usr.sbin/tcpdrop

2017-09-15 Thread Michael Tuexen
Author: tuexen
Date: Fri Sep 15 20:34:52 2017
New Revision: 323626
URL: https://svnweb.freebsd.org/changeset/base/323626

Log:
  Add references. Suggested by Maxim Konovalov.
  
  Sponsored by: Netflix, Inc.

Modified:
  head/usr.sbin/tcpdrop/tcpdrop.8

Modified: head/usr.sbin/tcpdrop/tcpdrop.8
==
--- head/usr.sbin/tcpdrop/tcpdrop.8 Fri Sep 15 20:16:06 2017
(r323625)
+++ head/usr.sbin/tcpdrop/tcpdrop.8 Fri Sep 15 20:34:52 2017
(r323626)
@@ -17,7 +17,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 14, 2017
+.Dd September 15, 2017
 .Dt TCPDROP 8
 .Os
 .Sh NAME
@@ -172,7 +172,10 @@ LAST_ACK state use:
 .Ed
 .Sh SEE ALSO
 .Xr netstat 1 ,
-.Xr sockstat 1
+.Xr sockstat 1 ,
+.Xr tcp 4 ,
+.Xr tcp_functions 9
+
 .Sh AUTHORS
 .An Markus Friedl Aq Mt mar...@openbsd.org
 .An Juli Mallett Aq Mt jmall...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323625 - head/sys/cam/nvme

2017-09-15 Thread Warner Losh
Author: imp
Date: Fri Sep 15 20:16:06 2017
New Revision: 323625
URL: https://svnweb.freebsd.org/changeset/base/323625

Log:
  Allow multiple TRIMs to be done for nda
  
  Don't call cam_iosched_trim_done or cam_iosched_submit_trim for nda
  since its hardware can handle almost an arbitrary number of TRIMs and
  we don't have to be careful to only ever do one.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/nvme/nvme_da.c

Modified: head/sys/cam/nvme/nvme_da.c
==
--- head/sys/cam/nvme/nvme_da.c Fri Sep 15 20:15:55 2017(r323624)
+++ head/sys/cam/nvme/nvme_da.c Fri Sep 15 20:16:06 2017(r323625)
@@ -920,7 +920,12 @@ ndastart(struct cam_periph *periph, union ccb *start_c
nda_nvme_trim(softc, _ccb->nvmeio, dsm_range, 1);
start_ccb->ccb_h.ccb_state = NDA_CCB_TRIM;
start_ccb->ccb_h.flags |= CAM_UNLOCKED;
-   cam_iosched_submit_trim(softc->cam_iosched);/* XXX 
*/
+   /*
+* Note: We can have multiple TRIMs in flight, so we 
don't call
+* cam_iosched_submit_trim(softc->cam_iosched);
+* since that forces the I/O scheduler to only schedule 
one at a time.
+* On NVMe drives, this is a performance disaster.
+*/
goto out;
}
case BIO_FLUSH:
@@ -1013,7 +1018,11 @@ ndadone(struct cam_periph *periph, union ccb *done_ccb
TAILQ_INIT();
TAILQ_CONCAT(, >trim_req.bps, bio_queue);
 #endif
-   cam_iosched_trim_done(softc->cam_iosched);
+   /*
+* Since we can have multiple trims in flight, we don't
+* need to call this here.
+* cam_iosched_trim_done(softc->cam_iosched);
+*/
ndaschedule(periph);
cam_periph_unlock(periph);
 #ifdef notyet
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323624 - head/sys/cam

2017-09-15 Thread Warner Losh
Author: imp
Date: Fri Sep 15 20:15:55 2017
New Revision: 323624
URL: https://svnweb.freebsd.org/changeset/base/323624

Log:
  Update comments on what the CAM_IOSCHED_FLAG_TRIM_ACTIVE means.
  
  It's intended only for those situations where the periph driver
  ones to limit the number of trims active to one and only one.
  Also update comments on associated functions.
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==
--- head/sys/cam/cam_iosched.c  Fri Sep 15 20:12:38 2017(r323623)
+++ head/sys/cam/cam_iosched.c  Fri Sep 15 20:15:55 2017(r323624)
@@ -673,7 +673,10 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp)
 }
 #endif
 
-   /* Trim or similar currently pending completion */
+/*
+ * Trim or similar currently pending completion. Should only be set for
+ * those drivers wishing only one Trim active at a time.
+ */
 #define CAM_IOSCHED_FLAG_TRIM_ACTIVE   (1ul << 0)
/* Callout active, and needs to be torn down */
 #define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
@@ -1387,7 +1390,7 @@ cam_iosched_schedule(struct cam_iosched_softc *isc, st
 }
 
 /*
- * Complete a trim request
+ * Complete a trim request. Mark that we no longer have one in flight.
  */
 void
 cam_iosched_trim_done(struct cam_iosched_softc *isc)
@@ -1437,7 +1440,8 @@ cam_iosched_bio_complete(struct cam_iosched_softc *isc
 
 /*
  * Tell the io scheduler that you've pushed a trim down into the sim.
- * xxx better place for this?
+ * This also tells the I/O scheduler not to push any more trims down, so
+ * some periphs do not call it if they can cope with multiple trims in flight.
  */
 void
 cam_iosched_submit_trim(struct cam_iosched_softc *isc)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323623 - head/lib/libc/sys

2017-09-15 Thread Ed Maste
Author: emaste
Date: Fri Sep 15 20:12:38 2017
New Revision: 323623
URL: https://svnweb.freebsd.org/changeset/base/323623

Log:
  rename(2): document capability mode errors
  
  Reviewed by:  allanjude
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D12339

Modified:
  head/lib/libc/sys/rename.2

Modified: head/lib/libc/sys/rename.2
==
--- head/lib/libc/sys/rename.2  Fri Sep 15 20:05:55 2017(r323622)
+++ head/lib/libc/sys/rename.2  Fri Sep 15 20:12:38 2017(r323623)
@@ -28,7 +28,7 @@
 .\" @(#)rename.2   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd April 10, 2008
+.Dd September 15, 2017
 .Dt RENAME 2
 .Os
 .Sh NAME
@@ -252,6 +252,9 @@ The
 .Fa to
 argument
 is a directory and is not empty.
+.It Bq Er ECAPMODE
+.Fn rename
+was called and the process is in capability mode.
 .El
 .Pp
 In addition to the errors returned by the
@@ -288,6 +291,26 @@ argument is not an absolute path and
 is neither
 .Dv AT_FDCWD
 nor a file descriptor associated with a directory.
+.It Bq Er ECAPMODE
+.Dv AT_FDCWD
+is specified and the process is in capability mode.
+.It Bq Er ENOTCAPABLE
+.Fa path
+is an absolute path or contained a ".." component leading to a directory
+outside of the directory hierarchy specified by
+.Fa fromfd
+or
+.Fa tofd .
+.It Bq Er ENOTCAPABLE
+The
+.Fa fromfd
+file descriptor lacks the
+.Dv CAP_RENAMEAT_SOURCE
+right, or the
+.Fa tofd
+file descriptor lacks the
+.Dv CAP_RENAMEAT_TARGET
+right.
 .El
 .Sh SEE ALSO
 .Xr chflags 2 ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323622 - head/lib/libc/sys

2017-09-15 Thread Ed Maste
Author: emaste
Date: Fri Sep 15 20:05:55 2017
New Revision: 323622
URL: https://svnweb.freebsd.org/changeset/base/323622

Log:
  open(2): update ENOTCAPABLE description for .. lookups
  
  After r308212 Capsicum permits .. lookups in capability mode, as long as
  path component traversal does not escape the directory corresponding to
  the provided file descriptor.
  
  We should add a description of the vfs.lookup_cap_dotdot and
  vfs.lookup_cap_dotdot_nonlocal sysctls, perhaps as a cross-reference to
  capsicum(4). I intend to look at that soon.
  
  Reviewed by:  bjk, cem, kib
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D12343

Modified:
  head/lib/libc/sys/open.2

Modified: head/lib/libc/sys/open.2
==
--- head/lib/libc/sys/open.2Fri Sep 15 19:56:21 2017(r323621)
+++ head/lib/libc/sys/open.2Fri Sep 15 20:05:55 2017(r323622)
@@ -28,7 +28,7 @@
 .\" @(#)open.2 8.2 (Berkeley) 11/16/93
 .\" $FreeBSD$
 .\"
-.Dd November 22, 2016
+.Dd September 15, 2017
 .Dt OPEN 2
 .Os
 .Sh NAME
@@ -487,7 +487,9 @@ is specified and the process is in capability mode.
 was called and the process is in capability mode.
 .It Bq Er ENOTCAPABLE
 .Fa path
-is an absolute path or contained "..".
+is an absolute path or contained a ".." component leading to a
+directory outside of the directory hierarchy specified by
+.Fa fd .
 .El
 .Sh SEE ALSO
 .Xr chmod 2 ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323621 - head/sys/mips/include

2017-09-15 Thread Landon J. Fuller
Author: landonf
Date: Fri Sep 15 19:56:21 2017
New Revision: 323621
URL: https://svnweb.freebsd.org/changeset/base/323621

Log:
  Add MIPS32/64 Rev2 CP0 intctl register definitions.
  
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D12300

Modified:
  head/sys/mips/include/cpufunc.h
  head/sys/mips/include/cpuregs.h

Modified: head/sys/mips/include/cpufunc.h
==
--- head/sys/mips/include/cpufunc.h Fri Sep 15 19:48:48 2017
(r323620)
+++ head/sys/mips/include/cpufunc.h Fri Sep 15 19:56:21 2017
(r323621)
@@ -279,6 +279,15 @@ MIPS_RW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1);
 MIPS_RW32_COP0(prid, MIPS_COP_0_PRID);
 /* XXX 64-bit?  */
 MIPS_RW32_COP0_SEL(ebase, MIPS_COP_0_PRID, 1);
+
+#if defined(CPU_MIPS24K) || defined(CPU_MIPS34K) ||\
+defined(CPU_MIPS74K) || defined(CPU_MIPS1004K)  || \
+defined(CPU_MIPS1074K) || defined(CPU_INTERAPTIV) ||   \
+defined(CPU_PROAPTIV)
+/* MIPS32/64 r2 intctl */
+MIPS_RW32_COP0_SEL(intctl, MIPS_COP_0_INTCTL, 1);
+#endif
+
 #ifdef CPU_XBURST
 MIPS_RW32_COP0_SEL(xburst_mbox0, MIPS_COP_0_XBURST_MBOX, 0);
 MIPS_RW32_COP0_SEL(xburst_mbox1, MIPS_COP_0_XBURST_MBOX, 1);

Modified: head/sys/mips/include/cpuregs.h
==
--- head/sys/mips/include/cpuregs.h Fri Sep 15 19:48:48 2017
(r323620)
+++ head/sys/mips/include/cpuregs.h Fri Sep 15 19:56:21 2017
(r323621)
@@ -468,6 +468,7 @@
  * 10  MIPS_COP_0_TLB_HI   3636 TLB entry high.
  * 11  MIPS_COP_0_COMPARE  .333 Compare (against Count).
  * 12  MIPS_COP_0_STATUS    Status register.
+ * 12/1MIPS_COP_0_INTCTL   ..33 Interrupt setup (MIPS32/64 r2).
  * 13  MIPS_COP_0_CAUSE Exception cause register.
  * 14  MIPS_COP_0_EXC_PC   3636 Exception PC.
  * 15  MIPS_COP_0_PRID  Processor revision identifier.
@@ -548,6 +549,7 @@
 /* MIPS32/64 */
 #defineMIPS_COP_0_USERLOCAL_(4)/* sel 2 is userlevel register 
*/
 #defineMIPS_COP_0_HWRENA   _(7)
+#defineMIPS_COP_0_INTCTL   _(12)
 #defineMIPS_COP_0_DEBUG_(23)
 #defineMIPS_COP_0_DEPC _(24)
 #defineMIPS_COP_0_PERFCNT  _(25)
@@ -560,6 +562,16 @@
 #define MIPS_MMU_TLB   0x01/* Standard TLB */
 #define MIPS_MMU_BAT   0x02/* Standard BAT */
 #define MIPS_MMU_FIXED 0x03/* Standard fixed 
mapping */
+
+/*
+ * IntCtl Register Fields
+ */
+#defineMIPS_INTCTL_IPTI_MASK   0xE000  /* bits 31..29 timer 
intr # */
+#defineMIPS_INTCTL_IPTI_SHIFT  29
+#defineMIPS_INTCTL_IPPCI_MASK  0x1C00  /* bits 26..29 perf 
counter intr # */
+#defineMIPS_INTCTL_IPPCI_SHIFT 26
+#defineMIPS_INTCTL_VS_MASK 0x01F0  /* bits 5..9 vector 
spacing */
+#defineMIPS_INTCTL_VS_SHIFT4
 
 /*
  * Config Register Fields
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323620 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise

2017-09-15 Thread Bryan Drewery
Author: bdrewery
Date: Fri Sep 15 19:48:48 2017
New Revision: 323620
URL: https://svnweb.freebsd.org/changeset/base/323620

Log:
  Fix the raise tests.
  
  - The exit probe was not appropriately filtered to only the known pid so it
was firing on any random process that would exit rather the only the one
we cared about.
  - The dtest script executes the tst.raise*.exe in the background from
POSIX sh without jobs control.  POSIX mandates that SIGINT be set to
SIG_IGN in this case.  The test executable never actually tested that
SIGINT could be caught despite trying to block and delay the signal.
So the SIGINT sent from raise() is never actually received since it
is ignored.  This could be fixed by calling 'trap - INT' from dtest
before running the executable but I've opted to just use SIGUSR1
instead in these specific tests rather than adding more logic to
test that SIGINT is not ignored at startup.
  
  These 2 issues meant that the tests would randomly work but only if a process
  coincidentally exited during the test.
  
  Reviewed by:  markj
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c
==
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c 
Fri Sep 15 19:47:44 2017(r323619)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.c 
Fri Sep 15 19:48:48 2017(r323620)
@@ -35,13 +35,13 @@ main(int argc, char **argv)
sigset_t ss;
 
(void) sigemptyset();
-   (void) sigaddset(, SIGINT);
+   (void) sigaddset(, SIGUSR1);
(void) sigprocmask(SIG_BLOCK, , NULL);
 
do {
(void) getpid();
(void) sigpending();
-   } while (!sigismember(, SIGINT));
+   } while (!sigismember(, SIGUSR1));
 
return (0);
 }

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d
==
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d 
Fri Sep 15 19:47:44 2017(r323619)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d 
Fri Sep 15 19:48:48 2017(r323620)
@@ -47,7 +47,7 @@ syscall::getpid:entry
 /pid == $1/
 {
trace("raised");
-   raise(SIGINT);
+   raise(SIGUSR1);
/*
 * Wait no more than half a second for the process to die.
 */
@@ -55,6 +55,7 @@ syscall::getpid:entry
 }
 
 syscall::exit:entry
+/pid == $1/
 {
exit(0);
 }

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c
==
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c 
Fri Sep 15 19:47:44 2017(r323619)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c 
Fri Sep 15 19:48:48 2017(r323620)
@@ -45,7 +45,7 @@ main(int argc, char **argv)
sigemptyset(_mask);
sa.sa_flags = 0;
 
-   (void) sigaction(SIGINT, , NULL);
+   (void) sigaction(SIGUSR1, , NULL);
 
for (;;) {
(void) getpid();

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d
==
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d 
Fri Sep 15 19:47:44 2017(r323619)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d 
Fri Sep 15 19:48:48 2017(r323620)
@@ -47,7 +47,7 @@ syscall::getpid:return
 /pid == $1/
 {
trace("raised");
-   raise(SIGINT);
+   raise(SIGUSR1);
/*
 * Wait no more than half a second for the process to die.
 */
@@ -55,6 +55,7 @@ syscall::getpid:return
 }
 
 syscall::exit:entry
+/pid == $1/
 {
exit(0);
 }

Modified: 
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c
==
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c 
Fri Sep 15 19:47:44 2017(r323619)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c 
Fri Sep 15 19:48:48 2017(r323620)

svn commit: r323619 - in head/sys: arm/broadcom/bcm2835 cam/mmc conf dev/mmc/host

2017-09-15 Thread Ilya Bakulin
Author: kibab
Date: Fri Sep 15 19:47:44 2017
New Revision: 323619
URL: https://svnweb.freebsd.org/changeset/base/323619

Log:
  Miscellaneous fixes and improvements to MMCCAM stack
  
   * Demote the level of several debug messages to CAM_DEBUG_TRACE
   * Add detection for SDHC cards that can do 1.8V. No voltage switch sequence
 is issued yet;
   * Don't create a separate LUN for each SDIO function. We need just one to 
make
 pass(4) attach;
   * Remove obsolete mmc_sdio* files. SDIO functionality will be moved into the
 separate device that will manage a new sdio(4) bus;
   * Terminate probing if got no reply to CMD0;
   * Make bcm2835 SDHCI host controller driver compile with 'option MMCCAM'.
  
  Approved by:  imp (mentor)
  Differential Revision:https://reviews.freebsd.org/D12109

Deleted:
  head/sys/cam/mmc/mmc_sdio.c
  head/sys/cam/mmc/mmc_sdio.h
Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
  head/sys/cam/mmc/mmc.h
  head/sys/cam/mmc/mmc_da.c
  head/sys/cam/mmc/mmc_xpt.c
  head/sys/conf/files
  head/sys/dev/mmc/host/dwmmc.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Fri Sep 15 19:17:30 
2017(r323618)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Fri Sep 15 19:47:44 
2017(r323619)
@@ -685,4 +685,6 @@ static driver_t bcm_sdhci_driver = {
 DRIVER_MODULE(sdhci_bcm, simplebus, bcm_sdhci_driver, bcm_sdhci_devclass,
 NULL, NULL);
 MODULE_DEPEND(sdhci_bcm, sdhci, 1, 1, 1);
+#ifndef MMCCAM
 MMC_DECLARE_BRIDGE(sdhci_bcm);
+#endif

Modified: head/sys/cam/mmc/mmc.h
==
--- head/sys/cam/mmc/mmc.h  Fri Sep 15 19:17:30 2017(r323618)
+++ head/sys/cam/mmc/mmc.h  Fri Sep 15 19:47:44 2017(r323619)
@@ -87,6 +87,7 @@ struct mmc_params {
 #define CARD_FEATURE_SDIO   0x1 << 2
 #define CARD_FEATURE_SD20   0x1 << 3
 #define CARD_FEATURE_MMC0x1 << 4
+#define CARD_FEATURE_18V0x1 << 5
 
 uint8_t sdio_func_count;
 } __packed;

Modified: head/sys/cam/mmc/mmc_da.c
==
--- head/sys/cam/mmc/mmc_da.c   Fri Sep 15 19:17:30 2017(r323618)
+++ head/sys/cam/mmc/mmc_da.c   Fri Sep 15 19:47:44 2017(r323619)
@@ -378,8 +378,7 @@ sddaopen(struct disk *dp)
return (error);
}
 
-   CAM_DEBUG(periph->path, CAM_DEBUG_TRACE | CAM_DEBUG_PERIPH,
-   ("sddaopen\n"));
+   CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddaopen\n"));
 
softc = (struct sdda_softc *)periph->softc;
softc->flags |= SDDA_FLAG_OPEN;
@@ -403,8 +402,7 @@ sddaclose(struct disk *dp)
 
cam_periph_lock(periph);
 
-   CAM_DEBUG(periph->path, CAM_DEBUG_TRACE | CAM_DEBUG_PERIPH,
-   ("sddaclose\n"));
+   CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sddaclose\n"));
 
while (softc->refcount != 0)
cam_periph_sleep(periph, >refcount, PRIBIO, "sddaclose", 
1);

Modified: head/sys/cam/mmc/mmc_xpt.c
==
--- head/sys/cam/mmc/mmc_xpt.c  Fri Sep 15 19:17:30 2017(r323618)
+++ head/sys/cam/mmc/mmc_xpt.c  Fri Sep 15 19:47:44 2017(r323619)
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 
 #include /* for xpt_print below */
 #include   /* for PRIu64 */
@@ -162,6 +161,7 @@ typedef struct {
union ccb   saved_ccb;
uint32_tflags;
 #define PROBE_FLAG_ACMD_SENT   0x1 /* CMD55 is sent, card expects ACMD */
+   uint8_t acmd41_count; /* how many times ACMD41 has been issued 
*/
struct cam_periph *periph;
 } mmcprobe_softc;
 
@@ -219,6 +219,8 @@ mmc_dev_async(u_int32_t async_code, struct cam_eb *bus
 printf("Got AC_PATH_REGISTERED -- whatever...\n");
 } else if (async_code == AC_PATH_DEREGISTERED ) {
 printf("Got AC_PATH_DEREGISTERED -- whatever...\n");
+   } else if (async_code == AC_UNIT_ATTENTION) {
+   printf("Got interrupt generated by the card and ignored it\n");
} else
panic("Unknown async code\n");
 }
@@ -299,9 +301,9 @@ mmc_scan_lun(struct cam_periph *periph, struct cam_pat
 static void
 mmc_action(union ccb *start_ccb)
 {
-   CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_INFO,
+   CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE,
  ("mmc_action! func_code=%x, action %s\n", 
start_ccb->ccb_h.func_code,
-   xpt_action_name(start_ccb->ccb_h.func_code)));
+  xpt_action_name(start_ccb->ccb_h.func_code)));
switch (start_ccb->ccb_h.func_code) {
 
case XPT_SCAN_BUS:
@@ -486,6 +488,7 @@ mmcprobe_register(struct cam_periph *periph, void *arg
}
 
softc->flags = 0;
+ 

svn commit: r323616 - head/sys/vm

2017-09-15 Thread Konstantin Belousov
Author: kib
Date: Fri Sep 15 16:07:09 2017
New Revision: 323616
URL: https://svnweb.freebsd.org/changeset/base/323616

Log:
  Batch freeing of the pages in vm_object_page_remove() under the same
  free queue mutex lock owning session, same as it was done for the
  object termination in r323561.
  
  Reported and tested by:   mjg
  Reviewed by:  alc, markj
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/vm/vm_object.c

Modified: head/sys/vm/vm_object.c
==
--- head/sys/vm/vm_object.c Fri Sep 15 15:57:15 2017(r323615)
+++ head/sys/vm/vm_object.c Fri Sep 15 16:07:09 2017(r323616)
@@ -1953,6 +1953,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t 
 {
vm_page_t p, next;
struct mtx *mtx;
+   struct pglist pgl;
 
VM_OBJECT_ASSERT_WLOCKED(object);
KASSERT((object->flags & OBJ_UNMANAGED) == 0 ||
@@ -1961,6 +1962,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t 
if (object->resident_page_count == 0)
return;
vm_object_pip_add(object, 1);
+   TAILQ_INIT();
 again:
p = vm_page_find_least(object, start);
mtx = NULL;
@@ -2012,10 +2014,13 @@ again:
}
if ((options & OBJPR_NOTMAPPED) == 0)
pmap_remove_all(p);
-   vm_page_free(p);
+   p->flags &= ~PG_ZERO;
+   if (vm_page_free_prep(p, false))
+   TAILQ_INSERT_TAIL(, p, listq);
}
if (mtx != NULL)
mtx_unlock(mtx);
+   vm_page_free_phys_pglist();
vm_object_pip_wakeup(object);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323615 - head/share/mk

2017-09-15 Thread Kyle Evans
Author: kevans
Date: Fri Sep 15 15:57:15 2017
New Revision: 323615
URL: https://svnweb.freebsd.org/changeset/base/323615

Log:
  bsdgrep: disable TRE implementation by default
  
  Start the phasing out of TRE by disabling it by default. r317254 introduced
  a BSD_GREP_FASTMATCH knob (defaulting to on) for testing of bsdgrep with and
  without TRE enabled. More bugs have cropped up since then, and
  WITHOUT_BSD_GREP_FASTMATCH has shown in testing to be more stable than its
  counterpart.
  
  Approved by:  emaste (mentor)
  Differential Revision:https://reviews.freebsd.org/D12381

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Fri Sep 15 15:41:07 2017(r323614)
+++ head/share/mk/src.opts.mk   Fri Sep 15 15:57:15 2017(r323615)
@@ -62,7 +62,6 @@ __DEFAULT_YES_OPTIONS = \
 BOOTPARAMD \
 BOOTPD \
 BSD_CPIO \
-BSD_GREP_FASTMATCH \
 BSDINSTALL \
 BSNMP \
 BZIP2 \
@@ -175,6 +174,7 @@ __DEFAULT_YES_OPTIONS = \
 
 __DEFAULT_NO_OPTIONS = \
 BSD_GREP \
+BSD_GREP_FASTMATCH \
 CLANG_EXTRAS \
 DTRACE_TESTS \
 GNU_GREP_COMPAT \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323614 - head/usr.sbin/acpi/acpidump

2017-09-15 Thread Scott Long
Author: scottl
Date: Fri Sep 15 15:41:07 2017
New Revision: 323614
URL: https://svnweb.freebsd.org/changeset/base/323614

Log:
  Add support for parsing the Watchdog Descriptor Table (WDDT)
  
  Sponsored by: Netflix

Modified:
  head/usr.sbin/acpi/acpidump/acpi.c
  head/usr.sbin/acpi/acpidump/acpidump.8

Modified: head/usr.sbin/acpi/acpidump/acpi.c
==
--- head/usr.sbin/acpi/acpidump/acpi.c  Fri Sep 15 14:59:35 2017
(r323613)
+++ head/usr.sbin/acpi/acpidump/acpi.c  Fri Sep 15 15:41:07 2017
(r323614)
@@ -65,6 +65,7 @@ static void   acpi_handle_ecdt(ACPI_TABLE_HEADER *sdp);
 static voidacpi_handle_hpet(ACPI_TABLE_HEADER *sdp);
 static voidacpi_handle_mcfg(ACPI_TABLE_HEADER *sdp);
 static voidacpi_handle_slit(ACPI_TABLE_HEADER *sdp);
+static voidacpi_handle_wddt(ACPI_TABLE_HEADER *sdp);
 static voidacpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain,
uint32_t flags);
 static voidacpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp);
@@ -679,6 +680,40 @@ acpi_handle_slit(ACPI_TABLE_HEADER *sdp)
 }
 
 static void
+acpi_handle_wddt(ACPI_TABLE_HEADER *sdp)
+{
+   ACPI_TABLE_WDDT *wddt;
+
+   printf(BEGIN_COMMENT);
+   acpi_print_sdt(sdp);
+   wddt = (ACPI_TABLE_WDDT *)sdp;
+   printf("\tSpecVersion=0x%04x, TableVersion=0x%04x\n",
+   wddt->SpecVersion, wddt->TableVersion);
+   printf("\tPciVendorId=0x%04x, Address=", wddt->PciVendorId);
+   acpi_print_gas(>Address);
+   printf("\n\tMaxCount=%u, MinCount=%u, Period=%ums\n",
+   wddt->MaxCount, wddt->MinCount, wddt->Period);
+
+#definePRINTFLAG(var, flag)printflag((var), ACPI_WDDT_## flag, 
#flag)
+   printf("\tStatus=");
+   PRINTFLAG(wddt->Status, AVAILABLE);
+   PRINTFLAG(wddt->Status, ACTIVE);
+   PRINTFLAG(wddt->Status, TCO_OS_OWNED);
+   PRINTFLAG(wddt->Status, USER_RESET);
+   PRINTFLAG(wddt->Status, WDT_RESET);
+   PRINTFLAG(wddt->Status, POWER_FAIL);
+   PRINTFLAG(wddt->Status, UNKNOWN_RESET);
+   PRINTFLAG_END();
+   printf("\tCapability=");
+   PRINTFLAG(wddt->Capability, AUTO_RESET);
+   PRINTFLAG(wddt->Capability, ALERT_SUPPORT);
+   PRINTFLAG_END();
+#undef PRINTFLAG
+
+   printf(END_COMMENT);
+}
+
+static void
 acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain,
 uint32_t flags)
 {
@@ -1654,6 +1689,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp)
acpi_handle_dmar(sdp);
else if (!memcmp(sdp->Signature, ACPI_SIG_NFIT, 4))
acpi_handle_nfit(sdp);
+   else if (!memcmp(sdp->Signature, ACPI_SIG_WDDT, 4))
+   acpi_handle_wddt(sdp);
else {
printf(BEGIN_COMMENT);
acpi_print_sdt(sdp);

Modified: head/usr.sbin/acpi/acpidump/acpidump.8
==
--- head/usr.sbin/acpi/acpidump/acpidump.8  Fri Sep 15 14:59:35 2017
(r323613)
+++ head/usr.sbin/acpi/acpidump/acpidump.8  Fri Sep 15 15:41:07 2017
(r323614)
@@ -107,6 +107,7 @@ utility dumps contents of the following tables:
 .It MCFG
 .It RSD PTR
 .It RSDT
+.It WDDT
 .El
 .Pp
 The RSDT contains a pointer to the physical memory address of the FACP
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323613 - head/sys/vm

2017-09-15 Thread Mark Johnston
Author: markj
Date: Fri Sep 15 14:59:35 2017
New Revision: 323613
URL: https://svnweb.freebsd.org/changeset/base/323613

Log:
  Include _bitset.h to get BITSET_DEFINE, used to define struct slabbits.
  
  MFC after:1 week

Modified:
  head/sys/vm/uma_int.h

Modified: head/sys/vm/uma_int.h
==
--- head/sys/vm/uma_int.h   Fri Sep 15 13:57:08 2017(r323612)
+++ head/sys/vm/uma_int.h   Fri Sep 15 14:59:35 2017(r323613)
@@ -28,6 +28,7 @@
  *
  */
 
+#include 
 #include 
 
 /* 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323612 - head/sys/geom/mirror

2017-09-15 Thread Andriy Gapon
Author: avg
Date: Fri Sep 15 13:57:08 2017
New Revision: 323612
URL: https://svnweb.freebsd.org/changeset/base/323612

Log:
  gmirror: treat ENXIO as disk disconnect, not media error
  
  In theory, all data access errors mean that a member is out of sync
  at most.  But they were treated as more serious errors to avoid the
  situation where a flaky disk gets repeatedly disconnected, re-synchronized,
  reconnected and then disconnected again.
  
  ENXIO is a special error that means that the member disk disappeared,
  so it should get the same handling as the GEOM orphaning event.
  There is a better chance that when the disk is reconnected, it will be
  a good member again.
  
  When ENXIO happens on a read we use the exisiting G_MIRROR_BUMP_SYNCID
  mechanism which means that the mirror's syncid is increased as soon
  as there is a write to the mirror.  That's because no data has got out
  of sync yet, but the problematic memeber is disconnected, so the future
  write will make it stale.
  
  When ENXIO happens on a write we use a new G_MIRROR_BUMP_SYNCID_NOW
  mechanism which means that we update the mirror metadata as soon as
  possible because the problematic memeber is already behind.
  
  Reviewed by:  markj, imp
  MFC after:3 weeks
  Differential Revision: https://reviews.freebsd.org/D9463

Modified:
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/mirror/g_mirror.h

Modified: head/sys/geom/mirror/g_mirror.c
==
--- head/sys/geom/mirror/g_mirror.c Fri Sep 15 13:34:00 2017
(r323611)
+++ head/sys/geom/mirror/g_mirror.c Fri Sep 15 13:57:08 2017
(r323612)
@@ -982,7 +982,13 @@ g_mirror_regular_request(struct bio *bp)
if (g_mirror_disconnect_on_failure &&
g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE) > 1)
{
-   sc->sc_bump_id |= G_MIRROR_BUMP_GENID;
+   if (bp->bio_error == ENXIO &&
+   bp->bio_cmd == BIO_READ)
+   sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID;
+   else if (bp->bio_error == ENXIO)
+   sc->sc_bump_id |= 
G_MIRROR_BUMP_SYNCID_NOW;
+   else
+   sc->sc_bump_id |= G_MIRROR_BUMP_GENID;
g_mirror_event_send(disk,
G_MIRROR_DISK_STATE_DISCONNECTED,
G_MIRROR_EVENT_DONTWAIT);
@@ -2517,6 +2523,10 @@ g_mirror_update_device(struct g_mirror_softc *sc, bool
if ((sc->sc_bump_id & G_MIRROR_BUMP_GENID) != 0) {
sc->sc_bump_id &= ~G_MIRROR_BUMP_GENID;
g_mirror_bump_genid(sc);
+   }
+   if ((sc->sc_bump_id & G_MIRROR_BUMP_SYNCID_NOW) != 0) {
+   sc->sc_bump_id &= ~G_MIRROR_BUMP_SYNCID_NOW;
+   g_mirror_bump_syncid(sc);
}
break;
default:

Modified: head/sys/geom/mirror/g_mirror.h
==
--- head/sys/geom/mirror/g_mirror.h Fri Sep 15 13:34:00 2017
(r323611)
+++ head/sys/geom/mirror/g_mirror.h Fri Sep 15 13:57:08 2017
(r323612)
@@ -169,9 +169,11 @@ struct g_mirror_event {
 #defineG_MIRROR_TYPE_AUTOMATIC 1
 
 /* Bump syncid on first write. */
-#defineG_MIRROR_BUMP_SYNCID0x1
+#defineG_MIRROR_BUMP_SYNCID0x1
 /* Bump genid immediately. */
-#defineG_MIRROR_BUMP_GENID 0x2
+#defineG_MIRROR_BUMP_GENID 0x2
+/* Bump syncid immediately. */
+#defineG_MIRROR_BUMP_SYNCID_NOW0x4
 struct g_mirror_softc {
u_int   sc_type;/* Device type (manual/automatic). */
u_int   sc_state;   /* Device state. */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323611 - head/usr.bin/grep/regex

2017-09-15 Thread Ed Maste
Author: emaste
Date: Fri Sep 15 13:34:00 2017
New Revision: 323611
URL: https://svnweb.freebsd.org/changeset/base/323611

Log:
  fastmatch.h: remove duplicate #defines
  
  Reviewed by:  kevans
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D12375

Modified:
  head/usr.bin/grep/regex/fastmatch.h

Modified: head/usr.bin/grep/regex/fastmatch.h
==
--- head/usr.bin/grep/regex/fastmatch.h Fri Sep 15 12:57:34 2017
(r323610)
+++ head/usr.bin/grep/regex/fastmatch.h Fri Sep 15 13:34:00 2017
(r323611)
@@ -92,17 +92,4 @@ tre_fastwnexec(const fastmatch_t *preg, const wchar_t 
 #define fastexec   tre_fastexec
 #define fastwnexec tre_fastwnexec
 #define fastwexec  tre_fastwexec
-#define fixcomptre_fixcomp
-#define fastcomp   tre_fastcomp
-#define fastexec   tre_fastexec
-#define fastfree   tre_fastfree
-#define fixwcomp   tre_fixwcomp
-#define fastwcomp  tre_fastwcomp
-#define fastwexec  tre_fastwexec
-#define fixncomp   tre_fixncomp
-#define fastncomp  tre_fastncomp
-#define fastnexec  tre_fastnexec
-#define fixwncomp  tre_fixwncomp
-#define fastwncomp tre_fastwncomp
-#define fastwnexec tre_fastwnexec
 #endif /* FASTMATCH_H */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r323610 - in head/sys/arm64: arm64 include

2017-09-15 Thread Andrew Turner
Author: andrew
Date: Fri Sep 15 12:57:34 2017
New Revision: 323610
URL: https://svnweb.freebsd.org/changeset/base/323610

Log:
  Add the ARMv8.3 ID register fields. These were found in the A-Profile
  exploration tools documentation:
  https://developer.arm.com/products/architecture/a-profile/exploration-tools
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm64/arm64/identcpu.c
  head/sys/arm64/include/armreg.h

Modified: head/sys/arm64/arm64/identcpu.c
==
--- head/sys/arm64/arm64/identcpu.c Fri Sep 15 09:03:01 2017
(r323609)
+++ head/sys/arm64/arm64/identcpu.c Fri Sep 15 12:57:34 2017
(r323610)
@@ -282,6 +282,9 @@ print_cpu_features(u_int cpu)
case ID_AA64ISAR0_SHA2_BASE:
printf("%sSHA2", SEP_STR);
break;
+   case ID_AA64ISAR0_SHA2_512:
+   printf("%sSHA2+SHA512", SEP_STR);
+   break;
default:
printf("%sUnknown SHA2", SEP_STR);
break;
@@ -298,6 +301,50 @@ print_cpu_features(u_int cpu)
break;
}
 
+   switch (ID_AA64ISAR0_SHA3(cpu_desc[cpu].id_aa64isar0)) {
+   case ID_AA64ISAR0_SHA3_NONE:
+   break;
+   case ID_AA64ISAR0_SHA3_IMPL:
+   printf("%sSHA3", SEP_STR);
+   break;
+   default:
+   printf("%sUnknown SHA3", SEP_STR);
+   break;
+   }
+
+   switch (ID_AA64ISAR0_SM3(cpu_desc[cpu].id_aa64isar0)) {
+   case ID_AA64ISAR0_SM3_NONE:
+   break;
+   case ID_AA64ISAR0_SM3_IMPL:
+   printf("%sSM3", SEP_STR);
+   break;
+   default:
+   printf("%sUnknown SM3", SEP_STR);
+   break;
+   }
+
+   switch (ID_AA64ISAR0_SM4(cpu_desc[cpu].id_aa64isar0)) {
+   case ID_AA64ISAR0_SM4_NONE:
+   break;
+   case ID_AA64ISAR0_SM4_IMPL:
+   printf("%sSM4", SEP_STR);
+   break;
+   default:
+   printf("%sUnknown SM4", SEP_STR);
+   break;
+   }
+
+   switch (ID_AA64ISAR0_DP(cpu_desc[cpu].id_aa64isar0)) {
+   case ID_AA64ISAR0_DP_NONE:
+   break;
+   case ID_AA64ISAR0_DP_IMPL:
+   printf("%sDotProd", SEP_STR);
+   break;
+   default:
+   printf("%sUnknown DP", SEP_STR);
+   break;
+   }
+
if ((cpu_desc[cpu].id_aa64isar0 & ~ID_AA64ISAR0_MASK) != 0)
printf("%s%#lx", SEP_STR,
cpu_desc[cpu].id_aa64isar0 & ~ID_AA64ISAR0_MASK);
@@ -310,6 +357,83 @@ print_cpu_features(u_int cpu)
printed = 0;
printf(" Instruction Set Attributes 1 = <");
 
+   switch (ID_AA64ISAR1_GPI(cpu_desc[cpu].id_aa64isar1)) {
+   case ID_AA64ISAR1_GPI_NONE:
+   break;
+   case ID_AA64ISAR1_GPI_IMPL:
+   printf("%sImpl GenericAuth", SEP_STR);
+   break;
+   default:
+   printf("%sUnknown GenericAuth", SEP_STR);
+   break;
+   }
+
+   switch (ID_AA64ISAR1_GPA(cpu_desc[cpu].id_aa64isar1)) {
+   case ID_AA64ISAR1_GPA_NONE:
+   break;
+   case ID_AA64ISAR1_GPA_IMPL:
+   printf("%sPrince GenericAuth", SEP_STR);
+   break;
+   default:
+   printf("%sUnknown GenericAuth", SEP_STR);
+   break;
+   }
+
+   switch (ID_AA64ISAR1_LRCPC(cpu_desc[cpu].id_aa64isar1)) {
+   case ID_AA64ISAR1_LRCPC_NONE:
+   break;
+   case ID_AA64ISAR1_LRCPC_IMPL:
+   printf("%sRCpc", SEP_STR);
+   break;
+   default:
+   printf("%sUnknown RCpc", SEP_STR);
+   break;
+   }
+
+   switch (ID_AA64ISAR1_FCMA(cpu_desc[cpu].id_aa64isar1)) {
+   case ID_AA64ISAR1_FCMA_NONE:
+   break;
+   case ID_AA64ISAR1_FCMA_IMPL:
+   printf("%sFCMA", SEP_STR);
+   break;
+   default:
+   printf("%sUnknown FCMA", SEP_STR);
+   break;
+   }
+
+   switch (ID_AA64ISAR1_JSCVT(cpu_desc[cpu].id_aa64isar1)) {
+   case 

Re: svn commit: r323177 - in head: sys/compat/cloudabi sys/contrib/cloudabi usr.bin/truss

2017-09-15 Thread Jilles Tjoelker
On Tue, Sep 05, 2017 at 07:46:45AM +, Ed Schouten wrote:
> Author: ed
> Date: Tue Sep  5 07:46:45 2017
> New Revision: 323177
> URL: https://svnweb.freebsd.org/changeset/base/323177

> Log:
>   Merge pipes and socket pairs.

>   Now that CloudABI's sockets API has been changed to be addressless and
>   only connected socket instances are used (e.g., socket pairs), they have
>   become fairly similar to pipes. The only differences on CloudABI is that
>   socket pairs additionally support shutdown(), send() and recv().

>   To simplify the ABI, we've therefore decided to remove pipes as a
>   separate file descriptor type and just let pipe() return a socket pair
>   of type SOCK_STREAM. S_ISFIFO() and S_ISSOCK() are now defined
>   identically.

Although this is correct from a functionality point of view (S_IFIFO and
S_IFSOCK are probably expected to be different in a POSIX context, but
this is unlikely to break anything that is not already broken), it is a
partial reversal of previous changes to FreeBSD that created separate
implementations for pipes (first unnamed pipes in 1996, later fifos in
2012 r232055). The main reason for these changes was performance.

Unfortunately, I do not have concrete benchmarks in the CloudABI
context.

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


Re: svn commit: r323493 - head/usr.sbin/tcpdrop

2017-09-15 Thread Maxim Konovalov
Hi Michael,

On Tue, 12 Sep 2017, 13:39-, Michael Tuexen wrote:

> Author: tuexen
> Date: Tue Sep 12 13:39:44 2017
> New Revision: 323493
> URL: https://svnweb.freebsd.org/changeset/base/323493
>
> Log:
>   Allow TCP connections to be filtered by stack and state.
>
>   Choose the command line options to be consistent with the ones of
>   sockstat.
>
Makes sense?

Index: tcpdrop.8
===
--- tcpdrop.8   (revision 323607)
+++ tcpdrop.8   (working copy)
@@ -172,7 +172,8 @@ LAST_ACK state use:
 .Ed
 .Sh SEE ALSO
 .Xr netstat 1 ,
-.Xr sockstat 1
+.Xr sockstat 1 ,
+.Xr tcp_functions 9
 .Sh AUTHORS
 .An Markus Friedl Aq Mt mar...@openbsd.org
 .An Juli Mallett Aq Mt jmall...@freebsd.org

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