svn commit: r323963 - head/contrib/one-true-awk

2017-09-23 Thread Warner Losh
Author: imp
Date: Sun Sep 24 05:03:57 2017
New Revision: 323963
URL: https://svnweb.freebsd.org/changeset/base/323963

Log:
  Fix uninitialized variable
  
  echo | awk 'BEGIN {i=$1; print i}' prints a boatload of stack
  garbage. NUL terminate the memory returned from malloc to prevent it.
  
  Obtained from: OpenBSD run.c 1.40
  Sponsored by: Netflix
  Differential Revision: https://reviews.freebsd.org/D12379

Modified:
  head/contrib/one-true-awk/lib.c

Modified: head/contrib/one-true-awk/lib.c
==
--- head/contrib/one-true-awk/lib.c Sun Sep 24 03:33:26 2017
(r323962)
+++ head/contrib/one-true-awk/lib.c Sun Sep 24 05:03:57 2017
(r323963)
@@ -62,6 +62,7 @@ void recinit(unsigned int n)
  || (fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *))) == NULL
  || (fldtab[0] = (Cell *) malloc(sizeof(Cell))) == NULL )
FATAL("out of space for $0 and fields");
+   *record = '\0';
*fldtab[0] = dollar0;
fldtab[0]->sval = record;
fldtab[0]->nval = tostring("0");
___
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: r323965 - head/contrib/one-true-awk

2017-09-23 Thread Warner Losh
Author: imp
Date: Sun Sep 24 05:04:06 2017
New Revision: 323965
URL: https://svnweb.freebsd.org/changeset/base/323965

Log:
  Don't display empty error context.
  
  Context extraction didn't handle this case and showed uninitialized memory.
  
  Obtained from: OpenBSD lib.c 1.21
  Sponsored by: Netflix
  Differential Revision: https://reviews.freebsd.org/D12379

Modified:
  head/contrib/one-true-awk/lib.c

Modified: head/contrib/one-true-awk/lib.c
==
--- head/contrib/one-true-awk/lib.c Sun Sep 24 05:04:02 2017
(r323964)
+++ head/contrib/one-true-awk/lib.c Sun Sep 24 05:04:06 2017
(r323965)
@@ -617,7 +617,7 @@ void eprint(void)   /* try to print context around error
static int been_here = 0;
extern char ebuf[], *ep;
 
-   if (compile_time == 2 || compile_time == 0 || been_here++ > 0)
+   if (compile_time == 2 || compile_time == 0 || been_here++ > 0 || ebuf 
== ep)
return;
p = ep - 1;
if (p > ebuf && *p == '\n')
___
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: r323964 - head/contrib/one-true-awk

2017-09-23 Thread Warner Losh
Author: imp
Date: Sun Sep 24 05:04:02 2017
New Revision: 323964
URL: https://svnweb.freebsd.org/changeset/base/323964

Log:
  Fix %c for floating values that become 0 when coerced to int.
  
  Obtained from: OpenBSD run.c 1.36 (From Jeremy Devenport)
  Sponsored by: Netflix
  Differential Revision: https://reviews.freebsd.org/D12379

Modified:
  head/contrib/one-true-awk/run.c

Modified: head/contrib/one-true-awk/run.c
==
--- head/contrib/one-true-awk/run.c Sun Sep 24 05:03:57 2017
(r323963)
+++ head/contrib/one-true-awk/run.c Sun Sep 24 05:04:02 2017
(r323964)
@@ -918,7 +918,7 @@ int format(char **pbuf, int *pbufsize, const char *s, 
break;
case 'c':
if (isnum(x)) {
-   if (getfval(x))
+   if ((int)getfval(x))
sprintf(p, fmt, (int) getfval(x));
else {
*p++ = '\0'; /* explicit null byte */
___
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: r323962 - head/sys/contrib/ipfilter/netinet

2017-09-23 Thread Cy Schubert
Author: cy
Date: Sun Sep 24 03:33:26 2017
New Revision: 323962
URL: https://svnweb.freebsd.org/changeset/base/323962

Log:
  Fix typo from r323945.
  
  Reported by:  Gary Jennejohn 
  Point hat to: cy (me)

