svn commit: r341676 - stable/12/share/man/man5

2018-12-06 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Dec  7 03:43:34 2018
New Revision: 341676
URL: https://svnweb.freebsd.org/changeset/base/341676

Log:
  MFC r341505:
  ext2fs.5: basic updates.
  
  Starting with FreeBSD 12 we fully support writing ext4 filesystems.
  Mention some features that we don't support while here.

Modified:
  stable/12/share/man/man5/ext2fs.5
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man5/ext2fs.5
==
--- stable/12/share/man/man5/ext2fs.5   Fri Dec  7 03:13:36 2018
(r341675)
+++ stable/12/share/man/man5/ext2fs.5   Fri Dec  7 03:43:34 2018
(r341676)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 23, 2016
+.Dd December 4, 2018
 .Dt EXT2FS 5
 .Os
 .Sh NAME
@@ -52,9 +52,10 @@ kernel to access
 and
 .Tn ext4
 file systems.
-The
+Support for Extended Attributes in
 .Tn ext4
-support is read-only.
+is experimental.
+Journalling and encryption are currently not supported.
 .Sh EXAMPLES
 To mount a
 .Nm
___
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: r341266 - in releng/12.0: . sys/modules/iavf

2018-12-06 Thread Dima Panov

Hello!

Marius Strobl wrote on 07/12/2018 05:08:

On Thu, Dec 06, 2018 at 05:30:03PM +, Glen Barber wrote:

On Thu, Dec 06, 2018 at 06:25:06PM +0100, Marius Strobl wrote:

On Thu, Dec 06, 2018 at 03:58:44PM +1000, Dima Panov wrote:

Hello!

Marius Strobl wrote on 30/11/2018 07:59:

Author: marius
Date: Thu Nov 29 21:59:09 2018
New Revision: 341266
URL: https://svnweb.freebsd.org/changeset/base/341266

Log:
MFC: r341016, MF12: r341261

- Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in r339338.

- Likewise, add ixlv.4.gz to OLD_FILES,
- and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the transition.


[cut]


Modified: releng/12.0/sys/modules/iavf/Makefile
==
--- releng/12.0/sys/modules/iavf/Makefile   Thu Nov 29 21:20:53 2018
(r341265)
+++ releng/12.0/sys/modules/iavf/Makefile   Thu Nov 29 21:59:09 2018
(r341266)
@@ -15,4 +15,6 @@ SRCS+= i40e_common.c i40e_nvm.c i40e_adminq.c
   # Enable asserts and other debugging facilities
   # CFLAGS += -DINVARIANTS -DINVARIANTS_SUPPORT -DWITNESS
   
+LINKS=	${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_ixlv.ko

+
   .include 



And this broke poudriere jail upgrade due to missed kernel modules for
build purpose

# poudriere jail -u -j fbsd12-test -t 12.0-RC3
[skip]
/usr/src/usr.sbin/newsyslog/newsyslog.c
To install the downloaded upgrades, run "/usr/sbin/freebsd-update.fixed
install".
Installing updates...ln: ///boot/kernel/if_iavf.ko: No such file or
directory
chflags: ///boot/kernel/if_ixlv.ko: No such file or directory
[00:20:27] Error: Fail to upgrade system
#


Hrm, apparently this doesn't trip up with a native, i. e. non-poudriere,
environment and I'd assume that the linking of if_igb.ko to if_em.ko that
sys/modules/em/Makefile does ever since r324500 isn't causing problems
with poudriere either. What are poudriere and the "fixed" version of
freebsd-update(8) doing differently than native counterparts and what do
you mean by "missed kernel modules for build purpose"?



FWIW, I did not see this in all of my freebsd-update(8) tests.


So could it be that a subset of the mirrors carries a corrupt index
of 12.0-RC3? Otherwise I don't see how only some freebsd-update(8)
runs to 12.0-RC3 fail or how the problem should be specific to
if_ixlv.ko so far.




No, mirrors are fine. Bug is repeatable on 4 different machines with 
poudrire during jails -RC2 => -RC3 binary upgrade.
On a host installation upgrade is always fine — /bot/kernel/* is always 
present on live systems.


Upgrade error caused by absent kernel and modules in poudriere jail 
installations.





--
Dima Panov (flu...@freebsd.org)
(X11, KDE, Office)@FreeBSD team

Facebook: http://www.facebook.com/fluffy.khv
twitter: fluffy_khv | skype: dima.panov | telegram: @dima_panov
IRC: fluffy@EFNet, fluffykhv@FreeNode
___
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: r341675 - head/contrib/openbsm/bin/auditdistd

2018-12-06 Thread Pawel Jakub Dawidek
Author: pjd
Date: Fri Dec  7 03:13:36 2018
New Revision: 341675
URL: https://svnweb.freebsd.org/changeset/base/341675

Log:
  Consider the following situation:
  The sender has .not_terminated file. It gets disconnected. The last trail
  file is then terminated without adding new data (this can happen for example
  when auditd is being stopped on the sender). After reconnect the 
.not_terminated
  was not renamed on the receiver as it should.
  
  We were already handling similar situation where the sender crashed and the
  .not_terminated trail file was renamed to .crash_recovery. Extend this case to
  handle the situation above.

Modified:
  head/contrib/openbsm/bin/auditdistd/trail.c

Modified: head/contrib/openbsm/bin/auditdistd/trail.c
==
--- head/contrib/openbsm/bin/auditdistd/trail.c Fri Dec  7 02:44:04 2018
(r341674)
+++ head/contrib/openbsm/bin/auditdistd/trail.c Fri Dec  7 03:13:36 2018
(r341675)
@@ -264,6 +264,12 @@ again:
 * 2. It is fully sent, but is not terminated, so new data can be
 *appended still, or
 * 3. It is fully sent but file name has changed.
+*There are two cases here:
+*3a. Sender has crashed and the name has changed from
+*.not_terminated to .crash_recovery.
+*3b. Sender was disconnected, no new data was added to the file,
+*but its name has changed from .not_terminated to terminated
+*name.
 *
 * Note that we are fine if our .not_terminated or .crash_recovery file
 * is smaller than the one on the receiver side, as it is possible that
@@ -275,7 +281,7 @@ again:
(offset >= sb.st_size &&
 trail_is_not_terminated(trail->tr_filename)) ||
(offset >= sb.st_size && trail_is_not_terminated(filename) &&
-trail_is_crash_recovery(trail->tr_filename))) {
+!trail_is_not_terminated(trail->tr_filename))) {
/* File was not fully send. Let's finish it. */
if (lseek(fd, offset, SEEK_SET) == -1) {
pjdlog_errno(LOG_ERR,
___
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: r341674 - in head: sys/geom/mirror tests/sys/geom/class/mirror

2018-12-06 Thread Conrad Meyer
Author: cem
Date: Fri Dec  7 02:44:04 2018
New Revision: 341674
URL: https://svnweb.freebsd.org/changeset/base/341674

Log:
  gmirror: Evaluate mirror components against newest metadata copy
  
  Re-apply r341665 with format strings fixed.
  
  If we happen to taste a stale mirror component first, don't reject valid,
  newer components that have differing metadata from the stale component
  (during STARTING).  Instead, update our view of the most recent metadata as
  we taste components.
  
  Like mediasize beforehand, remove some checks from g_mirror_check_metadata
  which would evict valid components due to metadata that can change over a
  mirror's lifetime.  g_mirror_check_metadata is invoked long before we check
  genid/syncid and decide which component(s) are newest and whether or not we
  have quorum.
  
  Before checking if we can enter RUNNING (i.e., we have quorum) after a NEW
  component is added, first remove any known stale or inconsistent disks from
  the mirrorset, rather than removing them *after* deciding we have quorum.
  Check if we have quorum after removing these components.
  
  Additionally, add a knob, kern.geom.mirror.launch_mirror_before_timeout, to
  force gmirrors to wait out the full timeout (kern.geom.mirror.timeout)
  before transitioning from STARTING to RUNNING.  This is a kludge to help
  ensure all eligible, boot-time available mirror components are tasted before
  RUNNING a gmirror.
  
  Add a basic test case for STARTING -> RUNNING startup behavior around stale
  genids.
  
  PR:   232671, 232835
  Submitted by: Cindy Yang  (previous version)
  Reviewed by:  markj (kernel portions)
  Discussed with:   asomers, Cindy Yang
  Tested by:pho
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D18062

Added:
  head/tests/sys/geom/class/mirror/component_selection.sh
 - copied unchanged from r341671, 
head/tests/sys/geom/class/mirror/component_selection.sh
Modified:
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/mirror/g_mirror.h
  head/tests/sys/geom/class/mirror/Makefile
  head/tests/sys/geom/class/mirror/conf.sh

Modified: head/sys/geom/mirror/g_mirror.c
==
--- head/sys/geom/mirror/g_mirror.c Fri Dec  7 00:50:02 2018
(r341673)
+++ head/sys/geom/mirror/g_mirror.c Fri Dec  7 02:44:04 2018
(r341674)
@@ -59,6 +59,11 @@ static SYSCTL_NODE(_kern_geom, OID_AUTO, mirror, CTLFL
 int g_mirror_debug = 0;
 SYSCTL_INT(_kern_geom_mirror, OID_AUTO, debug, CTLFLAG_RWTUN, _mirror_debug, 
0,
 "Debug level");
+bool g_launch_mirror_before_timeout = true;
+SYSCTL_BOOL(_kern_geom_mirror, OID_AUTO, launch_mirror_before_timeout,
+CTLFLAG_RWTUN, _launch_mirror_before_timeout, 0,
+"If false, force gmirror to wait out the full kern.geom.mirror.timeout "
+"before launching mirrors");
 static u_int g_mirror_timeout = 4;
 SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, timeout, CTLFLAG_RWTUN, 
_mirror_timeout,
 0, "Time to wait on all mirror components");
@@ -110,6 +115,8 @@ static int g_mirror_update_disk(struct g_mirror_disk *
 static void g_mirror_update_device(struct g_mirror_softc *sc, bool force);
 static void g_mirror_dumpconf(struct sbuf *sb, const char *indent,
 struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp);
+static int g_mirror_refresh_device(struct g_mirror_softc *sc,
+const struct g_provider *pp, const struct g_mirror_metadata *md);
 static void g_mirror_sync_reinit(const struct g_mirror_disk *disk,
 struct bio *bp, off_t offset);
 static void g_mirror_sync_stop(struct g_mirror_disk *disk, int type);
@@ -472,6 +479,10 @@ g_mirror_init_disk(struct g_mirror_softc *sc, struct g
disk->d_sync.ds_update_ts = time_uptime;
disk->d_genid = md->md_genid;
disk->d_sync.ds_syncid = md->md_syncid;
+   disk->d_init_ndisks = md->md_all;
+   disk->d_init_slice = md->md_slice;
+   disk->d_init_balance = md->md_balance;
+   disk->d_init_mediasize = md->md_mediasize;
if (errorp != NULL)
*errorp = 0;
return (disk);
@@ -2362,17 +2373,74 @@ g_mirror_update_device(struct g_mirror_softc *sc, bool
case G_MIRROR_DEVICE_STATE_STARTING:
{
struct g_mirror_disk *pdisk, *tdisk;
-   u_int dirty, ndisks, genid, syncid;
-   bool broken;
+   const char *mismatch;
+   uintmax_t found, newest;
+   u_int dirty, ndisks;
 
+   /* Pre-flight checks */
+   LIST_FOREACH_SAFE(disk, >sc_disks, d_next, tdisk) {
+   /*
+* Confirm we already detected the newest genid.
+*/
+   KASSERT(sc->sc_genid >= disk->d_genid,
+   ("%s: found newer genid %u (sc:%p had %u).", 
__func__,
+   disk->d_genid, sc, sc->sc_genid));
+
+ 

svn commit: r341673 - in stable/12/sys: kern sys

2018-12-06 Thread Konstantin Belousov
Author: kib
Date: Fri Dec  7 00:50:02 2018
New Revision: 341673
URL: https://svnweb.freebsd.org/changeset/base/341673

Log:
  MFC r340860:
  Provide storage for the process feature control flags in struct proc.

Modified:
  stable/12/sys/kern/kern_exec.c
  stable/12/sys/kern/kern_fork.c
  stable/12/sys/sys/proc.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/kern_exec.c
==
--- stable/12/sys/kern/kern_exec.c  Fri Dec  7 00:47:05 2018
(r341672)
+++ stable/12/sys/kern/kern_exec.c  Fri Dec  7 00:50:02 2018
(r341673)
@@ -488,6 +488,7 @@ interpret:
goto exec_fail_dealloc;
 
imgp->proc->p_osrel = 0;
+   imgp->proc->p_fctl0 = 0;
 
/*
 * Implement image setuid/setgid.

Modified: stable/12/sys/kern/kern_fork.c
==
--- stable/12/sys/kern/kern_fork.c  Fri Dec  7 00:47:05 2018
(r341672)
+++ stable/12/sys/kern/kern_fork.c  Fri Dec  7 00:50:02 2018
(r341673)
@@ -415,6 +415,7 @@ do_fork(struct thread *td, struct fork_req *fr, struct
 
bcopy(>p_startcopy, >p_startcopy,
__rangeof(struct proc, p_startcopy, p_endcopy));
+   p2->p_fctl0 = p1->p_fctl0;
pargs_hold(p2->p_args);
 
PROC_UNLOCK(p1);

Modified: stable/12/sys/sys/proc.h
==
--- stable/12/sys/sys/proc.hFri Dec  7 00:47:05 2018(r341672)
+++ stable/12/sys/sys/proc.hFri Dec  7 00:50:02 2018(r341673)
@@ -681,6 +681,7 @@ struct proc {
 */
LIST_ENTRY(proc) p_orphan;  /* (e) List of orphan processes. */
LIST_HEAD(, proc) p_orphans;/* (e) Pointer to list of orphans. */
+   uint32_tp_fctl0;/* (x) ABI feature control, ELF note */
 };
 
 #definep_session   p_pgrp->pg_session
___
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: r341672 - in head: sys/geom/mirror tests/sys/geom/class/mirror

2018-12-06 Thread Conrad Meyer
Author: cem
Date: Fri Dec  7 00:47:05 2018
New Revision: 341672
URL: https://svnweb.freebsd.org/changeset/base/341672

Log:
  Revert r341665 due to tinderbox breakage
  
  I didn't notice that some format strings were non-portable.  Will fix and
  re-commit later.

Deleted:
  head/tests/sys/geom/class/mirror/component_selection.sh
Modified:
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/mirror/g_mirror.h
  head/tests/sys/geom/class/mirror/Makefile
  head/tests/sys/geom/class/mirror/conf.sh

Modified: head/sys/geom/mirror/g_mirror.c
==
--- head/sys/geom/mirror/g_mirror.c Fri Dec  7 00:39:34 2018
(r341671)
+++ head/sys/geom/mirror/g_mirror.c Fri Dec  7 00:47:05 2018
(r341672)
@@ -59,11 +59,6 @@ static SYSCTL_NODE(_kern_geom, OID_AUTO, mirror, CTLFL
 int g_mirror_debug = 0;
 SYSCTL_INT(_kern_geom_mirror, OID_AUTO, debug, CTLFLAG_RWTUN, _mirror_debug, 
0,
 "Debug level");
-bool g_launch_mirror_before_timeout = true;
-SYSCTL_BOOL(_kern_geom_mirror, OID_AUTO, launch_mirror_before_timeout,
-CTLFLAG_RWTUN, _launch_mirror_before_timeout, 0,
-"If false, force gmirror to wait out the full kern.geom.mirror.timeout "
-"before launching mirrors");
 static u_int g_mirror_timeout = 4;
 SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, timeout, CTLFLAG_RWTUN, 
_mirror_timeout,
 0, "Time to wait on all mirror components");
@@ -115,8 +110,6 @@ static int g_mirror_update_disk(struct g_mirror_disk *
 static void g_mirror_update_device(struct g_mirror_softc *sc, bool force);
 static void g_mirror_dumpconf(struct sbuf *sb, const char *indent,
 struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp);
-static int g_mirror_refresh_device(struct g_mirror_softc *sc,
-const struct g_provider *pp, const struct g_mirror_metadata *md);
 static void g_mirror_sync_reinit(const struct g_mirror_disk *disk,
 struct bio *bp, off_t offset);
 static void g_mirror_sync_stop(struct g_mirror_disk *disk, int type);
@@ -479,10 +472,6 @@ g_mirror_init_disk(struct g_mirror_softc *sc, struct g
disk->d_sync.ds_update_ts = time_uptime;
disk->d_genid = md->md_genid;
disk->d_sync.ds_syncid = md->md_syncid;
-   disk->d_init_ndisks = md->md_all;
-   disk->d_init_slice = md->md_slice;
-   disk->d_init_balance = md->md_balance;
-   disk->d_init_mediasize = md->md_mediasize;
if (errorp != NULL)
*errorp = 0;
return (disk);
@@ -2373,74 +2362,17 @@ g_mirror_update_device(struct g_mirror_softc *sc, bool
case G_MIRROR_DEVICE_STATE_STARTING:
{
struct g_mirror_disk *pdisk, *tdisk;
-   const char *mismatch;
-   uintmax_t found, newest;
-   u_int dirty, ndisks;
+   u_int dirty, ndisks, genid, syncid;
+   bool broken;
 
-   /* Pre-flight checks */
-   LIST_FOREACH_SAFE(disk, >sc_disks, d_next, tdisk) {
-   /*
-* Confirm we already detected the newest genid.
-*/
-   KASSERT(sc->sc_genid >= disk->d_genid,
-   ("%s: found newer genid %u (sc:%p had %u).", 
__func__,
-   disk->d_genid, sc, sc->sc_genid));
-
-   /* Kick out any previously tasted stale components. */
-   if (disk->d_genid < sc->sc_genid) {
-   G_MIRROR_DEBUG(0, "Stale 'genid' field on %s "
-   "(device %s) (component=%u latest=%u), 
skipping.",
-   g_mirror_get_diskname(disk), sc->sc_name,
-   disk->d_genid, sc->sc_genid);
-   g_mirror_destroy_disk(disk);
-   sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID;
-   continue;
-   }
-
-   /*
-* Confirm we already detected the newest syncid.
-*/
-   KASSERT(sc->sc_syncid >= disk->d_sync.ds_syncid,
-   ("%s: found newer syncid %u (sc:%p had %u).",
-__func__, disk->d_sync.ds_syncid, sc,
-sc->sc_syncid));
-
-#define DETECT_MISMATCH(field, name) \
-   if (mismatch == NULL && 
\
-   disk->d_init_ ## field != sc->sc_ ## field) {   
\
-   mismatch = name;
\
-   found = (intmax_t)disk->d_init_ ## field;   
\
-   newest = (intmax_t)sc->sc_ ## field;
\
-   }
-   mismatch = NULL;
-   DETECT_MISMATCH(ndisks, "md_all");
- 

svn commit: r341671 - stable/11/sys/kern

2018-12-06 Thread Konstantin Belousov
Author: kib
Date: Fri Dec  7 00:39:34 2018
New Revision: 341671
URL: https://svnweb.freebsd.org/changeset/base/341671

Log:
  MFC r340863:
  Generalize ELF parse_notes().

Modified:
  stable/11/sys/kern/imgact_elf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/imgact_elf.c
==
--- stable/11/sys/kern/imgact_elf.c Fri Dec  7 00:38:21 2018
(r341670)
+++ stable/11/sys/kern/imgact_elf.c Fri Dec  7 00:39:34 2018
(r341671)
@@ -2325,8 +2325,9 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb,
 }
 
 static boolean_t
-__elfN(parse_notes)(struct image_params *imgp, Elf_Brandnote *checknote,
-int32_t *osrel, const Elf_Phdr *pnote)
+__elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote,
+const char *note_vendor, const Elf_Phdr *pnote,
+boolean_t (*cb)(const Elf_Note *, void *, boolean_t *), void *cb_arg)
 {
const Elf_Note *note, *note0, *note_end;
const char *note_name;
@@ -2364,27 +2365,18 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Bra
(const char *)note < sizeof(Elf_Note)) {
goto retf;
}
-   if (note->n_namesz != checknote->hdr.n_namesz ||
-   note->n_descsz != checknote->hdr.n_descsz ||
-   note->n_type != checknote->hdr.n_type)
+   if (note->n_namesz != checknote->n_namesz ||
+   note->n_descsz != checknote->n_descsz ||
+   note->n_type != checknote->n_type)
goto nextnote;
note_name = (const char *)(note + 1);
-   if (note_name + checknote->hdr.n_namesz >=
-   (const char *)note_end || strncmp(checknote->vendor,
-   note_name, checknote->hdr.n_namesz) != 0)
+   if (note_name + checknote->n_namesz >=
+   (const char *)note_end || strncmp(note_vendor,
+   note_name, checknote->n_namesz) != 0)
goto nextnote;
 
-   /*
-* Fetch the osreldate for binary
-* from the ELF OSABI-note if necessary.
-*/
-   if ((checknote->flags & BN_TRANSLATE_OSREL) != 0 &&
-   checknote->trans_osrel != NULL) {
-   res = checknote->trans_osrel(note, osrel);
+   if (cb(note, cb_arg, ))
goto ret;
-   }
-   res = TRUE;
-   goto ret;
 nextnote:
note = (const Elf_Note *)((const char *)(note + 1) +
roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) +
@@ -2397,26 +2389,54 @@ ret:
return (res);
 }
 
+struct brandnote_cb_arg {
+   Elf_Brandnote *brandnote;
+   int32_t *osrel;
+};
+
+static boolean_t
+brandnote_cb(const Elf_Note *note, void *arg0, boolean_t *res)
+{
+   struct brandnote_cb_arg *arg;
+
+   arg = arg0;
+
+   /*
+* Fetch the osreldate for binary from the ELF OSABI-note if
+* necessary.
+*/
+   *res = (arg->brandnote->flags & BN_TRANSLATE_OSREL) != 0 &&
+   arg->brandnote->trans_osrel != NULL ?
+   arg->brandnote->trans_osrel(note, arg->osrel) : TRUE;
+
+   return (TRUE);
+}
+
 /*
  * Try to find the appropriate ABI-note section for checknote,
  * fetch the osreldate for binary from the ELF OSABI-note. Only the
  * first page of the image is searched, the same as for headers.
  */
 static boolean_t
-__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote,
+__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote,
 int32_t *osrel)
 {
const Elf_Phdr *phdr;
const Elf_Ehdr *hdr;
+   struct brandnote_cb_arg b_arg;
int i;
 
hdr = (const Elf_Ehdr *)imgp->image_header;
phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff);
+   b_arg.brandnote = brandnote;
+   b_arg.osrel = osrel;
 
for (i = 0; i < hdr->e_phnum; i++) {
-   if (phdr[i].p_type == PT_NOTE &&
-   __elfN(parse_notes)(imgp, checknote, osrel, [i]))
+   if (phdr[i].p_type == PT_NOTE && __elfN(parse_notes)(imgp,
+   >hdr, brandnote->vendor, [i], brandnote_cb,
+   _arg)) {
return (TRUE);
+   }
}
return (FALSE);
 
___
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: r341670 - stable/11/sys/kern

2018-12-06 Thread Konstantin Belousov
Author: kib
Date: Fri Dec  7 00:38:21 2018
New Revision: 341670
URL: https://svnweb.freebsd.org/changeset/base/341670

Log:
  MFC r340862:
  Trivial reduction of the code duplication, reuse the return FALSE code.

Modified:
  stable/11/sys/kern/imgact_elf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/imgact_elf.c
==
--- stable/11/sys/kern/imgact_elf.c Fri Dec  7 00:35:56 2018
(r341669)
+++ stable/11/sys/kern/imgact_elf.c Fri Dec  7 00:38:21 2018
(r341670)
@@ -2348,8 +2348,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Bra
curthread->td_ucred, NOCRED, NULL, curthread);
if (error != 0) {
uprintf("i/o error PT_NOTE\n");
-   res = FALSE;
-   goto ret;
+   goto retf;
}
note = note0 = (const Elf_Note *)buf;
note_end = (const Elf_Note *)(buf + pnote->p_filesz);
@@ -2363,8 +2362,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Bra
for (i = 0; i < 100 && note >= note0 && note < note_end; i++) {
if (!aligned(note, Elf32_Addr) || (const char *)note_end -
(const char *)note < sizeof(Elf_Note)) {
-   res = FALSE;
-   goto ret;
+   goto retf;
}
if (note->n_namesz != checknote->hdr.n_namesz ||
note->n_descsz != checknote->hdr.n_descsz ||
@@ -2392,6 +2390,7 @@ nextnote:
roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) +
roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE));
}
+retf:
res = FALSE;
 ret:
free(buf, M_TEMP);
___
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: r341669 - stable/12/sys/kern

2018-12-06 Thread Konstantin Belousov
Author: kib
Date: Fri Dec  7 00:35:56 2018
New Revision: 341669
URL: https://svnweb.freebsd.org/changeset/base/341669

Log:
  MFC r340863:
  Generalize ELF parse_notes().

Modified:
  stable/12/sys/kern/imgact_elf.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/imgact_elf.c
==
--- stable/12/sys/kern/imgact_elf.c Fri Dec  7 00:33:02 2018
(r341668)
+++ stable/12/sys/kern/imgact_elf.c Fri Dec  7 00:35:56 2018
(r341669)
@@ -2340,8 +2340,9 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb,
 }
 
 static boolean_t
-__elfN(parse_notes)(struct image_params *imgp, Elf_Brandnote *checknote,
-int32_t *osrel, const Elf_Phdr *pnote)
+__elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote,
+const char *note_vendor, const Elf_Phdr *pnote,
+boolean_t (*cb)(const Elf_Note *, void *, boolean_t *), void *cb_arg)
 {
const Elf_Note *note, *note0, *note_end;
const char *note_name;
@@ -2379,27 +2380,18 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Bra
(const char *)note < sizeof(Elf_Note)) {
goto retf;
}
-   if (note->n_namesz != checknote->hdr.n_namesz ||
-   note->n_descsz != checknote->hdr.n_descsz ||
-   note->n_type != checknote->hdr.n_type)
+   if (note->n_namesz != checknote->n_namesz ||
+   note->n_descsz != checknote->n_descsz ||
+   note->n_type != checknote->n_type)
goto nextnote;
note_name = (const char *)(note + 1);
-   if (note_name + checknote->hdr.n_namesz >=
-   (const char *)note_end || strncmp(checknote->vendor,
-   note_name, checknote->hdr.n_namesz) != 0)
+   if (note_name + checknote->n_namesz >=
+   (const char *)note_end || strncmp(note_vendor,
+   note_name, checknote->n_namesz) != 0)
goto nextnote;
 
-   /*
-* Fetch the osreldate for binary
-* from the ELF OSABI-note if necessary.
-*/
-   if ((checknote->flags & BN_TRANSLATE_OSREL) != 0 &&
-   checknote->trans_osrel != NULL) {
-   res = checknote->trans_osrel(note, osrel);
+   if (cb(note, cb_arg, ))
goto ret;
-   }
-   res = TRUE;
-   goto ret;
 nextnote:
note = (const Elf_Note *)((const char *)(note + 1) +
roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) +
@@ -2412,26 +2404,54 @@ ret:
return (res);
 }
 
+struct brandnote_cb_arg {
+   Elf_Brandnote *brandnote;
+   int32_t *osrel;
+};
+
+static boolean_t
+brandnote_cb(const Elf_Note *note, void *arg0, boolean_t *res)
+{
+   struct brandnote_cb_arg *arg;
+
+   arg = arg0;
+
+   /*
+* Fetch the osreldate for binary from the ELF OSABI-note if
+* necessary.
+*/
+   *res = (arg->brandnote->flags & BN_TRANSLATE_OSREL) != 0 &&
+   arg->brandnote->trans_osrel != NULL ?
+   arg->brandnote->trans_osrel(note, arg->osrel) : TRUE;
+
+   return (TRUE);
+}
+
 /*
  * Try to find the appropriate ABI-note section for checknote,
  * fetch the osreldate for binary from the ELF OSABI-note. Only the
  * first page of the image is searched, the same as for headers.
  */
 static boolean_t
-__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote,
+__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *brandnote,
 int32_t *osrel)
 {
const Elf_Phdr *phdr;
const Elf_Ehdr *hdr;
+   struct brandnote_cb_arg b_arg;
int i;
 
hdr = (const Elf_Ehdr *)imgp->image_header;
phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff);
+   b_arg.brandnote = brandnote;
+   b_arg.osrel = osrel;
 
for (i = 0; i < hdr->e_phnum; i++) {
-   if (phdr[i].p_type == PT_NOTE &&
-   __elfN(parse_notes)(imgp, checknote, osrel, [i]))
+   if (phdr[i].p_type == PT_NOTE && __elfN(parse_notes)(imgp,
+   >hdr, brandnote->vendor, [i], brandnote_cb,
+   _arg)) {
return (TRUE);
+   }
}
return (FALSE);
 
___
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: r341668 - stable/12/sys/kern

2018-12-06 Thread Konstantin Belousov
Author: kib
Date: Fri Dec  7 00:33:02 2018
New Revision: 341668
URL: https://svnweb.freebsd.org/changeset/base/341668

Log:
  MFC r340862:
  Trivial reduction of the code duplication, reuse the return FALSE code.

Modified:
  stable/12/sys/kern/imgact_elf.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/imgact_elf.c
==
--- stable/12/sys/kern/imgact_elf.c Fri Dec  7 00:27:38 2018
(r341667)
+++ stable/12/sys/kern/imgact_elf.c Fri Dec  7 00:33:02 2018
(r341668)
@@ -2363,8 +2363,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Bra
curthread->td_ucred, NOCRED, NULL, curthread);
if (error != 0) {
uprintf("i/o error PT_NOTE\n");
-   res = FALSE;
-   goto ret;
+   goto retf;
}
note = note0 = (const Elf_Note *)buf;
note_end = (const Elf_Note *)(buf + pnote->p_filesz);
@@ -2378,8 +2377,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Bra
for (i = 0; i < 100 && note >= note0 && note < note_end; i++) {
if (!aligned(note, Elf32_Addr) || (const char *)note_end -
(const char *)note < sizeof(Elf_Note)) {
-   res = FALSE;
-   goto ret;
+   goto retf;
}
if (note->n_namesz != checknote->hdr.n_namesz ||
note->n_descsz != checknote->hdr.n_descsz ||
@@ -2407,6 +2405,7 @@ nextnote:
roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) +
roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE));
}
+retf:
res = FALSE;
 ret:
