svn commit: r362186 - head/sys/dev/virtio/network
Author: jrtc27 Date: Sun Jun 14 22:39:34 2020 New Revision: 362186 URL: https://svnweb.freebsd.org/changeset/base/362186 Log: vtnet: Fix regression introduced in r361944 For legacy devices that don't support MrgRxBuf (such as bhyve pre-r358180), r361944 failed to update the receive handler to account for the additional padding introduced by the unused num_buffers field that is now always present in struct vtnet_rx_header. Thus, calculate the padding dynamically based on vtnet_hdr_size. PR: 247242 Reported by: thj Tested by:thj Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c == --- head/sys/dev/virtio/network/if_vtnet.c Sun Jun 14 21:07:12 2020 (r362185) +++ head/sys/dev/virtio/network/if_vtnet.c Sun Jun 14 22:39:34 2020 (r362186) @@ -1819,9 +1819,10 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) adjsz = sizeof(struct vtnet_rx_header); /* * Account for our pad inserted between the header -* and the actual start of the frame. +* and the actual start of the frame. This includes +* the unused num_buffers when using a legacy device. */ - len += VTNET_RX_HEADER_PAD; + len += adjsz - sc->vtnet_hdr_size; } else { mhdr = mtod(m, struct virtio_net_hdr_mrg_rxbuf *); nbufs = mhdr->num_buffers; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r361944 - in head/sys/dev/virtio: . network
On 14 Jun 2020, at 22:22, Tom Jones wrote: > On Sun, Jun 14, 2020 at 09:56:03PM +0100, Jessica Clarke wrote: >> On 14 Jun 2020, at 20:51, Tom Jones wrote: >>> On Mon, Jun 08, 2020 at 09:51:36PM +, Jessica Clarke wrote: Author: jrtc27 Date: Mon Jun 8 21:51:36 2020 New Revision: 361944 URL: https://svnweb.freebsd.org/changeset/base/361944 Log: virtio: Support non-legacy network device and queue The non-legacy interface always defines num_buffers in the header, regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused. We also need to ensure our virtqueue doesn't filter out VIRTIO_F_VERSION_1 during negotiation, as it supports non-legacy transports just fine. This fixes network packet transmission on TinyEMU. Reviewed by: br, brooks (mentor), jhb (mentor) Approved by: br, brooks (mentor), jhb (mentor) Differential Revision: https://reviews.freebsd.org/D25132 Modified: head/sys/dev/virtio/network/if_vtnet.c head/sys/dev/virtio/network/if_vtnetvar.h head/sys/dev/virtio/virtio.c head/sys/dev/virtio/virtqueue.c >>> >>> Hi Jessica, >>> >>> After updating my current bhyve vm today (on a 12.1 host), networking no >>> longer >>> works. Reverting this commit seems to resolve the issue. I think vtnet is >>> not >>> passing enough data up to the ip layer. >>> >>> If I capture on the tap interface for the vm I see arp requests and arp >>> replies, however kern.msgbuf is full of: >>> >>> <5>arp: short packet received on vtnet0 >>> >>> and netstat does not see any replies to arp requests: >>> >>> root@freebsd-current:~ # netstat -s -p arp >>> arp: >>> 11 ARP requests sent >>> 0 ARP requests failed to sent >>> 0 ARP replies sent >>> 0 ARP requests received >>> 0 ARP replies received >>> 0 ARP packets received >>> 24 total packets dropped due to no ARP entry >>> 2 ARP entrys timed out >>> 0 Duplicate IPs seen >>> >>> If I set up an arp entry manually I can see ICMP echo requests and >>> responses on >>> the tap interface, but the vm does not see the responses. >>> >>> root@freebsd-current:~ # netstat -s -p ip >>> ip: >>> 7 total packets received >>> 0 bad header checksums >>> 0 with size smaller than minimum >>> 7 with data size < data length >>> 0 with ip length > max ip packet size >>> 0 with header length < data size >>> 0 with data length < header length >>> >>> The line >>> >>> 7 with data size < data length >>> >>> makes me think that vtnet is truncating packets. >>> >>> markj pointed me at this bug in irc which might also be related: >>> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247242 >> >> Hi Tom, >> Sorry about that; it seems bhyve hits the "legacy and no MrgRxBuf" >> case. Could you please try the patch below? >> >> Jess >> > > This changed fixed the issue for me. Please feel free to add > > Tested By: thj > > when you commit. Great, thanks for the report. > In testing I this lor went by, I wonder if this is something you care about: > > acquiring duplicate lock of same type: "vtnet0-rx0" > 1st vtnet0-rx0 @ > /usr/home/tj/code/freebsd/projects/review-D25220/sys/dev/virtio/network/if_vtnet.c:1780 > 2nd vtnet0-rx0 @ > /usr/home/tj/code/freebsd/projects/review-D25220/sys/kern/subr_taskqueue.c:281 > stack backtrace: > #0 0x80c32881 at witness_debugger+0x71 > #1 0x80ba3e54 at __mtx_lock_flags+0x94 > #2 0x80c24bd2 at taskqueue_enqueue+0x42 > #3 0x80a1af99 at vtnet_rxq_tq_intr+0xb9 > #4 0x80c2520a at taskqueue_run_locked+0xaa > #5 0x80c26284 at taskqueue_thread_loop+0x94 > #6 0x80b830e0 at fork_exit+0x80 > #7 0x81040eae at fork_trampoline+0xe Hm, I think that's just a false-positive, because if_vtnet constructs the taskqueue using the same name as its own internal mutexes. Though the locking around vtnet_rx_vq_intr and vtnet_rxq_tq_intr is a bit fishy given they're rather similar yet inconsistent. I would imagine rxq->vtnrx_stats.vrxs_rescheduled is supposed to be protected by that mutex, but wouldn't like to say whether taskqueue_enqueue needs to be. Vincenzo, you recently touched code around there, perhaps you could be persuaded to have a quick look?.. Jess ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r361944 - in head/sys/dev/virtio: . network
On Sun, Jun 14, 2020 at 09:56:03PM +0100, Jessica Clarke wrote: > On 14 Jun 2020, at 20:51, Tom Jones wrote: > > On Mon, Jun 08, 2020 at 09:51:36PM +, Jessica Clarke wrote: > >> Author: jrtc27 > >> Date: Mon Jun 8 21:51:36 2020 > >> New Revision: 361944 > >> URL: https://svnweb.freebsd.org/changeset/base/361944 > >> > >> Log: > >> virtio: Support non-legacy network device and queue > >> > >> The non-legacy interface always defines num_buffers in the header, > >> regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused. We > >> also need to ensure our virtqueue doesn't filter out VIRTIO_F_VERSION_1 > >> during negotiation, as it supports non-legacy transports just fine. This > >> fixes network packet transmission on TinyEMU. > >> > >> Reviewed by: br, brooks (mentor), jhb (mentor) > >> Approved by: br, brooks (mentor), jhb (mentor) > >> Differential Revision:https://reviews.freebsd.org/D25132 > >> > >> Modified: > >> head/sys/dev/virtio/network/if_vtnet.c > >> head/sys/dev/virtio/network/if_vtnetvar.h > >> head/sys/dev/virtio/virtio.c > >> head/sys/dev/virtio/virtqueue.c > >> > > > > Hi Jessica, > > > > After updating my current bhyve vm today (on a 12.1 host), networking no > > longer > > works. Reverting this commit seems to resolve the issue. I think vtnet is > > not > > passing enough data up to the ip layer. > > > > If I capture on the tap interface for the vm I see arp requests and arp > > replies, however kern.msgbuf is full of: > > > > <5>arp: short packet received on vtnet0 > > > > and netstat does not see any replies to arp requests: > > > > root@freebsd-current:~ # netstat -s -p arp > > arp: > >11 ARP requests sent > >0 ARP requests failed to sent > >0 ARP replies sent > >0 ARP requests received > >0 ARP replies received > >0 ARP packets received > >24 total packets dropped due to no ARP entry > >2 ARP entrys timed out > >0 Duplicate IPs seen > > > > If I set up an arp entry manually I can see ICMP echo requests and > > responses on > > the tap interface, but the vm does not see the responses. > > > > root@freebsd-current:~ # netstat -s -p ip > > ip: > >7 total packets received > >0 bad header checksums > >0 with size smaller than minimum > >7 with data size < data length > >0 with ip length > max ip packet size > >0 with header length < data size > >0 with data length < header length > > > > The line > > > >7 with data size < data length > > > > makes me think that vtnet is truncating packets. > > > > markj pointed me at this bug in irc which might also be related: > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247242 > > Hi Tom, > Sorry about that; it seems bhyve hits the "legacy and no MrgRxBuf" > case. Could you please try the patch below? > > Jess > This changed fixed the issue for me. Please feel free to add Tested By: thj when you commit. In testing I this lor went by, I wonder if this is something you care about: acquiring duplicate lock of same type: "vtnet0-rx0" 1st vtnet0-rx0 @ /usr/home/tj/code/freebsd/projects/review-D25220/sys/dev/virtio/network/if_vtnet.c:1780 2nd vtnet0-rx0 @ /usr/home/tj/code/freebsd/projects/review-D25220/sys/kern/subr_taskqueue.c:281 stack backtrace: #0 0x80c32881 at witness_debugger+0x71 #1 0x80ba3e54 at __mtx_lock_flags+0x94 #2 0x80c24bd2 at taskqueue_enqueue+0x42 #3 0x80a1af99 at vtnet_rxq_tq_intr+0xb9 #4 0x80c2520a at taskqueue_run_locked+0xaa #5 0x80c26284 at taskqueue_thread_loop+0x94 #6 0x80b830e0 at fork_exit+0x80 #7 0x81040eae at fork_trampoline+0xe - Tom ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r361944 - in head/sys/dev/virtio: . network
You may already know that, but FreeBSD-CURRENT supports mergeable rx buffers as of r358180. Cheers, Vincenzo Il giorno dom 14 giu 2020 alle ore 22:56 Jessica Clarke ha scritto: > On 14 Jun 2020, at 20:51, Tom Jones wrote: > > On Mon, Jun 08, 2020 at 09:51:36PM +, Jessica Clarke wrote: > >> Author: jrtc27 > >> Date: Mon Jun 8 21:51:36 2020 > >> New Revision: 361944 > >> URL: https://svnweb.freebsd.org/changeset/base/361944 > >> > >> Log: > >> virtio: Support non-legacy network device and queue > >> > >> The non-legacy interface always defines num_buffers in the header, > >> regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused. > We > >> also need to ensure our virtqueue doesn't filter out VIRTIO_F_VERSION_1 > >> during negotiation, as it supports non-legacy transports just fine. > This > >> fixes network packet transmission on TinyEMU. > >> > >> Reviewed by:br, brooks (mentor), jhb (mentor) > >> Approved by:br, brooks (mentor), jhb (mentor) > >> Differential Revision: https://reviews.freebsd.org/D25132 > >> > >> Modified: > >> head/sys/dev/virtio/network/if_vtnet.c > >> head/sys/dev/virtio/network/if_vtnetvar.h > >> head/sys/dev/virtio/virtio.c > >> head/sys/dev/virtio/virtqueue.c > >> > > > > Hi Jessica, > > > > After updating my current bhyve vm today (on a 12.1 host), networking no > longer > > works. Reverting this commit seems to resolve the issue. I think vtnet > is not > > passing enough data up to the ip layer. > > > > If I capture on the tap interface for the vm I see arp requests and arp > > replies, however kern.msgbuf is full of: > > > > <5>arp: short packet received on vtnet0 > > > > and netstat does not see any replies to arp requests: > > > > root@freebsd-current:~ # netstat -s -p arp > > arp: > >11 ARP requests sent > >0 ARP requests failed to sent > >0 ARP replies sent > >0 ARP requests received > >0 ARP replies received > >0 ARP packets received > >24 total packets dropped due to no ARP entry > >2 ARP entrys timed out > >0 Duplicate IPs seen > > > > If I set up an arp entry manually I can see ICMP echo requests and > responses on > > the tap interface, but the vm does not see the responses. > > > > root@freebsd-current:~ # netstat -s -p ip > > ip: > >7 total packets received > >0 bad header checksums > >0 with size smaller than minimum > >7 with data size < data length > >0 with ip length > max ip packet size > >0 with header length < data size > >0 with data length < header length > > > > The line > > > >7 with data size < data length > > > > makes me think that vtnet is truncating packets. > > > > markj pointed me at this bug in irc which might also be related: > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247242 > > Hi Tom, > Sorry about that; it seems bhyve hits the "legacy and no MrgRxBuf" > case. Could you please try the patch below? > > Jess > > diff --git a/sys/dev/virtio/network/if_vtnet.c > b/sys/dev/virtio/network/if_vtnet.c > index 7a0859cc0eb1..7e10b75f7f66 100644 > --- a/sys/dev/virtio/network/if_vtnet.c > +++ b/sys/dev/virtio/network/if_vtnet.c > @@ -1819,9 +1819,10 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) > adjsz = sizeof(struct vtnet_rx_header); > /* > * Account for our pad inserted between the header > - * and the actual start of the frame. > + * and the actual start of the frame. This includes > + * the unused num_buffers when using a legacy device. > */ > -len += VTNET_RX_HEADER_PAD; > +len += adjsz - sc->vtnet_hdr_size; > } else { > mhdr = mtod(m, struct virtio_net_hdr_mrg_rxbuf *); > nbufs = mhdr->num_buffers; > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362185 - head/sys/net
Author: vmaffione Date: Sun Jun 14 21:07:12 2020 New Revision: 362185 URL: https://svnweb.freebsd.org/changeset/base/362185 Log: iflib: netmap: enter/exit netmap mode after device stops Avoid possible race conditions by calling nm_set_native_flags() and nm_clear_native_flags() only after the device has been stopped. MFC after:1 week Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cSun Jun 14 20:57:24 2020(r362184) +++ head/sys/net/iflib.cSun Jun 14 21:07:12 2020(r362185) @@ -788,13 +788,19 @@ iflib_netmap_register(struct netmap_adapter *na, int o if (!CTX_IS_VF(ctx)) IFDI_CRCSTRIP_SET(ctx, onoff, iflib_crcstrip); - /* enable or disable flags and callbacks in na and ifp */ + iflib_stop(ctx); + + /* +* Enable (or disable) netmap flags, and intercept (or restore) +* ifp->if_transmit. This is done once the device has been stopped +* to prevent race conditions. +*/ if (onoff) { nm_set_native_flags(na); } else { nm_clear_native_flags(na); } - iflib_stop(ctx); + iflib_init_locked(ctx); IFDI_CRCSTRIP_SET(ctx, onoff, iflib_crcstrip); // XXX why twice ? status = ifp->if_drv_flags & IFF_DRV_RUNNING ? 0 : 1; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362184 - head/stand/i386/zfsboot
Author: tsoome Date: Sun Jun 14 20:57:24 2020 New Revision: 362184 URL: https://svnweb.freebsd.org/changeset/base/362184 Log: zfsboot: cstyle cleanup No functional changes intended. Sponsored by: Netflix, Klara Inc. Modified: head/stand/i386/zfsboot/zfsboot.c Modified: head/stand/i386/zfsboot/zfsboot.c == --- head/stand/i386/zfsboot/zfsboot.c Sun Jun 14 20:47:31 2020 (r362183) +++ head/stand/i386/zfsboot/zfsboot.c Sun Jun 14 20:57:24 2020 (r362184) @@ -48,20 +48,20 @@ __FBSDID("$FreeBSD$"); #include "libzfs.h" -#define ARGS 0x900 -#define NOPT 14 -#define NDEV 3 +#defineARGS0x900 +#defineNOPT14 +#defineNDEV3 -#define BIOS_NUMDRIVES 0x475 -#define DRV_HARD 0x80 -#define DRV_MASK 0x7f +#defineBIOS_NUMDRIVES 0x475 +#defineDRV_HARD0x80 +#defineDRV_MASK0x7f -#define TYPE_AD0 -#define TYPE_DA1 -#define TYPE_MAXHARD TYPE_DA -#define TYPE_FD2 +#defineTYPE_AD 0 +#defineTYPE_DA 1 +#defineTYPE_MAXHARDTYPE_DA +#defineTYPE_FD 2 -#define DEV_GELIBOOT_BSIZE 4096 +#defineDEV_GELIBOOT_BSIZE 4096 extern uint32_t _end; @@ -97,12 +97,12 @@ uint32_t opts; * If no loader is found, try to load a kernel directly instead. */ static const struct string { -const char *p; -size_t len; + const char *p; + size_t len; } loadpath[] = { -{ PATH_LOADER_ZFS, sizeof(PATH_LOADER_ZFS) }, -{ PATH_LOADER, sizeof(PATH_LOADER) }, -{ PATH_KERNEL, sizeof(PATH_KERNEL) }, + { PATH_LOADER_ZFS, sizeof(PATH_LOADER_ZFS) }, + { PATH_LOADER, sizeof(PATH_LOADER) }, + { PATH_KERNEL, sizeof(PATH_KERNEL) }, }; static const unsigned char dev_maj[NDEV] = {30, 4, 2}; @@ -130,7 +130,7 @@ static char *heap_next; static char *heap_end; /* Buffers that must not span a 64k boundary. */ -#define READ_BUF_SIZE 8192 +#defineREAD_BUF_SIZE 8192 struct dmadat { char rdbuf[READ_BUF_SIZE]; /* for reading large things */ char secbuf[READ_BUF_SIZE]; /* for MBR/disklabel */ @@ -150,9 +150,9 @@ static char gelipw[GELI_PW_MAXLEN]; #endif struct zfsdsk { - struct dsk dsk; + struct dsk dsk; #ifdef LOADER_GELI_SUPPORT - struct geli_dev *gdev; + struct geli_dev *gdev; #endif }; @@ -162,7 +162,8 @@ struct zfsdsk { * Read from a dnode (which must be from a ZPL filesystem). */ static int -zfs_read(spa_t *spa, const dnode_phys_t *dnode, off_t *offp, void *start, size_t size) +zfs_read(spa_t *spa, const dnode_phys_t *dnode, off_t *offp, void *start, +size_t size) { const znode_phys_t *zp = (const znode_phys_t *) dnode->dn_bonus; size_t n; @@ -198,10 +199,10 @@ vdev_read(void *xvdev, void *priv, off_t off, void *bu daddr_t lba, alignlba; off_t diff; unsigned int nb, alignnb; - struct zfsdsk *zdsk = (struct zfsdsk *) priv; + struct zfsdsk *zdsk = priv; if ((off & (DEV_BSIZE - 1)) || (bytes & (DEV_BSIZE - 1))) - return -1; + return (-1); p = buf; lba = off / DEV_BSIZE; @@ -242,12 +243,13 @@ vdev_read(void *xvdev, void *priv, off_t off, void *bu } if (drvread(>dsk, dmadat->rdbuf, alignlba, alignnb)) - return -1; + return (-1); #ifdef LOADER_GELI_SUPPORT /* decrypt */ if (zdsk->gdev != NULL) { - if (geli_read(zdsk->gdev, ((alignlba - zdsk->dsk.start) * - DEV_BSIZE), dmadat->rdbuf, alignnb * DEV_BSIZE)) + if (geli_read(zdsk->gdev, + ((alignlba - zdsk->dsk.start) * DEV_BSIZE), + dmadat->rdbuf, alignnb * DEV_BSIZE)) return (-1); } #endif @@ -260,13 +262,13 @@ vdev_read(void *xvdev, void *priv, off_t off, void *bu diff = 0; } - return 0; + return (0); } /* Match the signature exactly due to signature madness */ static int vdev_read2(vdev_t *vdev, void *priv, off_t off, void *buf, size_t bytes) { - return vdev_read(vdev, priv, off, buf, bytes); + return (vdev_read(vdev, priv, off, buf, bytes)); } @@ -276,10 +278,10 @@ vdev_write(vdev_t *vdev, void *priv, off_t off, void * char *p; daddr_t lba; unsigned int nb; - struct zfsdsk *zdsk = (struct zfsdsk *) priv; + struct zfsdsk *zdsk = priv; if ((off
Re: svn commit: r361944 - in head/sys/dev/virtio: . network
On 14 Jun 2020, at 20:51, Tom Jones wrote: > On Mon, Jun 08, 2020 at 09:51:36PM +, Jessica Clarke wrote: >> Author: jrtc27 >> Date: Mon Jun 8 21:51:36 2020 >> New Revision: 361944 >> URL: https://svnweb.freebsd.org/changeset/base/361944 >> >> Log: >> virtio: Support non-legacy network device and queue >> >> The non-legacy interface always defines num_buffers in the header, >> regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused. We >> also need to ensure our virtqueue doesn't filter out VIRTIO_F_VERSION_1 >> during negotiation, as it supports non-legacy transports just fine. This >> fixes network packet transmission on TinyEMU. >> >> Reviewed by:br, brooks (mentor), jhb (mentor) >> Approved by:br, brooks (mentor), jhb (mentor) >> Differential Revision: https://reviews.freebsd.org/D25132 >> >> Modified: >> head/sys/dev/virtio/network/if_vtnet.c >> head/sys/dev/virtio/network/if_vtnetvar.h >> head/sys/dev/virtio/virtio.c >> head/sys/dev/virtio/virtqueue.c >> > > Hi Jessica, > > After updating my current bhyve vm today (on a 12.1 host), networking no > longer > works. Reverting this commit seems to resolve the issue. I think vtnet is not > passing enough data up to the ip layer. > > If I capture on the tap interface for the vm I see arp requests and arp > replies, however kern.msgbuf is full of: > > <5>arp: short packet received on vtnet0 > > and netstat does not see any replies to arp requests: > > root@freebsd-current:~ # netstat -s -p arp > arp: >11 ARP requests sent >0 ARP requests failed to sent >0 ARP replies sent >0 ARP requests received >0 ARP replies received >0 ARP packets received >24 total packets dropped due to no ARP entry >2 ARP entrys timed out >0 Duplicate IPs seen > > If I set up an arp entry manually I can see ICMP echo requests and responses > on > the tap interface, but the vm does not see the responses. > > root@freebsd-current:~ # netstat -s -p ip > ip: >7 total packets received >0 bad header checksums >0 with size smaller than minimum >7 with data size < data length >0 with ip length > max ip packet size >0 with header length < data size >0 with data length < header length > > The line > >7 with data size < data length > > makes me think that vtnet is truncating packets. > > markj pointed me at this bug in irc which might also be related: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247242 Hi Tom, Sorry about that; it seems bhyve hits the "legacy and no MrgRxBuf" case. Could you please try the patch below? Jess diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 7a0859cc0eb1..7e10b75f7f66 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1819,9 +1819,10 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) adjsz = sizeof(struct vtnet_rx_header); /* * Account for our pad inserted between the header - * and the actual start of the frame. + * and the actual start of the frame. This includes + * the unused num_buffers when using a legacy device. */ -len += VTNET_RX_HEADER_PAD; +len += adjsz - sc->vtnet_hdr_size; } else { mhdr = mtod(m, struct virtio_net_hdr_mrg_rxbuf *); nbufs = mhdr->num_buffers; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362183 - in head/sys/dev: netmap virtio/network
Author: vmaffione Date: Sun Jun 14 20:47:31 2020 New Revision: 362183 URL: https://svnweb.freebsd.org/changeset/base/362183 Log: netmap: vtnet: fix races in vtnet_netmap_reg() The nm_register callback needs to call nm_set_native_flags() or nm_clear_native_flags() once the device has been stopped. However, in the current implementation this is not true, as the device is stopped by vtnet_init_locked(). This causes race conditions where the driver crashes as soon as it dequeues netmap buffers assuming they are mbufs (or the other way around). To fix the issue, we extend vtnet_init_locked() with a second argument that, if not zero, will set/clear the netmap flags. This results in a huge simplification of the nm_register callback itself. Also, use netmap_reset() to check if a ring is going to be re-initialized in netmap mode. MFC after:1 week Modified: head/sys/dev/netmap/if_vtnet_netmap.h head/sys/dev/virtio/network/if_vtnet.c head/sys/dev/virtio/network/if_vtnetvar.h Modified: head/sys/dev/netmap/if_vtnet_netmap.h == --- head/sys/dev/netmap/if_vtnet_netmap.h Sun Jun 14 19:41:24 2020 (r362182) +++ head/sys/dev/netmap/if_vtnet_netmap.h Sun Jun 14 20:47:31 2020 (r362183) @@ -39,52 +39,18 @@ vtnet_netmap_reg(struct netmap_adapter *na, int state) { struct ifnet *ifp = na->ifp; struct vtnet_softc *sc = ifp->if_softc; - int success; - int i; - /* Drain the taskqueues to make sure that there are no worker threads -* accessing the virtqueues. */ - vtnet_drain_taskqueues(sc); - + /* +* Trigger a device reinit, asking vtnet_init_locked() to +* also enter or exit netmap mode. +*/ VTNET_CORE_LOCK(sc); - - /* We need nm_netmap_on() to return true when called by -* vtnet_init_locked() below. */ - if (state) - nm_set_native_flags(na); - - /* We need to trigger a device reset in order to unexpose guest buffers -* published to the host. */ - ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - /* Get pending used buffers. The way they are freed depends on whether -* they are netmap buffer or they are mbufs. We can tell apart the two -* cases by looking at kring->nr_mode, before this is possibly updated -* in the loop below. */ - for (i = 0; i < sc->vtnet_act_vq_pairs; i++) { - struct vtnet_txq *txq = >vtnet_txqs[i]; - struct vtnet_rxq *rxq = >vtnet_rxqs[i]; - - VTNET_TXQ_LOCK(txq); - vtnet_txq_free_mbufs(txq); - VTNET_TXQ_UNLOCK(txq); - - VTNET_RXQ_LOCK(rxq); - vtnet_rxq_free_mbufs(rxq); - VTNET_RXQ_UNLOCK(rxq); - } - vtnet_init_locked(sc); - success = (ifp->if_drv_flags & IFF_DRV_RUNNING) ? 0 : ENXIO; - - if (state) { - netmap_krings_mode_commit(na, state); - } else { - nm_clear_native_flags(na); - netmap_krings_mode_commit(na, state); - } - + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + vtnet_init_locked(sc, state ? VTNET_INIT_NETMAP_ENTER + : VTNET_INIT_NETMAP_EXIT); VTNET_CORE_UNLOCK(sc); - return success; + return 0; } @@ -245,15 +211,13 @@ vtnet_netmap_rxq_populate(struct vtnet_rxq *rxq) { struct netmap_adapter *na = NA(rxq->vtnrx_sc->vtnet_ifp); struct netmap_kring *kring; + struct netmap_slot *slot; int error; - if (!nm_native_on(na) || rxq->vtnrx_id >= na->num_rx_rings) + slot = netmap_reset(na, NR_RX, rxq->vtnrx_id, 0); + if (slot == NULL) return -1; - kring = na->rx_rings[rxq->vtnrx_id]; - if (!(nm_kring_pending_on(kring) || - kring->nr_pending_mode == NKR_NETMAP_ON)) - return -1; /* Expose all the RX netmap buffers we can. In case of no indirect * buffers, the number of netmap slots in the RX ring matches the Modified: head/sys/dev/virtio/network/if_vtnet.c == --- head/sys/dev/virtio/network/if_vtnet.c Sun Jun 14 19:41:24 2020 (r362182) +++ head/sys/dev/virtio/network/if_vtnet.c Sun Jun 14 20:47:31 2020 (r362183) @@ -181,7 +181,7 @@ static int vtnet_init_tx_queues(struct vtnet_softc *); static int vtnet_init_rxtx_queues(struct vtnet_softc *); static voidvtnet_set_active_vq_pairs(struct vtnet_softc *); static int vtnet_reinit(struct vtnet_softc *); -static voidvtnet_init_locked(struct vtnet_softc *); +static voidvtnet_init_locked(struct vtnet_softc *, int); static voidvtnet_init(void *); static voidvtnet_free_ctrl_vq(struct vtnet_softc *); @@ -523,7 +523,7 @@ vtnet_resume(device_t
Re: svn commit: r361944 - in head/sys/dev/virtio: . network
On Mon, Jun 08, 2020 at 09:51:36PM +, Jessica Clarke wrote: > Author: jrtc27 > Date: Mon Jun 8 21:51:36 2020 > New Revision: 361944 > URL: https://svnweb.freebsd.org/changeset/base/361944 > > Log: > virtio: Support non-legacy network device and queue > > The non-legacy interface always defines num_buffers in the header, > regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused. We > also need to ensure our virtqueue doesn't filter out VIRTIO_F_VERSION_1 > during negotiation, as it supports non-legacy transports just fine. This > fixes network packet transmission on TinyEMU. > > Reviewed by:br, brooks (mentor), jhb (mentor) > Approved by:br, brooks (mentor), jhb (mentor) > Differential Revision: https://reviews.freebsd.org/D25132 > > Modified: > head/sys/dev/virtio/network/if_vtnet.c > head/sys/dev/virtio/network/if_vtnetvar.h > head/sys/dev/virtio/virtio.c > head/sys/dev/virtio/virtqueue.c > Hi Jessica, After updating my current bhyve vm today (on a 12.1 host), networking no longer works. Reverting this commit seems to resolve the issue. I think vtnet is not passing enough data up to the ip layer. If I capture on the tap interface for the vm I see arp requests and arp replies, however kern.msgbuf is full of: <5>arp: short packet received on vtnet0 and netstat does not see any replies to arp requests: root@freebsd-current:~ # netstat -s -p arp arp: 11 ARP requests sent 0 ARP requests failed to sent 0 ARP replies sent 0 ARP requests received 0 ARP replies received 0 ARP packets received 24 total packets dropped due to no ARP entry 2 ARP entrys timed out 0 Duplicate IPs seen If I set up an arp entry manually I can see ICMP echo requests and responses on the tap interface, but the vm does not see the responses. root@freebsd-current:~ # netstat -s -p ip ip: 7 total packets received 0 bad header checksums 0 with size smaller than minimum 7 with data size < data length 0 with ip length > max ip packet size 0 with header length < data size 0 with data length < header length The line 7 with data size < data length makes me think that vtnet is truncating packets. markj pointed me at this bug in irc which might also be related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247242 - Tom ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362182 - head/bin/sh/tests/execution
Author: jilles Date: Sun Jun 14 19:41:24 2020 New Revision: 362182 URL: https://svnweb.freebsd.org/changeset/base/362182 Log: sh/tests: Add tests for SIGINT in non-jobc background commands If job control is not enabled, background commands shall ignore SIGINT and SIGQUIT, and it shall be possible to override that ignore in the same shell. MFC after:1 week Added: head/bin/sh/tests/execution/bg11.0 (contents, props changed) head/bin/sh/tests/execution/bg12.0 (contents, props changed) Modified: head/bin/sh/tests/execution/Makefile Modified: head/bin/sh/tests/execution/Makefile == --- head/bin/sh/tests/execution/MakefileSun Jun 14 18:49:06 2020 (r362181) +++ head/bin/sh/tests/execution/MakefileSun Jun 14 19:41:24 2020 (r362182) @@ -17,6 +17,8 @@ ${PACKAGE}FILES+= bg7.0 ${PACKAGE}FILES+= bg8.0 ${PACKAGE}FILES+= bg9.0 ${PACKAGE}FILES+= bg10.0 bg10.0.stdout +${PACKAGE}FILES+= bg11.0 +${PACKAGE}FILES+= bg12.0 ${PACKAGE}FILES+= env1.0 ${PACKAGE}FILES+= fork1.0 ${PACKAGE}FILES+= fork2.0 Added: head/bin/sh/tests/execution/bg11.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/execution/bg11.0 Sun Jun 14 19:41:24 2020 (r362182) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.` +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +# Use a trap, not the default action, since the shell may catch SIGINT and +# therefore its processing may be delayed. +{ trap 'exit 5' TERM; read dummy fifo1 +kill -INT "$!" +kill -TERM "$!" +exec 3>&- +wait "$!" +r=$? +[ "$r" = 5 ] Added: head/bin/sh/tests/execution/bg12.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/execution/bg12.0 Sun Jun 14 19:41:24 2020 (r362182) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.` +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +{ trap - INT; : >fifo1; sleep 5; exit 4; } & +: https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r362170 - in head/cddl/contrib/opensolaris/cmd: dtrace lockstat zdb zfs zpool zstreamdump
On Sun, Jun 14, 2020, 8:57 AM Rodney W. Grimes wrote: > > Author: gbe (doc committer) > > Date: Sun Jun 14 05:50:28 2020 > > New Revision: 362170 > > URL: https://svnweb.freebsd.org/changeset/base/362170 > > > > Log: > > Add HISTORY sections to ZFS and dtrace manpage > > > > Reviewed by:bcr (mentor) > > Approved by:bcr (mentor) > > MFC after: 7 days > > Differential Revision: https://reviews.freebsd.org/D23833 > > > > Modified: > > head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 > > head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 > > head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 > > head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 > > head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 > > head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 > > Is this really the correct history? Didnt all of these first > appear in Solaris? > > The man page may of first appeared in FreeBSD, but the commands > themselves originated some place else? > They did first appear in FreeBSD as indicated (as far as I could tell). They originated in Solaris as well and could have that indicated as well. Other places in the tree note both where appropriate, but sometimes fall short noting only the first FreeBSD release they appeared in. Warner > > > Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 > > > == > > --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sun Jun 14 > 05:35:02 2020(r362169) > > +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sun Jun 14 > 05:50:28 2020(r362170) > > @@ -20,7 +20,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd October 30, 2018 > > +.Dd February 25, 2020 > > .Dt DTRACE 1 > > .Os > > .Sh NAME > > @@ -776,6 +776,11 @@ failed or that the specified request could not be > sati > > .It 2 > > Invalid command line options or arguments were specified. > > .El > > +.Sh HISTORY > > +The > > +.Nm > > +utility first appeared in > > +.Fx 7.1 . > > .Sh SEE ALSO > > .Xr cpp 1 , > > .Xr elf 5 , > > > > Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 > > > == > > --- head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Sun Jun 14 > 05:35:02 2020(r362169) > > +++ head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Sun Jun 14 > 05:50:28 2020(r362170) > > @@ -21,7 +21,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd September 29, 2015 > > +.Dd February 25, 2020 > > .Dt LOCKSTAT 1 > > .Os > > .Sh NAME > > @@ -366,6 +366,11 @@ Count indv cuml rcnt nsec Lock > C > > .Xr dtrace 1 , > > .Xr ksyms 4 , > > .Xr locking 9 > > +.Sh HISTORY > > +The > > +.Nm > > +utility first appeared in > > +.Fx 7.1 . > > .Sh NOTES > > Tail-call elimination can affect call sites. > > For example, if > > > > Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 > > > == > > --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Jun 14 > 05:35:02 2020(r362169) > > +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Jun 14 > 05:50:28 2020(r362170) > > @@ -13,7 +13,7 @@ > > .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. > > .\" Copyright 2017 Nexenta Systems, Inc. > > .\" > > -.Dd October 06, 2017 > > +.Dd February 25, 2020 > > .Dt ZDB 8 > > .Os > > .Sh NAME > > @@ -407,3 +407,8 @@ dedup = 1.11, compress = 1.80, copies = 1.00, dedup > * > > .Sh SEE ALSO > > .Xr zfs 8 , > > .Xr zpool 8 > > +.Sh HISTORY > > +The > > +.Nm > > +utility first appeared in > > +.Fx 7.0 . > > > > Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 > > > == > > --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Jun 14 > 05:35:02 2020(r362169) > > +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Jun 14 > 05:50:28 2020(r362170) > > @@ -3949,6 +3949,11 @@ M F /tank/test/modified > > .Xr umount 8 , > > .Xr zfs-program 8 , > > .Xr zpool 8 > > +.Sh HISTORY > > +The > > +.Nm > > +utility first appeared in > > +.Fx 7.0 . > > .Sh AUTHORS > > This manual page is a > > .Xr mdoc 7 > > > > Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 > > > == > > --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Jun 14 > 05:35:02 2020(r362169) > > +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Jun 14 > 05:50:28 2020(r362170) > > @@ -29,7 +29,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd November 7, 2019 > > +.Dd February 25, 2020 > > .Dt ZPOOL 8 > > .Os > > .Sh NAME > > @@ -2462,6 +2462,11 @@ Discarded approximately 29 seconds of > transactions. > > .Xr zpool-features 7 , > > .Xr zfs 8 , > > .Xr zfsd 8 > >
svn commit: r362179 - in head/sys/dev: ic scc
Author: bdragon Date: Sun Jun 14 16:47:16 2020 New Revision: 362179 URL: https://svnweb.freebsd.org/changeset/base/362179 Log: [PowerPC] Fix scc z8530 driver Parts of the z8530 driver were still using the SUN channel spacing. This was invalid on PowerMac and QEMU, where the attachment was to escc, not escc-legacy. This means the driver has apparently NEVER worked properly on Macintosh hardware. Add documentation for the channel spacing details, and change to using driver-specific initialization instead of hardcoded spacing so either spacing can be used. Fixes boot hang in QEMU when using the serial console, and fixes use on Xserve serial (and presumably PowerMacs that have a Stealth Serial port or similar) Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision:https://reviews.freebsd.org/D24661 Modified: head/sys/dev/ic/z8530.h head/sys/dev/scc/scc_bfe.h head/sys/dev/scc/scc_bfe_macio.c head/sys/dev/scc/scc_dev_z8530.c Modified: head/sys/dev/ic/z8530.h == --- head/sys/dev/ic/z8530.h Sun Jun 14 16:05:08 2020(r362178) +++ head/sys/dev/ic/z8530.h Sun Jun 14 16:47:16 2020(r362179) @@ -32,15 +32,14 @@ #define_DEV_IC_Z8530_H_ /* - * Channel B control: 0 - * Channel B data: 1 - * Channel A control: 2 - * Channel A data: 3 + * legacy: SUN compatible + * escc: Macintosh + * legacy escc + * Channel B control: 0 0 + * Channel B data: 1 1 + * Channel A control: 2 16 + * Channel A data: 3 17 */ - -/* The following apply when using a device-scoped bus handle */ -#defineCHAN_A 2 -#defineCHAN_B 0 #defineREG_CTRL0 #defineREG_DATA1 Modified: head/sys/dev/scc/scc_bfe.h == --- head/sys/dev/scc/scc_bfe.h Sun Jun 14 16:05:08 2020(r362178) +++ head/sys/dev/scc/scc_bfe.h Sun Jun 14 16:47:16 2020(r362179) @@ -114,7 +114,8 @@ struct scc_class { extern struct scc_class scc_quicc_class; extern struct scc_class scc_sab82532_class; -extern struct scc_class scc_z8530_class; +extern struct scc_class scc_z8530_escc_class; +extern struct scc_class scc_z8530_legacy_class; struct scc_softc { KOBJ_FIELDS; Modified: head/sys/dev/scc/scc_bfe_macio.c == --- head/sys/dev/scc/scc_bfe_macio.cSun Jun 14 16:05:08 2020 (r362178) +++ head/sys/dev/scc/scc_bfe_macio.cSun Jun 14 16:47:16 2020 (r362179) @@ -55,9 +55,10 @@ scc_macio_probe(device_t dev) sc = device_get_softc(dev); nm = ofw_bus_get_name(dev); + /* Attach to modern escc (channel shift 4 bits) */ if (!strcmp(nm, "escc")) { device_set_desc(dev, "Zilog Z8530 dual channel SCC"); - sc->sc_class = _z8530_class; + sc->sc_class = _z8530_escc_class; return (scc_bfe_probe(dev, MACIO_REGSHFT, MACIO_RCLK, 0)); } return (ENXIO); Modified: head/sys/dev/scc/scc_dev_z8530.c == --- head/sys/dev/scc/scc_dev_z8530.cSun Jun 14 16:05:08 2020 (r362178) +++ head/sys/dev/scc/scc_dev_z8530.cSun Jun 14 16:47:16 2020 (r362179) @@ -51,6 +51,10 @@ static int z8530_bfe_iclear(struct scc_softc *, struct static int z8530_bfe_ipend(struct scc_softc *); static int z8530_bfe_probe(struct scc_softc *); +/* Channel B is always at 0 offset. */ +#defineCHAN_A (-(sc->sc_class->cl_range)) +#defineCHAN_B 0 + static kobj_method_t z8530_methods[] = { KOBJMETHOD(scc_attach, z8530_bfe_attach), KOBJMETHOD(scc_iclear, z8530_bfe_iclear), @@ -59,14 +63,32 @@ static kobj_method_t z8530_methods[] = { KOBJMETHOD_END }; -struct scc_class scc_z8530_class = { - "z8530 class", +/* + * escc (macio) spacing. + */ +struct scc_class scc_z8530_escc_class = { + "z8530 escc class", z8530_methods, sizeof(struct scc_softc), .cl_channels = 2, .cl_class = SCC_CLASS_Z8530, .cl_modes = SCC_MODE_ASYNC | SCC_MODE_BISYNC | SCC_MODE_HDLC, - .cl_range = CHAN_B - CHAN_A, + /* Negative .cl_range signifies this is channel spacing. */ + .cl_range = (CHAN_B - 16), +}; + +/* + * SUN compatible channel spacing. + */ +struct scc_class scc_z8530_legacy_class = { + "z8530 legacy class", + z8530_methods, + sizeof(struct scc_softc), + .cl_channels = 2, + .cl_class = SCC_CLASS_Z8530, + .cl_modes = SCC_MODE_ASYNC | SCC_MODE_BISYNC | SCC_MODE_HDLC, + /* Negative .cl_range signifies this is channel spacing. */ + .cl_range =
svn commit: r362178 - head/sys/netinet
Author: tuexen Date: Sun Jun 14 16:05:08 2020 New Revision: 362178 URL: https://svnweb.freebsd.org/changeset/base/362178 Log: Allocate the mbuf for the signature in the COOKIE or the correct size. While there, do also do some cleanups. MFC after:1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Sun Jun 14 15:49:32 2020 (r362177) +++ head/sys/netinet/sctp_output.c Sun Jun 14 16:05:08 2020 (r362178) @@ -3831,8 +3831,6 @@ sctp_add_cookie(struct mbuf *init, int init_offset, struct mbuf *copy_init, *copy_initack, *m_at, *sig, *mret; struct sctp_state_cookie *stc; struct sctp_paramhdr *ph; - uint8_t *foo; - int sig_offset; uint16_t cookie_sz; mret = sctp_get_mbuf_for_msg((sizeof(struct sctp_state_cookie) + @@ -3896,24 +3894,20 @@ sctp_add_cookie(struct mbuf *init, int init_offset, break; } } - sig = sctp_get_mbuf_for_msg(SCTP_SECRET_SIZE, 0, M_NOWAIT, 1, MT_DATA); + sig = sctp_get_mbuf_for_msg(SCTP_SIGNATURE_SIZE, 0, M_NOWAIT, 1, MT_DATA); if (sig == NULL) { /* no space, so free the entire chain */ sctp_m_freem(mret); return (NULL); } - SCTP_BUF_LEN(sig) = 0; SCTP_BUF_NEXT(m_at) = sig; - sig_offset = 0; - foo = (uint8_t *)(mtod(sig, caddr_t)+sig_offset); - memset(foo, 0, SCTP_SIGNATURE_SIZE); - *signature = foo; - SCTP_BUF_LEN(sig) += SCTP_SIGNATURE_SIZE; + SCTP_BUF_LEN(sig) = SCTP_SIGNATURE_SIZE; cookie_sz += SCTP_SIGNATURE_SIZE; ph->param_length = htons(cookie_sz); + *signature = (uint8_t *)mtod(sig, caddr_t); + memset(*signature, 0, SCTP_SIGNATURE_SIZE); return (mret); } - static uint8_t sctp_get_ect(struct sctp_tcb *stcb) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r362170 - in head/cddl/contrib/opensolaris/cmd: dtrace lockstat zdb zfs zpool zstreamdump
> Author: gbe (doc committer) > Date: Sun Jun 14 05:50:28 2020 > New Revision: 362170 > URL: https://svnweb.freebsd.org/changeset/base/362170 > > Log: > Add HISTORY sections to ZFS and dtrace manpage > > Reviewed by:bcr (mentor) > Approved by:bcr (mentor) > MFC after: 7 days > Differential Revision: https://reviews.freebsd.org/D23833 > > Modified: > head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 > head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 > head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 > head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 > head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 > head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Is this really the correct history? Didnt all of these first appear in Solaris? The man page may of first appeared in FreeBSD, but the commands themselves originated some place else? > > Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 > == > --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sun Jun 14 05:35:02 > 2020(r362169) > +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sun Jun 14 05:50:28 > 2020(r362170) > @@ -20,7 +20,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd October 30, 2018 > +.Dd February 25, 2020 > .Dt DTRACE 1 > .Os > .Sh NAME > @@ -776,6 +776,11 @@ failed or that the specified request could not be sati > .It 2 > Invalid command line options or arguments were specified. > .El > +.Sh HISTORY > +The > +.Nm > +utility first appeared in > +.Fx 7.1 . > .Sh SEE ALSO > .Xr cpp 1 , > .Xr elf 5 , > > Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 > == > --- head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Sun Jun 14 > 05:35:02 2020(r362169) > +++ head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Sun Jun 14 > 05:50:28 2020(r362170) > @@ -21,7 +21,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd September 29, 2015 > +.Dd February 25, 2020 > .Dt LOCKSTAT 1 > .Os > .Sh NAME > @@ -366,6 +366,11 @@ Count indv cuml rcnt nsec Lock C > .Xr dtrace 1 , > .Xr ksyms 4 , > .Xr locking 9 > +.Sh HISTORY > +The > +.Nm > +utility first appeared in > +.Fx 7.1 . > .Sh NOTES > Tail-call elimination can affect call sites. > For example, if > > Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 > == > --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Jun 14 05:35:02 > 2020(r362169) > +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Jun 14 05:50:28 > 2020(r362170) > @@ -13,7 +13,7 @@ > .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. > .\" Copyright 2017 Nexenta Systems, Inc. > .\" > -.Dd October 06, 2017 > +.Dd February 25, 2020 > .Dt ZDB 8 > .Os > .Sh NAME > @@ -407,3 +407,8 @@ dedup = 1.11, compress = 1.80, copies = 1.00, dedup * > .Sh SEE ALSO > .Xr zfs 8 , > .Xr zpool 8 > +.Sh HISTORY > +The > +.Nm > +utility first appeared in > +.Fx 7.0 . > > Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 > == > --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Jun 14 05:35:02 > 2020(r362169) > +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sun Jun 14 05:50:28 > 2020(r362170) > @@ -3949,6 +3949,11 @@ M F /tank/test/modified > .Xr umount 8 , > .Xr zfs-program 8 , > .Xr zpool 8 > +.Sh HISTORY > +The > +.Nm > +utility first appeared in > +.Fx 7.0 . > .Sh AUTHORS > This manual page is a > .Xr mdoc 7 > > Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 > == > --- head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Jun 14 05:35:02 > 2020(r362169) > +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Jun 14 05:50:28 > 2020(r362170) > @@ -29,7 +29,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd November 7, 2019 > +.Dd February 25, 2020 > .Dt ZPOOL 8 > .Os > .Sh NAME > @@ -2462,6 +2462,11 @@ Discarded approximately 29 seconds of transactions. > .Xr zpool-features 7 , > .Xr zfs 8 , > .Xr zfsd 8 > +.Sh HISTORY > +The > +.Nm > +utility first appeared in > +.Fx 7.0 . > .Sh AUTHORS > This manual page is a > .Xr mdoc 7 > > Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 > == > --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Sun Jun > 14 05:35:02 2020(r362169) > +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Sun Jun > 14 05:50:28 2020(r362170) > @@ -22,7 +22,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd December 31, 2013 > +.Dd
svn commit: r362176 - head/sys/compat/linux
Author: trasz Date: Sun Jun 14 14:38:40 2020 New Revision: 362176 URL: https://svnweb.freebsd.org/changeset/base/362176 Log: Make linux(4) warn about unsupported CMSG level/type. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D25255 Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c == --- head/sys/compat/linux/linux_socket.cSun Jun 14 11:41:57 2020 (r362175) +++ head/sys/compat/linux/linux_socket.cSun Jun 14 14:38:40 2020 (r362176) @@ -1042,8 +1042,12 @@ linux_sendmsg_common(struct thread *td, l_int s, struc cmsg->cmsg_level = linux_to_bsd_sockopt_level(linux_cmsg.cmsg_level); if (cmsg->cmsg_type == -1 - || cmsg->cmsg_level != SOL_SOCKET) + || cmsg->cmsg_level != SOL_SOCKET) { + linux_msg(curthread, + "unsupported sendmsg cmsg level %d type %d", + linux_cmsg.cmsg_level, linux_cmsg.cmsg_type); goto bad; + } /* * Some applications (e.g. pulseaudio) attempt to @@ -1228,6 +1232,9 @@ linux_recvmsg_common(struct thread *td, l_int s, struc bsd_to_linux_sockopt_level(cm->cmsg_level); if (linux_cmsg->cmsg_type == -1 || cm->cmsg_level != SOL_SOCKET) { + linux_msg(curthread, + "unsupported recvmsg cmsg level %d type %d", + cm->cmsg_level, cm->cmsg_type); error = EINVAL; goto bad; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362175 - head/sys/fs/nfs
Author: dfr Date: Sun Jun 14 11:41:57 2020 New Revision: 362175 URL: https://svnweb.freebsd.org/changeset/base/362175 Log: Add support for the timecreate attribute This maps to the va_birthtime VFS attribute. Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c == --- head/sys/fs/nfs/nfs_commonsubs.cSun Jun 14 10:13:40 2020 (r362174) +++ head/sys/fs/nfs/nfs_commonsubs.cSun Jun 14 11:41:57 2020 (r362175) @@ -2922,6 +2922,11 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount txdr_nfsv4time(>va_mtime, tl); retnum += NFSX_V4TIME; break; + case NFSATTRBIT_TIMECREATE: + NFSM_BUILD(tl, u_int32_t *, NFSX_V4TIME); + txdr_nfsv4time(>va_birthtime, tl); + retnum += NFSX_V4TIME; + break; case NFSATTRBIT_TIMEMODIFYSET: if ((vap->va_vaflags & VA_UTIMES_NULL) == 0) { NFSM_BUILD(tl, u_int32_t *, NFSX_V4SETTIME); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362174 - head/stand/efi/loader
Author: tsoome Date: Sun Jun 14 10:13:40 2020 New Revision: 362174 URL: https://svnweb.freebsd.org/changeset/base/362174 Log: loader.efi: update console after gfx mode change The gfx mode change should be coordinated with console setup. Modified: head/stand/efi/loader/framebuffer.c Modified: head/stand/efi/loader/framebuffer.c == --- head/stand/efi/loader/framebuffer.c Sun Jun 14 09:50:00 2020 (r362173) +++ head/stand/efi/loader/framebuffer.c Sun Jun 14 10:13:40 2020 (r362174) @@ -586,6 +586,7 @@ gop_autoresize(EFI_GRAPHICS_OUTPUT *gop) mode, EFI_ERROR_CODE(status)); return (CMD_ERROR); } + (void) efi_cons_update_mode(); } return (CMD_OK); } @@ -610,6 +611,7 @@ text_autoresize() } if (max_dim > 0) conout->SetMode(conout, best_mode); + (void) efi_cons_update_mode(); return (CMD_OK); } @@ -697,6 +699,7 @@ command_gop(int argc, char *argv[]) argv[0], mode, EFI_ERROR_CODE(status)); return (CMD_ERROR); } + (void) efi_cons_update_mode(); } else if (!strcmp(argv[1], "get")) { if (argc != 2) goto usage; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362173 - head/sys/netinet
Author: tuexen Date: Sun Jun 14 09:50:00 2020 New Revision: 362173 URL: https://svnweb.freebsd.org/changeset/base/362173 Log: Cleanups, no functional change. MFC after:1 week Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_ss_functions.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_indata.c == --- head/sys/netinet/sctp_indata.c Sun Jun 14 06:58:58 2020 (r362172) +++ head/sys/netinet/sctp_indata.c Sun Jun 14 09:50:00 2020 (r362173) @@ -66,7 +66,7 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *co struct sctp_stream_in *strm, struct sctp_tcb *stcb, struct sctp_association *asoc, -struct sctp_tmit_chunk *chk, int lock_held); +struct sctp_tmit_chunk *chk, int hold_rlock); void Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Sun Jun 14 06:58:58 2020 (r362172) +++ head/sys/netinet/sctp_output.c Sun Jun 14 09:50:00 2020 (r362173) @@ -5118,7 +5118,6 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_ } } return (op_err); - break; } default: /* Modified: head/sys/netinet/sctp_ss_functions.c == --- head/sys/netinet/sctp_ss_functions.cSun Jun 14 06:58:58 2020 (r362172) +++ head/sys/netinet/sctp_ss_functions.cSun Jun 14 09:50:00 2020 (r362173) @@ -767,8 +767,8 @@ sctp_ss_fb_scheduled(struct sctp_tcb *stcb, struct sct */ static void sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc, -struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp, -int holds_lock); +struct sctp_stream_out *strq SCTP_UNUSED, +struct sctp_stream_queue_pending *sp, int holds_lock); static void sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc, Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Sun Jun 14 06:58:58 2020(r362172) +++ head/sys/netinet/sctputil.c Sun Jun 14 09:50:00 2020(r362173) @@ -5230,10 +5230,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc if (((struct sockaddr_in *)addr)->sin_addr.s_addr == laddr->ifa->address.sin.sin_addr.s_addr) { /* found him. */ - if (holds_lock == 0) { - SCTP_INP_RUNLOCK(inp); - } - return (laddr->ifa); break; } } @@ -5243,10 +5239,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc if (SCTP6_ARE_ADDR_EQUAL((struct sockaddr_in6 *)addr, >ifa->address.sin6)) { /* found him. */ - if (holds_lock == 0) { - SCTP_INP_RUNLOCK(inp); - } - return (laddr->ifa); break; } } @@ -5255,7 +5247,7 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc if (holds_lock == 0) { SCTP_INP_RUNLOCK(inp); } - return (NULL); + return (laddr->ifa); } uint32_t @@ -5332,9 +5324,6 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t if (((struct sockaddr_in *)addr)->sin_addr.s_addr == sctp_ifap->address.sin.sin_addr.s_addr) { /* found him. */ - if (holds_lock == 0) - SCTP_IPI_ADDR_RUNLOCK(); - return (sctp_ifap); break; } } @@ -5344,9 +5333,6 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t if (SCTP6_ARE_ADDR_EQUAL((struct sockaddr_in6 *)addr, _ifap->address.sin6)) { /* found him. */ - if (holds_lock == 0) - SCTP_IPI_ADDR_RUNLOCK(); - return (sctp_ifap); break; } } @@ -5354,7 +5340,7 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t }
Website and Mobile App Development
We have ✅ 500+ clone ScriptHi, I am Waseem From HW Infotech. Please share your phone number or Skype id, Whatsapp if you are looking to develop a clone of any website. Work in the following area : ✅ Clone Script for any Website and Mobile APP -Development and Digital Marketing for App, Web, Software Clone Scripts ✅Readymade Script for useful product -Shop Website Templates, Clone Scripts, & Marketplace Software | HW Infotech ✅Software Requirement Specification Documentation ✅A wireframe design for Website, ERP, Product app ✅PHP Framework & MYSQL, HTML5, CSS3, JavaScript, jQuery, XML, JSON. ✅eCommerce, WordPress,Magento,Open Cart, Joomla, Magento 2, Prestashop ✅Mobile APP- Android, IOS, Phone Gap and Flutter ✅SEO, SMO, and PPC ✅Install and config the project ✅Plugin: Customize and create a new plugin ✅Migrate & Upgrade: sustainable development and long-term ✅WHM Panel server configuration ✅Server Optimization ✅Website and Server Penetration testing ✅Load Balancing and Failover clustering Server ✅Mail Server configuration for bulk emailing Contact us - Hire A Developer | Web and App Development Services | HW Infotech Regards Waseem www.hwinfotech.com Gurugram | California |London|Vancouver|Abuja | Melbourne http://app.hwinfotech.net/index.php/lists/dd296hm0jzd67/unsubscribe/gh632mxbevecf/ok072mq8cc88f ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r362172 - in head: share/vt/fonts sys/dev/vt sys/dev/vt/font sys/sys tools/build tools/tools/vt/mkkfont usr.bin/vtfontcvt usr.sbin/vidcontrol
Author: tsoome Date: Sun Jun 14 06:58:58 2020 New Revision: 362172 URL: https://svnweb.freebsd.org/changeset/base/362172 Log: Move font related data structured to sys/font.c and update vtfontcvt Prepare support to be able to handle font data in loader, consolidate data structures to sys/font.h and update vtfontcvt. vtfontcvt update is about to output set of glyphs in form of C source, the implementation does allow to output compressed or uncompressed font bitmaps. Reviewed by: bcr Differential Revision:https://reviews.freebsd.org/D24189 Added: head/sys/sys/font.h (contents, props changed) Modified: head/share/vt/fonts/Makefile head/sys/dev/vt/font/vt_font_default.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_font.c head/sys/sys/consio.h head/tools/build/Makefile head/tools/tools/vt/mkkfont/mkkfont.c head/usr.bin/vtfontcvt/Makefile head/usr.bin/vtfontcvt/vtfontcvt.8 head/usr.bin/vtfontcvt/vtfontcvt.c head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/share/vt/fonts/Makefile == --- head/share/vt/fonts/MakefileSun Jun 14 05:59:30 2020 (r362171) +++ head/share/vt/fonts/MakefileSun Jun 14 06:58:58 2020 (r362172) @@ -15,7 +15,7 @@ CLEANFILES+= ${FONTS} .SUFFIXES: .bdf .fnt .fnt.uu .hex .bdf.fnt .hex.fnt: - vtfontcvt ${.IMPSRC} ${.TARGET} + vtfontcvt -o ${.TARGET} ${.IMPSRC} FILESDIR= ${SHAREDIR}/vt/fonts Modified: head/sys/dev/vt/font/vt_font_default.c == --- head/sys/dev/vt/font/vt_font_default.c Sun Jun 14 05:59:30 2020 (r362171) +++ head/sys/dev/vt/font/vt_font_default.c Sun Jun 14 06:58:58 2020 (r362172) @@ -3006,7 +3006,7 @@ static uint8_t font_bytes[2224 * 16] = { 0x0c, 0x06, 0x03, 0x01, }; -static struct vt_font_map font_mapping_normal[308] = { +static vfnt_map_t font_mapping_normal[308] = { { 0x0020, 0x0001, 0x5e }, { 0x00a0, 0x0001, 0x00 }, { 0x00a1, 0x0060, 0x6e }, { 0x0110, 0x008f, 0x00 }, { 0x0111, 0x00cf, 0x08 }, { 0x011a, 0x00d2, 0x01 }, @@ -3163,7 +3163,7 @@ static struct vt_font_map font_mapping_normal[308] = { { 0xe0b0, 0x0478, 0x03 }, { 0xf6be, 0x0148, 0x00 }, }; -static struct vt_font_map font_mapping_bold[319] = { +static vfnt_map_t font_mapping_bold[319] = { { 0x0021, 0x047c, 0x0b }, { 0x002d, 0x0220, 0x00 }, { 0x002e, 0x0488, 0x50 }, { 0x00a1, 0x04d9, 0x07 }, { 0x00aa, 0x04e1, 0x03 }, { 0x00af, 0x04e5, 0x07 }, Modified: head/sys/dev/vt/vt.h == --- head/sys/dev/vt/vt.hSun Jun 14 05:59:30 2020(r362171) +++ head/sys/dev/vt/vt.hSun Jun 14 06:58:58 2020(r362172) @@ -48,6 +48,7 @@ #include #include #include +#include #include "opt_syscons.h" #include "opt_splash.h" @@ -399,30 +400,6 @@ void vt_upgrade(struct vt_device *vd); /* name argument is not used yet. */ #define VT_DRIVER_DECLARE(name, drv) DATA_SET(vt_drv_set, drv) - -/* - * Fonts. - * - * Remapping tables are used to map Unicode points to glyphs. They need - * to be sorted, because vtfont_lookup() performs a binary search. Each - * font has two remapping tables, for normal and bold. When a character - * is not present in bold, it uses a normal glyph. When no glyph is - * available, it uses glyph 0, which is normally equal to U+FFFD. - */ - -struct vt_font_map { - uint32_t vfm_src; - uint16_t vfm_dst; - uint16_t vfm_len; -}; - -struct vt_font { - struct vt_font_map *vf_map[VFNT_MAPS]; - uint8_t *vf_bytes; - unsigned int vf_height, vf_width; - unsigned int vf_map_count[VFNT_MAPS]; - unsigned int vf_refcount; -}; #ifndef SC_NO_CUTPASTE struct vt_mouse_cursor { Modified: head/sys/dev/vt/vt_font.c == --- head/sys/dev/vt/vt_font.c Sun Jun 14 05:59:30 2020(r362171) +++ head/sys/dev/vt/vt_font.c Sun Jun 14 06:58:58 2020(r362172) @@ -49,7 +49,7 @@ static MALLOC_DEFINE(M_VTFONT, "vtfont", "vt font"); #defineVTFONT_MAXDIMENSION 128 static uint16_t -vtfont_bisearch(const struct vt_font_map *map, unsigned int len, uint32_t src) +vtfont_bisearch(const vfnt_map_t *map, unsigned int len, uint32_t src) { int min, mid, max; @@ -137,7 +137,7 @@ vtfont_unref(struct vt_font *vf) } static int -vtfont_validate_map(struct vt_font_map *vfm, unsigned int length, +vtfont_validate_map(vfnt_map_t *vfm, unsigned int length, unsigned int glyph_count) { unsigned int i, last = 0; @@ -198,7 +198,7 @@ vtfont_load(vfnt_t *f, struct vt_font **ret) vf->vf_map_count[i] =
svn commit: r362171 - in head/lib/libc: stdio string sys
Author: gbe (doc committer) Date: Sun Jun 14 05:59:30 2020 New Revision: 362171 URL: https://svnweb.freebsd.org/changeset/base/362171 Log: libc manpages: various improvements from NetBSD - Add STANDARDS and HISTORY sections within the appropriate manpages - Mention two USENIX papers within kqueue(2) and strlcpy(3) Reviewed by: bcr (mentor) Approved by: bcr (mentor) Obtained from:NetBSD MFC after:7 days Differential Revision: https://reviews.freebsd.org/D24650 Modified: head/lib/libc/stdio/fflush.3 head/lib/libc/stdio/fopen.3 head/lib/libc/stdio/setbuf.3 head/lib/libc/string/strlcpy.3 head/lib/libc/sys/getgid.2 head/lib/libc/sys/getitimer.2 head/lib/libc/sys/kqueue.2 Modified: head/lib/libc/stdio/fflush.3 == --- head/lib/libc/stdio/fflush.3Sun Jun 14 05:50:28 2020 (r362170) +++ head/lib/libc/stdio/fflush.3Sun Jun 14 05:59:30 2020 (r362171) @@ -32,7 +32,7 @@ .\" @(#)fflush.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 23, 2020 +.Dd May 1, 2020 .Dt FFLUSH 3 .Os .Sh NAME @@ -125,3 +125,12 @@ The function conforms to .St -isoC . +.Sh HISTORY +The +.Fn fflush +function first appeared in +.At v4 . +The +.Fn fpurge +function first appeared in +.Bx 4.4 . Modified: head/lib/libc/stdio/fopen.3 == --- head/lib/libc/stdio/fopen.3 Sun Jun 14 05:50:28 2020(r362170) +++ head/lib/libc/stdio/fopen.3 Sun Jun 14 05:59:30 2020(r362171) @@ -32,7 +32,7 @@ .\" @(#)fopen.38.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 30, 2013 +.Dd May 1, 2020 .Dt FOPEN 3 .Os .Sh NAME @@ -356,3 +356,8 @@ The .Dq Li b mode does not conform to any standard but is also supported by glibc. +.Sh HISTORY +An +.Fn fopen +function appeared in +.At v1 . Modified: head/lib/libc/stdio/setbuf.3 == --- head/lib/libc/stdio/setbuf.3Sun Jun 14 05:50:28 2020 (r362170) +++ head/lib/libc/stdio/setbuf.3Sun Jun 14 05:59:30 2020 (r362171) @@ -32,7 +32,7 @@ .\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 18, 2013 +.Dd May 1, 2020 .Dt SETBUF 3 .Os .Sh NAME @@ -195,6 +195,23 @@ and functions conform to .St -isoC . +.Sh HISTORY +The +.Fn setbuf +function first appeared in +.At v7 . +The +.Fn setbuffer +function first appeared in +.Bx 4.1c . +The +.Fn setlinebuf +function first appeared in +.Bx 4.2 . +The +.Fn setvbuf +function first appeared in +.Bx 4.4 . .Sh BUGS .Fn setbuf usually uses a suboptimal buffer size and should be avoided. Modified: head/lib/libc/string/strlcpy.3 == --- head/lib/libc/string/strlcpy.3 Sun Jun 14 05:50:28 2020 (r362170) +++ head/lib/libc/string/strlcpy.3 Sun Jun 14 05:59:30 2020 (r362171) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2016 +.Dd May 1, 2020 .Dt STRLCPY 3 .Os .Sh NAME @@ -189,6 +189,16 @@ As a matter of fact, the first version of this manual .Xr strncat 3 , .Xr strncpy 3 , .Xr wcslcpy 3 +.Rs +.%A Todd C. Miller +.%A Theo de Raadt +.%T strlcpy and strlcat -- Consistent, Safe, String Copy and Concatenation +.%I USENIX Association +.%B Proceedings of the FREENIX Track: 1999 USENIX Annual Technical Conference +.%D June 6-11, 1999 +.%U http://www.usenix.org/publications/library/proceedings/usenix99/ +.%U full_papers/millert/millert.pdf +.Re .Sh HISTORY The .Fn strlcpy Modified: head/lib/libc/sys/getgid.2 == --- head/lib/libc/sys/getgid.2 Sun Jun 14 05:50:28 2020(r362170) +++ head/lib/libc/sys/getgid.2 Sun Jun 14 05:59:30 2020(r362171) @@ -28,7 +28,7 @@ .\" @(#)getgid.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 15, 2015 +.Dd May 1, 2020 .Dt GETGID 2 .Os .Sh NAME @@ -78,3 +78,8 @@ and .Fn getegid system calls are expected to conform to .St -p1003.1-90 . +.Sh HISTORY +The +.Fn getgid +function appeared in +.At v4 . Modified: head/lib/libc/sys/getitimer.2 == --- head/lib/libc/sys/getitimer.2 Sun Jun 14 05:50:28 2020 (r362170) +++ head/lib/libc/sys/getitimer.2 Sun Jun 14 05:59:30 2020 (r362171) @@ -28,7 +28,7 @@ .\" @(#)getitimer.28.3 (Berkeley) 5/16/95 .\" $FreeBSD$ .\" -.Dd May 16, 1995 +.Dd May 1, 2020 .Dt GETITIMER 2 .Os .Sh NAME @@ -173,6 +173,21 @@ to be handled. .Xr select 2 , .Xr sigaction 2 , .Xr clocks 7 +.Sh STANDARDS +The +.Fn getitimer +and +.Fn setitimer +functions conform to +.St -p1003.1-2001 . +The later +.St -p1003.1-2008 +revision however marked both functions as obsolescent, +recommending the use of +.Xr