Modified:
  head/sys/contrib/ipfilter/netinet/ip_nat.c

Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c
==
--- head/sys/contrib/ipfilter/netinet/ip_nat.c  Sun Sep 24 02:50:59 2017
(r323961)
+++ head/sys/contrib/ipfilter/netinet/ip_nat.c  Sun Sep 24 03:33:26 2017
(r323962)
@@ -6093,7 +6093,7 @@ ipf_nat_icmpquerytype(icmptype)
{
case ICMP_ECHOREPLY:
case ICMP_ECHO:
-   /* route advertisement/soliciation is currently unsupported: */
+   /* route advertisement/solicitation is currently unsupported: */
/* it would require rewriting the ICMP data section  */
case ICMP_TSTAMP:
case ICMP_TSTAMPREPLY:
___
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: r323961 - head/sys/dev/ti

2017-09-23 Thread Alan Cox
Author: alc
Date: Sun Sep 24 02:50:59 2017
New Revision: 323961
URL: https://svnweb.freebsd.org/changeset/base/323961

Log:
  Since the page "frame" doesn't belong to a vm object, it can't be paged
  out.  Since it can't be paged out, it is never actually enqueued in a
  paging queue.  Nonetheless, passing PQ_INACTIVE to vm_page_unwire()
  creates the appearance that the page "frame" is being enqueued in the
  inactive queue.  As of r288122, we can avoid this false impression by
  passing PQ_NONE.
  
  MFC after:1 week

Modified:
  head/sys/dev/ti/if_ti.c

Modified: head/sys/dev/ti/if_ti.c
==
--- head/sys/dev/ti/if_ti.c Sun Sep 24 00:14:48 2017(r323960)
+++ head/sys/dev/ti/if_ti.c Sun Sep 24 02:50:59 2017(r323961)
@@ -1621,7 +1621,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int idx, struct m
}
sf[i] = sf_buf_alloc(frame, SFB_NOWAIT);
if (sf[i] == NULL) {
-   vm_page_unwire(frame, PQ_INACTIVE);
+   vm_page_unwire(frame, PQ_NONE);
vm_page_free(frame);
device_printf(sc->ti_dev, "buffer allocation "
"failed -- packet dropped!\n");
___
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: r323960 - head/tests/sys/opencrypto

2017-09-23 Thread Ngie Cooper
Author: ngie
Date: Sun Sep 24 00:14:48 2017
New Revision: 323960
URL: https://svnweb.freebsd.org/changeset/base/323960

Log:
  Convert some idioms over to py3k-compatible idioms
  
  - Import print_function from __future__ and use print(..) instead of `print 
..`.
  - Use repr instead of backticks when the object needs to be dumped, unless
print(..) can do it lazily. Use str instead of backticks as appropriate
for simplification reasons.
  
  This doesn't fully convert these modules over py3k. It just gets over some of
  the trivial compatibility hurdles.

Modified:
  head/tests/sys/opencrypto/cryptodev.py
  head/tests/sys/opencrypto/cryptotest.py

Modified: head/tests/sys/opencrypto/cryptodev.py
==
--- head/tests/sys/opencrypto/cryptodev.py  Sun Sep 24 00:07:18 2017
(r323959)
+++ head/tests/sys/opencrypto/cryptodev.py  Sun Sep 24 00:14:48 2017
(r323960)
@@ -30,6 +30,7 @@
 # $FreeBSD$
 #
 
+from __future__ import print_function
 import array
 import dpkt
 from fcntl import ioctl
@@ -174,9 +175,9 @@ class Crypto:
if not cipher and not mac:
raise ValueError('one of cipher or mac MUST be 
specified.')
ses.crid = crid
-   #print `ses`
+   #print(ses)
s = array.array('B', ses.pack_hdr())
-   #print `s`
+   #print(s)
ioctl(_cryptodev, CIOCGSESSION2, s, 1)
ses.unpack(s)
 
@@ -206,7 +207,7 @@ class Crypto:
ivbuf = array.array('B', iv)
cop.iv = ivbuf.buffer_info()[0]
 
-   #print 'cop:', `cop`
+   #print('cop:', cop)
ioctl(_cryptodev, CIOCCRYPT, str(cop))
 
s = s.tostring()
@@ -234,7 +235,8 @@ class Crypto:
if tag is None:
tag = array.array('B', [0] * self._maclen)
else:
-   assert len(tag) == self._maclen, `len(tag), 
self._maclen`
+   assert len(tag) == self._maclen, \
+'%d != %d' % (len(tag), self._maclen)
tag = array.array('B', tag)
 
caead.tag = tag.buffer_info()[0]
@@ -288,8 +290,8 @@ class Crypto:
 
signal.signal(signal.SIGALRM, oldalarm)
 
-   print 'time:', end - start
-   print 'perf MB/sec:', (reps * size) / (end - start) / 1024 / 
1024
+   print('time:', end - start)
+   print('perf MB/sec:', (reps * size) / (end - start) / 1024 / 
1024)
 
def encrypt(self, data, iv, aad=None):
if aad is None:
@@ -332,7 +334,7 @@ class KATParser:
if i[0] == '[':
yield i[1:].split(']', 1)[0], self.fielditer()
else:
-   raise ValueError('unknown line: %s' % `i`)
+   raise ValueError('unknown line: %r' % repr(i))
 
def eatblanks(self):
while True:
@@ -362,12 +364,12 @@ class KATParser:
if line == 'FAIL':
f, v = 'FAIL', ''
else:
-   print 'line:', `line`
+   print('line:', repr(line))
raise
v = v.strip()
 
if f in values:
-   raise ValueError('already present: %s' 
% `f`)
+   raise ValueError('already present: %r' 
% repr(f))
values[f] = v
line = self.fp.readline().strip()
if not line:
@@ -377,7 +379,7 @@ class KATParser:
remain = self.fields.copy() - set(values.keys())
# XXX - special case GCM decrypt
if remain and not ('FAIL' in values and 'PT' in remain):
-   raise ValueError('not all fields found: 
%s' % `remain`)
+   raise ValueError('not all fields found: %r' % 
repr(remain))
 
yield values
 
@@ -388,22 +390,22 @@ if __name__ == '__main__':
if True:
try:
crid = Crypto.findcrid('aesni0')
-   print 'aesni:', crid
+   print('aesni:', crid)
except IOError:
-   print 'aesni0 not found'
+   print('aesni0 not found')
 
for i in xrange(10):
try:
name = Crypto.getcridname(i)
-   print '%2d: %s' % (i, `name`)
+ 

Re: svn commit: r323942 - head/sys/net

2017-09-23 Thread Stephen Hurd

Bjoern A. Zeeb wrote:

On 23 Sep 2017, at 6:32, Stephen Hurd wrote:


Bjoern A. Zeeb wrote:

On 23 Sep 2017, at 1:35, Stephen Hurd wrote:


Author: shurd
Date: Sat Sep 23 01:35:14 2017
New Revision: 323942
URL: https://svnweb.freebsd.org/changeset/base/323942

Log:
   Chain mbufs before passing to if_input()

   Build a list of mbufs to pass to if_input() after LRO. Results in
   12% small packet forwarding rate improvement.

forwarding seems a confusing word here..


The test was small (64 byte frames) received on one interface, then 
sent out on a different one using the net.inet.ip.forwarding sysctl 
(controlled via the gateway_enable setting in rc.conf).


Then this makes no sense as we don’t do LRO if forwarding is enabled 
on the machine;

https://svnweb.freebsd.org/base/head/sys/netinet/tcp_lro.c?annotate=317390#l645


Basically, it changed from this:

foreach (mbuf in rx) {
  if (lro && tcp_lro_rx(mbuf) == 0)
continue;
  if_input(mbuf)
}

To this:

prev_mbuf = first_mbuf = NULL;
foreach (mbuf in rx) {
  if (lro && tcp_lro_rx(mbuf) == 0)
continue;
  if (prev_mbuf) {
prev_mbuf->m_nextpkt = mbuf;
prev_mbuf = mbuf;
  }
  else {
first_mbuf = prev_mbuf = mbuf;
  }
}

if (first_mbuf)
  if_input(first_mbuf);

So while before it called if_input() for each separate mbuf that was not 
LROed, it now builds a chain of mbufs that were not LROed, and makes a 
single call to if_input() with the whole chain.  For cases like packet 
forwarding where no packets are LROed, performance is better.

___
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: r323942 - head/sys/net

2017-09-23 Thread Jonathan Looney
On Sat, Sep 23, 2017 at 4:37 AM, Bjoern A. Zeeb <
bzeeb-li...@lists.zabbadoz.net> wrote:

>
> Then this makes no sense as we don’t do LRO if forwarding is enabled on
> the machine;
> https://svnweb.freebsd.org/base/head/sys/netinet/tcp_lro.c?
> annotate=317390#l645


Yes, that is true. However, this change still makes a difference.
Previously, if LRO was not enabled or the packet was not eligible for LRO,
the iflib code would call ifp->if_input() once for each packet. Now, the
iflib code will build a chain of packets for which it couldn't do LRO and
call ifp->if_input() once for the entire chain.

(I agree that was not obvious from the rather short commit message and the
diff in the email. The lack of comments or meaningful variable names did
not help to alleviate the confusion. Nonetheless, when I looked at the diff
with enough surrounding context, it became clear.)

Jonathan
___
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: r323958 - head/share/misc

2017-09-23 Thread Fedor Uporov
Author: fsu
Date: Sat Sep 23 19:49:12 2017
New Revision: 323958
URL: https://svnweb.freebsd.org/changeset/base/323958

Log:
  Add myself as src committer.
  
  Approved by:pfg (mentor)

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Sat Sep 23 18:37:37 2017
(r323957)
+++ head/share/misc/committers-src.dot  Sat Sep 23 19:49:12 2017
(r323958)
@@ -167,6 +167,7 @@ fabient [label="Fabien Thomas\nfabi...@freebsd.org\n20
 fanf [label="Tony Finch\nf...@freebsd.org\n2002/05/05"]
 fjoe [label="Max Khon\nf...@freebsd.org\n2001/08/06"]
 flz [label="Florent Thoumie\n...@freebsd.org\n2006/03/30"]
+fsu [label="Fedor Uporov\n...@freebsd.org\n2017/08/28"]
 gabor [label="Gabor Kovesdan\nga...@freebsd.org\n2010/02/02"]
 gad [label="Garance A. Drosehn\n...@freebsd.org\n2000/10/27"]
 gallatin [label="Andrew Gallatin\ngalla...@freebsd.org\n1999/01/15"]
@@ -689,6 +690,8 @@ obrien -> groudier
 obrien -> gshapiro
 obrien -> kan
 obrien -> sam
+
+pfg -> fsu
 
 peter -> asmodai
 peter -> jayanth
___
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: r323952 - head/sys/boot/i386/libi386

2017-09-23 Thread Warner Losh
On Sat, Sep 23, 2017 at 9:50 AM, John Baldwin  wrote:

> On Saturday, September 23, 2017 12:44:42 PM Mariusz Zaborski wrote:
> > Author: oshogbo
> > Date: Sat Sep 23 12:44:42 2017
> > New Revision: 323952
> > URL: https://svnweb.freebsd.org/changeset/base/323952
> >
> > Log:
> >   After the r317886 support for TFTP and NFS can be enable
> simultaneously.
> >
> >   The cleanup of this distinction was done in the r318988, but this
> Makefile
> >   was omitted.
> >
> >   Submitted by:   kczekirda@
> >
> > Modified:
> >   head/sys/boot/i386/libi386/Makefile
> >
> > Modified: head/sys/boot/i386/libi386/Makefile
> > 
> ==
> > --- head/sys/boot/i386/libi386/Makefile   Sat Sep 23 12:35:46 2017
>   (r323951)
> > +++ head/sys/boot/i386/libi386/Makefile   Sat Sep 23 12:44:42 2017
>   (r323952)
> > @@ -12,10 +12,10 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c
> biospnp
> >  .PATH:   ${.CURDIR}/../../zfs
> >  SRCS+=   devicename_stubs.c
> >
> > -# Enable PXE TFTP or NFS support, not both.
> >  .if defined(LOADER_TFTP_SUPPORT)
> >  CFLAGS+= -DLOADER_TFTP_SUPPORT
> > -.else
> > +.endif
> > +.if defined(LOADER_NFS_SUPPORT)
> >  CFLAGS+= -DLOADER_NFS_SUPPORT
> >  .endif
>
> Is LOADER_NFS_SUPPORT defined by default?  If not, I think you just turned
> off NFS
> in the default loader.  One option would be to add a new
> 'LOADER_NO_NFS_SUPPORT'
> and include NFS unless that is defined.  We could also just always include
> NFS
> support.  Finally, if we want to retain the ability to choose loader bits,
> these
> should probably change to real src options: WITH/WITHOUT_LOADER_TFTP_SUPPORT
> and
> WITH/WITHOUT_LOADER_NFS_SUPPORT and have this Makefile check
> MK_LOADER_TFTP/NFS_SUPPORT.  Then we could choose defaults in src.opts.mk.
>

I've wanted all the 'ad-hoc' options in the tree to wind up in src.opts.mk.
These would be a great addition.

Warner
___
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: r323956 - head/sys/kern

2017-09-23 Thread Conrad Meyer
Author: cem
Date: Sat Sep 23 17:48:49 2017
New Revision: 323956
URL: https://svnweb.freebsd.org/changeset/base/323956

Log:
  ddb(4): Add 'show badstacks' command to show witness badstacks
  
  Add a DDB command that mirrors sysctl debug.witness.badstacks.
  
  Reapply r323935 after fixing trivial deficiency.  I forgot to compile with
  WITNESS enabled.  Thanks emaste@ for fixing the build while I was asleep.
  
  Reported by:  rstone
  Reviewed by:  rstone (previous version)
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D12468

Modified:
  head/sys/kern/subr_witness.c

Modified: head/sys/kern/subr_witness.c
==
--- head/sys/kern/subr_witness.cSat Sep 23 16:59:37 2017
(r323955)
+++ head/sys/kern/subr_witness.cSat Sep 23 17:48:49 2017
(r323956)
@@ -2539,31 +2539,18 @@ DB_SHOW_COMMAND(witness, db_witness_display)
 }
 #endif
 
-static int
-sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS)
+static void
+sbuf_print_witness_badstacks(struct sbuf *sb, size_t *oldidx)
 {
struct witness_lock_order_data *data1, *data2, *tmp_data1, *tmp_data2;
struct witness *tmp_w1, *tmp_w2, *w1, *w2;
-   struct sbuf *sb;
u_int w_rmatrix1, w_rmatrix2;
-   int error, generation, i, j;
+   int generation, i, j;
 
tmp_data1 = NULL;
tmp_data2 = NULL;
tmp_w1 = NULL;
tmp_w2 = NULL;
-   if (witness_watch < 1) {
-   error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning));
-   return (error);
-   }
-   if (witness_cold) {
-   error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold));
-   return (error);
-   }
-   error = 0;
-   sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND);
-   if (sb == NULL)
-   return (ENOMEM);
 
