Re: svn commit: r332510 - in head: usr.bin/wall usr.sbin/syslogd

2018-04-16 Thread Pintér , Olivér
On Sun, Apr 15, 2018 at 10:34 AM, Ed Schouten  wrote:

> Author: ed
> Date: Sun Apr 15 08:34:16 2018
> New Revision: 332510
> URL: https://svnweb.freebsd.org/changeset/base/332510
>
> Log:
>   Add RFC 5424 syslog message output to syslogd.
>
>   - Move all of the code responsible for transmitting log messages into a
> separate function, fprintlog_write().
>   - Instead of manually modifying a list of iovecs, add a structure
> iovlist with some helper functions.
>   - Alter the F_FORW (UDP message forwarding) case to also use iovecs like
> the other cases. Use sendmsg() instead of sendto().
>   - In the case of F_FORW, truncate the message to a size dependent on the
> address family (AF_INET, AF_INET6), as proposed by RFC 5426.
>   - Move all traditional message formatting into fprintlog_bsd(). Get rid
> of some of the string copying and snprintf()'ing. Simply emit more
> iovecs to get the job done.
>   - Increase ttymsg()'s limit of 7 iovecs to 32. Add a definition for this
> limit, so it can be reused by iovlist.
>   - Add fprintlog_rfc5424() to emit RFC 5424 formatted log entries.
>   - Add a "-O" command line option to enable RFC 5424 formatting. It would
> have been nicer if we supported "-o rfc5424", just like on NetBSD.
> Unfortunately, the "-o" flag is already used for a different purpose
> on FreeBSD.
>   - Don't truncate hostnames in the RFC 5424 case, as suggested by that
> specific RFC.
>
>   For people interested in using this, this feature can be enabled by
>   adding the following line to /etc/rc.conf:
>
> syslogd_flags="-s -O rfc5424"
>
>   Differential Revision:https://reviews.freebsd.org/D15011

Release notes: yes