free(buf, M_TEMP);
___
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: r341667 - in head/tests/sys/geom/class: . eli

2018-12-06 Thread Alan Somers
Author: asomers
Date: Fri Dec  7 00:27:38 2018
New Revision: 341667
URL: https://svnweb.freebsd.org/changeset/base/341667

Log:
  geom tests: Fix cleanup of ATF tests since r341392
  
  r341392 changed common test cleanup routines in a way that allowed them to
  be used by TAP tests as well as ATF tests.  However, a late change made
  during code review resulted in cleanup being broken for ATF tests, which
  source geom_subr.sh separately during the body and cleanup phases of the
  test.  The result was that md(4) devices wouldn't get cleaned up.
  
  MFC after:2 weeks
  X-MFC-With:   341392

Modified:
  head/tests/sys/geom/class/eli/conf.sh
  head/tests/sys/geom/class/geom_subr.sh

Modified: head/tests/sys/geom/class/eli/conf.sh
==
--- head/tests/sys/geom/class/eli/conf.sh   Fri Dec  7 00:00:12 2018
(r341666)
+++ head/tests/sys/geom/class/eli/conf.sh   Fri Dec  7 00:27:38 2018
(r341667)
@@ -4,7 +4,6 @@
 class="eli"
 base=$(atf_get ident)
 MAX_SECSIZE=8192