/* Allocate and init temporary storage space. */
tmp_w1 = malloc(sizeof(struct witness), M_TEMP, M_WAITOK | M_ZERO);
@@ -2587,7 +2574,7 @@ restart:
mtx_unlock_spin(_mtx);
 
/* The graph has changed, try again. */
-   req->oldidx = 0;
+   *oldidx = 0;
sbuf_clear(sb);
goto restart;
}
@@ -2613,7 +2600,7 @@ restart:
mtx_unlock_spin(_mtx);
 
/* The graph has changed, try again. */
-   req->oldidx = 0;
+   *oldidx = 0;
sbuf_clear(sb);
goto restart;
}
@@ -2672,7 +2659,7 @@ restart:
 * The graph changed while we were printing stack data,
 * try again.
 */
-   req->oldidx = 0;
+   *oldidx = 0;
sbuf_clear(sb);
goto restart;
}
@@ -2683,13 +2670,56 @@ restart:
free(tmp_data2, M_TEMP);
free(tmp_w1, M_TEMP);
free(tmp_w2, M_TEMP);
+}
 
+static int
+sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS)
+{
+   struct sbuf *sb;
+   int error;
+
+   if (witness_watch < 1) {
+   error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning));
+   return (error);
+   }
+   if (witness_cold) {
+   error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold));
+   return (error);
+   }
+   error = 0;
+   sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND);
+   if (sb == NULL)
+   return (ENOMEM);
+
+   sbuf_print_witness_badstacks(sb, >oldidx);
+
sbuf_finish(sb);
error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1);
sbuf_delete(sb);
 
return (error);
 }