>
>
> Modified:
>   head/usr.bin/wall/ttymsg.c
>   head/usr.bin/wall/ttymsg.h
>   head/usr.sbin/syslogd/syslogd.8
>   head/usr.sbin/syslogd/syslogd.c
>
> Modified: head/usr.bin/wall/ttymsg.c
> 
> ==
> --- head/usr.bin/wall/ttymsg.c  Sat Apr 14 22:14:18 2018(r332509)
> +++ head/usr.bin/wall/ttymsg.c  Sun Apr 15 08:34:16 2018(r332510)
> @@ -61,7 +61,7 @@ static const char sccsid[] = "@(#)ttymsg.c8.2 (Berkel
>  const char *
>  ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout)
>  {
> -   struct iovec localiov[7];
> +   struct iovec localiov[TTYMSG_IOV_MAX];
> ssize_t left, wret;
> int cnt, fd;
> char device[MAXNAMLEN] = _PATH_DEV;
>
> Modified: head/usr.bin/wall/ttymsg.h
> 
> ==
> --- head/usr.bin/wall/ttymsg.h  Sat Apr 14 22:14:18 2018(r332509)
> +++ head/usr.bin/wall/ttymsg.h  Sun Apr 15 08:34:16 2018(r332510)
> @@ -1,3 +1,5 @@
>  /* $FreeBSD$ */
>
> +#defineTTYMSG_IOV_MAX  32
> +
>  const char *ttymsg(struct iovec *, int, const char *, int);
>
> Modified: head/usr.sbin/syslogd/syslogd.8
> 
> ==
> --- head/usr.sbin/syslogd/syslogd.8 Sat Apr 14 22:14:18 2018
> (r332509)
> +++ head/usr.sbin/syslogd/syslogd.8 Sun Apr 15 08:34:16 2018
> (r332510)
> @@ -28,7 +28,7 @@
>  .\" @(#)syslogd.8  8.1 (Berkeley) 6/6/93
>  .\" $FreeBSD$
>  .\"
> -.Dd November 28, 2017
> +.Dd April 9, 2018
>  .Dt SYSLOGD 8
>  .Os
>  .Sh NAME
> @@ -42,6 +42,7 @@
>  .Op Fl f Ar config_file
>  .Op Fl l Oo Ar mode Ns \&: Oc Ns Ar path
>  .Op Fl m Ar mark_interval
> +.Op Fl O Ar format
>  .Op Fl P Ar pid_file
>  .Op Fl p Ar log_socket
>  .Op Fl S Ar logpriv_socket
> @@ -242,6 +243,20 @@ Usually the
>  .Dq kern
>  facility is reserved for messages read directly from
>  .Pa /dev/klog .
> +.It Fl O Ar format
> +Select the output format of generated log messages.
> +The values
> +.Ar bsd
> +and
> +.Ar rfc3164
> +are used to generate RFC 3164 log messages.
> +The values
> +.Ar syslog
> +and
> +.Ar rfc5424
> +are used to generate RFC 5424 log messages,
> +having RFC 3339 timestamps with microsecond precision.
> +The default is to generate RFC 3164 log messages.
>  .It Fl m Ar mark_interval
>  Select the number of minutes between
>  .Dq mark
>
> Modified: head/usr.sbin/syslogd/syslogd.c
> 
> ==
> --- head/usr.sbin/syslogd/syslogd.c Sat Apr 14 22:14:18 2018
> (r332509)
> +++ head/usr.sbin/syslogd/syslogd.c Sun Apr 15 08:34:16 2018
> (r332510)
> @@ -136,6 +136,7 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -367,9 +368,12 @@ static int KeepKernFac;/* Keep remotely logged
> kernel
>  static int needdofsync = 0; /* Are any file(s) waiting to be fsynced?
> */
>  static struct pidfh *pfh;
>  static int sigpipe[2]; /* Pipe to catch a signal during select().
> */
> +static boolRFC3164OutputFormat = true; /* Use legacy format by
> default. */
>
>  static volatile sig_atom

Re: svn commit: r324038 - in head/sys: dev/bnxt dev/drm dev/drm2/i915 dev/drm2/radeon dev/e1000 net

2017-09-27 Thread Pintér , Olivér
On Wed, Sep 27, 2017 at 1:23 AM, Conrad Meyer  wrote:

> Author: cem
> Date: Tue Sep 26 23:23:58 2017
> New Revision: 324038
> URL: https://svnweb.freebsd.org/changeset/base/324038
>
> Log:
>   Add PNP metadata to more drivers
>
>   GPUs: radeonkms, i915kms
>   NICs: if_em, if_igb, if_bnxt
>
>   This metadata isn't used yet, but it will be handy to have later to
>   implement automatic module loading.
>
>   Reviewed by:  imp, mmacy
>   Sponsored by: Dell EMC Isilon
>   Differential Revision:https://reviews.freebsd.org/D12488
>
> Modified:
>   head/sys/dev/bnxt/if_bnxt.c
>   head/sys/dev/drm/drmP.h
>   head/sys/dev/drm2/i915/i915_drv.c
>   head/sys/dev/drm2/radeon/radeon_drv.c
>   head/sys/dev/e1000/if_em.c
>   head/sys/net/iflib.h
>
> Modified: head/sys/dev/bnxt/if_bnxt.c
> 
> ==
> --- head/sys/dev/bnxt/if_bnxt.c Tue Sep 26 23:12:32 2017(r324037)
> +++ head/sys/dev/bnxt/if_bnxt.c Tue Sep 26 23:23:58 2017(r324038)
> @@ -243,6 +243,8 @@ MODULE_DEPEND(bnxt, pci, 1, 1, 1);
>  MODULE_DEPEND(bnxt, ether, 1, 1, 1);
>  MODULE_DEPEND(bnxt, iflib, 1, 1, 1);
>
> +IFLIB_PNP_INFO(pci, bnxt, bnxt_vendor_info_array);
> +
>  static device_method_t bnxt_iflib_methods[] = {
> DEVMETHOD(ifdi_tx_queues_alloc, bnxt_tx_queues_alloc),
> DEVMETHOD(ifdi_rx_queues_alloc, bnxt_rx_queues_alloc),
>
> Modified: head/sys/dev/drm/drmP.h
> 
> ==
> --- head/sys/dev/drm/drmP.h Tue Sep 26 23:12:32 2017(r324037)
> +++ head/sys/dev/drm/drmP.h Tue Sep 26 23:23:58 2017(r324038)
> @@ -321,7 +321,7 @@ typedef struct drm_pci_id_list
>  {
> int vendor;
> int device;
> -   long driver_private;
> +   intptr_t driver_private;
> char *name;
>  } drm_pci_id_list_t;
>
>
> Modified: head/sys/dev/drm2/i915/i915_drv.c
> 
> ==
> --- head/sys/dev/drm2/i915/i915_drv.c   Tue Sep 26 23:12:32 2017
> (r324037)
> +++ head/sys/dev/drm2/i915/i915_drv.c   Tue Sep 26 23:23:58 2017
> (r324038)
> @@ -1236,6 +1236,8 @@ MODULE_DEPEND(i915kms, agp, 1, 1, 1);
>  MODULE_DEPEND(i915kms, iicbus, 1, 1, 1);
>  MODULE_DEPEND(i915kms, iic, 1, 1, 1);
>  MODULE_DEPEND(i915kms, iicbb, 1, 1, 1);
> +MODULE_PNP_INFO("U32:vendor;U32:device;P;D:human", vgapci, i915,
> pciidlist,
> +sizeof(pciidlist[0]), nitems(pciidlist));
>
>  /* We give fast paths for the really cool registers */
>  #define NEEDS_FORCE_WAKE(dev_priv, reg) \
>
> Modified: head/sys/dev/drm2/radeon/radeon_drv.c
> 
> ==
> --- head/sys/dev/drm2/radeon/radeon_drv.c   Tue Sep 26 23:12:32 2017
>   (r324037)
> +++ head/sys/dev/drm2/radeon/radeon_drv.c   Tue Sep 26 23:23:58 2017
>   (r324038)
> @@ -401,3 +401,5 @@ MODULE_DEPEND(radeonkms, iicbus, 1, 1, 1);
>  MODULE_DEPEND(radeonkms, iic, 1, 1, 1);
>  MODULE_DEPEND(radeonkms, iicbb, 1, 1, 1);
>  MODULE_DEPEND(radeonkms, firmware, 1, 1, 1);
> +MODULE_PNP_INFO("U32:vendor;U32:device;P;D:human", vgapci, radeonkms,
> +pciidlist, sizeof(pciidlist[0]), nitems(pciidlist));
>
> Modified: head/sys/dev/e1000/if_em.c
> 
> ==
> --- head/sys/dev/e1000/if_em.c  Tue Sep 26 23:12:32 2017(r324037)
> +++ head/sys/dev/e1000/if_em.c  Tue Sep 26 23:23:58 2017(r324038)
> @@ -339,6 +339,8 @@ MODULE_DEPEND(em, pci, 1, 1, 1);
>  MODULE_DEPEND(em, ether, 1, 1, 1);
>  MODULE_DEPEND(em, iflib, 1, 1, 1);
>
> +IFLIB_PNP_INFO(pci, em, em_vendor_info_array);
> +
>  static driver_t igb_driver = {
> "igb", igb_methods, sizeof(struct adapter),
>  };
> @@ -350,6 +352,7 @@ MODULE_DEPEND(igb, pci, 1, 1, 1);
>  MODULE_DEPEND(igb, ether, 1, 1, 1);
>  MODULE_DEPEND(igb, iflib, 1, 1, 1);
>
> +IFLIB_PNP_INFO(pci, igb, igb_vendor_info_array);
>
>  static device_method_t em_if_methods[] = {
> DEVMETHOD(ifdi_attach_pre, em_if_attach_pre),
>
> Modified: head/sys/net/iflib.h
> 
> ==
> --- head/sys/net/iflib.hTue Sep 26 23:12:32 2017(r324037)
> +++ head/sys/net/iflib.hTue Sep 26 23:23:58 2017(r324038)
> @@ -173,6 +173,11 @@ typedef struct pci_vendor_info {
>  #define PVID_OEM(vendor, devid, svid, sdevid, revid, name) {vendor,
> devid, svid, sdevid, revid, 0, name}
>  #define PVID_END {0, 0, 0, 0, 0, 0, NULL}
>
> +#define IFLIB_PNP_DESCR "U32:vendor;U32:device;U32:subvendor;U32:subdevice;"
> \
> +"U32:revision;U32:class;D:human"
>
This will be MODULE_PNP_INFO.



> +#define IFLIB_PNP_INFO(b, u, t) \
> +MODULE_PNP_INFO(IFLIB_PNP_DESCR, b, u, t, sizeof(t[0]), nitems(t))
>
And this IFLIB_PNP_DESCR.


> +
>  typedef struct if_txrx {
> int (*ift_txd_encap) (void *, if_pkt_info_t);
> v

Re: svn commit: r299678 - head/sys/x86/x86

2016-05-13 Thread Pintér , Olivér
On Fri, May 13, 2016 at 5:16 PM, Ed Maste  wrote:

> On 13 May 2016 at 11:11, Bjoern A. Zeeb  wrote:
> > Author: bz
> > Date: Fri May 13 15:11:17 2016
> > New Revision: 299678
> > URL: https://svnweb.freebsd.org/changeset/base/299678
> >
> ...
> > -SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD,
> &workaround_erratum383, 0,
> > +SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD|CTLFLAG_RDTUN,
> > +&workaround_erratum383, 0,
>
> Note that CTLFLAG_RDTUN is already (CTLFLAG_RD|CTLFLAG_TUN) so there's
> no need for CTLFLAG_RD
>

Fix me, but this only true for 11-CURRENT, and not for older releases.

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