-TEST_MDS_FILE=md.devs
 
 attach_md()
 {

Modified: head/tests/sys/geom/class/geom_subr.sh
==
--- head/tests/sys/geom/class/geom_subr.sh  Fri Dec  7 00:00:12 2018
(r341666)
+++ head/tests/sys/geom/class/geom_subr.sh  Fri Dec  7 00:27:38 2018
(r341667)
@@ -1,8 +1,7 @@
 #!/bin/sh
 # $FreeBSD$
 
-# NOTE: existence is sanity-checked in 
`geom_verify_temp_mds_file_existence(..)`
-TEST_MDS_FILE="$(mktemp test_mds.${0##*/}.)"
+TEST_MDS_FILE="${TMPDIR}/test_mds.$(basename $0)"
 
 devwait()
 {
@@ -47,14 +46,6 @@ geom_test_cleanup()
fi
 }
 
-geom_verify_temp_mds_file_existence()
-{
-   if [ ! -f $TEST_MDS_FILE ]; then
-   echo "test md(4) devices file creation unsuccessful"
-   return 1
-   fi
-}
-
 geom_load_class_if_needed()
 {
local class=$1
@@ -71,9 +62,6 @@ geom_load_class_if_needed()
 
 geom_atf_test_setup()
 {
-   if ! error_message=$(geom_verify_temp_mds_file_existence); then
-   atf_skip "$error_message"
-   fi
if ! error_message=$(geom_load_class_if_needed $class); then
atf_skip "$error_message"
fi
@@ -81,10 +69,6 @@ geom_atf_test_setup()
 
 geom_tap_test_setup()
 {
-   if ! error_message=$(geom_verify_temp_mds_file_existence); then
-   echo "1..0 # SKIP $error_message"
-   exit 1
-   fi
if ! error_message=$(geom_load_class_if_needed $class); then
echo "1..0 # SKIP $error_message"
exit 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"


Re: svn commit: r341665 - in head: sys/geom/mirror tests/sys/geom/class/mirror

2018-12-06 Thread Conrad Meyer
This minor part was removed from the revision during review, but I
forgot to remove it from the commit message.  Sorry about the mistake,
and please disregard:

On Thu, Dec 6, 2018 at 3:55 PM Conrad Meyer  wrote:
>   When we are instructed to forget mirror components, bump the generation id
>   to avoid confusion with such stale components later.

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


svn commit: r341665 - in head: sys/geom/mirror tests/sys/geom/class/mirror

2018-12-06 Thread Conrad Meyer
Author: cem
Date: Thu Dec  6 23:55:39 2018
New Revision: 341665
URL: https://svnweb.freebsd.org/changeset/base/341665

Log:
  gmirror: Evaluate mirror components against newest metadata copy
  
  If we happen to taste a stale mirror component first, don't reject valid,
  newer components that have differing metadata from the stale component
  (during STARTING).  Instead, update our view of the most recent metadata as
  we taste components.
  
  Like mediasize beforehand, remove some checks from g_mirror_check_metadata
  which would evict valid components due to metadata that can change over a
  mirror's lifetime.  g_mirror_check_metadata is invoked long before we check
  genid/syncid and decide which component(s) are newest and whether or not we
  have quorum.
  
  Before checking if we can enter RUNNING (i.e., we have quorum) after a NEW
  component is added, first remove any known stale or inconsistent disks from
  the mirrorset, rather than removing them *after* deciding we have quorum.
  Check if we have quorum after removing these components.
  
  Additionally, add a knob, kern.geom.mirror.launch_mirror_before_timeout, to
  force gmirrors to wait out the full timeout (kern.geom.mirror.timeout)
  before transitioning from STARTING to RUNNING.  This is a kludge to help
  ensure all eligible, boot-time available mirror components are tasted before
  RUNNING a gmirror.
  
  When we are instructed to forget mirror components, bump the generation id
  to avoid confusion with such stale components later.
  
  Add a basic test case for STARTING -> RUNNING startup behavior around stale
  genids.
  
  PR:   232671, 232835
  Submitted by: Cindy Yang  (previous version)
  Reviewed by:  markj (kernel portions)
  Discussed with:   asomers, Cindy Yang
  Tested by:pho
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D18062

Added:
  head/tests/sys/geom/class/mirror/component_selection.sh   (contents, props 
changed)
Modified:
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/mirror/g_mirror.h
  head/tests/sys/geom/class/mirror/Makefile
  head/tests/sys/geom/class/mirror/conf.sh

Modified: head/sys/geom/mirror/g_mirror.c
==
--- head/sys/geom/mirror/g_mirror.c Thu Dec  6 23:40:56 2018
(r341664)
+++ head/sys/geom/mirror/g_mirror.c Thu Dec  6 23:55:39 2018
(r341665)
@@ -59,6 +59,11 @@ static SYSCTL_NODE(_kern_geom, OID_AUTO, mirror, CTLFL
 int g_mirror_debug = 0;
 SYSCTL_INT(_kern_geom_mirror, OID_AUTO, debug, CTLFLAG_RWTUN, _mirror_debug, 
0,
 "Debug level");
+bool g_launch_mirror_before_timeout = true;
+SYSCTL_BOOL(_kern_geom_mirror, OID_AUTO, launch_mirror_before_timeout,
+CTLFLAG_RWTUN, _launch_mirror_before_timeout, 0,
+"If false, force gmirror to wait out the full kern.geom.mirror.timeout "
+"before launching mirrors");
 static u_int g_mirror_timeout = 4;
 SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, timeout, CTLFLAG_RWTUN, 
_mirror_timeout,
 0, "Time to wait on all mirror components");
@@ -110,6 +115,8 @@ static int g_mirror_update_disk(struct g_mirror_disk *
 static void g_mirror_update_device(struct g_mirror_softc *sc, bool force);
 static void g_mirror_dumpconf(struct sbuf *sb, const char *indent,
 struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp);
+static int g_mirror_refresh_device(struct g_mirror_softc *sc,
+const struct g_provider *pp, const struct g_mirror_metadata *md);
 static void g_mirror_sync_reinit(const struct g_mirror_disk *disk,
 struct bio *bp, off_t offset);
 static void g_mirror_sync_stop(struct g_mirror_disk *disk, int type);
@@ -472,6 +479,10 @@ g_mirror_init_disk(struct g_mirror_softc *sc, struct g
disk->d_sync.ds_update_ts = time_uptime;
disk->d_genid = md->md_genid;
disk->d_sync.ds_syncid = md->md_syncid;
+   disk->d_init_ndisks = md->md_all;
+   disk->d_init_slice = md->md_slice;
+   disk->d_init_balance = md->md_balance;
+   disk->d_init_mediasize = md->md_mediasize;
if (errorp != NULL)
*errorp = 0;
return (disk);
@@ -2362,17 +2373,74 @@ g_mirror_update_device(struct g_mirror_softc *sc, bool
case G_MIRROR_DEVICE_STATE_STARTING:
{
struct g_mirror_disk *pdisk, *tdisk;
-   u_int dirty, ndisks, genid, syncid;
-   bool broken;
+   const char *mismatch;
+   uintmax_t found, newest;
+   u_int dirty, ndisks;
 
+   /* Pre-flight checks */
+   LIST_FOREACH_SAFE(disk, >sc_disks, d_next, tdisk) {
+   /*
+* Confirm we already detected the newest genid.
+*/
+   KASSERT(sc->sc_genid >= disk->d_genid,
+   ("%s: found newer genid %u (sc:%p had %u).", 
__func__,
+   disk->d_genid, sc, 

svn commit: r341666 - in releng/12.0: . lib/csu/common sys/conf

2018-12-06 Thread Glen Barber
Author: gjb
Date: Fri Dec  7 00:00:12 2018
New Revision: 341666
URL: https://svnweb.freebsd.org/changeset/base/341666

Log:
  - Switch releng/12.0 from RC3 to RELEASE.
  - Add the anticipated 12.0-RELEASE date to UPDATING.
  - Set a static __FreeBSD_version.
  - This one goes to 12.
  
  Approved by:  re (implicit)
  Sponsored by: The FreeBSD Foundation

Modified:
  releng/12.0/UPDATING
  releng/12.0/lib/csu/common/crtbrand.c
  releng/12.0/sys/conf/newvers.sh

Modified: releng/12.0/UPDATING
==
--- releng/12.0/UPDATINGThu Dec  6 23:55:39 2018(r341665)
+++ releng/12.0/UPDATINGFri Dec  7 00:00:12 2018(r341666)
@@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20181211:
+   12.0-RELEASE.
+
 20181115:
The set of CTM commands (ctm, ctm_smail, ctm_rmail, ctm_dequeue)
has been converted to a port (misc/ctm) and will be removed from

Modified: releng/12.0/lib/csu/common/crtbrand.c
==
--- releng/12.0/lib/csu/common/crtbrand.c   Thu Dec  6 23:55:39 2018
(r341665)
+++ releng/12.0/lib/csu/common/crtbrand.c   Fri Dec  7 00:00:12 2018
(r341666)
@@ -65,5 +65,5 @@ static const struct {
.descsz = sizeof(int32_t),
.type = NT_FREEBSD_ABI_TAG,
.name = NOTE_FREEBSD_VENDOR,
-   .desc = __FreeBSD_version
+   .desc = 1200086
 };

Modified: releng/12.0/sys/conf/newvers.sh
==
--- releng/12.0/sys/conf/newvers.sh Thu Dec  6 23:55:39 2018
(r341665)
+++ releng/12.0/sys/conf/newvers.sh Fri Dec  7 00:00:12 2018
(r341666)
@@ -46,7 +46,7 @@
 
 TYPE="FreeBSD"
 REVISION="12.0"
-BRANCH="RC3"
+BRANCH="RELEASE"
 if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
 fi
___
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: r341657 - in head: etc/mtree sbin/nvmecontrol share/man/man7

2018-12-06 Thread Warner Losh
On Thu, Dec 6, 2018 at 4:25 PM Andrew Thompson  wrote:

> On Fri, 7 Dec 2018 at 11:58, Warner Losh  wrote:
>
>> Author: imp
>> Date: Thu Dec  6 22:58:26 2018
>> New Revision: 341657
>> URL: https://svnweb.freebsd.org/changeset/base/341657
>>
>> Log:
>>   Dynamically load .so modules to expand functionality
>>
>>   o Dynamically load all the .so files found in /libexec/nvmecontrol and
>> /usr/local/libexec/nvmecontrol.
>>   o Link nvmecontrol -rdynamic so that its symbols are visible to the
>> libraries we load.
>>   o Create concatinated linker sets that we dynamically expand.
>>   o Add the linked-in top and logpage linker sets to the mirrors for them
>> and add those sets to the mirrors when we load a new .so.
>>   o Add some macros to help hide the names of the linker sets.
>>   o Update the man page.
>>
> ...
>
>>
>> Modified: head/sbin/nvmecontrol/nvmecontrol.c
>>
>> ==
>> --- head/sbin/nvmecontrol/nvmecontrol.c Thu Dec  6 22:35:07 2018
>> (r341656)
>> +++ head/sbin/nvmecontrol/nvmecontrol.c Thu Dec  6 22:58:26 2018
>> (r341657)
>> @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
>>  #include 
>> ...
>>  int
>>  main(int argc, char *argv[])
>>  {
>>
>> +   add_to_top(NVME_CMD_BEGIN(top), NVME_CMD_LIMIT(top));
>> +   add_to_logpage(NVME_LOGPAGE_BEGIN, NVME_LOGPAGE_LIMIT);
>> +
>> +   load_dir("/lib/nvmecontrol");
>> +   load_dir("/usr/local/lib/nvmecontrol");
>>
>>
>  You have /libexec/nvmecontrol in some places and /lib/nvmecontrol in
> others. It seems it actually loads from the latter.
>

It does. I had libexec for most of my development, but in the review it was
pointed out that this should be lib, so I changed it most, but not all,
places. Thanks for catching the mismatch. I've corrected it.

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: r341664 - head/sbin/nvmecontrol

2018-12-06 Thread Warner Losh
Author: imp
Date: Thu Dec  6 23:40:56 2018
New Revision: 341664
URL: https://svnweb.freebsd.org/changeset/base/341664

Log:
  Update paths based on last-minute changes from libexec to lib.

Modified:
  head/sbin/nvmecontrol/nvmecontrol.8

Modified: head/sbin/nvmecontrol/nvmecontrol.8
==
--- head/sbin/nvmecontrol/nvmecontrol.8 Thu Dec  6 23:29:06 2018
(r341663)
+++ head/sbin/nvmecontrol/nvmecontrol.8 Thu Dec  6 23:40:56 2018
(r341664)
@@ -232,9 +232,9 @@ Set the current power mode.
 Get the current power mode.
 .Sh DYNAMIC LOADING
 The directories
-.Pa /libexec/nvmecontrol
+.Pa /lib/nvmecontrol
 and
-.Pa /usr/local/libexec/nvmecontrol
+.Pa /usr/local/lib/nvmecontrol
 are scanned for any .so files.
 These files are loaded.
 The members of the
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r341657 - in head: etc/mtree sbin/nvmecontrol share/man/man7

2018-12-06 Thread Warner Losh
On Thu, Dec 6, 2018 at 4:23 PM John Baldwin  wrote:

> On 12/6/18 2:58 PM, Warner Losh wrote:
> > Author: imp
> > Date: Thu Dec  6 22:58:26 2018
> > New Revision: 341657
> > URL: https://svnweb.freebsd.org/changeset/base/341657
> >
> > Log:
> >   Dynamically load .so modules to expand functionality
> >
> >   o Dynamically load all the .so files found in /libexec/nvmecontrol and
> > /usr/local/libexec/nvmecontrol.
> >   o Link nvmecontrol -rdynamic so that its symbols are visible to the
> > libraries we load.
> >   o Create concatinated linker sets that we dynamically expand.
> >   o Add the linked-in top and logpage linker sets to the mirrors for them
> > and add those sets to the mirrors when we load a new .so.
> >   o Add some macros to help hide the names of the linker sets.
> >   o Update the man page.
> >
> >   Sponsored by: Netflix
> >   Differential Revision: https://reviews.freebsd.org/D18455
>
> While linker sets are cool and all (and I used them in mfiutil and mptutil
> to build the command tree), it seems like in this case where you want to
> deal
> with dynamic registration, etc. you would be better served by just using
> something like STL C++ containers to maintain the command tree.  New
> commands can be associated with a static object whose constructor invokes a
> "register_command" function or some such.  You could also do this in C via
> explicit ctor attributes, but just using static constructors in C++ seems
> like
> a less obscure way to do this.
>

I thought about doing it that way. I had it mostly coded up, but it turned
out to be a bigger pain and required more source changes between modules
and non-module builds.

I didn't want to make C++ anything. And the ctor stuff runs at 'random
times' that I didn't want to deal with.

And linker sets aren't that obscure.

So in the end, I went with linker sets because it seemed like the right
tool for the job.

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"


Re: svn commit: r341657 - in head: etc/mtree sbin/nvmecontrol share/man/man7

2018-12-06 Thread Andrew Thompson
On Fri, 7 Dec 2018 at 11:58, Warner Losh  wrote:

> Author: imp
> Date: Thu Dec  6 22:58:26 2018
> New Revision: 341657
> URL: https://svnweb.freebsd.org/changeset/base/341657
>
> Log:
>   Dynamically load .so modules to expand functionality
>
>   o Dynamically load all the .so files found in /libexec/nvmecontrol and
> /usr/local/libexec/nvmecontrol.
>   o Link nvmecontrol -rdynamic so that its symbols are visible to the
> libraries we load.
>   o Create concatinated linker sets that we dynamically expand.
>   o Add the linked-in top and logpage linker sets to the mirrors for them
> and add those sets to the mirrors when we load a new .so.
>   o Add some macros to help hide the names of the linker sets.
>   o Update the man page.
>
...

>
> Modified: head/sbin/nvmecontrol/nvmecontrol.c
>
> ==
> --- head/sbin/nvmecontrol/nvmecontrol.c Thu Dec  6 22:35:07 2018
> (r341656)
> +++ head/sbin/nvmecontrol/nvmecontrol.c Thu Dec  6 22:58:26 2018
> (r341657)
> @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
>  #include 
> ...
>  int
>  main(int argc, char *argv[])
>  {
>
> +   add_to_top(NVME_CMD_BEGIN(top), NVME_CMD_LIMIT(top));
> +   add_to_logpage(NVME_LOGPAGE_BEGIN, NVME_LOGPAGE_LIMIT);
> +
> +   load_dir("/lib/nvmecontrol");
> +   load_dir("/usr/local/lib/nvmecontrol");
>
>
 You have /libexec/nvmecontrol in some places and /lib/nvmecontrol in
others. It seems it actually loads from the latter.


Andrew
___
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: r341663 - head/sbin/nvmecontrol

2018-12-06 Thread Warner Losh
Author: imp
Date: Thu Dec  6 23:29:06 2018
New Revision: 341663
URL: https://svnweb.freebsd.org/changeset/base/341663

Log:
  Declare global function print_intel_add_smart in header

Modified:
  head/sbin/nvmecontrol/nvmecontrol.h

Modified: head/sbin/nvmecontrol/nvmecontrol.h
==
--- head/sbin/nvmecontrol/nvmecontrol.h Thu Dec  6 23:28:55 2018
(r341662)
+++ head/sbin/nvmecontrol/nvmecontrol.h Thu Dec  6 23:29:06 2018
(r341663)
@@ -118,6 +118,7 @@ void print_hex(void *data, uint32_t length);
 void read_logpage(int fd, uint8_t log_page, uint32_t nsid, void *payload,
 uint32_t payload_size);
 void print_temp(uint16_t t);
+void print_intel_add_smart(const struct nvme_controller_data *cdata __unused, 
void *buf, uint32_t size __unused);
 
 void usage(const struct nvme_function *f);
 void dispatch_set(int argc, char *argv[], const struct nvme_function * const 
*tbl,
___
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: r341662 - head/sbin/nvmecontrol

2018-12-06 Thread Warner Losh
Author: imp
Date: Thu Dec  6 23:28:55 2018
New Revision: 341662
URL: https://svnweb.freebsd.org/changeset/base/341662

Log:
  Use proper prototypes.

Modified:
  head/sbin/nvmecontrol/nvmecontrol.h

Modified: head/sbin/nvmecontrol/nvmecontrol.h
==
--- head/sbin/nvmecontrol/nvmecontrol.h Thu Dec  6 22:59:18 2018
(r341661)
+++ head/sbin/nvmecontrol/nvmecontrol.h Thu Dec  6 23:28:55 2018
(r341662)
@@ -96,8 +96,8 @@ struct set_concat {
 void set_concat_add(struct set_concat *m, void *begin, void *end);
 #define SET_CONCAT_DEF(set, t) 
\
 static struct set_concat set ## _concat;   
\
-static inline const t * const *set ## _begin() { return ((const t * const 
*)set ## _concat.begin); }   \
-static inline const t * const *set ## _limit() { return ((const t * const 
*)set ## _concat.limit); }   \
+static inline const t * const *set ## _begin(void) { return ((const t * const 
*)set ## _concat.begin); }   \
+static inline const t * const *set ## _limit(void) { return ((const t * const 
*)set ## _concat.limit); }   \
 void add_to_ ## set(t **b, t **e)  
\
 {  
\
set_concat_add( ## _concat, b, e);  
\
___
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: r341657 - in head: etc/mtree sbin/nvmecontrol share/man/man7

2018-12-06 Thread John Baldwin
On 12/6/18 2:58 PM, Warner Losh wrote:
> Author: imp
> Date: Thu Dec  6 22:58:26 2018
> New Revision: 341657
> URL: https://svnweb.freebsd.org/changeset/base/341657
> 
> Log:
>   Dynamically load .so modules to expand functionality
>   
>   o Dynamically load all the .so files found in /libexec/nvmecontrol and
> /usr/local/libexec/nvmecontrol.
>   o Link nvmecontrol -rdynamic so that its symbols are visible to the
> libraries we load.
>   o Create concatinated linker sets that we dynamically expand.
>   o Add the linked-in top and logpage linker sets to the mirrors for them
> and add those sets to the mirrors when we load a new .so.
>   o Add some macros to help hide the names of the linker sets.
>   o Update the man page.
>   
>   Sponsored by: Netflix
>   Differential Revision: https://reviews.freebsd.org/D18455

While linker sets are cool and all (and I used them in mfiutil and mptutil
to build the command tree), it seems like in this case where you want to deal
with dynamic registration, etc. you would be better served by just using
something like STL C++ containers to maintain the command tree.  New
commands can be associated with a static object whose constructor invokes a
"register_command" function or some such.  You could also do this in C via
explicit ctor attributes, but just using static constructors in C++ seems like
a less obscure way to do this.

-- 
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: r341660 - head/sbin/nvmecontrol/modules/intel

2018-12-06 Thread Warner Losh
Author: imp
Date: Thu Dec  6 22:59:08 2018
New Revision: 341660
URL: https://svnweb.freebsd.org/changeset/base/341660

Log:
  This is not a samsung standard, so remove that alias.
  
  This was never documented, and isn't needed, so it's best removed to
  avoid confusion.
  
  Sponsored by: Netflix
  Differential Revision:https://reviews.freebsd.org/D18460

Modified:
  head/sbin/nvmecontrol/modules/intel/intel.c

Modified: head/sbin/nvmecontrol/modules/intel/intel.c
==
--- head/sbin/nvmecontrol/modules/intel/intel.c Thu Dec  6 22:58:55 2018
(r341659)
+++ head/sbin/nvmecontrol/modules/intel/intel.c Thu Dec  6 22:59:08 2018
(r341660)
@@ -117,7 +117,7 @@ print_intel_write_lat_log(const struct nvme_controller
 }
 
 /*
- * Table 19. 5.4 SMART Attributes. Samsung also implements this and some extra 
data not documented.
+ * Table 19. 5.4 SMART Attributes. Others also implement this and some extra 
data not documented.
  */
 static void
 print_intel_add_smart(const struct nvme_controller_data *cdata __unused, void 
*buf, uint32_t size __unused)
@@ -192,7 +192,4 @@ NVME_LOGPAGE(intel_wlat,
 print_intel_write_lat_log, DEFAULT_SIZE);
 NVME_LOGPAGE(intel_smart,
 INTEL_LOG_ADD_SMART,   "intel", "Extra Health/SMART Data",
-print_intel_add_smart, DEFAULT_SIZE);
-NVME_LOGPAGE(samsung_smart,/* NOTE, this 
will be deleted before 13.0 */
-INTEL_LOG_ADD_SMART,   "samsung", "Extra Health/SMART Data",
 print_intel_add_smart, DEFAULT_SIZE);
___
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: r341661 - head/sbin/nvmecontrol/modules/intel

2018-12-06 Thread Warner Losh
Author: imp
Date: Thu Dec  6 22:59:18 2018
New Revision: 341661
URL: https://svnweb.freebsd.org/changeset/base/341661

Log:
  It's useful to have this be a global function.
  
  Other vendors base their additional smart info pages on what Intel did
  plus some other bits. So it's convenient to have this be global.
  
  Sponsored by: Netflix

Modified:
  head/sbin/nvmecontrol/modules/intel/intel.c

Modified: head/sbin/nvmecontrol/modules/intel/intel.c
==
--- head/sbin/nvmecontrol/modules/intel/intel.c Thu Dec  6 22:59:08 2018
(r341660)
+++ head/sbin/nvmecontrol/modules/intel/intel.c Thu Dec  6 22:59:18 2018
(r341661)
@@ -119,7 +119,7 @@ print_intel_write_lat_log(const struct nvme_controller
 /*
  * Table 19. 5.4 SMART Attributes. Others also implement this and some extra 
data not documented.
  */
-static void
+void
 print_intel_add_smart(const struct nvme_controller_data *cdata __unused, void 
*buf, uint32_t size __unused)
 {
uint8_t *walker = buf;
___
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: r341658 - head/sbin/nvmecontrol

2018-12-06 Thread Warner Losh
Author: imp
Date: Thu Dec  6 22:58:42 2018
New Revision: 341658
URL: https://svnweb.freebsd.org/changeset/base/341658

Log:
  Const poison the command interface
  
  Make the pointers we pass into the commands const, also make the
  linker set mirrors const.
  
  Suggested by: cem@
  Sponsored by: Netflix
  Differential Revision: https://reviews.freebsd.org/D18459

Modified:
  head/sbin/nvmecontrol/devlist.c
  head/sbin/nvmecontrol/firmware.c
  head/sbin/nvmecontrol/format.c
  head/sbin/nvmecontrol/identify.c
  head/sbin/nvmecontrol/logpage.c
  head/sbin/nvmecontrol/ns.c
  head/sbin/nvmecontrol/nvmecontrol.c
  head/sbin/nvmecontrol/nvmecontrol.h
  head/sbin/nvmecontrol/perftest.c
  head/sbin/nvmecontrol/power.c
  head/sbin/nvmecontrol/reset.c
  head/sbin/nvmecontrol/wdc.c

Modified: head/sbin/nvmecontrol/devlist.c
==
--- head/sbin/nvmecontrol/devlist.c Thu Dec  6 22:58:26 2018
(r341657)
+++ head/sbin/nvmecontrol/devlist.c Thu Dec  6 22:58:42 2018
(r341658)
@@ -60,7 +60,7 @@ ns_get_sector_size(struct nvme_namespace_data *nsdata)
 }
 
 static void
-devlist(struct nvme_function *nf, int argc, char *argv[])
+devlist(const struct nvme_function *nf, int argc, char *argv[])
 {
struct nvme_controller_data cdata;
struct nvme_namespace_data  nsdata;

Modified: head/sbin/nvmecontrol/firmware.c
==
--- head/sbin/nvmecontrol/firmware.cThu Dec  6 22:58:26 2018
(r341657)
+++ head/sbin/nvmecontrol/firmware.cThu Dec  6 22:58:42 2018
(r341658)
@@ -174,7 +174,7 @@ activate_firmware(int fd, int slot, int activate_actio
 }
 
 static void
-firmware(struct nvme_function *nf, int argc, char *argv[])
+firmware(const struct nvme_function *nf, int argc, char *argv[])
 {
int fd = -1, slot = 0;
int a_flag, s_flag, f_flag;

Modified: head/sbin/nvmecontrol/format.c
==
--- head/sbin/nvmecontrol/format.c  Thu Dec  6 22:58:26 2018
(r341657)
+++ head/sbin/nvmecontrol/format.c  Thu Dec  6 22:58:42 2018
(r341658)
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
"format [-f fmt] [-m mset] [-p pi] [-l pil] [-E] [-C] \n"
 
 static void
-format(struct nvme_function *nf, int argc, char *argv[])
+format(const struct nvme_function *nf, int argc, char *argv[])
 {
struct nvme_controller_data cd;
struct nvme_namespace_data  nsd;

Modified: head/sbin/nvmecontrol/identify.c
==
--- head/sbin/nvmecontrol/identify.cThu Dec  6 22:58:26 2018
(r341657)
+++ head/sbin/nvmecontrol/identify.cThu Dec  6 22:58:42 2018
(r341658)
@@ -150,7 +150,7 @@ print_namespace(struct nvme_namespace_data *nsdata)
 }
 
 static void
-identify_ctrlr(struct nvme_function *nf, int argc, char *argv[])
+identify_ctrlr(const struct nvme_function *nf, int argc, char *argv[])
 {
struct nvme_controller_data cdata;
int ch, fd, hexflag = 0, hexlength;
@@ -197,7 +197,7 @@ identify_ctrlr(struct nvme_function *nf, int argc, cha
 }
 
 static void
-identify_ns(struct nvme_function *nf,int argc, char *argv[])
+identify_ns(const struct nvme_function *nf,int argc, char *argv[])
 {
struct nvme_namespace_data  nsdata;
charpath[64];
@@ -261,7 +261,7 @@ identify_ns(struct nvme_function *nf,int argc, char *a
 }
 
 static void
-identify(struct nvme_function *nf, int argc, char *argv[])
+identify(const struct nvme_function *nf, int argc, char *argv[])
 {
char*target;
 

Modified: head/sbin/nvmecontrol/logpage.c
==
--- head/sbin/nvmecontrol/logpage.c Thu Dec  6 22:58:26 2018
(r341657)
+++ head/sbin/nvmecontrol/logpage.c Thu Dec  6 22:58:42 2018
(r341658)
@@ -326,7 +326,7 @@ NVME_LOGPAGE(fw,
 static void
 logpage_help(void)
 {
-   struct logpage_function **f;
+   const struct logpage_function   * const *f;
const char  *v;
 
fprintf(stderr, "\n");
@@ -341,7 +341,7 @@ logpage_help(void)
 }
 
 static void
-logpage(struct nvme_function *nf, int argc, char *argv[])
+logpage(const struct nvme_function *nf, int argc, char *argv[])
 {
int fd;
int log_page = 0, pageflag = false;
@@ -352,7 +352,7 @@ logpage(struct nvme_function *nf, int argc, char *argv
uint32_tnsid, size;
void*buf;
const char  *vendor = NULL;
-   struct logpage_function **f;
+   const struct 

svn commit: r341657 - in head: etc/mtree sbin/nvmecontrol share/man/man7

2018-12-06 Thread Warner Losh
Author: imp
Date: Thu Dec  6 22:58:26 2018
New Revision: 341657
URL: https://svnweb.freebsd.org/changeset/base/341657

Log:
  Dynamically load .so modules to expand functionality
  
  o Dynamically load all the .so files found in /libexec/nvmecontrol and
/usr/local/libexec/nvmecontrol.
  o Link nvmecontrol -rdynamic so that its symbols are visible to the
libraries we load.
  o Create concatinated linker sets that we dynamically expand.
  o Add the linked-in top and logpage linker sets to the mirrors for them
and add those sets to the mirrors when we load a new .so.
  o Add some macros to help hide the names of the linker sets.
  o Update the man page.
  
  Sponsored by: Netflix
  Differential Revision: https://reviews.freebsd.org/D18455
  
  fold

Modified:
  head/etc/mtree/BSD.root.dist
  head/sbin/nvmecontrol/Makefile
  head/sbin/nvmecontrol/logpage.c
  head/sbin/nvmecontrol/ns.c
  head/sbin/nvmecontrol/nvmecontrol.8
  head/sbin/nvmecontrol/nvmecontrol.c
  head/sbin/nvmecontrol/nvmecontrol.h
  head/sbin/nvmecontrol/wdc.c
  head/share/man/man7/hier.7

Modified: head/etc/mtree/BSD.root.dist
==
--- head/etc/mtree/BSD.root.distThu Dec  6 22:35:07 2018
(r341656)
+++ head/etc/mtree/BSD.root.distThu Dec  6 22:58:26 2018
(r341657)
@@ -88,6 +88,8 @@
 ..
 geom
 ..
+nvmecontrol
+..
 ..
 libexec
 resolvconf

Modified: head/sbin/nvmecontrol/Makefile
==
--- head/sbin/nvmecontrol/Makefile  Thu Dec  6 22:35:07 2018
(r341656)
+++ head/sbin/nvmecontrol/Makefile  Thu Dec  6 22:58:26 2018
(r341657)
@@ -6,6 +6,7 @@ SRCS=   nvmecontrol.c devlist.c firmware.c format.c iden
perftest.c reset.c ns.c nvme_util.c power.c nc_util.c
 SRCS+= wdc.c intel.c
 MAN=   nvmecontrol.8
+LDFLAGS+= -rdynamic
 
 .PATH: ${SRCTOP}/sys/dev/nvme
 

Modified: head/sbin/nvmecontrol/logpage.c
==
--- head/sbin/nvmecontrol/logpage.c Thu Dec  6 22:35:07 2018
(r341656)
+++ head/sbin/nvmecontrol/logpage.c Thu Dec  6 22:58:26 2018
(r341657)
@@ -48,13 +48,13 @@ __FBSDID("$FreeBSD$");
 
 #include "nvmecontrol.h"
 
-SET_DECLARE(logpage, struct logpage_function);
-
 #define LOGPAGE_USAGE \
"logpage <-p page_id> [-b] [-v vendor] [-x] \n"  \
 
 #define MAX_FW_SLOTS   (7)
 
+SET_CONCAT_DEF(logpage, struct logpage_function);
+
 const char *
 kv_lookup(const struct kv_name *kv, size_t kv_count, uint32_t key)
 {
@@ -332,7 +332,7 @@ logpage_help(void)
fprintf(stderr, "\n");
fprintf(stderr, "%-8s %-10s %s\n", "Page", "Vendor","Page Name");
fprintf(stderr, " -- --\n");
-   for (f = SET_BEGIN(logpage); f < SET_LIMIT(logpage); f++) {
+   for (f = logpage_begin(); f < logpage_limit(); f++) {
v = (*f)->vendor == NULL ? "-" : (*f)->vendor;
fprintf(stderr, "0x%02x %-10s %s\n", (*f)->log_page, v, 
(*f)->name);
}
@@ -438,7 +438,7 @@ logpage(struct nvme_function *nf, int argc, char *argv
 * the page is vendor specific, don't match the print function
 * unless the vendors match.
 */
-   for (f = SET_BEGIN(logpage); f < SET_LIMIT(logpage); f++) {
+   for (f = logpage_begin(); f < logpage_limit(); f++) {
if ((*f)->vendor != NULL && vendor != NULL &&
strcmp((*f)->vendor, vendor) != 0)
continue;

Modified: head/sbin/nvmecontrol/ns.c
==
--- head/sbin/nvmecontrol/ns.c  Thu Dec  6 22:35:07 2018(r341656)
+++ head/sbin/nvmecontrol/ns.c  Thu Dec  6 22:58:26 2018(r341657)
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
 
 #include "nvmecontrol.h"
 
-SET_DECLARE(ns, struct nvme_function);
+NVME_CMD_DECLARE(ns, struct nvme_function);
 
 #define NS_USAGE   \
"ns (create|delete|attach|detach)\n"

Modified: head/sbin/nvmecontrol/nvmecontrol.8
==
--- head/sbin/nvmecontrol/nvmecontrol.8 Thu Dec  6 22:35:07 2018
(r341656)
+++ head/sbin/nvmecontrol/nvmecontrol.8 Thu Dec  6 22:58:26 2018
(r341657)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 12, 2018
+.Dd December 7, 2018
 .Dt NVMECONTROL 8
 .Os
 .Sh NAME
@@ -230,6 +230,19 @@ Set the current power mode.
 .Dl nvmecontrol power nvme0
 .Pp
 Get the current power mode.
+.Sh DYNAMIC LOADING
+The directories
+.Pa /libexec/nvmecontrol
+and
+.Pa /usr/local/libexec/nvmecontrol
+are scanned for any .so files.
+These files are 

svn commit: r341659 - in head/sbin/nvmecontrol: . modules modules/intel modules/wdc

2018-12-06 Thread Warner Losh
Author: imp
Date: Thu Dec  6 22:58:55 2018
New Revision: 341659
URL: https://svnweb.freebsd.org/changeset/base/341659

Log:
  Move intel and wdc files to their own modules
  
  Move the intel and wdc vendor specific stuff to their own modules.
  
  Sponsored by: Netflix
  Differential Revision:  https://reviews.freebsd.org/D18460

Added:
  head/sbin/nvmecontrol/modules/
  head/sbin/nvmecontrol/modules/Makefile   (contents, props changed)
  head/sbin/nvmecontrol/modules/Makefile.inc   (contents, props changed)
  head/sbin/nvmecontrol/modules/intel/
  head/sbin/nvmecontrol/modules/intel/Makefile   (contents, props changed)
  head/sbin/nvmecontrol/modules/intel/intel.c   (contents, props changed)
 - copied, changed from r341658, head/sbin/nvmecontrol/intel.c
  head/sbin/nvmecontrol/modules/wdc/
  head/sbin/nvmecontrol/modules/wdc/Makefile   (contents, props changed)
  head/sbin/nvmecontrol/modules/wdc/wdc.c   (contents, props changed)
 - copied, changed from r341658, head/sbin/nvmecontrol/wdc.c
Deleted:
  head/sbin/nvmecontrol/intel.c
  head/sbin/nvmecontrol/wdc.c
Modified:
  head/sbin/nvmecontrol/Makefile

Modified: head/sbin/nvmecontrol/Makefile
==
--- head/sbin/nvmecontrol/Makefile  Thu Dec  6 22:58:42 2018
(r341658)
+++ head/sbin/nvmecontrol/Makefile  Thu Dec  6 22:58:55 2018
(r341659)
@@ -4,10 +4,11 @@ PACKAGE=runtime
 PROG=  nvmecontrol
 SRCS=  nvmecontrol.c devlist.c firmware.c format.c identify.c identify_ext.c 
logpage.c \
perftest.c reset.c ns.c nvme_util.c power.c nc_util.c
-SRCS+= wdc.c intel.c
 MAN=   nvmecontrol.8
 LDFLAGS+= -rdynamic
+SUBDIR=modules
 
 .PATH: ${SRCTOP}/sys/dev/nvme
 
 .include 
+.include 

Added: head/sbin/nvmecontrol/modules/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/nvmecontrol/modules/Makefile  Thu Dec  6 22:58:55 2018
(r341659)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+SUBDIR=intel wdc
+
+.include 

Added: head/sbin/nvmecontrol/modules/Makefile.inc
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/nvmecontrol/modules/Makefile.inc  Thu Dec  6 22:58:55 2018
(r341659)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+PACKAGE=runtime
+NVMECONTROLDIR=${SRCTOP}/sbin/nvmecontrol
+
+MK_INSTALLLIB= no
+MK_PROFILE=no
+
+CFLAGS+=   -I${NVMECONTROLDIR}
+
+SHLIB_NAME?=   ${LIB}.so
+LIBDIR=/lib/nvmecontrol

Added: head/sbin/nvmecontrol/modules/intel/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/nvmecontrol/modules/intel/MakefileThu Dec  6 22:58:55 
2018(r341659)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+LIB=   intel
+SRCS=  intel.c
+
+.include 

Copied and modified: head/sbin/nvmecontrol/modules/intel/intel.c (from r341658, 
head/sbin/nvmecontrol/intel.c)
==

Added: head/sbin/nvmecontrol/modules/wdc/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/nvmecontrol/modules/wdc/Makefile  Thu Dec  6 22:58:55 2018
(r341659)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+LIB=   wdc
+SRCS=  wdc.c
+
+.include 

Copied and modified: head/sbin/nvmecontrol/modules/wdc/wdc.c (from r341658, 
head/sbin/nvmecontrol/wdc.c)
==
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2018-12-06 Thread John Baldwin
Author: jhb
Date: Thu Dec  6 22:35:07 2018
New Revision: 341656
URL: https://svnweb.freebsd.org/changeset/base/341656

Log:
  Rename riscv64-freebsd.c to riscv-freebsd.c.
  
  This fixes truss when built as part of a riscv64sf world.  Additionally,
  if FreeBSD ever supports RV32 RISC-V most of this file can be used as-is
  just as a single file is used for all of the MIPS ABIs.
  
  Sponsored by: DARPA

Added:
  head/usr.bin/truss/riscv-freebsd.c
 - copied, changed from r341655, head/usr.bin/truss/riscv64-freebsd.c
Deleted:
  head/usr.bin/truss/riscv64-freebsd.c

Copied and modified: head/usr.bin/truss/riscv-freebsd.c (from r341655, 
head/usr.bin/truss/riscv64-freebsd.c)
==
--- head/usr.bin/truss/riscv64-freebsd.cThu Dec  6 21:52:40 2018
(r341655, copy source)
+++ head/usr.bin/truss/riscv-freebsd.c  Thu Dec  6 22:35:07 2018
(r341656)
@@ -26,7 +26,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-/* FreeBSD/riscv64-specific system call handling. */
+/* FreeBSD/riscv-specific system call handling. */
 
 #include 
 #include 
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
 #include "truss.h"
 
 static int
-riscv64_fetch_args(struct trussinfo *trussinfo, u_int narg)
+riscv_fetch_args(struct trussinfo *trussinfo, u_int narg)
 {
struct reg regs;
struct current_syscall *cs;
@@ -77,7 +77,7 @@ riscv64_fetch_args(struct trussinfo *trussinfo, u_int 
 }
 
 static int
-riscv64_fetch_retval(struct trussinfo *trussinfo, long *retval, int *errorp)
+riscv_fetch_retval(struct trussinfo *trussinfo, long *retval, int *errorp)
 {
struct reg regs;
lwpid_t tid;
@@ -94,13 +94,13 @@ riscv64_fetch_retval(struct trussinfo *trussinfo, long
return (0);
 }
 
-static struct procabi riscv64_freebsd = {
+static struct procabi riscv_freebsd = {
"FreeBSD ELF64",
SYSDECODE_ABI_FREEBSD,
-   riscv64_fetch_args,
-   riscv64_fetch_retval,
-   STAILQ_HEAD_INITIALIZER(riscv64_freebsd.extra_syscalls),
+   riscv_fetch_args,
+   riscv_fetch_retval,
+   STAILQ_HEAD_INITIALIZER(riscv_freebsd.extra_syscalls),
{ NULL }
 };
 
-PROCABI(riscv64_freebsd);
+PROCABI(riscv_freebsd);
___
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: r341655 - head/sys/dev/mlx5/mlx5_en

2018-12-06 Thread Konstantin Belousov
Author: kib
Date: Thu Dec  6 21:52:40 2018
New Revision: 341655
URL: https://svnweb.freebsd.org/changeset/base/341655

Log:
  Fix build with option RSS, removing unused variables.
  
  Reported by:  np
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cThu Dec  6 21:33:08 2018
(r341654)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cThu Dec  6 21:52:40 2018
(r341655)
@@ -1212,13 +1212,8 @@ mlx5e_create_sq(struct mlx5e_channel *c,
struct mlx5e_priv *priv = c->priv;
struct mlx5_core_dev *mdev = priv->mdev;
char buffer[16];
-
void *sqc = param->sqc;
void *sqc_wq = MLX5_ADDR_OF(sqc, sqc, wq);
-#ifdef RSS
-   cpuset_t cpu_mask;
-   int cpu_id;
-#endif
int err;
 
/* Create DMA descriptor TAG */
___
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: r341654 - head/sys/dev/cxgbe

2018-12-06 Thread Navdeep Parhar
Author: np
Date: Thu Dec  6 21:33:08 2018
New Revision: 341654
URL: https://svnweb.freebsd.org/changeset/base/341654

Log:
  cxgbe(4): Get Linux cxgb4vf working in bhyve VMs with VFs passed
  through.
  
  cxgb4vf doesn't own the buffer size list but still expects the first two
  entries to be 4K and some power of 2 respectively.  The BSD cxgbe
  doesn't care where its preferred buffer sizes are as long as they're in
  the list somewhere, so just move its entries towards the end as a
  workaround.
  
  MFC after:1 month
  Sponsored by: Chelsio Communicatons

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==
--- head/sys/dev/cxgbe/t4_sge.c Thu Dec  6 21:27:36 2018(r341653)
+++ head/sys/dev/cxgbe/t4_sge.c Thu Dec  6 21:33:08 2018(r341654)
@@ -701,8 +701,10 @@ t4_tweak_chip_settings(struct adapter *sc)
 
KASSERT(nitems(sge_flbuf_sizes) <= SGE_FLBUF_SIZES,
("%s: hw buffer size table too big", __func__));
+   t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0, 4096);
+   t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE1, 65536);
for (i = 0; i < min(nitems(sge_flbuf_sizes), SGE_FLBUF_SIZES); i++) {
-   t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i),
+   t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE15 - (4 * i),
sge_flbuf_sizes[i]);
}
 
___
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: r341653 - head/share/man/man7

2018-12-06 Thread Ed Maste
Author: emaste
Date: Thu Dec  6 21:27:36 2018
New Revision: 341653
URL: https://svnweb.freebsd.org/changeset/base/341653

Log:
  hier.7: add /lib/casper directory
  
  Reported by:  imp
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man7/hier.7

Modified: head/share/man/man7/hier.7
==
--- head/share/man/man7/hier.7  Thu Dec  6 20:56:19 2018(r341652)
+++ head/share/man/man7/hier.7  Thu Dec  6 21:27:36 2018(r341653)
@@ -28,7 +28,7 @@
 .\"@(#)hier.7  8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd June 18, 2018
+.Dd December 6, 2018
 .Dt HIER 7
 .Os
 .Sh NAME
@@ -144,6 +144,10 @@ and
 .Pa /sbin
 .Pp
 .Bl -tag -width "defaults/" -compact
+.It Pa casper/
+service-specific
+.Xr libcasper 3
+Capsicum support libraries
 .It Pa geom/
 class-specific libraries for the
 .Xr geom 8
___
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: r341652 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests

2018-12-06 Thread Simon J. Gerraty
Author: sjg
Date: Thu Dec  6 20:56:19 2018
New Revision: 341652
URL: https://svnweb.freebsd.org/changeset/base/341652

Log:
  Update bmake to version 20180919
  
  Cleanup of stats cache
  and new :q modifier.

Added:
  head/contrib/bmake/unit-tests/varquote.exp
 - copied unchanged from r341610, 
vendor/NetBSD/bmake/dist/unit-tests/varquote.exp
  head/contrib/bmake/unit-tests/varquote.mk
 - copied unchanged from r341610, 
vendor/NetBSD/bmake/dist/unit-tests/varquote.mk
Modified:
  head/contrib/bmake/ChangeLog
  head/contrib/bmake/FILES
  head/contrib/bmake/Makefile.config.in
  head/contrib/bmake/VERSION
  head/contrib/bmake/bmake.1
  head/contrib/bmake/dir.c
  head/contrib/bmake/make.1
  head/contrib/bmake/mk/ChangeLog
  head/contrib/bmake/mk/dirdeps-options.mk
  head/contrib/bmake/mk/dirdeps.mk
  head/contrib/bmake/mk/gendirdeps.mk
  head/contrib/bmake/mk/install-mk
  head/contrib/bmake/mk/meta.autodep.mk
  head/contrib/bmake/mk/meta.stage.mk
  head/contrib/bmake/unit-tests/Makefile.in
  head/contrib/bmake/var.c
  head/usr.bin/bmake/Makefile.config
  head/usr.bin/bmake/unit-tests/Makefile
Directory Properties:
  head/contrib/bmake/   (props changed)

Modified: head/contrib/bmake/ChangeLog
==
--- head/contrib/bmake/ChangeLogThu Dec  6 20:28:09 2018
(r341651)
+++ head/contrib/bmake/ChangeLogThu Dec  6 20:56:19 2018
(r341652)
@@ -1,3 +1,14 @@
+2018-09-21  Simon J. Gerraty  
+
+   * VERSION: 20180919
+ Merge with NetBSD make, pick up
+ o var.c: add :q
+ o dir.c: cleanup caching of stats
+
+2018-09-21  Simon J Gerraty  
+
+   * Makefile.config.in: use += where it makes sense.
+
 2018-05-12  Simon J. Gerraty  
 
* VERSION: 20180512

Modified: head/contrib/bmake/FILES
==
--- head/contrib/bmake/FILESThu Dec  6 20:28:09 2018(r341651)
+++ head/contrib/bmake/FILESThu Dec  6 20:56:19 2018(r341652)
@@ -163,6 +163,8 @@ unit-tests/varcmd.exp
 unit-tests/varcmd.mk
 unit-tests/varmisc.exp
 unit-tests/varmisc.mk
+unit-tests/varquote.exp
+unit-tests/varquote.mk
 unit-tests/varshell.exp
 unit-tests/varshell.mk
 util.c

Modified: head/contrib/bmake/Makefile.config.in
==
--- head/contrib/bmake/Makefile.config.in   Thu Dec  6 20:28:09 2018
(r341651)
+++ head/contrib/bmake/Makefile.config.in   Thu Dec  6 20:56:19 2018
(r341652)
@@ -1,6 +1,6 @@
 # things set by configure
 
-_MAKE_VERSION=@_MAKE_VERSION@
+_MAKE_VERSION?=@_MAKE_VERSION@
 
 prefix?= @prefix@
 srcdir= @srcdir@
@@ -11,9 +11,9 @@ DEFAULT_SYS_PATH?= @default_sys_path@
 
 CPPFLAGS+= @CPPFLAGS@
 CFLAGS+= ${CPPFLAGS} @DEFS@
-LDFLAGS= @LDFLAGS@
-LIBOBJS= @LIBOBJS@
-LDADD= @LIBS@
+LDFLAGS+= @LDFLAGS@
+LIBOBJS+= @LIBOBJS@
+LDADD+= @LIBS@
 USE_META= @use_meta@
 FILEMON_H?= @filemon_h@
 BMAKE_PATH_MAX?= @bmake_path_max@

Modified: head/contrib/bmake/VERSION
==
--- head/contrib/bmake/VERSION  Thu Dec  6 20:28:09 2018(r341651)
+++ head/contrib/bmake/VERSION  Thu Dec  6 20:56:19 2018(r341652)
@@ -1,2 +1,2 @@
 # keep this compatible with sh and make
-_MAKE_VERSION=20180512
+_MAKE_VERSION=20180919

Modified: head/contrib/bmake/bmake.1
==
--- head/contrib/bmake/bmake.1  Thu Dec  6 20:28:09 2018(r341651)
+++ head/contrib/bmake/bmake.1  Thu Dec  6 20:56:19 2018(r341652)
@@ -1,4 +1,4 @@
-.\"$NetBSD: make.1,v 1.272 2018/04/02 04:26:17 dholland Exp $
+.\"$NetBSD: make.1,v 1.273 2018/05/27 01:14:51 christos Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"from: @(#)make.18.4 (Berkeley) 3/19/94
 .\"
-.Dd June 22, 2017
+.Dd May 26, 2018
 .Dt BMAKE 1
 .Os
 .Sh NAME
@@ -1227,8 +1227,15 @@ due uno quattro tre
 .Ed
 .It Cm \&:Q
 Quotes every shell meta-character in the variable, so that it can be passed
+safely to the shell.
+.It Cm \&:q
+Quotes every shell meta-character in the variable, and also doubles
+.Sq $
+characters so that it can be passed
 safely through recursive invocations of
 .Nm .
+This is equivalent to: 
+.Sq \&:S/\e\&$/&&/g:Q .
 .It Cm \&:R
 Replaces each word in the variable with everything but its suffix.
 .It Cm \&:range[=count]

Modified: head/contrib/bmake/dir.c
==
--- head/contrib/bmake/dir.cThu Dec  6 20:28:09 2018(r341651)
+++ head/contrib/bmake/dir.cThu Dec  6 20:56:19 2018(r341652)
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.71 2017/04/16 21:14:47 riastradh Exp $   */
+/* $NetBSD: dir.c,v 1.73 2018/07/12 18:03:31 christos 

svn commit: r341651 - head/stand/i386/loader

2018-12-06 Thread Ian Lepore
Author: ian
Date: Thu Dec  6 20:28:09 2018
New Revision: 341651
URL: https://svnweb.freebsd.org/changeset/base/341651

Log:
  Don't reference zfs-specific variables if LOADER_ZFS_SUPPORT is undefined
  because the variables will be undefined too.
  
  Reported by:  sjg@
  Pointy hat:   ian@

Modified:
  head/stand/i386/loader/main.c

Modified: head/stand/i386/loader/main.c
==
--- head/stand/i386/loader/main.c   Thu Dec  6 20:15:54 2018
(r341650)
+++ head/stand/i386/loader/main.c   Thu Dec  6 20:28:09 2018
(r341651)
@@ -195,11 +195,14 @@ main(void)
  */
 #defineLEGACY_GELI_ARGS_SIZE   260 /* This can never change */
 
+#ifdef LOADER_ZFS_SUPPORT
 if (zargs != NULL) {
if (zargs->size > offsetof(struct zfs_boot_args, gelidata)) {
gbdata = >gelidata;
}
-} else if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) {
+} else
+#endif /* LOADER_ZFS_SUPPORT */
+  if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) {
gargs = (struct geli_boot_args *)(kargs + 1);
if ((kargs->bootflags & KARGS_FLAGS_GELI) ||
gargs->size == LEGACY_GELI_ARGS_SIZE) {
___
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: r341650 - in head: contrib/ipfilter/ipsend sys/contrib/ipfilter/netinet

2018-12-06 Thread Cy Schubert
Author: cy
Date: Thu Dec  6 20:15:54 2018
New Revision: 341650
URL: https://svnweb.freebsd.org/changeset/base/341650

Log:
  Remove an ugly Ultrix hack. Ultrix has been AWOL since the last ice
  age, more to come.
  
  MFC after:1 week

Modified:
  head/contrib/ipfilter/ipsend/ip.c
  head/contrib/ipfilter/ipsend/resend.c
  head/sys/contrib/ipfilter/netinet/ip_compat.h

Modified: head/contrib/ipfilter/ipsend/ip.c
==
--- head/contrib/ipfilter/ipsend/ip.c   Thu Dec  6 20:04:01 2018
(r341649)
+++ head/contrib/ipfilter/ipsend/ip.c   Thu Dec  6 20:15:54 2018
(r341650)
@@ -67,9 +67,9 @@ int   send_ether(nfd, buf, len, gwip)
bcopy((char *)buf, s + sizeof(*eh), len);
if (gwip.s_addr == last_gw.s_addr)
{
-   bcopy(last_arp, (char *)A_A eh->ether_dhost, 6);
+   bcopy(last_arp, (char *) >ether_dhost, 6);
}
-   else if (arp((char *), (char *)A_A eh->ether_dhost) == -1)
+   else if (arp((char *), (char *) >ether_dhost) == -1)
{
perror("arp");
return -2;
@@ -109,17 +109,17 @@ int   send_ip(nfd, mtu, ip, gwip, frag)
 
eh = (ether_header_t *)ipbuf;
 
-   bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost));
+   bzero((char *) >ether_shost, sizeof(eh->ether_shost));
if (last_gw.s_addr && (gwip.s_addr == last_gw.s_addr))
{
-   bcopy(last_arp, (char *)A_A eh->ether_dhost, 6);
+   bcopy(last_arp, (char *) >ether_dhost, 6);
}
-   else if (arp((char *), (char *)A_A eh->ether_dhost) == -1)
+   else if (arp((char *), (char *) >ether_dhost) == -1)
{
perror("arp");
return -2;
}
-   bcopy((char *)A_A eh->ether_dhost, last_arp, sizeof(last_arp));
+   bcopy((char *) >ether_dhost, last_arp, sizeof(last_arp));
eh->ether_type = htons(ETHERTYPE_IP);
 
bcopy((char *)ip, (char *), sizeof(*ip));
@@ -136,11 +136,11 @@ int   send_ip(nfd, mtu, ip, gwip, frag)
}
 
if (ip->ip_src.s_addr != local_ip.s_addr) {
-   (void) arp((char *)>ip_src, (char *)A_A local_arp);
-   bcopy(local_arp, (char *)A_A eh->ether_shost,sizeof(last_arp));
+   (void) arp((char *)>ip_src, (char *) _arp);
+   bcopy(local_arp, (char *) >ether_shost,sizeof(last_arp));
local_ip = ip->ip_src;
} else
-   bcopy(local_arp, (char *)A_A eh->ether_shost, 6);
+   bcopy(local_arp, (char *) >ether_shost, 6);
 
if (!frag || (sizeof(*eh) + iplen < mtu))
{

Modified: head/contrib/ipfilter/ipsend/resend.c
==
--- head/contrib/ipfilter/ipsend/resend.c   Thu Dec  6 20:04:01 2018
(r341649)
+++ head/contrib/ipfilter/ipsend/resend.c   Thu Dec  6 20:15:54 2018
(r341650)
@@ -97,7 +97,7 @@ int   ip_resend(dev, mtu, r, gwip, datain)
return -2;
}
 
-   bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost));
+   bzero((char *) >ether_shost, sizeof(eh->ether_shost));
if (gwip.s_addr && (arp((char *), dhost) == -1))
{
perror("arp");
@@ -113,12 +113,12 @@ int   ip_resend(dev, mtu, r, gwip, datain)
eh->ether_type = htons((u_short)ETHERTYPE_IP);
if (!gwip.s_addr) {
if (arp((char *),
-   (char *)A_A eh->ether_dhost) == -1) {
+   (char *) >ether_dhost) == -1) {
perror("arp");
continue;
}
} else
-   bcopy(dhost, (char *)A_A eh->ether_dhost,
+   bcopy(dhost, (char *) >ether_dhost,
  sizeof(dhost));
if (!ip->ip_sum)
ip->ip_sum = chksum((u_short *)ip,

Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
==
--- head/sys/contrib/ipfilter/netinet/ip_compat.h   Thu Dec  6 20:04:01 
2018(r341649)
+++ head/sys/contrib/ipfilter/netinet/ip_compat.h   Thu Dec  6 20:15:54 
2018(r341650)
@@ -758,16 +758,6 @@ typedefstruct  tcpiphdrtcpiphdr_t;
 #endif
 #defineIPMINLEN(i, h)  ((i)->ip_len >= (IP_HL(i) * 4 + sizeof(struct 
h)))
 
-
-/*
- * XXX - This is one of those *awful* hacks which nobody likes
- */
-#ifdef ultrix
-#defineA_A
-#else
-#defineA_A &
-#endif
-
 #defineTCPF_ALL(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\
 

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

2018-12-06 Thread Joel Dahl
Author: joel (doc committer)
Date: Thu Dec  6 20:04:01 2018
New Revision: 341649
URL: https://svnweb.freebsd.org/changeset/base/341649

Log:
  Minor mandoc fixes.

Modified:
  head/share/man/man4/muge.4
  head/share/man/man4/vxlan.4

Modified: head/share/man/man4/muge.4
==
--- head/share/man/man4/muge.4  Thu Dec  6 20:03:06 2018(r341648)
+++ head/share/man/man4/muge.4  Thu Dec  6 20:04:01 2018(r341649)
@@ -35,10 +35,6 @@ To load the driver as a module at boot time, place the
 .Bd -literal -offset indent
 if_muge_load="YES"
 .Ed
-.Pp
-.\" Alternatively, to compile this driver into the kernel, place the
-.\" following lines in your kernel configuration file:
-.Ed
 .Sh DESCRIPTION
 The
 .Nm

Modified: head/share/man/man4/vxlan.4
==
--- head/share/man/man4/vxlan.4 Thu Dec  6 20:03:06 2018(r341648)
+++ head/share/man/man4/vxlan.4 Thu Dec  6 20:04:01 2018(r341649)
@@ -108,7 +108,7 @@ forwarding table entry.
 When the
 .Nm
 interface is brought up, a
-.Xr UDP 4
+.Xr udp 4
 .Xr socket 9
 is created based on the configuration,
 such as the local address for unicast mode or
@@ -214,7 +214,6 @@ Once created, the
 .Nm
 interface can be configured with
 .Xr ifconfig 8 .
-.Ed
 .Pp
 The following when placed in the file
 .Pa /etc/rc.conf
@@ -224,6 +223,7 @@ to be created, and will configure the interface in uni
 .Bd -literal -offset indent
 cloned_interfaces="vxlan0"
 create_args_vxlan0="vxlanid 108 vxlanlocal 192.168.100.1 vxlanremote 
192.168.100.2"
+.Ed
 .Sh SEE ALSO
 .Xr inet 4 ,
 .Xr inet6 4 ,
@@ -238,7 +238,7 @@ create_args_vxlan0="vxlanid 108 vxlanlocal 192.168.100
 .%D August 2014
 .%O "RFC 7348"
 .Re
-.Sh AUTHOR
+.Sh AUTHORS
 .An -nosplit
 The
 .Nm
___
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: r341648 - head/lib/libz

2018-12-06 Thread Mark Johnston
Author: markj
Date: Thu Dec  6 20:03:06 2018
New Revision: 341648
URL: https://svnweb.freebsd.org/changeset/base/341648

Log:
  Add zdopen(3) to complement zopen(3).
  
  zdopen() can be used in capability mode.  Update zopen.3 accordingly
  and fix some grammar nits while I'm here.
  
  Reviewed by:  delphij
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D18456

Modified:
  head/lib/libz/Makefile
  head/lib/libz/Symbol.map
  head/lib/libz/Versions.def
  head/lib/libz/zopen.3
  head/lib/libz/zopen.c

Modified: head/lib/libz/Makefile
==
--- head/lib/libz/Makefile  Thu Dec  6 19:49:08 2018(r341647)
+++ head/lib/libz/Makefile  Thu Dec  6 20:03:06 2018(r341648)
@@ -7,6 +7,7 @@ LIB=z
 SHLIBDIR?= /lib
 SHLIB_MAJOR=   6
 MAN=   zlib.3 zopen.3
+MLINKS+=   zopen.3 zdopen.3
 
 ZLIBSRC=   ${SRCTOP}/contrib/zlib
 

Modified: head/lib/libz/Symbol.map
==
--- head/lib/libz/Symbol.mapThu Dec  6 19:49:08 2018(r341647)
+++ head/lib/libz/Symbol.mapThu Dec  6 20:03:06 2018(r341648)
@@ -103,6 +103,10 @@ FBSD_1.2 {
zopen;
 };
 
+FBSD_1.6 {
+   zdopen;
+};
+
 ZLIBprivate_1.0 {
_tr_align;
_tr_flush_block;

Modified: head/lib/libz/Versions.def
==
--- head/lib/libz/Versions.def  Thu Dec  6 19:49:08 2018(r341647)
+++ head/lib/libz/Versions.def  Thu Dec  6 20:03:06 2018(r341648)
@@ -15,6 +15,9 @@ ZLIB_1.2.9 {
 FBSD_1.2 {
 } ZLIB_1.2.4.0;
 
+FBSD_1.6 {
+} FBSD_1.2;
+
 ZLIBprivate_1.0 {
 } ZLIB_1.2.4.0;
 

Modified: head/lib/libz/zopen.3
==
--- head/lib/libz/zopen.3   Thu Dec  6 19:49:08 2018(r341647)
+++ head/lib/libz/zopen.3   Thu Dec  6 20:03:06 2018(r341648)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 5, 2014
+.Dd December 6, 2018
 .Dt ZOPEN 3
 .Os
 .Sh NAME
@@ -34,33 +34,44 @@
 .Sh SYNOPSIS
 .Ft FILE *
 .Fn zopen "const char *path" "const char *mode"
+.Ft FILE *
+.Fn zdopen "int fd" "const char *mode"
 .Sh DESCRIPTION
 The
 .Fn zopen
-opens a gzip file whose name is the string pointed to by
+function opens a gzip file whose name is the string pointed to by
 .Fa path
-and associates a stream with it.
-It is a wrapper around
+and returns a stream which can be used to access the uncompressed contents
+of the file.
+The
+.Fn zdopen
+variant takes a gzip file referenced by the file descriptor
+.Fa fd ,
+analogous to
+.Xr fdopen 3 .
+They are wrappers around
 .Xr zlib 3
-and standard stream I/O APIs.
+and the standard stream I/O APIs.
 .Pp
 The argument
 .Fa mode
-have the same meaning as it does in
+has the same meaning as it does in
 .Xr fopen 3 .
 .Pp
 The
-.Nm
-function will associate read, write, seek and close
+.Fn zopen
+and
+.Fn zdopen
+functions will associate the read, write, seek and close
 functions of
 .Xr zlib 3
-after successfully opened a file with
-.Xr funopen 3
-so that they will be used to read or write the new stream.
+with the returned stream.
 .Sh RETURN VALUES
 Upon successful completion
-.Nm
-returns a
+.Fn zopen
+and
+.Fn zdopen
+return a
 .Tn FILE
 pointer.
 Otherwise,
@@ -70,26 +81,28 @@ is returned and the global variable
 is set to indicate the error.
 .Sh ERRORS
 In addition to the errors documented for
-.Xr fopen 3 ,
-the
-.Nm
-function may also fail for: 
+.Xr fopen 3
+and
+.Xr fdopen 3 ,
+the functions may also fail for:
 .Bl -tag -width Er
 .It Bq Er ENOMEM
 Insufficient memory is available.
 .El
 .Sh COMPATIBILITY
-This implementation of
-.Nm
+The implementation of
+.Fn zopen
 function first appeared in
 .Nx 1.6
 and
 .Fx 4.5 .
-The
-.Nm
-function may not be portable to systems other than
+.Fn zdopen
+first appeared in
+.Fx 13.0 .
+These functions may not be portable to systems other than
 .Fx .
 .Sh SEE ALSO
+.Xr fdopen 3 ,
 .Xr fopen 3 ,
 .Xr funopen 3 ,
 .Xr zlib 3

Modified: head/lib/libz/zopen.c
==
--- head/lib/libz/zopen.c   Thu Dec  6 19:49:08 2018(r341647)
+++ head/lib/libz/zopen.c   Thu Dec  6 20:03:06 2018(r341648)
@@ -9,6 +9,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 FILE *zopen(const char *fname, const char *mode);
+FILE *zdopen(int fd, const char *mode);
 
 /* convert arguments */
 static int
@@ -46,4 +47,19 @@ zopen(const char *fname, const char *mode)
return (funopen(gz, xgzread, NULL, xgzseek, xgzclose));
 else
return (funopen(gz, NULL, xgzwrite, xgzseek, xgzclose));
+}
+
+FILE *
+zdopen(int fd, const char *mode)
+{
+   gzFile gz;
+
+   gz = gzdopen(fd, mode);
+   if (gz == NULL)
+   return (NULL);
+
+   if (*mode 

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

2018-12-06 Thread Joel Dahl
Author: joel (doc committer)
Date: Thu Dec  6 19:49:08 2018
New Revision: 341647
URL: https://svnweb.freebsd.org/changeset/base/341647

Log:
  Sort .Xr

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

Modified: head/share/man/man4/vmci.4
==
--- head/share/man/man4/vmci.4  Thu Dec  6 19:27:15 2018(r341646)
+++ head/share/man/man4/vmci.4  Thu Dec  6 19:49:08 2018(r341647)
@@ -54,8 +54,8 @@ In addition to this, the VMCI kernel API provides supp
 events related to the state of the VMCI communication channels, and the
 virtual machine itself.
 .Sh SEE ALSO
-.Xr pci 9 ,
-.Xr socket 2
+.Xr socket 2 ,
+.Xr pci 9
 .Rs
 .%T "VMware vSockets Documentation"
 .%U https://www.vmware.com/support/developer/vmci-sdk/
___
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: r341646 - in head: share/man/man4 sys/netpfil/pf

2018-12-06 Thread Kristof Provost
Author: kp
Date: Thu Dec  6 19:27:15 2018
New Revision: 341646
URL: https://svnweb.freebsd.org/changeset/base/341646

Log:
  pfsync: Performance improvement
  
  pfsync code is called for every new state, state update and state
  deletion in pf. While pf itself can operate on multiple states at the
  same time (on different cores, assuming the states hash to a different
  hashrow), pfsync only had a single lock.
  This greatly reduced throughput on multicore systems.
  
  Address this by splitting the pfsync queues into buckets, based on the
  state id. This ensures that updates for a given connection always end up
  in the same bucket, which allows pfsync to still collapse multiple
  updates into one, while allowing multiple cores to proceed at the same
  time.
  
  The number of buckets is tunable, but defaults to 2 x number of cpus.
  Benchmarking has shown improvement, depending on hardware and setup, from ~30%
  to ~100%.
  
  MFC after:1 week
  Sponsored by: Orange Business Services
  Differential Revision:https://reviews.freebsd.org/D18373

Modified:
  head/share/man/man4/pfsync.4
  head/sys/netpfil/pf/if_pfsync.c

Modified: head/share/man/man4/pfsync.4
==
--- head/share/man/man4/pfsync.4Thu Dec  6 19:20:00 2018
(r341645)
+++ head/share/man/man4/pfsync.4Thu Dec  6 19:27:15 2018
(r341646)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 18, 2017
+.Dd December 6, 2018
 .Dt PFSYNC 4
 .Os
 .Sh NAME
@@ -130,6 +130,13 @@ See
 .Xr carp 4
 for more information.
 Default value is 240.
+.It Va net.pfsync.pfsync_buckets
+The number of
+.Nm
+buckets.
+This affects the performance and memory tradeoff.
+Defaults to twice the number of CPUs.
+Change only if benchmarks show this helps on your workload.
 .El
 .Sh EXAMPLES
 .Nm

Modified: head/sys/netpfil/pf/if_pfsync.c
==
--- head/sys/netpfil/pf/if_pfsync.c Thu Dec  6 19:20:00 2018
(r341645)
+++ head/sys/netpfil/pf/if_pfsync.c Thu Dec  6 19:27:15 2018
(r341646)
@@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -106,6 +107,8 @@ __FBSDID("$FreeBSD$");
sizeof(struct pfsync_header) + \
sizeof(struct pfsync_subheader) )
 
+struct pfsync_bucket;
+
 struct pfsync_pkt {
struct ip *ip;
struct in_addr src;
@@ -164,7 +167,7 @@ static struct pfsync_q pfsync_qs[] = {
 };
 
 static voidpfsync_q_ins(struct pf_state *, int, bool);
-static voidpfsync_q_del(struct pf_state *, bool);
+static voidpfsync_q_del(struct pf_state *, bool, struct pfsync_bucket *);
 
 static voidpfsync_update_state(struct pf_state *);
 
@@ -183,6 +186,28 @@ struct pfsync_deferral {
struct mbuf *pd_m;
 };
 
+struct pfsync_sofct;
+
+struct pfsync_bucket
+{
+   int b_id;
+   struct pfsync_softc *b_sc;
+   struct mtx  b_mtx;
+   struct callout  b_tmo;
+   int b_flags;
+#definePFSYNCF_BUCKET_PUSH 0x0001
+
+   size_t  b_len;
+   TAILQ_HEAD(, pf_state)  b_qs[PFSYNC_S_COUNT];
+   TAILQ_HEAD(, pfsync_upd_req_item)   b_upd_req_list;
+   TAILQ_HEAD(, pfsync_deferral)   b_deferrals;
+   u_int   b_deferred;
+   void*b_plus;
+   size_t  b_pluslen;
+
+   struct  ifaltq b_snd;
+};
+
 struct pfsync_softc {
/* Configuration */
struct ifnet*sc_ifp;
@@ -192,20 +217,12 @@ struct pfsync_softc {
uint32_tsc_flags;
 #definePFSYNCF_OK  0x0001
 #definePFSYNCF_DEFER   0x0002
-#definePFSYNCF_PUSH0x0004
uint8_t sc_maxupdates;
struct ip   sc_template;
-   struct callout  sc_tmo;
struct mtx  sc_mtx;
 
/* Queued data */
-   size_t  sc_len;
-   TAILQ_HEAD(, pf_state)  sc_qs[PFSYNC_S_COUNT];
-   TAILQ_HEAD(, pfsync_upd_req_item)   sc_upd_req_list;
-   TAILQ_HEAD(, pfsync_deferral)   sc_deferrals;
-   u_int   sc_deferred;
-   void*sc_plus;
-   size_t  sc_pluslen;
+   struct pfsync_bucket*sc_buckets;
 
/* Bulk update info */
struct mtx  sc_bulk_mtx;
@@ -223,6 +240,10 @@ struct pfsync_softc {
 #definePFSYNC_UNLOCK(sc)   mtx_unlock(&(sc)->sc_mtx)
 #definePFSYNC_LOCK_ASSERT(sc)  mtx_assert(&(sc)->sc_mtx, MA_OWNED)
 
+#define PFSYNC_BUCKET_LOCK(b)  mtx_lock(&(b)->b_mtx)
+#define PFSYNC_BUCKET_UNLOCK(b)mtx_unlock(&(b)->b_mtx)
+#define 

svn commit: r341645 - head/sys/dev/mlx5/mlx5_en

2018-12-06 Thread Konstantin Belousov
Author: kib
Date: Thu Dec  6 19:20:00 2018
New Revision: 341645
URL: https://svnweb.freebsd.org/changeset/base/341645

Log:
  Appease gcc build, remove duplicated declaration.
  
  Reported by:  np
  Sponsored by: Mellanox Technologies
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cThu Dec  6 19:18:51 2018
(r341644)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cThu Dec  6 19:20:00 2018
(r341645)
@@ -160,8 +160,6 @@ static const struct {
 
 MALLOC_DEFINE(M_MLX5EN, "MLX5EN", "MLX5 Ethernet");
 
-SYSCTL_DECL(_hw_mlx5);
-
 static void
 mlx5e_update_carrier(struct mlx5e_priv *priv)
 {
___
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: r341644 - stable/11/sys/kern

2018-12-06 Thread Kyle Evans
Author: kevans
Date: Thu Dec  6 19:18:51 2018
New Revision: 341644
URL: https://svnweb.freebsd.org/changeset/base/341644

Log:
  Fix kenv handling in stable/11 following r337333
  
  The aforementioned commit merged revised static_env/static_hint handling to
  allow static_env and loader env to coexist with the variable
  loader_env.disabled=0. init_static_kenv had been rewritten slighly in an
  attempt to maintain historical behavior: the static environment and loader
  environment are mutually exclusive, unless the latter disables the former.
  
  The rewritten version botched this by only setting up the loader environment
  if the static environment was empty or if the loader environment was
  specifically enabled. It was never given a chance to disable the static
  environment, so the default behavior was broken unless the loader
  environment was specifically enabled by the static environment.
  
  Rewrite this again to do the right thing:
  - Setup the static environment and check loader_env.disabled; if it's
explicitly enabled, we're done.
  - Check static_{env,hints}.disabled and "empty out" the respective
environments as needed
  - Finally, check: if the static environment is not empty and we've not
explicitly re-enabled the static environment with loader_env.disabled=0,
we tear the loader environment (which was setup to 'keep things simple')
down again.
  
  Future commits to head (and subsequently MFC'd) will likely zero these
  environments out if they're disabled since this normally happens when
  they're merged into the dynamic environment.
  
  This is a direct commit to stable/11 because this particular bug does not
  apply to head.
  
  Fixes:r337333
  Reported by:  bde

Modified:
  stable/11/sys/kern/kern_environment.c

Modified: stable/11/sys/kern/kern_environment.c
==
--- stable/11/sys/kern/kern_environment.c   Thu Dec  6 18:59:33 2018
(r341643)
+++ stable/11/sys/kern/kern_environment.c   Thu Dec  6 19:18:51 2018
(r341644)
@@ -245,7 +245,7 @@ done:
 void
 init_static_kenv(char *buf, size_t len)
 {
-   char *eval;
+   char *eval, *loader_eval;
 
KASSERT(!dynamic_kenv, ("kenv: dynamic_kenv already initialized"));
/*
@@ -264,21 +264,43 @@ init_static_kenv(char *buf, size_t len)
 *
 * As a warning, the static environment may not be disabled in any way
 * if the static environment has disabled the loader environment.
+*
+* We're setting up the static environment early here because it will
+* either be used or empty.
 */
kern_envp = static_env;
-   eval = kern_getenv("loader_env.disabled");
-   if (*kern_envp == '\0' || (eval != NULL && strcmp(eval, "0") == 0)) {
-   md_envp = buf;
-   md_env_len = len;
-   md_env_pos = 0;
+   loader_eval = kern_getenv("loader_env.disabled");
+   if (loader_eval != NULL && strcmp(loader_eval, "1") == 0)
+   /* Bail out early, the loader environment is disabled. */
+   return;
 
-   eval = kern_getenv("static_env.disabled");
-   if (eval != NULL && strcmp(eval, "1") == 0)
-   *kern_envp = '\0';
-   }
+   /*
+* Next, the loader env is checked for the status of the static env.  We
+* are allowing static_env and static_hints to disable themselves here 
for
+* the sake of simplicity.
+*/
+   md_envp = buf;
+   md_env_len = len;
+   md_env_pos = 0;
+
+   eval = kern_getenv("static_env.disabled");
+   if (eval != NULL && strcmp(eval, "1") == 0)
+   *static_env = '\0';
+
eval = kern_getenv("static_hints.disabled");
if (eval != NULL && strcmp(eval, "1") == 0)
*static_hints = '\0';
+
+   /*
+* Now we see if we need to tear the loader environment back down due
+* to the presence of a non-empty static environment and lack of request
+* to keep it enabled.
+*/
+   if (*static_env != '\0' &&
+   (loader_eval == NULL || strcmp(loader_eval, "0") != 0)) {
+   md_envp = NULL;
+   md_env_len = 0;
+   }
 }
 
 static void
___
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: r339516 - head/sys/cddl/dev/dtrace/powerpc

2018-12-06 Thread Justin Hibbits
On Thu, 22 Nov 2018 02:16:29 -0500
Mark Johnston  wrote:

> On Wed, Nov 21, 2018 at 10:02:15PM -0600, Kyle Evans wrote:
> > On Wed, Nov 21, 2018 at 9:42 PM Kyle Evans 
> > wrote:  
> > >
> > > On Sat, Oct 20, 2018 at 9:09 PM Justin Hibbits
> > >  wrote:  
> > > >
> > > > Author: jhibbits
> > > > Date: Sun Oct 21 02:08:57 2018
> > > > New Revision: 339516
> > > > URL: https://svnweb.freebsd.org/changeset/base/339516
> > > >
> > > > Log:
> > > >   powerpc/dtrace: Use explicit bit numbers to mask out PSL_EE
> > > >
> > > >   There seems to be a race in CI, such that dtrace_asm.S might
> > > > be assembled before the genassym is completed.  This causes a
> > > > build failure when PSL_EE doesn't exist, and is read as 0.  Get
> > > > around this by explicitly specifying the bits in the mask
> > > > instead. 
> > >
> > > Hi,
> > >
> > > CI on the stable/12 branch still hits this, so I'm tempted to MFC
> > > this if you don't object. OTOH, the correct solution should be a
> > > `dependency "genassym.o"` in ^/sys/conf/files.powerpc for
> > > dtrace_asm.S, no?  
> 
> I believe that dtrace_asm.S will be built as part of dtrace.ko, not
> the kernel.  dtrace/Makefile already specifies a dependency on
> assym.inc. Maybe this is the same issue as PR 29?
> 
> > Sorry, that should have read "genassym.inc" -- my naive
> > understanding of 'dependency' is that config(8) will turn it
> > directly into a makefile dependency that will alleviate this.
> >   

Yep, looks a lot like PR 29.

- Justin
___
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: r341266 - in releng/12.0: . sys/modules/iavf

2018-12-06 Thread Marius Strobl
On Thu, Dec 06, 2018 at 05:30:03PM +, Glen Barber wrote:
> On Thu, Dec 06, 2018 at 06:25:06PM +0100, Marius Strobl wrote:
> > On Thu, Dec 06, 2018 at 03:58:44PM +1000, Dima Panov wrote:
> > > Hello!
> > > 
> > > Marius Strobl wrote on 30/11/2018 07:59:
> > > > Author: marius
> > > > Date: Thu Nov 29 21:59:09 2018
> > > > New Revision: 341266
> > > > URL: https://svnweb.freebsd.org/changeset/base/341266
> > > > 
> > > > Log:
> > > >MFC: r341016, MF12: r341261
> > > >
> > > >- Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in 
> > > > r339338.
> > > >- Likewise, add ixlv.4.gz to OLD_FILES,
> > > >- and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the 
> > > > transition.
> > > >
> > > [cut]
> > > > 
> > > > Modified: releng/12.0/sys/modules/iavf/Makefile
> > > > ==
> > > > --- releng/12.0/sys/modules/iavf/Makefile   Thu Nov 29 21:20:53 
> > > > 2018(r341265)
> > > > +++ releng/12.0/sys/modules/iavf/Makefile   Thu Nov 29 21:59:09 
> > > > 2018(r341266)
> > > > @@ -15,4 +15,6 @@ SRCS+= i40e_common.c i40e_nvm.c i40e_adminq.c
> > > >   # Enable asserts and other debugging facilities
> > > >   # CFLAGS += -DINVARIANTS -DINVARIANTS_SUPPORT -DWITNESS
> > > >   
> > > > +LINKS= ${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_ixlv.ko
> > > > +
> > > >   .include 
> > > 
> > > 
> > > And this broke poudriere jail upgrade due to missed kernel modules for 
> > > build purpose
> > > 
> > > # poudriere jail -u -j fbsd12-test -t 12.0-RC3
> > > [skip]
> > > /usr/src/usr.sbin/newsyslog/newsyslog.c
> > > To install the downloaded upgrades, run "/usr/sbin/freebsd-update.fixed 
> > > install".
> > > Installing updates...ln: ///boot/kernel/if_iavf.ko: No such file or 
> > > directory
> > > chflags: ///boot/kernel/if_ixlv.ko: No such file or directory
> > > [00:20:27] Error: Fail to upgrade system
> > > #
> > 
> > Hrm, apparently this doesn't trip up with a native, i. e. non-poudriere,
> > environment and I'd assume that the linking of if_igb.ko to if_em.ko that
> > sys/modules/em/Makefile does ever since r324500 isn't causing problems
> > with poudriere either. What are poudriere and the "fixed" version of
> > freebsd-update(8) doing differently than native counterparts and what do
> > you mean by "missed kernel modules for build purpose"?
> > 
> 
> FWIW, I did not see this in all of my freebsd-update(8) tests.

So could it be that a subset of the mirrors carries a corrupt index
of 12.0-RC3? Otherwise I don't see how only some freebsd-update(8)
runs to 12.0-RC3 fail or how the problem should be specific to
if_ixlv.ko so far.

Marius

___
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: r341643 - head/sys/dev/mlx5

2018-12-06 Thread Sean Bruno
Author: sbruno
Date: Thu Dec  6 18:59:33 2018
New Revision: 341643
URL: https://svnweb.freebsd.org/changeset/base/341643

Log:
  Change u32 to uint32_t to allow the native-xtools target to build
  libsysdecode.
  
  Submitted by: kib

Modified:
  head/sys/dev/mlx5/mlx5io.h

Modified: head/sys/dev/mlx5/mlx5io.h
==
--- head/sys/dev/mlx5/mlx5io.h  Thu Dec  6 18:58:54 2018(r341642)
+++ head/sys/dev/mlx5/mlx5io.h  Thu Dec  6 18:59:33 2018(r341643)
@@ -132,7 +132,7 @@ struct mlx5_fpga_temperature {
 #defineMLX5_FPGA_RESET _IO('m', 0x82)
 #defineMLX5_FPGA_IMAGE_SEL _IOWINT('m', 0x83)
 #defineMLX5_FPGA_QUERY _IOR('m', 0x84, struct mlx5_fpga_query)
-#defineMLX5_FPGA_CAP   _IOR('m', 0x85, 
u32[MLX5_FPGA_CAP_ARR_SZ])
+#defineMLX5_FPGA_CAP   _IOR('m', 0x85, 
uint32_t[MLX5_FPGA_CAP_ARR_SZ])
 #defineMLX5_FPGA_TEMPERATURE   _IOWR('m', 0x86, struct 
mlx5_fpga_temperature)
 #defineMLX5_FPGA_CONNECT   _IOWR('m', 0x87, enum mlx5_fpga_connect)
 
___
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: r341642 - head/sys/netpfil/pf

2018-12-06 Thread Kristof Provost
Author: kp
Date: Thu Dec  6 18:58:54 2018
New Revision: 341642
URL: https://svnweb.freebsd.org/changeset/base/341642

Log:
  pf: add a comment describing why do we call pf_map_addr again if port
  selection process fails
  
  Obtained from:OpenBSD

Modified:
  head/sys/netpfil/pf/pf_lb.c

Modified: head/sys/netpfil/pf/pf_lb.c
==
--- head/sys/netpfil/pf/pf_lb.c Thu Dec  6 18:21:48 2018(r341641)
+++ head/sys/netpfil/pf/pf_lb.c Thu Dec  6 18:58:54 2018(r341642)
@@ -293,6 +293,10 @@ pf_get_sport(sa_family_t af, u_int8_t proto, struct pf
switch (r->rpool.opts & PF_POOL_TYPEMASK) {
case PF_POOL_RANDOM:
case PF_POOL_ROUNDROBIN:
+   /*
+* pick a different source address since we're out
+* of free port choices for the current one.
+*/
if (pf_map_addr(af, r, saddr, naddr, _addr, sn))
return (1);
break;
___
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: r341266 - in releng/12.0: . sys/modules/iavf

2018-12-06 Thread Dima Panov

Hello!

Marius Strobl wrote on 07/12/2018 03:25:

On Thu, Dec 06, 2018 at 03:58:44PM +1000, Dima Panov wrote:

Hello!

Marius Strobl wrote on 30/11/2018 07:59:

Author: marius
Date: Thu Nov 29 21:59:09 2018
New Revision: 341266
URL: https://svnweb.freebsd.org/changeset/base/341266

Log:
MFC: r341016, MF12: r341261

- Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in r339338.

- Likewise, add ixlv.4.gz to OLD_FILES,
- and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the transition.


[cut]


Modified: releng/12.0/sys/modules/iavf/Makefile
==
--- releng/12.0/sys/modules/iavf/Makefile   Thu Nov 29 21:20:53 2018
(r341265)
+++ releng/12.0/sys/modules/iavf/Makefile   Thu Nov 29 21:59:09 2018
(r341266)
@@ -15,4 +15,6 @@ SRCS+= i40e_common.c i40e_nvm.c i40e_adminq.c
   # Enable asserts and other debugging facilities
   # CFLAGS += -DINVARIANTS -DINVARIANTS_SUPPORT -DWITNESS
   
+LINKS=	${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_ixlv.ko

+
   .include 



And this broke poudriere jail upgrade due to missed kernel modules for
build purpose

# poudriere jail -u -j fbsd12-test -t 12.0-RC3
[skip]
/usr/src/usr.sbin/newsyslog/newsyslog.c
To install the downloaded upgrades, run "/usr/sbin/freebsd-update.fixed
install".
Installing updates...ln: ///boot/kernel/if_iavf.ko: No such file or
directory
chflags: ///boot/kernel/if_ixlv.ko: No such file or directory
[00:20:27] Error: Fail to upgrade system
#


Hrm, apparently this doesn't trip up with a native, i. e. non-poudriere,
environment and I'd assume that the linking of if_igb.ko to if_em.ko that
sys/modules/em/Makefile does ever since r324500 isn't causing problems
with poudriere either. What are poudriere and the "fixed" version of
freebsd-update(8) doing differently than native counterparts and what do
you mean by "missed kernel modules for build purpose"?



Poudriere not install kernel/modules package into jails, only 
base|lib|src, so whole '${jail}/boot/kernel' directory is missing, but 
freebsd-update(8) unconditionaly try to link on modules.


Package building procedure is not demanding on binary kernel and modules

--
Dima Panov (flu...@freebsd.org)
(X11, KDE, Office)@FreeBSD team

Facebook: http://www.facebook.com/fluffy.khv
twitter: fluffy_khv | skype: dima.panov | telegram: @dima_panov
IRC: fluffy@EFNet, fluffykhv@FreeNode
___
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: r341641 - head/usr.sbin/mountd

2018-12-06 Thread Sean Eric Fagan
Author: sef
Date: Thu Dec  6 18:21:48 2018
New Revision: 341641
URL: https://svnweb.freebsd.org/changeset/base/341641

Log:
  Reduce number of DNS queries in mountd.
  
  As reported by a FreeNAS user (see 
https://redmine.ixsystems.com/issues/55728),
  mountd does more calls to getnameinfo() than it needs to; this changes it to
  only call it for the RPC calls it needs the name information for.
  
  Reported by:  Dave Flowers
  Reviewed by:  imp, mav
  Approved by:  mav (mentor)
  MFC after:2 weeks
  Sponsored by: iXsystems Inc
  Differential Revision:https://reviews.freebsd.org/D18430

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

Modified: head/usr.sbin/mountd/mountd.c
==
--- head/usr.sbin/mountd/mountd.c   Thu Dec  6 18:12:50 2018
(r341640)
+++ head/usr.sbin/mountd/mountd.c   Thu Dec  6 18:21:48 2018
(r341641)
@@ -1026,8 +1026,13 @@ mntsrv(struct svc_req *rqstp, SVCXPRT *transp)
syslog(LOG_ERR, "request from unknown address family");
return;
}
-   lookup_failed = getnameinfo(saddr, saddr->sa_len, host, sizeof host, 
-   NULL, 0, 0);
+   switch (rqstp->rq_proc) {
+   case MOUNTPROC_MNT:
+   case MOUNTPROC_UMNT:
+   case MOUNTPROC_UMNTALL:
+   lookup_failed = getnameinfo(saddr, saddr->sa_len, host,
+   sizeof host, NULL, 0, 0);
+   }
getnameinfo(saddr, saddr->sa_len, numerichost,
sizeof numerichost, NULL, 0, NI_NUMERICHOST);
switch (rqstp->rq_proc) {
___
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: r341640 - head/share/misc

2018-12-06 Thread Maxim Sobolev
Author: sobomax
Date: Thu Dec  6 18:12:50 2018
New Revision: 341640
URL: https://svnweb.freebsd.org/changeset/base/341640

Log:
  Apparently @portmgr does not feel like my current level of contribution
  warrants me a repo access to the ports tree anymore. Move myself into alumni
  at least for a time being.

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

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotThu Dec  6 18:03:18 2018
(r341639)
+++ head/share/misc/committers-ports.dotThu Dec  6 18:12:50 2018
(r341640)
@@ -33,6 +33,7 @@ asami [label="Satoshi Asami\nas...@freebsd.org\n1994/1
 billf [label="Bill Fumerola\nbi...@freebsd.org\n1998/11/11\n2006/12/14"]
 jmallett [label="Juli Mallett\njmall...@freebsd.org\n2003/01/16\n2006/08/10"]
 marcel [label="Marcel Moolenaar\nmar...@freebsd.org\n1999/07/03\n2007/07/01"]
+sobomax[label="Maxim Sobolev\nsobo...@freebsd.org\n2000/05/17\n2018/12/03"]
 steve [label="Steve Price\nst...@freebsd.org\n/xx/xx\n/xx/xx"]
 will [label="Will Andrews\nw...@freebsd.org\n2000/03/20\n2006/09/01"]
 
@@ -240,7 +241,6 @@ shurd [label="Stephen Hurd\nsh...@freebsd.org\n2014/06
 simon [label="Simon L. Nielsen\nsi...@freebsd.org\n2005/01/08"]
 skozlov [label="Sergey Kozlov\nskoz...@freebsd.org\n2018/09/21"]
 skreuzer [label="Steven Kreuzer\nskreu...@freebsd.org\n2009/03/25"]
-sobomax[label="Maxim Sobolev\nsobo...@freebsd.org\n2000/05/17"]
 sperber[label="Armin Pirkovitsch\nsper...@freebsd.org\n2012/04/15"]
 stas [label="Stanislav Sedov\ns...@freebsd.org\n2006/09/18"]
 stefan [label="Stefan Walter\nste...@freebsd.org\n2006/05/07"]
___
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: r341639 - head/lib/libc/gen

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 18:03:18 2018
New Revision: 341639
URL: https://svnweb.freebsd.org/changeset/base/341639

Log:
  syslog(3): stdarg.h is needed only for vsyslog()
  
  Reported by:  Brian Wood 
  Reviewed by:  asomers, ngie
  Differential revision:https://reviews.freebsd.org/D18334

Modified:
  head/lib/libc/gen/syslog.3

Modified: head/lib/libc/gen/syslog.3
==
--- head/lib/libc/gen/syslog.3  Thu Dec  6 17:29:37 2018(r341638)
+++ head/lib/libc/gen/syslog.3  Thu Dec  6 18:03:18 2018(r341639)
@@ -28,7 +28,7 @@
 .\" @(#)syslog.3   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd April 12, 2018
+.Dd November 25, 2018
 .Dt SYSLOG 3
 .Os
 .Sh NAME
@@ -42,17 +42,18 @@
 .Lb libc
 .Sh SYNOPSIS
 .In syslog.h
-.In stdarg.h
 .Ft void
 .Fn syslog "int priority" "const char *message" "..."
 .Ft void
-.Fn vsyslog "int priority" "const char *message" "va_list args"
-.Ft void
 .Fn openlog "const char *ident" "int logopt" "int facility"
 .Ft void
 .Fn closelog void
 .Ft int
 .Fn setlogmask "int maskpri"
+.In syslog.h
+.In stdarg.h
+.Ft void
+.Fn vsyslog "int priority" "const char *message" "va_list args"
 .Sh DESCRIPTION
 The
 .Fn syslog
___
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: r341266 - in releng/12.0: . sys/modules/iavf

2018-12-06 Thread Glen Barber
On Thu, Dec 06, 2018 at 06:25:06PM +0100, Marius Strobl wrote:
> On Thu, Dec 06, 2018 at 03:58:44PM +1000, Dima Panov wrote:
> > Hello!
> > 
> > Marius Strobl wrote on 30/11/2018 07:59:
> > > Author: marius
> > > Date: Thu Nov 29 21:59:09 2018
> > > New Revision: 341266
> > > URL: https://svnweb.freebsd.org/changeset/base/341266
> > > 
> > > Log:
> > >MFC: r341016, MF12: r341261
> > >
> > >- Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in 
> > > r339338.
> > >- Likewise, add ixlv.4.gz to OLD_FILES,
> > >- and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the 
> > > transition.
> > >
> > [cut]
> > > 
> > > Modified: releng/12.0/sys/modules/iavf/Makefile
> > > ==
> > > --- releng/12.0/sys/modules/iavf/Makefile Thu Nov 29 21:20:53 2018
> > > (r341265)
> > > +++ releng/12.0/sys/modules/iavf/Makefile Thu Nov 29 21:59:09 2018
> > > (r341266)
> > > @@ -15,4 +15,6 @@ SRCS+= i40e_common.c i40e_nvm.c i40e_adminq.c
> > >   # Enable asserts and other debugging facilities
> > >   # CFLAGS += -DINVARIANTS -DINVARIANTS_SUPPORT -DWITNESS
> > >   
> > > +LINKS=   ${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_ixlv.ko
> > > +
> > >   .include 
> > 
> > 
> > And this broke poudriere jail upgrade due to missed kernel modules for 
> > build purpose
> > 
> > # poudriere jail -u -j fbsd12-test -t 12.0-RC3
> > [skip]
> > /usr/src/usr.sbin/newsyslog/newsyslog.c
> > To install the downloaded upgrades, run "/usr/sbin/freebsd-update.fixed 
> > install".
> > Installing updates...ln: ///boot/kernel/if_iavf.ko: No such file or 
> > directory
> > chflags: ///boot/kernel/if_ixlv.ko: No such file or directory
> > [00:20:27] Error: Fail to upgrade system
> > #
> 
> Hrm, apparently this doesn't trip up with a native, i. e. non-poudriere,
> environment and I'd assume that the linking of if_igb.ko to if_em.ko that
> sys/modules/em/Makefile does ever since r324500 isn't causing problems
> with poudriere either. What are poudriere and the "fixed" version of
> freebsd-update(8) doing differently than native counterparts and what do
> you mean by "missed kernel modules for build purpose"?
> 

FWIW, I did not see this in all of my freebsd-update(8) tests.

Glen



signature.asc
Description: PGP signature


svn commit: r341638 - head/sys/kern

2018-12-06 Thread Mark Johnston
Author: markj
Date: Thu Dec  6 17:29:37 2018
New Revision: 341638
URL: https://svnweb.freebsd.org/changeset/base/341638

Log:
  Let kern.trap_enotcap be set as a tunable.
  
  This is handy for testing programs that are run by rc.
  
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/kern/sys_capability.c

Modified: head/sys/kern/sys_capability.c
==
--- head/sys/kern/sys_capability.c  Thu Dec  6 16:10:39 2018
(r341637)
+++ head/sys/kern/sys_capability.c  Thu Dec  6 17:29:37 2018
(r341638)
@@ -86,7 +86,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 bool __read_frequently trap_enotcap;
-SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RW, _enotcap, 0,
+SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RWTUN, _enotcap, 0,
 "Deliver SIGTRAP on ENOTCAPABLE");
 
 #ifdef CAPABILITY_MODE
___
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: r341266 - in releng/12.0: . sys/modules/iavf

2018-12-06 Thread Marius Strobl
On Thu, Dec 06, 2018 at 03:58:44PM +1000, Dima Panov wrote:
> Hello!
> 
> Marius Strobl wrote on 30/11/2018 07:59:
> > Author: marius
> > Date: Thu Nov 29 21:59:09 2018
> > New Revision: 341266
> > URL: https://svnweb.freebsd.org/changeset/base/341266
> > 
> > Log:
> >MFC: r341016, MF12: r341261
> >
> >- Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in 
> > r339338.
> >- Likewise, add ixlv.4.gz to OLD_FILES,
> >- and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the 
> > transition.
> >
> [cut]
> > 
> > Modified: releng/12.0/sys/modules/iavf/Makefile
> > ==
> > --- releng/12.0/sys/modules/iavf/Makefile   Thu Nov 29 21:20:53 2018
> > (r341265)
> > +++ releng/12.0/sys/modules/iavf/Makefile   Thu Nov 29 21:59:09 2018
> > (r341266)
> > @@ -15,4 +15,6 @@ SRCS+= i40e_common.c i40e_nvm.c i40e_adminq.c
> >   # Enable asserts and other debugging facilities
> >   # CFLAGS += -DINVARIANTS -DINVARIANTS_SUPPORT -DWITNESS
> >   
> > +LINKS= ${KMODDIR}/${KMOD}.ko ${KMODDIR}/if_ixlv.ko
> > +
> >   .include 
> 
> 
> And this broke poudriere jail upgrade due to missed kernel modules for 
> build purpose
> 
> # poudriere jail -u -j fbsd12-test -t 12.0-RC3
> [skip]
> /usr/src/usr.sbin/newsyslog/newsyslog.c
> To install the downloaded upgrades, run "/usr/sbin/freebsd-update.fixed 
> install".
> Installing updates...ln: ///boot/kernel/if_iavf.ko: No such file or 
> directory
> chflags: ///boot/kernel/if_ixlv.ko: No such file or directory
> [00:20:27] Error: Fail to upgrade system
> #

Hrm, apparently this doesn't trip up with a native, i. e. non-poudriere,
environment and I'd assume that the linking of if_igb.ko to if_em.ko that
sys/modules/em/Makefile does ever since r324500 isn't causing problems
with poudriere either. What are poudriere and the "fixed" version of
freebsd-update(8) doing differently than native counterparts and what do
you mean by "missed kernel modules for build purpose"?

Marius

___
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: r341637 - stable/12

2018-12-06 Thread Ed Maste
Author: emaste
Date: Thu Dec  6 16:10:39 2018
New Revision: 341637
URL: https://svnweb.freebsd.org/changeset/base/341637

Log:
  MFC r340986: UPDATING: add note for ld.bfd removal
  
  r340984 in HEAD, MFC in r341239

Modified:
  stable/12/UPDATING
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/UPDATING
==
--- stable/12/UPDATING  Thu Dec  6 15:28:09 2018(r341636)
+++ stable/12/UPDATING  Thu Dec  6 16:10:39 2018(r341637)
@@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITHOUT_CLANG and 
 the tip of head, and then rebuild without this option. The bootstrap process
 from older version of current across the gcc/clang cutover is a bit fragile.
 
+20181129:
+   On amd64, arm64 and armv7 (architectures that install LLVM's ld.lld
+   linker as /usr/bin/ld) GNU ld is no longer installed as ld.bfd, as
+   it produces broken binaries when ifuncs are in use.  Users needing
+   GNU ld should install the binutils port or package.
+
 20181115:
The set of CTM commands (ctm, ctm_smail, ctm_rmail, ctm_dequeue)
has been converted to a port (misc/ctm) and will be removed from
___
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: r341636 - stable/12/sys/dev/ixl

2018-12-06 Thread Eric Joyner
Author: erj
Date: Thu Dec  6 15:28:09 2018
New Revision: 341636
URL: https://svnweb.freebsd.org/changeset/base/341636

Log:
  MFC r340010
  
  ixl/iavf(4): Update remaining references of "num_queues" to "num_rx_queues"

Modified:
  stable/12/sys/dev/ixl/iavf_vc.c
  stable/12/sys/dev/ixl/if_iavf.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/ixl/iavf_vc.c
==
--- stable/12/sys/dev/ixl/iavf_vc.c Thu Dec  6 13:52:02 2018
(r341635)
+++ stable/12/sys/dev/ixl/iavf_vc.c Thu Dec  6 15:28:09 2018
(r341636)
@@ -720,10 +720,6 @@ iavf_update_stats_counters(struct iavf_sc *sc, struct 
uint64_t tx_discards;
 
tx_discards = es->tx_discards;
-#if 0
-   for (int i = 0; i < vsi->num_queues; i++)
-   tx_discards += sc->vsi.queues[i].txr.br->br_drops;
-#endif
 
/* Update ifnet stats */
IXL_SET_IPACKETS(vsi, es->rx_unicast +
@@ -826,7 +822,7 @@ iavf_config_rss_lut(struct iavf_sc *sc)
/*
 * Fetch the RSS bucket id for the given indirection entry.
 * Cap it at the number of configured buckets (which is
-* num_queues.)
+* num_rx_queues.)
 */
que_id = rss_get_indirection_to_bucket(i);
que_id = que_id % sc->vsi.num_rx_queues;

Modified: stable/12/sys/dev/ixl/if_iavf.c
==
--- stable/12/sys/dev/ixl/if_iavf.c Thu Dec  6 13:52:02 2018
(r341635)
+++ stable/12/sys/dev/ixl/if_iavf.c Thu Dec  6 15:28:09 2018
(r341636)
@@ -1947,10 +1947,10 @@ iavf_config_rss_reg(struct iavf_sc *sc)
/*
 * Fetch the RSS bucket id for the given indirection entry.
 * Cap it at the number of configured buckets (which is
-* num_queues.)
+* num_rx_queues.)
 */
que_id = rss_get_indirection_to_bucket(i);
-   que_id = que_id % vsi->num_queues;
+   que_id = que_id % vsi->num_rx_queues;
 #else
que_id = j;
 #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: r341635 - head/share/man/man7

2018-12-06 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Dec  6 13:52:02 2018
New Revision: 341635
URL: https://svnweb.freebsd.org/changeset/base/341635

Log:
  Add examples for "make buildenv".
  
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL

Modified:
  head/share/man/man7/development.7

Modified: head/share/man/man7/development.7
==
--- head/share/man/man7/development.7   Thu Dec  6 13:46:18 2018
(r341634)
+++ head/share/man/man7/development.7   Thu Dec  6 13:52:02 2018
(r341635)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 30, 2018
+.Dd December 6, 2018
 .Dt DEVELOPMENT 7
 .Os
 .Sh NAME
@@ -134,6 +134,29 @@ build has been completed in the past, not on a fresh s
 .Bd -literal -offset indent
 cd src
 make -sj8 kernel KERNFAST=1
+.Ed
+.Pp
+To rebuild parts of
+.Fx
+for another CPU architecture,
+first prepare your source tree by building the cross-toolchain:
+.Bd -literal -offset indent
+cd src
+make -sj8 toolchain TARGET_ARCH=armv6
+.Ed
+.Pp
+Afterwards, to build and install a single piece of userspace, use:
+.Bd -literal -offset indent
+cd src/bin/ls
+make buildenv TARGET_ARCH=armv6
+make clean all install DESTDIR=/clients/arm
+.Ed
+.Pp
+Likewise, to quickly rebuild and reinstall the kernel, use:
+.Bd -literal -offset indent
+cd src
+make buildenv TARGET_ARCH=armv6
+make -sj8 kernel KERNFAST=1 DESTDIR=/clients/arm
 .Ed
 .Sh SEE ALSO
 .Xr svnlite 1 ,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r341634 - head/share/termcap

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 13:46:18 2018
New Revision: 341634
URL: https://svnweb.freebsd.org/changeset/base/341634

Log:
  termcap: add italics and tmux entries
  
  - add "ecma+italics" cap
  - use it in "xterm-basic"
  - add "tmux"/"tmux-256color" caps, fixing "so" and "se" caps,
and sourcing "ecma+italics" and "screen"/"screen-256color"
  
  Reviewed by:  bapt
  Differential revision:https://reviews.freebsd.org/D18363

Modified:
  head/share/termcap/termcap

Modified: head/share/termcap/termcap
==
--- head/share/termcap/termcap  Thu Dec  6 13:32:51 2018(r341633)
+++ head/share/termcap/termcap  Thu Dec  6 13:46:18 2018(r341634)
@@ -2787,6 +2787,17 @@ SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 13
 screen-256color|VT 100/ANSI X3.64 terminal with 256 colors:\
:Co#256:pa#32767:\
:AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=screen:
+
+ecma+italics|ECMA-48 italics:\
+   :ZH=\E[3m:ZR=\E[23m:
+
+tmux|tmux terminal multiplexer:\
+   :so=\E[7m:se=\E[27m:\
+   :tc=ecma+italics:tc=screen:
+tmux-256color|tmux with 256 colors:\
+   :so=\E[7m:se=\E[27m:\
+   :tc=ecma+italics:tc=screen-256color:
+
 # $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $
 #
 # Note:
@@ -2829,7 +2840,8 @@ xterm-basic|modern xterm common:\
:me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:op=\E[39;49m:\
:rc=\E8:rs=\E[!p\E[?3;4l\E[4l\E>:sc=\E7:se=\E[27m:sf=^J:\
:so=\E[7m:sr=\EM:st=\EH:\
-   :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:
+   :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:\
+   :tc=ecma+italics:
 
 # The xterm-new description has all of the features, but is not completely
 # compatible with vt220.  If you are using a Sun or PC keyboard, set the
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r341633 - stable/10/sys/security/audit

2018-12-06 Thread Andriy Gapon
Author: avg
Date: Thu Dec  6 13:32:51 2018
New Revision: 341633
URL: https://svnweb.freebsd.org/changeset/base/341633

Log:
  MFC r336641: fix incorrect operator in the AUDITPIPE_SET_QLIMIT bounds check
  
  PR:   229983

Modified:
  stable/10/sys/security/audit/audit_pipe.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/security/audit/audit_pipe.c
==
--- stable/10/sys/security/audit/audit_pipe.c   Thu Dec  6 12:34:34 2018
(r341632)
+++ stable/10/sys/security/audit/audit_pipe.c   Thu Dec  6 13:32:51 2018
(r341633)
@@ -800,7 +800,7 @@ audit_pipe_ioctl(struct cdev *dev, u_long cmd, caddr_t
 
case AUDITPIPE_SET_QLIMIT:
/* Lockless integer write. */
-   if (*(u_int *)data >= AUDIT_PIPE_QLIMIT_MIN ||
+   if (*(u_int *)data >= AUDIT_PIPE_QLIMIT_MIN &&
*(u_int *)data <= AUDIT_PIPE_QLIMIT_MAX) {
ap->ap_qlimit = *(u_int *)data;
error = 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: r341632 - head/sys/dev/acpica

2018-12-06 Thread Andriy Gapon
Author: avg
Date: Thu Dec  6 12:34:34 2018
New Revision: 341632
URL: https://svnweb.freebsd.org/changeset/base/341632

Log:
  acpi_{Device,Battery}IsPresent: restore pre-r330957 behaviour
  
  Specifically, assume that the device is present if evaluation of _STA
  method fails.
  
  Before r330957 we ignored any _STA evaluation failure (which was
  performed by AcpiGetObjectInfo in ACPICA contrib code) for the purpose
  of acpi_DeviceIsPresent and acpi_BatteryIsPresent.  ACPICA 20180313
  removed evaluation of _STA from AcpiGetObjectInfo.  So, we added
  evaluation of _STA to acpi_DeviceIsPresent and acpi_BatteryIsPresent.
  One important difference is that the new code ignored a failure only if
  _STA did not exist (AE_NOT_FOUND).  Any other kind of failure was
  treated as a fatal failure.  Apparently, on some systems we can get
  AE_NOT_EXIST when evaluating _STA.  And that error is not an evil twin
  of AE_NOT_FOUND, despite a very similar name, but a distinct error
  related to a missing handler for an ACPI operation region.
  
  It's possible that for some people the problem was already fixed by
  changes in ACPICA and/or in acpi_ec driver (or even in BIOS) that fixed
  the AE_NOT_EXIST failure related to EC operation region.
  
  This work is based on a great analysis by cem and an earlier patch by
  Ali Abdallah .
  
  PR:   227191
  Reported by:  0mp
  MFC after:2 weeks

Modified:
  head/sys/dev/acpica/acpi.c

Modified: head/sys/dev/acpica/acpi.c
==
--- head/sys/dev/acpica/acpi.c  Thu Dec  6 11:52:07 2018(r341631)
+++ head/sys/dev/acpica/acpi.c  Thu Dec  6 12:34:34 2018(r341632)
@@ -2203,8 +2203,6 @@ acpi_DeviceIsPresent(device_t dev)
h = acpi_get_handle(dev);
if (h == NULL)
return (FALSE);
-   status = acpi_GetInteger(h, "_STA", );
-
/*
 * Certain Treadripper boards always returns 0 for FreeBSD because it
 * only returns non-zero for the OS string "Windows 2015". Otherwise it
@@ -2214,9 +2212,14 @@ acpi_DeviceIsPresent(device_t dev)
if (acpi_MatchHid(h, "AMDI0020") || acpi_MatchHid(h, "AMDI0010"))
return (TRUE);
 
-   /* If no _STA method, must be present */
+   status = acpi_GetInteger(h, "_STA", );
+
+   /*
+* If no _STA method or if it failed, then assume that
+* the device is present.
+*/
if (ACPI_FAILURE(status))
-   return (status == AE_NOT_FOUND ? TRUE : FALSE);
+   return (TRUE);
 
return (ACPI_DEVICE_PRESENT(s) ? TRUE : FALSE);
 }
@@ -2236,9 +2239,12 @@ acpi_BatteryIsPresent(device_t dev)
return (FALSE);
status = acpi_GetInteger(h, "_STA", );
 
-   /* If no _STA method, must be present */
+   /*
+* If no _STA method or if it failed, then assume that
+* the device is present.
+*/
if (ACPI_FAILURE(status))
-   return (status == AE_NOT_FOUND ? TRUE : FALSE);
+   return (TRUE);
 
return (ACPI_BATTERY_PRESENT(s) ? TRUE : FALSE);
 }
___
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: r341631 - stable/11/usr.bin/localedef

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 11:52:07 2018
New Revision: 341631
URL: https://svnweb.freebsd.org/changeset/base/341631

Log:
  MFC r339827:
  localedef: define characters in "space" class also as "print", except
  for the known conflicts ("control" characters can't be "print"able).
  POSIX doesn't explicitly forbid this, and actually includes 
  character in "print".
  
  PR:   225692
  Reviewed by:  bapt, cem (previous version), pfg (previous version)
  Differential Revision:https://reviews.freebsd.org/D17467

Modified:
  stable/11/usr.bin/localedef/ctype.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/localedef/ctype.c
==
--- stable/11/usr.bin/localedef/ctype.c Thu Dec  6 11:49:52 2018
(r341630)
+++ stable/11/usr.bin/localedef/ctype.c Thu Dec  6 11:52:07 2018
(r341631)
@@ -120,7 +120,13 @@ add_ctype_impl(ctype_node_t *ctn)
ctn->ctype |= (_ISDIGIT | _ISGRAPH | _ISPRINT | _ISXDIGIT | 
_E4);
break;
case T_ISSPACE:
-   ctn->ctype |= _ISSPACE;
+   /*
+* This can be troublesome as , ,
+* , , and  are defined both
+* as space and cntrl, and POSIX doesn't allow cntrl/print
+* combination.  We will take care of this in dump_ctype().
+*/
+   ctn->ctype |= (_ISSPACE | _ISPRINT);
break;
case T_ISCNTRL:
ctn->ctype |= _ISCNTRL;
@@ -372,9 +378,15 @@ dump_ctype(void)
ctn->ctype |= _ISPRINT;
 
/*
-* Finally, POSIX requires that certain combinations
-* are invalid.  We don't flag this as a fatal error,
-* but we will warn about.
+* POSIX requires that certain combinations are invalid.
+* Try fixing the cases we know about (see add_ctype_impl()).
+*/
+   if ((ctn->ctype & (_ISSPACE|_ISCNTRL)) == (_ISSPACE|_ISCNTRL))
+   ctn->ctype &= ~_ISPRINT;
+
+   /*
+* Finally, don't flag remaining cases as a fatal error,
+* and just warn about them.
 */
if ((ctn->ctype & _ISALPHA) &&
(ctn->ctype & (_ISPUNCT|_ISDIGIT)))
___
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: r341630 - in stable/11: share/ctypedef tools/tools/locale tools/tools/locale/etc

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 11:49:52 2018
New Revision: 341630
URL: https://svnweb.freebsd.org/changeset/base/341630

Log:
  MFC r339311, r339313:
  Restore some of the ctype definitions reported in the PR from pre-CLDR
  data, namely 0xE000-0xF8FF private use area, and 0xFF00-0xFFF half- and
  fullwidth punctuation.
  
  While here, update tools/tools/locale/README based on my experience
  rebuilding the locale data.
  
  PR:   225692
  Reviewed by:  bapt, cem (previous version)
  Differential Revision:https://reviews.freebsd.org/D17471

Modified:
  stable/11/share/ctypedef/en_US.UTF-8.src
  stable/11/tools/tools/locale/README
  stable/11/tools/tools/locale/etc/common.UTF-8.src
  stable/11/tools/tools/locale/etc/manual-input.UTF-8   (contents, props 
changed)
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/ctypedef/en_US.UTF-8.src
==
--- stable/11/share/ctypedef/en_US.UTF-8.srcThu Dec  6 10:53:11 2018
(r341629)
+++ stable/11/share/ctypedef/en_US.UTF-8.srcThu Dec  6 11:49:52 2018
(r341630)
@@ -6241,6 +6241,12 @@ graph;...;;...;
 
 **
+* 0xE000 - 0xF8FF Private Use Area (from pre-CLDR data)
+**
+
+graph  ;...;
+
+**
 * 0xFB50 - 0xFDFF Arabic Presentation Forms (differential)
 **
 
@@ -6277,6 +6283,17 @@ punct;...;
 **
 
 blank  
+
+**
+* 0xFF00 - 0x Half- and Fullwidth Punctuation (from pre-CLDR data)
+**
+
+punct  ;...;;/
+   ;...;;/
+   ;...;;/
+   ;...;;/
+   ;...;;/
+   ;...;
 
 **
 * 0x10300 - 0x1032F Old Italic

Modified: stable/11/tools/tools/locale/README
==
--- stable/11/tools/tools/locale/README Thu Dec  6 10:53:11 2018
(r341629)
+++ stable/11/tools/tools/locale/README Thu Dec  6 11:49:52 2018
(r341630)
@@ -2,17 +2,37 @@
 
 To generate the locales:
 
-Tools needed: java, perl and devel/p5-Tie-IxHash
+Tools needed:
+   java (openjdk >= 8)
+   perl
+   converters/p5-Text-Iconv
+   devel/p5-Tie-IxHash
+   textproc/p5-XML-Parser
 
-fetch cldr data from: http://cldr.unicode.org
-extract in a directory ~/unicode/cldr/v27.0.1 for example
-fetch unidata from http://www.unicode.org/Public/zipped/ (latest version)
-extract in a directory ~/unicode/UNIDATA/8.0.0 for example
+Fetch CLDR data from: http://unicode.org/Public/cldr/.  You need all of the
+core.zip, keyboards.zip, and tools.zip.
 
-either modify tools/tools/locales/etc/unicode.conf or export variables:
-CLDRDIR="~/unicode/cldr/v27.0.1"
-UNIDATADIR="~/unicode/UNIDATA/8.0.0"
+Extract:
+   mkdir -p ~/unicode/cldr/v33.0
+   cd ~/unicode/cldr/v33.0
+   unzip ~/core.zip ~/keyboards.zip ~/tools.zip
 
-run:
-make POSIX
-make install
+Fetch unidata (UCD.zip) from http://www.unicode.org/Public/zipped/latest.
+
+Extract:
+   mkdir -p ~/unicode/UNIDATA/11.0.0
+   cd ~/unicode/UNIDATA/11.0.0
+   unzip ~/UCD.zip
+
+Either modify tools/tools/locales/etc/unicode.conf or export variables:
+   CLDRDIR=~/unicode/cldr/v33.0; export CLDRDIR
+   UNIDATADIR=~/unicode/UNIDATA/9.0.0; export UNIDATADIR
+
+Build the CLDR tools:
+   cd $CLDRDIR/tools/java
+   ant jar
+
+Run:
+   make POSIX
+   make
+   make install

Modified: stable/11/tools/tools/locale/etc/common.UTF-8.src
==
--- stable/11/tools/tools/locale/etc/common.UTF-8.src   Thu Dec  6 10:53:11 
2018(r341629)
+++ stable/11/tools/tools/locale/etc/common.UTF-8.src   Thu Dec  6 11:49:52 
2018(r341630)
@@ -6241,6 +6241,12 @@ graph;...;;...;
 
 **
+* 0xE000 - 0xF8FF Private Use Area (from pre-CLDR data)
+**
+
+graph  ;...;
+
+**
 * 0xFB50 - 0xFDFF Arabic Presentation Forms (differential)
 **
 
@@ -6277,6 +6283,17 @@ punct;...;
 **
 
 blank  
+
+**
+* 0xFF00 - 0x Half- and Fullwidth Punctuation (from pre-CLDR data)

svn commit: r341629 - in stable/12: contrib/netbsd-tests/lib/libc/locale share/ctypedef tools/tools/locale tools/tools/locale/etc tools/tools/locale/tools

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 10:53:11 2018
New Revision: 341629
URL: https://svnweb.freebsd.org/changeset/base/341629

Log:
  MFC r340491, r340492:
  Use UnicodeData.txt to create UTF-8 ctype map.
  
  This should provide more complete coverage of currently defined Unicode
  characters as compared to manually assembled one we use currently.
  
  Comparison of original and new UTF-8 ctype maps by character class:
  
  TYPEORIGNEW
  alnum   94229   126029
  alpha   93557   125419
  blank   4   2
  cntrl   73  137685
  digit   469 622
  graph   109615  137203
  lower   14782145
  print   109641  137222
  punct   3428797
  rune110481  274907
  space   33  24
  upper   983 1781
  xdigit  469 622
  
  Large number of added cntrl definitions is due to the fact that private-use
  planes are currently defined as such, this can change in the future.
  
  Discussed with:   bapt
  Differential revision:https://reviews.freebsd.org/D17842

Deleted:
  stable/12/tools/tools/locale/etc/common.UTF-8.src
  stable/12/tools/tools/locale/etc/manual-input.UTF-8
Modified:
  stable/12/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c
  stable/12/share/ctypedef/C.UTF-8.src
  stable/12/tools/tools/locale/Makefile
  stable/12/tools/tools/locale/tools/utf8-rollup.pl
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c
==
--- stable/12/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Thu Dec  6 
10:48:46 2018(r341628)
+++ stable/12/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Thu Dec  6 
10:53:11 2018(r341629)
@@ -88,7 +88,7 @@ static struct test {
0x, 0x5D, 0x5B, 0x1, 0x10, 0x5D, 0x0A
},
 #ifdef __FreeBSD__
-   {1, -1, -1,  1,  1, -1, -1,  1,  1, 1, -1,  1,  1, -1, -1,
+   {1, -1, -1,  1,  1, -1,  1,  1,  1,  1, -1,  1,  1,  1, -1,
 #else
{1, -1, -1,  1,  1, -1, -1,  1,  1, -1, -1,  1,  1, -1, -1,
 #endif

Modified: stable/12/share/ctypedef/C.UTF-8.src
==
--- stable/12/share/ctypedef/C.UTF-8.srcThu Dec  6 10:48:46 2018
(r341628)
+++ stable/12/share/ctypedef/C.UTF-8.srcThu Dec  6 10:53:11 2018
(r341629)
@@ -7,386 +7,27606 @@ comment_char *
 escape_char /
 
 LC_CTYPE
-
-**
-* 0x - 0x007F Basic Latin
-* 0x0080 - 0x00FF Latin-1 Supplement
-* 0x0100 - 0x017F Latin Extended-A
-* 0x0180 - 0x024F Latin Extended-B
-* 0x0250 - 0x02AF IPA Extensions
-* 0x1D00 - 0x1D7F Phonetic Extensions
-* 0x1D80 - 0x1DBF Phonetic Extensions Supplement
-* 0x1E00 - 0x1EFF Latin Extended Additional
-* 0x2150 - 0x218F Number Forms (partial - Roman Numerals)
-* 0x2C60 - 0x2C7F Latin Extended-C
-* 0xA720 - 0xA7FF Latin Extended-D
-* 0xAB30 - 0xAB6F Latin Extended-E
-* 0xFB00 - 0xFF4F Alphabetic Presentation Forms (partial)
-* 0xFF00 - 0xFFEF Halfwidth and Fullwidth Forms (partial)
-**
-upper  ;...;;/
-   
;...;;/
-   ;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   
;...;;/
-   
;...;;/
-   ;/
-   ;/
-   ;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   
;...;;/
-   ;/
-   ;/
-   ;/
-   ;/
-   ;/
-   

svn commit: r341628 - in stable/12/tools/tools/locale: . etc tools

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 10:48:46 2018
New Revision: 341628
URL: https://svnweb.freebsd.org/changeset/base/341628

Log:
  MFC r340204:
  Cleanup locale tools:
  
  - Simplify the source dir specification, and update README
appropriately
  - Drop the LC (doonly) processing, it's broken, and even if fixed, not
really useful
  - Don't remove the target directories while installing new data as it
removes Makefile.depend which we don't manage; only rm the files we
are going to add/replace/delete instead
  - Restrict adding bsd.endian.mk to colldef and ctypedef Makefiles, it's
not needed in other (text-only) categories
  - GC unused scripts; they don't seem to be particularly helpful standalone
as well
  
  Reviewed by:  bapt
  Differential Revision:https://reviews.freebsd.org/D17858

Deleted:
  stable/12/tools/tools/locale/etc/unicode.conf
  stable/12/tools/tools/locale/tools/UTF82encoding.pl
  stable/12/tools/tools/locale/tools/changeoffset.pl
  stable/12/tools/tools/locale/tools/unicode2src.pl
  stable/12/tools/tools/locale/tools/whatis.pl
Modified:
  stable/12/tools/tools/locale/Makefile
  stable/12/tools/tools/locale/README
  stable/12/tools/tools/locale/tools/cldr2def.pl
  stable/12/tools/tools/locale/tools/finalize
  stable/12/tools/tools/locale/tools/utf8-rollup.pl
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tools/tools/locale/Makefile
==
--- stable/12/tools/tools/locale/Makefile   Thu Dec  6 10:41:22 2018
(r341627)
+++ stable/12/tools/tools/locale/Makefile   Thu Dec  6 10:48:46 2018
(r341628)
@@ -10,13 +10,10 @@
 
 .OBJDIR:   .
 
-.if !defined(CLDRDIR)
-CLDRDIR!=  grep ^cldr etc/unicode.conf | cut -f 2 -d " "
+.if !defined(UNIDIR)
+.error UNIDIR is not set
 .endif
-.if !defined(UNIDATADIR)
-UNIDATADIR!=   grep ^unidata etc/unicode.conf | cut -f 2 -d " "
-.endif
-PASSON=CLDRDIR="${CLDRDIR}" UNIDATADIR="${UNIDATADIR}"
+PASSON=UNIDIR="${UNIDIR}"
 
 ETCDIR=${.CURDIR}/etc
 
@@ -49,12 +46,8 @@ COLLATIONS_SPECIAL_ENV+= ${area}.${enc}
 .endfor
 PASSON+=   COLLATIONS_SPECIAL="${COLLATIONS_SPECIAL_ENV}"
 
-.if defined(LC)
-LC:=   --lc=${LC}
-.endif
-
 all:
-   cp ${ETCDIR}/common.UTF-8.src ${CLDRDIR}/posix/xx_Comm_C.UTF-8.src
+   cp ${ETCDIR}/common.UTF-8.src ${UNIDIR}/posix/xx_Comm_C.UTF-8.src
 .for t in ${TYPES}
 .  if ${KNOWN:M${t}}
test -d ${t} || mkdir ${t}
@@ -69,8 +62,9 @@ install: install-${t}
 install-${t}:
 .  if ${KNOWN:M${t}}
rm -rf ${.CURDIR}/${t}.draft
-   rm -rf ${.CURDIR}/../../../share/${t}
-   mv ${.CURDIR}/${t} ${.CURDIR}/../../../share/${t}
+   rm -f ${.CURDIR}/../../../share/${t}/Makefile
+   rm -f ${.CURDIR}/../../../share/${t}/*.src
+   mv ${.CURDIR}/${t}/* ${.CURDIR}/../../../share/${t}/
 .  endif
 .endfor
 
@@ -86,10 +80,9 @@ post-install:
 gen-${t}:
mkdir -p ${t} ${t}.draft
perl -I tools tools/cldr2def.pl \
-   --cldr=$$(realpath ${CLDRDIR}) \
-   --unidata=$$(realpath ${UNIDATADIR}) \
+   --unidir=$$(realpath ${UNIDIR}) \
--etc=$$(realpath ${ETCDIR}) \
-   --type=${t} ${LC}
+   --type=${t}
 
 build-${t}: gen-${t}
env ${PASSON} tools/finalize ${t}
@@ -101,15 +94,16 @@ build-colldef: static-colldef
 
 static-colldef:
 .for area enc in ${COLLATION_SPECIAL}
-   awk -f tools/extract-colldef.awk ${CLDRDIR}/posix/${area}.${enc}.src > 
colldef.draft/${area}.${enc}.src
+   awk -f tools/extract-colldef.awk ${UNIDIR}/posix/${area}.${enc}.src > \
+   colldef.draft/${area}.${enc}.src
 .endfor
 
 transfer-rollup:
-   cp ${ETCDIR}/common.UTF-8.src ${CLDRDIR}/posix/xx_Comm_C.UTF-8.src
+   cp ${ETCDIR}/common.UTF-8.src ${UNIDIR}/posix/xx_Comm_C.UTF-8.src
 
 rollup:
perl -I tools tools/utf8-rollup.pl \
-   --cldr=$$(realpath ${CLDRDIR}) \
+   --unidir=$$(realpath ${UNIDIR}) \
--etc=$$(realpath ${ETCDIR})
 
 clean:
@@ -159,33 +153,33 @@ ENCODINGS=Big5 \
 
 
 POSIX:
-.if exists (${CLDRDIR}/tools/java/cldr.jar)
-   mkdir -p ${CLDRDIR}/posix
+.if exists (${UNIDIR}/tools/java/cldr.jar)
+   mkdir -p ${UNIDIR}/posix
 .  for area in ${BASE_LOCALES_OF_INTEREST}
-.if !exists(${CLDRDIR}/posix/${area}.UTF-8.src)
-   java -DCLDR_DIR=${CLDRDIR:Q} -jar ${CLDRDIR}/tools/java/cldr.jar \
+.if !exists(${UNIDIR}/posix/${area}.UTF-8.src)
+   java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar \
org.unicode.cldr.posix.GeneratePOSIX \
-   -d ${CLDRDIR}/posix -m ${area} -c UTF-8
+   -d ${UNIDIR}/posix -m ${area} -c UTF-8
 .endif
 .  endfor
 .  for area encoding in ${COLLATION_SPECIAL}
-.if !exists(${CLDRDIR}/posix/${area}.${encoding}.src)
-   java -DCLDR_DIR=${CLDRDIR:Q} -jar 

svn commit: r341627 - in stable/12: lib/libc/locale share/ctypedef tools/tools/locale tools/tools/locale/tools

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 10:41:22 2018
New Revision: 341627
URL: https://svnweb.freebsd.org/changeset/base/341627

Log:
  MFC r340144:
  Add hybrid C.UTF-8 locale being identical to default C locale except
  that it uses the same ctype maps and functions as other UTF-8 locales.
  
  Reviewed by:  bapt, cem, eadler
  Differential Revision:https://reviews.freebsd.org/D17833

Added:
  stable/12/share/ctypedef/C.UTF-8.src
 - copied unchanged from r340144, head/share/ctypedef/C.UTF-8.src
Deleted:
  stable/12/share/ctypedef/en_US.UTF-8.src
Modified:
  stable/12/lib/libc/locale/collate.c
  stable/12/lib/libc/locale/ldpart.c
  stable/12/share/ctypedef/Makefile
  stable/12/tools/tools/locale/Makefile
  stable/12/tools/tools/locale/tools/cldr2def.pl
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libc/locale/collate.c
==
--- stable/12/lib/libc/locale/collate.c Thu Dec  6 09:51:51 2018
(r341626)
+++ stable/12/lib/libc/locale/collate.c Thu Dec  6 10:41:22 2018
(r341627)
@@ -84,7 +84,8 @@ destruct_collate(void *t)
 void *
 __collate_load(const char *encoding, __unused locale_t unused)
 {
-   if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
+   if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 ||
+   strncmp(encoding, "C.", 2) == 0) {
return &__xlocale_C_collate;
}
struct xlocale_collate *table = calloc(sizeof(struct xlocale_collate), 
1);
@@ -122,7 +123,8 @@ __collate_load_tables_l(const char *encoding, struct x
table->__collate_load_error = 1;
 
/* 'encoding' must be already checked. */
-   if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
+   if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0 ||
+   strncmp(encoding, "C.", 2) == 0) {
return (_LDP_CACHE);
}
 

Modified: stable/12/lib/libc/locale/ldpart.c
==
--- stable/12/lib/libc/locale/ldpart.c  Thu Dec  6 09:51:51 2018
(r341626)
+++ stable/12/lib/libc/locale/ldpart.c  Thu Dec  6 10:41:22 2018
(r341627)
@@ -63,7 +63,8 @@ __part_load_locale(const char *name,
size_t  namesize, bufsize;
 
/* 'name' must be already checked. */
-   if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0) {
+   if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0 ||
+   strncmp(name, "C.", 2) == 0) {
*using_locale = 0;
return (_LDP_CACHE);
}

Copied: stable/12/share/ctypedef/C.UTF-8.src (from r340144, 
head/share/ctypedef/C.UTF-8.src)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/12/share/ctypedef/C.UTF-8.srcThu Dec  6 10:41:22 2018
(r341627, copy of r340144, head/share/ctypedef/C.UTF-8.src)
@@ -0,0 +1,6372 @@
+# Warning: Do not edit. This file is automatically generated from the
+# tools in /usr/src/tools/tools/locale. The data is obtained from the
+# CLDR project, obtained from http://cldr.unicode.org/
+# -
+
+comment_char *
+escape_char /
+
+LC_CTYPE
+
+**
+* 0x - 0x007F Basic Latin
+* 0x0080 - 0x00FF Latin-1 Supplement
+* 0x0100 - 0x017F Latin Extended-A
+* 0x0180 - 0x024F Latin Extended-B
+* 0x0250 - 0x02AF IPA Extensions
+* 0x1D00 - 0x1D7F Phonetic Extensions
+* 0x1D80 - 0x1DBF Phonetic Extensions Supplement
+* 0x1E00 - 0x1EFF Latin Extended Additional
+* 0x2150 - 0x218F Number Forms (partial - Roman Numerals)
+* 0x2C60 - 0x2C7F Latin Extended-C
+* 0xA720 - 0xA7FF Latin Extended-D
+* 0xAB30 - 0xAB6F Latin Extended-E
+* 0xFB00 - 0xFF4F Alphabetic Presentation Forms (partial)
+* 0xFF00 - 0xFFEF Halfwidth and Fullwidth Forms (partial)
+**
+upper  ;...;;/
+   
;...;;/
+   ;...;;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   ;/
+   
;...;;/
+   
;...;;/
+   ;/
+

svn commit: r341626 - stable/12/usr.bin/man

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 09:51:51 2018
New Revision: 341626
URL: https://svnweb.freebsd.org/changeset/base/341626

Log:
  MFC r340128:
  Teach man(1) about C.UTF-8.
  
  While here, use LANG as the proper source to select man pages 
language/encoding,
  falling back to LC_CTYPE.
  
  Reviewed by:  bapt
  Differential Revision:https://reviews.freebsd.org/D17835

Modified:
  stable/12/usr.bin/man/man.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/man/man.sh
==
--- stable/12/usr.bin/man/man.shThu Dec  6 09:47:23 2018
(r341625)
+++ stable/12/usr.bin/man/man.shThu Dec  6 09:51:51 2018
(r341626)
@@ -662,6 +662,7 @@ man_setup_width() {
 # Setup necessary locale variables.
 man_setup_locale() {
local lang_cc
+   local locstr
 
locpaths='.'
man_charset='US-ASCII'
@@ -670,18 +671,25 @@ man_setup_locale() {
if [ -n "$oflag" ]; then
decho 'Using non-localized manpages'
else
-   # Use the locale tool to give us the proper LC_CTYPE
+   # Use the locale tool to give us proper locale information
eval $( $LOCALE )
 
-   case "$LC_CTYPE" in
+   if [ -n "$LANG" ]; then
+   locstr=$LANG
+   else
+   locstr=$LC_CTYPE
+   fi
+
+   case "$locstr" in
C)  ;;
+   C.UTF-8);;
POSIX)  ;;
[a-z][a-z]_[A-Z][A-Z]\.*)
-   lang_cc="${LC_CTYPE%.*}"
-   man_lang="${LC_CTYPE%_*}"
+   lang_cc="${locstr%.*}"
+   man_lang="${locstr%_*}"
man_country="${lang_cc#*_}"
-   man_charset="${LC_CTYPE#*.}"
-   locpaths="$LC_CTYPE"
+   man_charset="${locstr#*.}"
+   locpaths="$locstr"
locpaths="$locpaths:$man_lang.$man_charset"
if [ "$man_lang" != "en" ]; then
locpaths="$locpaths:en.$man_charset"
___
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: r341625 - in stable/12: share/colldef share/ctypedef share/monetdef share/numericdef tools/tools/locale tools/tools/locale/etc tools/tools/locale/etc/final-maps

2018-12-06 Thread Yuri Pankov
Author: yuripv
Date: Thu Dec  6 09:47:23 2018
New Revision: 341625
URL: https://svnweb.freebsd.org/changeset/base/341625

Log:
  MFC r340104:
  Update to CLDR 34 and UNICODE 11.
  
  Discussed with:   bapt

Added:
  stable/12/share/monetdef/fr_FR.UTF-8.src
 - copied unchanged from r340104, head/share/monetdef/fr_FR.UTF-8.src
  stable/12/share/monetdef/it_IT.ISO8859-15.src
 - copied unchanged from r340104, head/share/monetdef/it_IT.ISO8859-15.src
  stable/12/share/monetdef/it_IT.UTF-8.src
 - copied unchanged from r340104, head/share/monetdef/it_IT.UTF-8.src
  stable/12/share/monetdef/nl_BE.ISO8859-1.src
 - copied unchanged from r340104, head/share/monetdef/nl_BE.ISO8859-1.src
  stable/12/share/numericdef/fr_FR.UTF-8.src
 - copied unchanged from r340104, head/share/numericdef/fr_FR.UTF-8.src
Deleted:
  stable/12/share/monetdef/de_AT.ISO8859-1.src
  stable/12/share/monetdef/de_AT.ISO8859-15.src
  stable/12/share/monetdef/de_AT.UTF-8.src
Modified:
  stable/12/share/colldef/af_ZA.UTF-8.src
  stable/12/share/colldef/am_ET.UTF-8.src
  stable/12/share/colldef/ar_SA.UTF-8.src
  stable/12/share/colldef/be_BY.UTF-8.src
  stable/12/share/colldef/ca_AD.UTF-8.src
  stable/12/share/colldef/cs_CZ.ISO8859-2.src
  stable/12/share/colldef/cs_CZ.UTF-8.src
  stable/12/share/colldef/da_DK.ISO8859-1.src
  stable/12/share/colldef/da_DK.ISO8859-15.src
  stable/12/share/colldef/da_DK.UTF-8.src
  stable/12/share/colldef/el_GR.UTF-8.src
  stable/12/share/colldef/en_US.UTF-8.src
  stable/12/share/colldef/es_MX.UTF-8.src
  stable/12/share/colldef/et_EE.UTF-8.src
  stable/12/share/colldef/fi_FI.UTF-8.src
  stable/12/share/colldef/fr_CA.UTF-8.src
  stable/12/share/colldef/he_IL.UTF-8.src
  stable/12/share/colldef/hi_IN.UTF-8.src
  stable/12/share/colldef/hr_HR.ISO8859-2.src
  stable/12/share/colldef/hu_HU.ISO8859-2.src
  stable/12/share/colldef/hu_HU.UTF-8.src
  stable/12/share/colldef/hy_AM.UTF-8.src
  stable/12/share/colldef/is_IS.UTF-8.src
  stable/12/share/colldef/ja_JP.UTF-8.src
  stable/12/share/colldef/ja_JP.eucJP.src
  stable/12/share/colldef/kk_KZ.UTF-8.src
  stable/12/share/colldef/ko_KR.UTF-8.src
  stable/12/share/colldef/lt_LT.UTF-8.src
  stable/12/share/colldef/lv_LV.UTF-8.src
  stable/12/share/colldef/nb_NO.ISO8859-1.src
  stable/12/share/colldef/nb_NO.ISO8859-15.src
  stable/12/share/colldef/nn_NO.ISO8859-1.src
  stable/12/share/colldef/nn_NO.ISO8859-15.src
  stable/12/share/colldef/nn_NO.UTF-8.src
  stable/12/share/colldef/pl_PL.UTF-8.src
  stable/12/share/colldef/ro_RO.UTF-8.src
  stable/12/share/colldef/ru_RU.UTF-8.src
  stable/12/share/colldef/se_NO.UTF-8.src
  stable/12/share/colldef/sk_SK.ISO8859-2.src
  stable/12/share/colldef/sk_SK.UTF-8.src
  stable/12/share/colldef/sl_SI.UTF-8.src
  stable/12/share/colldef/sr_RS.ISO8859-2.src
  stable/12/share/colldef/sr_RS.ISO8859-5.src
  stable/12/share/colldef/sr_RS.UTF-8.src
  stable/12/share/colldef/sr_rs.ut...@latin.src
  stable/12/share/colldef/sv_SE.UTF-8.src
  stable/12/share/colldef/tr_TR.UTF-8.src
  stable/12/share/colldef/uk_UA.UTF-8.src
  stable/12/share/colldef/zh_CN.GB18030.src
  stable/12/share/colldef/zh_CN.GB2312.src
  stable/12/share/colldef/zh_CN.GBK.src
  stable/12/share/colldef/zh_CN.UTF-8.src
  stable/12/share/colldef/zh_CN.eucCN.src
  stable/12/share/colldef/zh_TW.Big5.src
  stable/12/share/colldef/zh_TW.UTF-8.src
  stable/12/share/ctypedef/Makefile
  stable/12/share/ctypedef/ca_IT.ISO8859-1.src
  stable/12/share/ctypedef/en_US.ISO8859-1.src
  stable/12/share/ctypedef/hi_IN.ISCII-DEV.src
  stable/12/share/ctypedef/hy_AM.ARMSCII-8.src
  stable/12/share/ctypedef/ja_JP.eucJP.src
  stable/12/share/ctypedef/zh_CN.eucCN.src
  stable/12/share/monetdef/Makefile
  stable/12/share/monetdef/fr_CH.UTF-8.src
  stable/12/share/monetdef/hy_AM.ARMSCII-8.src
  stable/12/share/monetdef/hy_AM.UTF-8.src
  stable/12/share/monetdef/mn_MN.UTF-8.src
  stable/12/share/monetdef/nl_BE.ISO8859-15.src
  stable/12/share/monetdef/nl_BE.UTF-8.src
  stable/12/share/numericdef/Makefile
  stable/12/tools/tools/locale/Makefile
  stable/12/tools/tools/locale/etc/charmaps.xml
  stable/12/tools/tools/locale/etc/final-maps/map.UTF-8
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/colldef/af_ZA.UTF-8.src
==
--- stable/12/share/colldef/af_ZA.UTF-8.src Thu Dec  6 09:45:25 2018
(r341624)
+++ stable/12/share/colldef/af_ZA.UTF-8.src Thu Dec  6 09:47:23 2018
(r341625)
@@ -60,6 +60,7 @@ collating-symbol 
 collating-symbol 
 collating-symbol 
 collating-symbol 
+collating-symbol 
 collating-symbol 
 collating-symbol 
 collating-symbol 
@@ -70,431 +71,433 @@ collating-symbol 
 collating-symbol 
 collating-symbol 
 collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
-collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
+collating-symbol 
 collating-symbol 
-collating-symbol 
-collating-symbol 

svn commit: r341624 - head/sys/dev/netmap

2018-12-06 Thread Vincenzo Maffione
Author: vmaffione
Date: Thu Dec  6 09:45:25 2018
New Revision: 341624
URL: https://svnweb.freebsd.org/changeset/base/341624

Log:
  netmap: netmap_transmit should honor bpf packet tap hook
  
  This allows tcpdump to capture outbound kernel packets while
  in netmap mode
  
  Submitted by: Marc de la Gueronniere 
  Reviewed by:  vmaffione
  MFC after:1 week
  Sponsored by: Verisign, Inc.
  Differential Revision:https://reviews.freebsd.org/D17896

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

Modified: head/sys/dev/netmap/netmap.c
==
--- head/sys/dev/netmap/netmap.cThu Dec  6 09:22:35 2018
(r341623)
+++ head/sys/dev/netmap/netmap.cThu Dec  6 09:45:25 2018
(r341624)
@@ -449,6 +449,7 @@ ports attached to the switch)
 #include/* bus_dmamap_* */
 #include 
 #include 
+#include   /* ETHER_BPF_MTAP */
 
 
 #elif defined(linux)
@@ -3859,6 +3860,10 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m)
RD(1, "%s drop mbuf that needs generic segmentation offload", 
na->name);
goto done;
}
+
+#ifdef __FreeBSD__
+   ETHER_BPF_MTAP(ifp, m);
+#endif /* __FreeBSD__ */
 
/* protect against netmap_rxsync_from_host(), netmap_sw_to_nic()
 * and maybe other instances of netmap_transmit (the latter
___
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: r341623 - in head: tests/sys/kqueue/libkqueue usr.bin/procstat/tests

2018-12-06 Thread Li-Wen Hsu
Author: lwhsu
Date: Thu Dec  6 09:22:35 2018
New Revision: 341623
URL: https://svnweb.freebsd.org/changeset/base/341623

Log:
  Temporarily skip flakey test cases
  
  PR:   233586, 233587, 233588
  Approved by:  markj (mentor)
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D18362

Modified:
  head/tests/sys/kqueue/libkqueue/kqueue_test.sh
  head/usr.bin/procstat/tests/procstat_test.sh

Modified: head/tests/sys/kqueue/libkqueue/kqueue_test.sh
==
--- head/tests/sys/kqueue/libkqueue/kqueue_test.sh  Thu Dec  6 08:27:56 
2018(r341622)
+++ head/tests/sys/kqueue/libkqueue/kqueue_test.sh  Thu Dec  6 09:22:35 
2018(r341623)
@@ -2,7 +2,8 @@
 # $FreeBSD$
 
 i=1
-"$(dirname $0)/kqtest" | while read line; do
+# Temporarily disable evfilt_proc tests: https://bugs.freebsd.org/233586
+"$(dirname $0)/kqtest" --no-proc | while read line; do
echo $line | grep -q passed
if [ $? -eq 0 ]; then
echo "ok - $i $line"

Modified: head/usr.bin/procstat/tests/procstat_test.sh
==
--- head/usr.bin/procstat/tests/procstat_test.shThu Dec  6 08:27:56 
2018(r341622)
+++ head/usr.bin/procstat/tests/procstat_test.shThu Dec  6 09:22:35 
2018(r341623)
@@ -79,6 +79,8 @@ command_line_arguments_head()
 }
 command_line_arguments_body()
 {
+   atf_skip "https://bugs.freebsd.org/233587;
+
arguments="my arguments"
 
start_program $arguments
@@ -103,6 +105,8 @@ environment_head()
 }
 environment_body()
 {
+   atf_skip "https://bugs.freebsd.org/233588;
+
var="MY_VARIABLE=foo"
eval "export $var"
 
___
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: r341505 - head/share/man/man5

2018-12-06 Thread Alexey Dokuchaev
On Wed, Dec 05, 2018 at 01:46:54PM -0500, Pedro Giffuni wrote:
> On 05/12/2018 12:41, Conrad Meyer wrote:
> > The Linux model is that the current incarnation of the ext2/3/4 driver
> > is named "ext4," and that's what Linux users expect.  You can mount
> > any ext2/3/4 filesystem with the Linux ext4 driver.  For ext4, it was
> > a result of wanting to keep ext3 stable while developing ext4 in-tree.
> > (For a while, it was called "ext4dev").  ext4 is long-since stabilized
> > and ext3 became fully redundant with ext4, so I guess they dropped it.
> 
>  From a linux user/marketing perspective you are right.
> 
> Are we sure there will never be an ext5fs? I would hate to start moving
> a filesystem in the tree every time a new release comes out.

+1.  I really hate it how Linux stirs things around, including naming,
and I'd advise against it.  Current name is fine; update the manpage and
move on.  We do expect our users to read documentation, don't we?

./danfe
___
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: r341622 - stable/11/usr.sbin/nfsd

2018-12-06 Thread Baptiste Daroussin
Author: bapt
Date: Thu Dec  6 08:27:56 2018
New Revision: 341622
URL: https://svnweb.freebsd.org/changeset/base/341622

Log:
  MFC r340111:
  
  nfsd: Factorize code
  
  Factorize code by using struct sockaddr_storage to handle both ipv6 and ipv4
  
  Discussed with: rmacklem
  Reviewed by: manu
  Sponsored by: Gandi.net
  Differential Revision: https://reviews.freebsd.org/D13223

Modified:
  stable/11/usr.sbin/nfsd/nfsd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/nfsd/nfsd.c
==
--- stable/11/usr.sbin/nfsd/nfsd.c  Thu Dec  6 08:27:30 2018
(r341621)
+++ stable/11/usr.sbin/nfsd/nfsd.c  Thu Dec  6 08:27:56 2018
(r341622)
@@ -149,10 +149,8 @@ main(int argc, char **argv)
struct addrinfo *ai_udp, *ai_tcp, *ai_udp6, *ai_tcp6, hints;
struct netconfig *nconf_udp, *nconf_tcp, *nconf_udp6, *nconf_tcp6;
struct netbuf nb_udp, nb_tcp, nb_udp6, nb_tcp6;
-   struct sockaddr_in inetpeer;
-   struct sockaddr_in6 inet6peer;
+   struct sockaddr_storage peer;
fd_set ready, sockbits;
-   fd_set v4bits, v6bits;
int ch, connect_type_cnt, i, maxsock, msgsock;
socklen_t len;
int on = 1, unregister, reregister, sock;
@@ -450,8 +448,6 @@ main(int argc, char **argv)
}
 
(void)signal(SIGUSR1, cleanup);
-   FD_ZERO();
-   FD_ZERO();
FD_ZERO();
  
rpcbregcnt = 0;
@@ -633,7 +629,6 @@ main(int argc, char **argv)
}
freeaddrinfo(ai_tcp);
FD_SET(tcpsock, );
-   FD_SET(tcpsock, ); 
maxsock = tcpsock;
connect_type_cnt++;
}
@@ -712,7 +707,6 @@ main(int argc, char **argv)
}
freeaddrinfo(ai_tcp6);
FD_SET(tcp6sock, );
-   FD_SET(tcp6sock, );
if (maxsock < tcp6sock)
maxsock = tcp6sock;
connect_type_cnt++;
@@ -786,52 +780,25 @@ main(int argc, char **argv)
}
for (tcpsock = 0; tcpsock <= maxsock; tcpsock++) {
if (FD_ISSET(tcpsock, )) {
-   if (FD_ISSET(tcpsock, )) {
-   len = sizeof(inetpeer);
-   if ((msgsock = accept(tcpsock,
-   (struct sockaddr *), 
)) < 0) {
-   error = errno;
-   syslog(LOG_ERR, "accept failed: 
%m");
-   if (error == ECONNABORTED ||
-   error == EINTR)
-   continue;
-   nfsd_exit(1);
-   }
-   memset(inetpeer.sin_zero, 0,
-   sizeof(inetpeer.sin_zero));
-   if (setsockopt(msgsock, SOL_SOCKET,
-   SO_KEEPALIVE, (char *), 
sizeof(on)) < 0)
-   syslog(LOG_ERR,
-   "setsockopt SO_KEEPALIVE: 
%m");
-   addsockargs.sock = msgsock;
-   addsockargs.name = (caddr_t)
-   addsockargs.namelen = len;
-   nfssvc(nfssvc_addsock, );
-   (void)close(msgsock);
-   } else if (FD_ISSET(tcpsock, )) {
-   len = sizeof(inet6peer);
-   if ((msgsock = accept(tcpsock,
-   (struct sockaddr *),
-   )) < 0) {
-   error = errno;
-   syslog(LOG_ERR,
-"accept failed: %m");
-   if (error == ECONNABORTED ||
-   error == EINTR)
-   continue;
-   nfsd_exit(1);
-   }
-   if (setsockopt(msgsock, SOL_SOCKET,
-   SO_KEEPALIVE, (char *),
-

svn commit: r341621 - stable/12/usr.sbin/nfsd

2018-12-06 Thread Baptiste Daroussin
Author: bapt
Date: Thu Dec  6 08:27:30 2018
New Revision: 341621
URL: https://svnweb.freebsd.org/changeset/base/341621

Log:
  MFC r340111:
  
  nfsd: Factorize code
  
  Factorize code by using struct sockaddr_storage to handle both ipv6 and ipv4
  
  Discussed with: rmacklem
  Reviewed by: manu
  Sponsored by: Gandi.net
  Differential Revision: https://reviews.freebsd.org/D13223

Modified:
  stable/12/usr.sbin/nfsd/nfsd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/nfsd/nfsd.c
==
--- stable/12/usr.sbin/nfsd/nfsd.c  Thu Dec  6 06:18:21 2018
(r341620)
+++ stable/12/usr.sbin/nfsd/nfsd.c  Thu Dec  6 08:27:30 2018
(r341621)
@@ -160,10 +160,8 @@ main(int argc, char **argv)
struct addrinfo *ai_udp, *ai_tcp, *ai_udp6, *ai_tcp6, hints;
struct netconfig *nconf_udp, *nconf_tcp, *nconf_udp6, *nconf_tcp6;
struct netbuf nb_udp, nb_tcp, nb_udp6, nb_tcp6;
-   struct sockaddr_in inetpeer;
-   struct sockaddr_in6 inet6peer;
+   struct sockaddr_storage peer;
fd_set ready, sockbits;
-   fd_set v4bits, v6bits;
int ch, connect_type_cnt, i, maxsock, msgsock;
socklen_t len;
int on = 1, unregister, reregister, sock;
@@ -480,8 +478,6 @@ main(int argc, char **argv)
}
 
(void)signal(SIGUSR1, cleanup);
-   FD_ZERO();
-   FD_ZERO();
FD_ZERO();
  
rpcbregcnt = 0;
@@ -663,7 +659,6 @@ main(int argc, char **argv)
}
freeaddrinfo(ai_tcp);
FD_SET(tcpsock, );
-   FD_SET(tcpsock, ); 
maxsock = tcpsock;
connect_type_cnt++;
}
@@ -742,7 +737,6 @@ main(int argc, char **argv)
}
freeaddrinfo(ai_tcp6);
FD_SET(tcp6sock, );
-   FD_SET(tcp6sock, );
if (maxsock < tcp6sock)
maxsock = tcp6sock;
connect_type_cnt++;
@@ -816,52 +810,25 @@ main(int argc, char **argv)
}
for (tcpsock = 0; tcpsock <= maxsock; tcpsock++) {
if (FD_ISSET(tcpsock, )) {
-   if (FD_ISSET(tcpsock, )) {
-   len = sizeof(inetpeer);
-   if ((msgsock = accept(tcpsock,
-   (struct sockaddr *), 
)) < 0) {
-   error = errno;
-   syslog(LOG_ERR, "accept failed: 
%m");
-   if (error == ECONNABORTED ||
-   error == EINTR)
-   continue;
-   nfsd_exit(1);
-   }
-   memset(inetpeer.sin_zero, 0,
-   sizeof(inetpeer.sin_zero));
-   if (setsockopt(msgsock, SOL_SOCKET,
-   SO_KEEPALIVE, (char *), 
sizeof(on)) < 0)
-   syslog(LOG_ERR,
-   "setsockopt SO_KEEPALIVE: 
%m");
-   addsockargs.sock = msgsock;
-   addsockargs.name = (caddr_t)
-   addsockargs.namelen = len;
-   nfssvc(nfssvc_addsock, );
-   (void)close(msgsock);
-   } else if (FD_ISSET(tcpsock, )) {
-   len = sizeof(inet6peer);
-   if ((msgsock = accept(tcpsock,
-   (struct sockaddr *),
-   )) < 0) {
-   error = errno;
-   syslog(LOG_ERR,
-"accept failed: %m");
-   if (error == ECONNABORTED ||
-   error == EINTR)
-   continue;
-   nfsd_exit(1);
-   }
-   if (setsockopt(msgsock, SOL_SOCKET,
-   SO_KEEPALIVE, (char *),
-