+
+#ifdef DDB
+static int
+sbuf_db_printf_drain(void *arg __unused, const char *data, int len)
+{
+
+   return (db_printf("%.*s", len, data));
+}
+
+DB_SHOW_COMMAND(badstacks, db_witness_badstacks)
+{
+   struct sbuf sb;
+   char buffer[128];
+   size_t dummy;
+
+   sbuf_new(, buffer, sizeof(buffer), SBUF_FIXEDLEN);
+   sbuf_set_drain(, sbuf_db_printf_drain, NULL);
+   sbuf_print_witness_badstacks(, );
+   sbuf_finish();
+}
+#endif
 
 static int
 sysctl_debug_witness_channel(SYSCTL_HANDLER_ARGS)
___
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: r323955 - head/sys/dev/bnxt

2017-09-23 Thread Stephen Hurd
Author: shurd
Date: Sat Sep 23 16:59:37 2017
New Revision: 323955
URL: https://svnweb.freebsd.org/changeset/base/323955

Log:
  bnxt: Choose better HW LRO defaults for performance
  
  1) Choose correct Firmware options for HW LRO for best performance
  2) Delete TBD and other comments which are not required.
  3) Added sysctl interface to enable / disable / modify different factors
 of HW LRO.
  4) Disabled HW LRO by default to avoid issues with packet forwarding
  
  This allows much better control over the LRO configuration via sysctls, and
  uses much better defaults.  Hardware LRO can now be enabled/disabled
  independantly from the software LRO, and the tuning parameters are exposed.
  
  manpage updates coming soon.
  
  Submitted by: Bhargava Chenna Marreddy 
  Reviewed by:  shurd, sbruno
  Approved by:  sbruno (mentor)
  Sponsored by: Broadcom Limited
  Differential Revision:https://reviews.freebsd.org/D12223

Modified:
  head/sys/dev/bnxt/bnxt.h
  head/sys/dev/bnxt/bnxt_hwrm.c
  head/sys/dev/bnxt/bnxt_hwrm.h
  head/sys/dev/bnxt/bnxt_sysctl.c
  head/sys/dev/bnxt/bnxt_sysctl.h
  head/sys/dev/bnxt/if_bnxt.c

Modified: head/sys/dev/bnxt/bnxt.h
==
--- head/sys/dev/bnxt/bnxt.hSat Sep 23 16:46:30 2017(r323954)
+++ head/sys/dev/bnxt/bnxt.hSat Sep 23 16:59:37 2017(r323955)
@@ -526,6 +526,14 @@ struct bnxt_func_qcfg {
uint16_t alloc_vnics;
 };
 
+struct bnxt_hw_lro {
+   uint16_t enable;
+   uint16_t is_mode_gro;
+   uint16_t max_agg_segs;
+   uint16_t max_aggs;
+   uint32_t min_agg_len;
+};
+
 struct bnxt_softc {
device_tdev;
if_ctx_tctx;
@@ -586,10 +594,13 @@ struct bnxt_softc {
 
struct sysctl_ctx_list  hw_stats;
struct sysctl_oid   *hw_stats_oid;
+   struct sysctl_ctx_list  hw_lro_ctx;
+   struct sysctl_oid   *hw_lro_oid;
 
struct bnxt_ver_info*ver_info;
struct bnxt_nvram_info  *nvm_info;
bool wol;
+   struct bnxt_hw_lro  hw_lro;
uint8_t wol_filter_id;
uint16_trx_coal_usecs;
uint16_trx_coal_usecs_irq;

Modified: head/sys/dev/bnxt/bnxt_hwrm.c
==
--- head/sys/dev/bnxt/bnxt_hwrm.c   Sat Sep 23 16:46:30 2017
(r323954)
+++ head/sys/dev/bnxt/bnxt_hwrm.c   Sat Sep 23 16:59:37 2017
(r323955)
@@ -977,29 +977,53 @@ bnxt_cfg_async_cr(struct bnxt_softc *softc)
return rc;
 }
 
+void
+bnxt_validate_hw_lro_settings(struct bnxt_softc *softc)
+{
+   softc->hw_lro.enable = min(softc->hw_lro.enable, 1);
+
+softc->hw_lro.is_mode_gro = min(softc->hw_lro.is_mode_gro, 1);
+
+   softc->hw_lro.max_agg_segs = min(softc->hw_lro.max_agg_segs,
+   HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX);
+
+   softc->hw_lro.max_aggs = min(softc->hw_lro.max_aggs,
+   HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX);
+
+   softc->hw_lro.min_agg_len = min(softc->hw_lro.min_agg_len, 
BNXT_MAX_MTU);
+}
+
 int
-bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic,
-uint32_t flags)
+bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc)
 {
struct hwrm_vnic_tpa_cfg_input req = {0};
+   uint32_t flags;
 
bnxt_hwrm_cmd_hdr_init(softc, , HWRM_VNIC_TPA_CFG);
 
-   req.flags = htole32(flags);
-   req.vnic_id = htole16(vnic->id);
-   req.enables = htole32(HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS |
-   HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS |
-   /* HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_TIMER | */
-   HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN);
-   /* TODO: Calculate this based on ring size? */
-   req.max_agg_segs = htole16(3);
-   /* Base this in the allocated TPA start size... */
-   req.max_aggs = htole16(7);
-   /*
-* TODO: max_agg_timer?
-* req.mag_agg_timer = htole32(XXX);
-*/
-   req.min_agg_len = htole32(0);
+   if (softc->hw_lro.enable) {
+   flags = HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA |
+   HWRM_VNIC_TPA_CFG_INPUT_FLAGS_ENCAP_TPA |
+   HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN |
+   HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ;
+   
+   if (softc->hw_lro.is_mode_gro)
+   flags |= HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO;
+   else
+   flags |= HWRM_VNIC_TPA_CFG_INPUT_FLAGS_RSC_WND_UPDATE;
+   
+   req.flags = htole32(flags);
+
+   req.enables = 
htole32(HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS |
+   HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS |
+   HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN);
+
+ 

Re: svn commit: r323945 - head/sys/contrib/ipfilter/netinet

2017-09-23 Thread Cy Schubert
In message <20170923105628.73924...@ernst.home>, Gary Jennejohn writes:
> On Sat, 23 Sep 2017 06:00:17 + (UTC)
> Cy Schubert  wrote:
> 
> > Author: cy
> > Date: Sat Sep 23 06:00:17 2017
> > New Revision: 323945
> > URL: https://svnweb.freebsd.org/changeset/base/323945
> > 
> > Log:
> >   Correct two misspellings. Also align */.
> > 
> > Modified:
> >   head/sys/contrib/ipfilter/netinet/ip_nat.c
> > 
> > Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c
> > ===
> ===
> > --- head/sys/contrib/ipfilter/netinet/ip_nat.c  Sat Sep 23 01:39:16 201
> 7 (r323944)
> > +++ head/sys/contrib/ipfilter/netinet/ip_nat.c  Sat Sep 23 06:00:17 201
> 7 (r323945)
> > @@ -6093,8 +6093,8 @@ ipf_nat_icmpquerytype(icmptype)
> > {
> > case ICMP_ECHOREPLY:
> > case ICMP_ECHO:
> > -   /* route aedvertisement/solliciation is currently unsupported: */
> > -   /* it would require rewriting the ICMP data section*/
> > +   /* route advertisement/soliciation is currently unsupported: */
>  ^ still wrong - should b
> e solicitation.

pfft. Silly me.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
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: r323954 - head/sys/net

2017-09-23 Thread Stephen Hurd
Author: shurd
Date: Sat Sep 23 16:46:30 2017
New Revision: 323954
URL: https://svnweb.freebsd.org/changeset/base/323954

Log:
  Have ifmp_ring_enqueue() abdicate instead of switch to a consumer
  
  Move TX out of the enqueue() path. As a result, we need
  to have ifmp_ring_check_drainage() pick up from the abdicate state.
  
  We also need to either enqueue the TX task, or check drainage
  after calling ifmp_ring_enqueue() to ensure it's sent.
  
  This change results in a 30% small packet forwarding improvement.
  
  Reviewed by:  olivier, sbruno
  Approved by:  sbruno (mentor)
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D12439

Modified:
  head/sys/net/iflib.c
  head/sys/net/mp_ring.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cSat Sep 23 13:37:02 2017(r323953)
+++ head/sys/net/iflib.cSat Sep 23 16:46:30 2017(r323954)
@@ -3515,8 +3515,7 @@ _task_fn_tx(void *context)
}
if (txq->ift_db_pending)
ifmp_ring_enqueue(txq->ift_br, (void **), 1, TX_BATCH_SIZE);
-   else
-   ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
+   ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
if (ctx->ifc_flags & IFC_LEGACY)
IFDI_INTR_ENABLE(ctx);
else {
@@ -3718,16 +3717,14 @@ iflib_if_transmit(if_t ifp, struct mbuf *m)
DBG_COUNTER_INC(tx_seen);
err = ifmp_ring_enqueue(txq->ift_br, (void **), 1, TX_BATCH_SIZE);
 
+   GROUPTASK_ENQUEUE(>ift_task);
if (err) {
-   GROUPTASK_ENQUEUE(>ift_task);
/* support forthcoming later */
 #ifdef DRIVER_BACKPRESSURE
txq->ift_closed = TRUE;
 #endif
ifmp_ring_check_drainage(txq->ift_br, TX_BATCH_SIZE);
m_freem(m);
-   } else if (TXQ_AVAIL(txq) < (txq->ift_size >> 1)) {
-   GROUPTASK_ENQUEUE(>ift_task);
}
 
return (err);

Modified: head/sys/net/mp_ring.c
==
--- head/sys/net/mp_ring.c  Sat Sep 23 13:37:02 2017(r323953)
+++ head/sys/net/mp_ring.c  Sat Sep 23 16:46:30 2017(r323954)
@@ -454,18 +454,12 @@ ifmp_ring_enqueue(struct ifmp_ring *r, void **items, i
do {
os.state = ns.state = r->state;
ns.pidx_tail = pidx_stop;
-   ns.flags = BUSY;
+   if (os.flags == IDLE)
+   ns.flags = ABDICATED;
} while (atomic_cmpset_rel_64(>state, os.state, ns.state) == 0);
critical_exit();
counter_u64_add(r->enqueues, n);
 
-   /*
-* Turn into a consumer if some other thread isn't active as a consumer
-* already.
-*/
-   if (os.flags != BUSY)
-   drain_ring_lockless(r, ns, os.flags, budget);
-
return (0);
 }
 #endif
@@ -476,7 +470,9 @@ ifmp_ring_check_drainage(struct ifmp_ring *r, int budg
union ring_state os, ns;
 
os.state = r->state;
-   if (os.flags != STALLED || os.pidx_head != os.pidx_tail || 
r->can_drain(r) == 0)
+   if ((os.flags != STALLED && os.flags != ABDICATED) ||   // Only 
continue in STALLED and ABDICATED
+   os.pidx_head != os.pidx_tail || // Require work 
to be available
+   (os.flags != ABDICATED && r->can_drain(r) == 0))// Can either 
drain, or everyone left
return;
 
MPASS(os.cidx != os.pidx_tail); /* implied by STALLED */
___
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: r323952 - head/sys/boot/i386/libi386

2017-09-23 Thread John Baldwin
On Saturday, September 23, 2017 12:44:42 PM Mariusz Zaborski wrote:
> Author: oshogbo
> Date: Sat Sep 23 12:44:42 2017
> New Revision: 323952
> URL: https://svnweb.freebsd.org/changeset/base/323952
> 
> Log:
>   After the r317886 support for TFTP and NFS can be enable simultaneously.
>   
>   The cleanup of this distinction was done in the r318988, but this Makefile
>   was omitted.
>   
>   Submitted by:   kczekirda@
> 
> Modified:
>   head/sys/boot/i386/libi386/Makefile
> 
> Modified: head/sys/boot/i386/libi386/Makefile
> ==
> --- head/sys/boot/i386/libi386/Makefile   Sat Sep 23 12:35:46 2017
> (r323951)
> +++ head/sys/boot/i386/libi386/Makefile   Sat Sep 23 12:44:42 2017
> (r323952)
> @@ -12,10 +12,10 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp
>  .PATH:   ${.CURDIR}/../../zfs
>  SRCS+=   devicename_stubs.c
>  
> -# Enable PXE TFTP or NFS support, not both.
>  .if defined(LOADER_TFTP_SUPPORT)
>  CFLAGS+= -DLOADER_TFTP_SUPPORT
> -.else
> +.endif
> +.if defined(LOADER_NFS_SUPPORT)
>  CFLAGS+= -DLOADER_NFS_SUPPORT
>  .endif

Is LOADER_NFS_SUPPORT defined by default?  If not, I think you just turned off 
NFS
in the default loader.  One option would be to add a new 'LOADER_NO_NFS_SUPPORT'
and include NFS unless that is defined.  We could also just always include NFS
support.  Finally, if we want to retain the ability to choose loader bits, these
should probably change to real src options: WITH/WITHOUT_LOADER_TFTP_SUPPORT and
WITH/WITHOUT_LOADER_NFS_SUPPORT and have this Makefile check
MK_LOADER_TFTP/NFS_SUPPORT.  Then we could choose defaults in src.opts.mk.

-- 
John Baldwin
___
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: r323952 - head/sys/boot/i386/libi386

2017-09-23 Thread Mariusz Zaborski
Author: oshogbo
Date: Sat Sep 23 12:44:42 2017
New Revision: 323952
URL: https://svnweb.freebsd.org/changeset/base/323952

Log:
  After the r317886 support for TFTP and NFS can be enable simultaneously.
  
  The cleanup of this distinction was done in the r318988, but this Makefile
  was omitted.
  
  Submitted by: kczekirda@

Modified:
  head/sys/boot/i386/libi386/Makefile

Modified: head/sys/boot/i386/libi386/Makefile
==
--- head/sys/boot/i386/libi386/Makefile Sat Sep 23 12:35:46 2017
(r323951)
+++ head/sys/boot/i386/libi386/Makefile Sat Sep 23 12:44:42 2017
(r323952)
@@ -12,10 +12,10 @@ SRCS=   biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp
 .PATH: ${.CURDIR}/../../zfs
 SRCS+= devicename_stubs.c
 
-# Enable PXE TFTP or NFS support, not both.
 .if defined(LOADER_TFTP_SUPPORT)
 CFLAGS+=   -DLOADER_TFTP_SUPPORT
-.else
+.endif
+.if defined(LOADER_NFS_SUPPORT)
 CFLAGS+=   -DLOADER_NFS_SUPPORT
 .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: r323951 - head/sys/kern

2017-09-23 Thread Ed Maste
Author: emaste
Date: Sat Sep 23 12:35:46 2017
New Revision: 323951
URL: https://svnweb.freebsd.org/changeset/base/323951

Log:
  Revert r323935 as it broke the build
  
  subr_witness.c:2577:4: error: use of undeclared identifier 'req'
  req->oldidx = 0;
  ^

Modified:
  head/sys/kern/subr_witness.c

Modified: head/sys/kern/subr_witness.c
==
--- head/sys/kern/subr_witness.cSat Sep 23 12:32:11 2017
(r323950)
+++ head/sys/kern/subr_witness.cSat Sep 23 12:35:46 2017
(r323951)
@@ -2539,18 +2539,31 @@ DB_SHOW_COMMAND(witness, db_witness_display)
 }
 #endif
 
-static void
-sbuf_print_witness_badstacks(struct sbuf *sb)
+static int
+sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS)
 {
struct witness_lock_order_data *data1, *data2, *tmp_data1, *tmp_data2;
struct witness *tmp_w1, *tmp_w2, *w1, *w2;
+   struct sbuf *sb;
u_int w_rmatrix1, w_rmatrix2;
-   int generation, i, j;
+   int error, generation, i, j;
 
tmp_data1 = NULL;
tmp_data2 = NULL;
tmp_w1 = NULL;
tmp_w2 = NULL;
+   if (witness_watch < 1) {
+   error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning));
+   return (error);
+   }
+   if (witness_cold) {
+   error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold));
+   return (error);
+   }
+   error = 0;
+   sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND);
+   if (sb == NULL)
+   return (ENOMEM);
 
/* Allocate and init temporary storage space. */
tmp_w1 = malloc(sizeof(struct witness), M_TEMP, M_WAITOK | M_ZERO);
@@ -2670,55 +2683,13 @@ restart:
free(tmp_data2, M_TEMP);
free(tmp_w1, M_TEMP);
free(tmp_w2, M_TEMP);
-}
 
-static int
-sysctl_debug_witness_badstacks(SYSCTL_HANDLER_ARGS)
-{
-   struct sbuf *sb;
-   int error;
-
-   if (witness_watch < 1) {
-   error = SYSCTL_OUT(req, w_notrunning, sizeof(w_notrunning));
-   return (error);
-   }
-   if (witness_cold) {
-   error = SYSCTL_OUT(req, w_stillcold, sizeof(w_stillcold));
-   return (error);
-   }
-   error = 0;
-   sb = sbuf_new(NULL, NULL, badstack_sbuf_size, SBUF_AUTOEXTEND);
-   if (sb == NULL)
-   return (ENOMEM);
-
-   sbuf_print_witness_badstacks(sb);
-
sbuf_finish(sb);
error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1);
sbuf_delete(sb);
 
return (error);
 }
-
-#ifdef DDB
-static int
-sbuf_db_printf_drain(void *arg __unused, const char *data, int len)
-{
-
-   return (db_printf("%.*s", len, data));
-}
-
-DB_SHOW_COMMAND(badstacks, db_witness_badstacks)
-{
-   struct sbuf sb;
-   char buffer[128];
-
-   sbuf_new(, buffer, sizeof(buffer), SBUF_FIXEDLEN);
-   sbuf_set_drain(, sbuf_db_printf_drain, NULL);
-   sbuf_print_witness_badstacks();
-   sbuf_finish();
-}
-#endif
 
 static int
 sysctl_debug_witness_channel(SYSCTL_HANDLER_ARGS)
___
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: r323950 - stable/11/share/man/man9

2017-09-23 Thread Mariusz Zaborski
Author: oshogbo
Date: Sat Sep 23 12:32:11 2017
New Revision: 323950
URL: https://svnweb.freebsd.org/changeset/base/323950

Log:
  MFC r323655:
  
  Add missing links to the nv man page.

Modified:
  stable/11/share/man/man9/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man9/Makefile
==
--- stable/11/share/man/man9/Makefile   Sat Sep 23 12:28:56 2017
(r323949)
+++ stable/11/share/man/man9/Makefile   Sat Sep 23 12:32:11 2017
(r323950)
@@ -1207,13 +1207,18 @@ MLINKS+=nv.9 libnv.9 \
nv.9 nvlist.9 \
nv.9 nvlist_add_binary.9 \
nv.9 nvlist_add_bool.9 \
+   nv.9 nvlist_add_bool_array.9 \
nv.9 nvlist_add_descriptor.9 \
+   nv.9 nvlist_add_descriptor_array.9 \
nv.9 nvlist_add_null.9 \
nv.9 nvlist_add_number.9 \
+   nv.9 nvlist_add_number_array.9 \
nv.9 nvlist_add_nvlist.9 \
+   nv.9 nvlist_add_nvlist_array.9 \
nv.9 nvlist_add_string.9 \
nv.9 nvlist_add_stringf.9 \
nv.9 nvlist_add_stringv.9 \
+   nv.9 nvlist_add_string_array.9 \
nv.9 nvlist_clone.9 \
nv.9 nvlist_create.9 \
nv.9 nvlist_destroy.9 \
@@ -1223,10 +1228,14 @@ MLINKS+=nv.9 libnv.9 \
nv.9 nvlist_exists.9 \
nv.9 nvlist_exists_binary.9 \
nv.9 nvlist_exists_bool.9 \
+   nv.9 nvlist_exists_bool_array.9 \
nv.9 nvlist_exists_descriptor.9 \
+   nv.9 nvlist_exists_descriptor_array.9 \
nv.9 nvlist_exists_null.9 \
nv.9 nvlist_exists_number.9 \
+   nv.9 nvlist_exists_number_array.9 \
nv.9 nvlist_exists_nvlist.9 \
+   nv.9 nvlist_exists_nvlist_array.9 \
nv.9 nvlist_exists_string.9 \
nv.9 nvlist_exists_type.9 \
nv.9 nvlist_fdump.9 \
@@ -1234,23 +1243,36 @@ MLINKS+=nv.9 libnv.9 \
nv.9 nvlist_free.9 \
nv.9 nvlist_free_binary.9 \
nv.9 nvlist_free_bool.9 \
+   nv.9 nvlist_free_bool_array.9 \
nv.9 nvlist_free_descriptor.9 \
+   nv.9 nvlist_free_descriptor_array.9 \
nv.9 nvlist_free_null.9 \
nv.9 nvlist_free_number.9 \
+   nv.9 nvlist_free_number_array.9 \
nv.9 nvlist_free_nvlist.9 \
+   nv.9 nvlist_free_nvlist_array.9 \
nv.9 nvlist_free_string.9 \
+   nv.9 nvlist_free_string_array.9 \
nv.9 nvlist_free_type.9 \
nv.9 nvlist_get_binary.9 \
nv.9 nvlist_get_bool.9 \
+   nv.9 nvlist_get_bool_array.9 \
nv.9 nvlist_get_descriptor.9 \
+   nv.9 nvlist_get_descriptor_array.9 \
nv.9 nvlist_get_number.9 \
+   nv.9 nvlist_get_number_array.9 \
nv.9 nvlist_get_nvlist.9 \
+   nv.9 nvlist_get_nvlist_array.9 \
nv.9 nvlist_get_parent.9 \
nv.9 nvlist_get_string.9 \
+   nv.9 nvlist_get_string_array.9 \
nv.9 nvlist_move_binary.9 \
nv.9 nvlist_move_descriptor.9 \
+   nv.9 nvlist_move_descriptor_array.9 \
nv.9 nvlist_move_nvlist.9 \
+   nv.9 nvlist_move_nvlist_array.9 \
nv.9 nvlist_move_string.9 \
+   nv.9 nvlist_move_string_array.9 \
nv.9 nvlist_next.9 \
nv.9 nvlist_pack.9 \
nv.9 nvlist_recv.9 \
@@ -1259,10 +1281,15 @@ MLINKS+=nv.9 libnv.9 \
nv.9 nvlist_size.9 \
nv.9 nvlist_take_binary.9 \
nv.9 nvlist_take_bool.9 \
+   nv.9 nvlist_take_bool_array.9 \
nv.9 nvlist_take_descriptor.9 \
+   nv.9 nvlist_take_descriptor_array.9 \
nv.9 nvlist_take_number.9 \
+   nv.9 nvlist_take_number_array.9 \
nv.9 nvlist_take_nvlist.9 \
+   nv.9 nvlist_take_nvlist_array.9 \
nv.9 nvlist_take_string.9 \
+   nv.9 nvlist_take_string_array.9 \
nv.9 nvlist_unpack.9 \
nv.9 nvlist_xfer.9
 MLINKS+=osd.9 osd_call.9 \
___
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: r323949 - stable/11/share/man/man9

2017-09-23 Thread Mariusz Zaborski
Author: oshogbo
Date: Sat Sep 23 12:28:56 2017
New Revision: 323949
URL: https://svnweb.freebsd.org/changeset/base/323949

Log:
  MFC r323654:
  
  Fix names of the array functions in the nv man page.
  
  Submitted by: def@

Modified:
  stable/11/share/man/man9/nv.9
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man9/nv.9
==
--- stable/11/share/man/man9/nv.9   Sat Sep 23 11:09:25 2017
(r323948)
+++ stable/11/share/man/man9/nv.9   Sat Sep 23 12:28:56 2017
(r323949)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 15, 2015
+.Dd September 16, 2017
 .Dt NV 9
 .Os
 .Sh NAME
@@ -201,11 +201,11 @@
 .Ft "const bool *"
 .Fn nvlist_get_bool_array "const nvlist_t *nvl" "const char *name" "size_t 
*nitems"
 .Ft "const uint64_t *"
-.Fn nvlist_get_number "const nvlist_t *nvl" "const char *name" "size_t *nitems"
+.Fn nvlist_get_number_array "const nvlist_t *nvl" "const char *name" "size_t 
*nitems"
 .Ft "const char * const *"
-.Fn nvlist_get_string "const nvlist_t *nvl" "const char *name" "size_t *nitems"
+.Fn nvlist_get_string_array "const nvlist_t *nvl" "const char *name" "size_t 
*nitems"
 .Ft "const nvlist_t * const *"
-.Fn nvlist_get_nvlist "const nvlist_t *nvl" "const char *name" "size_t *nitems"
+.Fn nvlist_get_nvlist_array "const nvlist_t *nvl" "const char *name" "size_t 
*nitems"
 .Ft "const int *"
 .Fn nvlist_get_descriptor_array "const nvlist_t *nvl" "const char *name" 
"size_t *nitems"
 .Ft "const nvlist_t *"
@@ -230,13 +230,13 @@
 .Ft "bool *"
 .Fn nvlist_take_bool_array "nvlist_t *nvl" "const char *name" "size_t *nitems"
 .Ft "uint64_t **"
-.Fn nvlist_take_number "nvlist_t *nvl" "const char *name" "size_t *nitems"
+.Fn nvlist_take_number_array "nvlist_t *nvl" "const char *name" "size_t 
*nitems"
 .Ft "char **"
-.Fn nvlist_take_string "nvlist_t *nvl" "const char *name" "size_t *nitems"
+.Fn nvlist_take_string_array "nvlist_t *nvl" "const char *name" "size_t 
*nitems"
 .Ft "nvlist_t **"
-.Fn nvlist_take_nvlist "nvlist_t *nvl" "const char *name" "size_t *nitems"
+.Fn nvlist_take_nvlist_array "nvlist_t *nvl" "const char *name" "size_t 
*nitems"
 .Ft "int *"
-.Fn nvlist_take_descriptor "nvlist_t *nvl" "const char *name" "size_t *nitems"
+.Fn nvlist_take_descriptor_array "nvlist_t *nvl" "const char *name" "size_t 
*nitems"
 .\"
 .Ft void
 .Fn nvlist_free "nvlist_t *nvl" "const char *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"


Re: svn commit: r323945 - head/sys/contrib/ipfilter/netinet

2017-09-23 Thread Gary Jennejohn
On Sat, 23 Sep 2017 06:00:17 + (UTC)
Cy Schubert  wrote:

> Author: cy
> Date: Sat Sep 23 06:00:17 2017
> New Revision: 323945
> URL: https://svnweb.freebsd.org/changeset/base/323945
> 
> Log:
>   Correct two misspellings. Also align */.
> 
> Modified:
>   head/sys/contrib/ipfilter/netinet/ip_nat.c
> 
> Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c
> ==
> --- head/sys/contrib/ipfilter/netinet/ip_nat.cSat Sep 23 01:39:16 
> 2017(r323944)
> +++ head/sys/contrib/ipfilter/netinet/ip_nat.cSat Sep 23 06:00:17 
> 2017(r323945)
> @@ -6093,8 +6093,8 @@ ipf_nat_icmpquerytype(icmptype)
>   {
>   case ICMP_ECHOREPLY:
>   case ICMP_ECHO:
> - /* route aedvertisement/solliciation is currently unsupported: */
> - /* it would require rewriting the ICMP data section*/
> + /* route advertisement/soliciation is currently unsupported: */
 ^ still wrong - should be 
solicitation.
> + /* it would require rewriting the ICMP data section  */
>   case ICMP_TSTAMP:
>   case ICMP_TSTAMPREPLY:
>   case ICMP_IREQ:
>


-- 
Gary Jennejohn
___
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: r323942 - head/sys/net

2017-09-23 Thread Bjoern A. Zeeb

On 23 Sep 2017, at 6:32, Stephen Hurd wrote:


Bjoern A. Zeeb wrote:

On 23 Sep 2017, at 1:35, Stephen Hurd wrote:


Author: shurd
Date: Sat Sep 23 01:35:14 2017
New Revision: 323942
URL: https://svnweb.freebsd.org/changeset/base/323942

Log:
   Chain mbufs before passing to if_input()

   Build a list of mbufs to pass to if_input() after LRO. Results in
   12% small packet forwarding rate improvement.

forwarding seems a confusing word here..


The test was small (64 byte frames) received on one interface, then 
sent out on a different one using the net.inet.ip.forwarding sysctl 
(controlled via the gateway_enable setting in rc.conf).


Then this makes no sense as we don’t do LRO if forwarding is enabled 
on the machine;

https://svnweb.freebsd.org/base/head/sys/netinet/tcp_lro.c?annotate=317390#l645


___
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: r323946 - in head/sys/dev: mpr mps

2017-09-23 Thread Scott Long
Author: scottl
Date: Sat Sep 23 08:26:42 2017
New Revision: 323946
URL: https://svnweb.freebsd.org/changeset/base/323946

Log:
  Garbage collect usued fields
  
  Sponsored by: Netflix

Modified:
  head/sys/dev/mpr/mpr_sas.h
  head/sys/dev/mps/mps_sas.h

Modified: head/sys/dev/mpr/mpr_sas.h
==
--- head/sys/dev/mpr/mpr_sas.h  Sat Sep 23 06:00:17 2017(r323945)
+++ head/sys/dev/mpr/mpr_sas.h  Sat Sep 23 08:26:42 2017(r323946)
@@ -70,9 +70,6 @@ struct mprsas_target {
uint16_tparent_handle;
uint64_tparent_sasaddr;
uint32_tparent_devinfo;
-   struct sysctl_ctx_list sysctl_ctx;
-   struct sysctl_oid *sysctl_tree;
-   TAILQ_ENTRY(mprsas_target) sysctl_link;
uint64_tissued;
uint64_tcompleted;
unsigned intoutstanding;

Modified: head/sys/dev/mps/mps_sas.h
==
--- head/sys/dev/mps/mps_sas.h  Sat Sep 23 06:00:17 2017(r323945)
+++ head/sys/dev/mps/mps_sas.h  Sat Sep 23 08:26:42 2017(r323946)
@@ -67,9 +67,6 @@ struct mpssas_target {
uint16_tparent_handle;
uint64_tparent_sasaddr;
uint32_tparent_devinfo;
-   struct sysctl_ctx_list sysctl_ctx;
-   struct sysctl_oid *sysctl_tree;
-   TAILQ_ENTRY(mpssas_target) sysctl_link;
uint64_tissued;
uint64_tcompleted;
unsigned intoutstanding;
___
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: r323935 - head/sys/kern

2017-09-23 Thread Ngie Cooper (yaneurabeya)

> On Sep 22, 2017, at 13:01, Conrad Meyer  wrote:
> 
> Author: cem
> Date: Fri Sep 22 20:01:12 2017
> New Revision: 323935
> URL: https://svnweb.freebsd.org/changeset/base/323935
> 
> Log:
>  ddb(4): Add 'show badstacks' command to show witness badstacks
> 
>  Add a DDB command that mirrors sysctl debug.witness.badstacks.
> 
>  Reported by: rstone
>  Reviewed by: rstone
>  Sponsored by:Dell EMC Isilon
>  Differential Revision:   https://reviews.freebsd.org/D12468

This broke GENERIC:

--- subr_witness.o ---
/usr/src/sys/kern/subr_witness.c:2577:4: error: use of undeclared identifier 
'req'
req->oldidx = 0;
^
/usr/src/sys/kern/subr_witness.c:2603:5: error: use of undeclared identifier 
'req'
req->oldidx = 0;
^
/usr/src/sys/kern/subr_witness.c:2662:3: error: use of undeclared identifier 
'req'
req->oldidx = 0;
^


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r323942 - head/sys/net

2017-09-23 Thread Stephen Hurd

Bjoern A. Zeeb wrote:

On 23 Sep 2017, at 1:35, Stephen Hurd wrote:


Author: shurd
Date: Sat Sep 23 01:35:14 2017
New Revision: 323942
URL: https://svnweb.freebsd.org/changeset/base/323942

Log:
   Chain mbufs before passing to if_input()

   Build a list of mbufs to pass to if_input() after LRO. Results in
   12% small packet forwarding rate improvement.

forwarding seems a confusing word here..


The test was small (64 byte frames) received on one interface, then sent 
out on a different one using the net.inet.ip.forwarding sysctl 
(controlled via the gateway_enable setting in rc.conf).

___
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: r323899 - head/tests/sys/opencrypto

2017-09-23 Thread Ngie Cooper (yaneurabeya)

> On Sep 21, 2017, at 21:41, Conrad Meyer  wrote:
> 
> Author: cem
> Date: Fri Sep 22 04:41:48 2017
> New Revision: 323899
> URL: https://svnweb.freebsd.org/changeset/base/323899
> 
> Log:
>  cryptotest.py: Like r323869, skip SHA HMAC tests on non-SHA drivers
> 
>  Sponsored by:Dell EMC Isilon
> 
> Modified:
>  head/tests/sys/opencrypto/cryptotest.py
> 
> Modified: head/tests/sys/opencrypto/cryptotest.py
> ==
> --- head/tests/sys/opencrypto/cryptotest.py   Fri Sep 22 04:25:44 2017
> (r323898)
> +++ head/tests/sys/opencrypto/cryptotest.py   Fri Sep 22 04:41:48 2017
> (r323899)
> @@ -237,6 +237,7 @@ def GenTestCase(cname):
>   #for i in iglob('SHA1*'):
>   #   self.runSHA(i)
> 
> + @unittest.skipIf(cname not in shamodules, 'skipping SHA on %s' 
> % `name`)

Backticks for stringily’ing things isn’t py3k compatible, FYI.
-Ngie



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r323945 - head/sys/contrib/ipfilter/netinet

2017-09-23 Thread Cy Schubert
Author: cy
Date: Sat Sep 23 06:00:17 2017
New Revision: 323945
URL: https://svnweb.freebsd.org/changeset/base/323945

Log:
  Correct two misspellings. Also align */.

Modified:
  head/sys/contrib/ipfilter/netinet/ip_nat.c

Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c
==
--- head/sys/contrib/ipfilter/netinet/ip_nat.c  Sat Sep 23 01:39:16 2017
(r323944)
+++ head/sys/contrib/ipfilter/netinet/ip_nat.c  Sat Sep 23 06:00:17 2017
(r323945)
@@ -6093,8 +6093,8 @@ ipf_nat_icmpquerytype(icmptype)
{
case ICMP_ECHOREPLY:
case ICMP_ECHO:
-   /* route aedvertisement/solliciation is currently unsupported: */
-   /* it would require rewriting the ICMP data section*/
+   /* route advertisement/soliciation is currently unsupported: */
+   /* it would require rewriting the ICMP data section  */
case ICMP_TSTAMP:
case ICMP_TSTAMPREPLY:
case ICMP_IREQ:
___
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"