git: 5d2d599d3f34 - main - Create VM_MEMATTR_DEVICE on all architectures
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5d2d599d3f3494d813e51e1bcd1c9693eb9c098b commit 5d2d599d3f3494d813e51e1bcd1c9693eb9c098b Author: Andrew Turner AuthorDate: 2021-04-10 07:59:29 + Commit: Andrew Turner CommitDate: 2021-04-12 06:15:31 + Create VM_MEMATTR_DEVICE on all architectures This is intended to be used with memory mapped IO, e.g. from bus_space_map with no flags, or pmap_mapdev. Use this new memory type in the map request configured by resource_init_map_request, and in pciconf. Reviewed by:kib Differential Revision: https://reviews.freebsd.org/D29692 --- sys/amd64/include/vm.h | 1 + sys/i386/include/vm.h | 1 + sys/kern/subr_bus.c| 2 +- sys/mips/include/vm.h | 1 + sys/powerpc/include/vm.h | 2 ++ usr.sbin/pciconf/pciconf.c | 4 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/amd64/include/vm.h b/sys/amd64/include/vm.h index 2e9c30da9936..fef7a53ca317 100644 --- a/sys/amd64/include/vm.h +++ b/sys/amd64/include/vm.h @@ -43,5 +43,6 @@ #defineVM_MEMATTR_WEAK_UNCACHEABLE ((vm_memattr_t)PAT_UNCACHED) #defineVM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK +#defineVM_MEMATTR_DEVICE VM_MEMATTR_UNCACHEABLE #endif /* !_MACHINE_VM_H_ */ diff --git a/sys/i386/include/vm.h b/sys/i386/include/vm.h index 2e9c30da9936..fef7a53ca317 100644 --- a/sys/i386/include/vm.h +++ b/sys/i386/include/vm.h @@ -43,5 +43,6 @@ #defineVM_MEMATTR_WEAK_UNCACHEABLE ((vm_memattr_t)PAT_UNCACHED) #defineVM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK +#defineVM_MEMATTR_DEVICE VM_MEMATTR_UNCACHEABLE #endif /* !_MACHINE_VM_H_ */ diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 31975fb8977c..2a8cf00b5700 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3155,7 +3155,7 @@ resource_init_map_request_impl(struct resource_map_request *args, size_t sz) { bzero(args, sz); args->size = sz; - args->memattr = VM_MEMATTR_UNCACHEABLE; + args->memattr = VM_MEMATTR_DEVICE; } /** diff --git a/sys/mips/include/vm.h b/sys/mips/include/vm.h index 06af199db17b..c759d8cfa61e 100644 --- a/sys/mips/include/vm.h +++ b/sys/mips/include/vm.h @@ -38,6 +38,7 @@ #defineVM_MEMATTR_UNCACHEABLE ((vm_memattr_t)MIPS_CCA_UNCACHED) #defineVM_MEMATTR_WRITE_BACK ((vm_memattr_t)MIPS_CCA_CACHED) #defineVM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK +#defineVM_MEMATTR_DEVICE VM_MEMATTR_UNCACHEABLE #ifdef MIPS_CCA_WC #defineVM_MEMATTR_WRITE_COMBINING ((vm_memattr_t)MIPS_CCA_WC) #endif diff --git a/sys/powerpc/include/vm.h b/sys/powerpc/include/vm.h index 3af863509908..692bd8fc2d77 100644 --- a/sys/powerpc/include/vm.h +++ b/sys/powerpc/include/vm.h @@ -42,4 +42,6 @@ #defineVM_MEMATTR_WRITE_THROUGH0x10 #defineVM_MEMATTR_PREFETCHABLE 0x20 +#defineVM_MEMATTR_DEVICE VM_MEMATTR_DEFAULT + #endif /* !_MACHINE_VM_H_ */ diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 6b54687d7c79..ccc816d5986d 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -1126,11 +1126,7 @@ dump_bar(const char *name, const char *reg, const char *bar_start, if (*reg == '\0' || *el != '\0') errx(1, "Invalid bar specification %s", reg); pbm.pbm_flags = 0; -#ifdef VM_MEMATTR_DEVICE pbm.pbm_memattr = VM_MEMATTR_DEVICE; -#else - pbm.pbm_memattr = VM_MEMATTR_UNCACHEABLE; -#endif fd = open(_PATH_DEVPCI, O_RDWR, 0); if (fd < 0) ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 3da598388943 - main - Remove versatile support
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3da598388943b428bfd165c4d80d0428a23b61f1 commit 3da598388943b428bfd165c4d80d0428a23b61f1 Author: Andrew Turner AuthorDate: 2021-04-11 13:26:50 + Commit: Andrew Turner CommitDate: 2021-04-12 06:16:31 + Remove versatile support It was used for testing armv6 under QEMU, however since then we added support for the QEMU virt platform. Reviewed by:imp, manu Differential Revision: https://reviews.freebsd.org/D29707 --- sys/arm/annapurna/alpine/files.alpine | 2 +- sys/arm/arm/pl190.c | 311 sys/arm/{versatile => arm}/sp804.c| 0 sys/arm/conf/VERSATILEPB | 75 --- sys/arm/versatile/files.versatile | 9 - sys/arm/versatile/pl050.c | 742 --- sys/arm/versatile/versatile_clcd.c| 921 -- sys/arm/versatile/versatile_machdep.c | 104 sys/arm/versatile/versatile_pci.c | 548 sys/arm/versatile/versatile_scm.c | 144 -- sys/arm/versatile/versatile_scm.h | 49 -- sys/arm/versatile/versatile_sic.c | 324 12 files changed, 1 insertion(+), 3228 deletions(-) diff --git a/sys/arm/annapurna/alpine/files.alpine b/sys/arm/annapurna/alpine/files.alpine index 6724b45ec505..9b00d1db2d5d 100644 --- a/sys/arm/annapurna/alpine/files.alpine +++ b/sys/arm/annapurna/alpine/files.alpine @@ -1,6 +1,6 @@ # $FreeBSD$ -arm/versatile/sp804.c standard +arm/arm/sp804.cstandard dev/uart/uart_dev_ns8250.c optionaluart arm/annapurna/alpine/alpine_machdep.c standard diff --git a/sys/arm/arm/pl190.c b/sys/arm/arm/pl190.c deleted file mode 100644 index a8ca18effb8c.. --- a/sys/arm/arm/pl190.c +++ /dev/null @@ -1,311 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2012-2017 Oleksandr Tymoshenko - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "pic_if.h" - -#ifdef DEBUG -#define dprintf(fmt, args...) printf(fmt, ##args) -#else -#define dprintf(fmt, args...) -#endif - -#defineVICIRQSTATUS0x000 -#defineVICFIQSTATUS0x004 -#defineVICRAWINTR 0x008 -#defineVICINTSELECT0x00C -#defineVICINTENABLE0x010 -#defineVICINTENCLEAR 0x014 -#defineVICSOFTINT 0x018 -#defineVICSOFTINTCLEAR 0x01C -#defineVICPROTECTION 0x020 -#defineVICPERIPHID 0xFE0 -#defineVICPRIMECELLID 0xFF0 - -#defineVIC_NIRQS 32 - -struct pl190_intc_irqsrc { - struct intr_irqsrc isrc; - u_int irq; -}; - -struct pl190_intc_softc { - device_tdev; - struct mtx mtx; - struct resource * intc_res; - struct pl190_intc_irqsrcisrcs[VIC_NIRQS]; -}; - -#defineINTC_VIC_READ_4(sc, reg)\ -bus_read_4(sc->intc_res, (reg)) -#defineINTC_VIC_WRITE_4(sc, reg, val) \ -bus_write_4(sc->intc_res, (reg), (val)) - -#defineVIC_LOCK(_sc) mtx_lock_spin(&(_sc)->mtx) -#defineVIC_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->mtx) - -static inline void -pl190_intc_irq_dispatch(struct pl190_intc_softc *sc, u_int irq, -struct trapframe *tf) -{ - struct pl190_
git: 5e98cae661f3 - main - pf: Ensure that we don't use kif passed to pfi_kkif_attach()
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5e98cae661f3a7e85df7f277660765b823454073 commit 5e98cae661f3a7e85df7f277660765b823454073 Author: Kristof Provost AuthorDate: 2021-04-12 09:45:48 + Commit: Kristof Provost CommitDate: 2021-04-12 09:55:21 + pf: Ensure that we don't use kif passed to pfi_kkif_attach() Once a kif is passed to pfi_kkif_attach() we must ensure we never re-use it for anything else. Set the kif to NULL afterwards to guarantee this. Reported-by: syzbot+be5d4f4a7a4c295e6...@syzkaller.appspotmail.com MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_if.c| 1 + sys/netpfil/pf/pf_ioctl.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index be290a1e1f2e..4630098221c8 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -486,6 +486,7 @@ pfi_dynaddr_setup(struct pf_addr_wrap *aw, sa_family_t af) dyn->pfid_kif = pfi_kkif_attach(kif, IFG_ALL); else dyn->pfid_kif = pfi_kkif_attach(kif, aw->v.ifname); + kif = NULL; pfi_kkif_ref(dyn->pfid_kif); dyn->pfid_net = pfi_unmask(&aw->v.a.mask); diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 0b8570f294bf..6ea2a1c4571c 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2345,6 +2345,7 @@ pf_ioctl_addrule(struct pf_krule *rule, uint32_t ticket, rule->nr = 0; if (rule->ifname[0]) { rule->kif = pfi_kkif_attach(kif, rule->ifname); + kif = NULL; pfi_kkif_ref(rule->kif); } else rule->kif = NULL; @@ -2962,6 +2963,7 @@ DIOCGETRULENV_error: if (newrule->ifname[0]) { newrule->kif = pfi_kkif_attach(kif, newrule->ifname); + kif = NULL; pfi_kkif_ref(newrule->kif); } else newrule->kif = NULL; @@ -3747,6 +3749,7 @@ DIOCGETSTATES_full: } if (pa->ifname[0]) { pa->kif = pfi_kkif_attach(kif, pa->ifname); + kif = NULL; pfi_kkif_ref(pa->kif); } else pa->kif = NULL; ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0dd13c77432a - main - libnv: Build PIC
On 10 Apr 2021, at 17:27, Shawn Webb wrote: On Sat, Apr 10, 2021 at 09:16:22AM +, Kristof Provost wrote: The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0dd13c77432ade1ae94c9661cbad5537e3e6ab1d commit 0dd13c77432ade1ae94c9661cbad5537e3e6ab1d Author: Kristof Provost AuthorDate: 2021-04-02 15:06:02 + Commit: Kristof Provost CommitDate: 2021-04-10 09:16:01 + libnv: Build PIC Build libnv as position independent code so we can use it from shared libraries. MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29561 --- lib/libnv/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile index b13758931c4e..854cd2c7f3f3 100644 --- a/lib/libnv/Makefile +++ b/lib/libnv/Makefile @@ -10,6 +10,7 @@ SHLIB_MAJOR= 0 .PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys CFLAGS+=-I${.CURDIR} +CFLAGS+=-fPIC Wouldn't the better fix be renaming LIB to SHLIB like every other PIC lib? Ed pointed me at INSTALL_PIC_ARCHIVE. I’m also pondering just making libpfctl a .so, which should also fix the issue this addresses. The complication is that libpfctl is currently a .a, and can be used in a shared library itself (for bsnmp), so it has to be - and use - PIC. Best regards, Kristof ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: f66a1f40740c - main - genet: Use device_t in preference to struct device *
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f66a1f40740c63741b6ebe48cb0cbce9e52ef34e commit f66a1f40740c63741b6ebe48cb0cbce9e52ef34e Author: Mark Johnston AuthorDate: 2021-04-12 13:31:58 + Commit: Mark Johnston CommitDate: 2021-04-12 13:31:58 + genet: Use device_t in preference to struct device * MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/arm64/broadcom/genet/if_genet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/broadcom/genet/if_genet.c b/sys/arm64/broadcom/genet/if_genet.c index 0fe9f80f4c21..d0fe2b0d5e71 100644 --- a/sys/arm64/broadcom/genet/if_genet.c +++ b/sys/arm64/broadcom/genet/if_genet.c @@ -538,7 +538,7 @@ gen_dma_disable(device_t dev) static int gen_bus_dma_init(struct gen_softc *sc) { - struct device *dev = sc->dev; + device_t dev = sc->dev; int i, error; error = bus_dma_tag_create( ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: d8b1601d54e9 - main - al_eth: Use device_t in preference to struct device *
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d8b1601d54e94a47af37742420403b16be239ad2 commit d8b1601d54e94a47af37742420403b16be239ad2 Author: Mark Johnston AuthorDate: 2021-04-12 13:32:02 + Commit: Mark Johnston CommitDate: 2021-04-12 13:32:02 + al_eth: Use device_t in preference to struct device * MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/al_eth/al_eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c index e2fe8c42603f..bfc94275a21c 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -558,7 +558,7 @@ al_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) } static int -al_dma_alloc_coherent(struct device *dev, bus_dma_tag_t *tag, bus_dmamap_t *map, +al_dma_alloc_coherent(device_t dev, bus_dma_tag_t *tag, bus_dmamap_t *map, bus_addr_t *baddr, void **vaddr, uint32_t size) { int ret; @@ -2295,7 +2295,7 @@ static int al_eth_setup_tx_resources(struct al_eth_adapter *adapter, int qid) { struct al_eth_ring *tx_ring = &adapter->tx_ring[qid]; - struct device *dev = tx_ring->dev; + device_t dev = tx_ring->dev; struct al_udma_q_params *q_params = &tx_ring->q_params; int size; int ret; @@ -2472,7 +2472,7 @@ static int al_eth_setup_rx_resources(struct al_eth_adapter *adapter, unsigned int qid) { struct al_eth_ring *rx_ring = &adapter->rx_ring[qid]; - struct device *dev = rx_ring->dev; + device_t dev = rx_ring->dev; struct al_udma_q_params *q_params = &rx_ring->q_params; int size; int ret; ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 56cbd386fbae - main - qlnxr: Properly initialize the Linux device structure
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=56cbd386fbaefc009541870ee013b2ff8d096bfc commit 56cbd386fbaefc009541870ee013b2ff8d096bfc Author: Mark Johnston AuthorDate: 2021-04-12 13:32:08 + Commit: Mark Johnston CommitDate: 2021-04-12 13:32:08 + qlnxr: Properly initialize the Linux device structure The driver needs to provide a LinuxKPI device structure to register itself with the IB subsystem. It was erroneously using a copy of its FreeBSD device structure for this purpose. Use linux_pci_attach_device() instead, following the example of the Chelsio iwarp driver. Also ensure that we don't leak the faked device during detach. Reviewed by:hselasky MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29595 --- sys/dev/qlnx/qlnxr/qlnxr_def.h | 2 +- sys/dev/qlnx/qlnxr/qlnxr_os.c | 10 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/dev/qlnx/qlnxr/qlnxr_def.h b/sys/dev/qlnx/qlnxr/qlnxr_def.h index 04f911e792a8..9bc663e2a8d0 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_def.h +++ b/sys/dev/qlnx/qlnxr/qlnxr_def.h @@ -364,7 +364,7 @@ struct qlnxr_dev { struct ecore_dev*cdev; /* Added to extend Applications Support */ -struct pci_dev *pdev; +struct pci_dev pdev; uint32_tdp_module; uint8_t dp_level; diff --git a/sys/dev/qlnx/qlnxr/qlnxr_os.c b/sys/dev/qlnx/qlnxr/qlnxr_os.c index b6b56f58f166..62c0f2091d2f 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_os.c +++ b/sys/dev/qlnx/qlnxr/qlnxr_os.c @@ -257,7 +257,7 @@ qlnxr_register_device(qlnxr_dev_t *dev) ibdev->post_recv = qlnxr_post_recv; ibdev->process_mad = qlnxr_process_mad; -ibdev->dma_device = &dev->pdev->dev; + ibdev->dma_device = &dev->pdev.dev; ibdev->get_link_layer = qlnxr_link_layer; @@ -1097,11 +1097,7 @@ qlnxr_add(void *eth_dev) dev->ha = eth_dev; dev->cdev = &ha->cdev; /* Added to extend Application support */ - dev->pdev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL); - -dev->pdev->dev = *(dev->ha->pci_dev); -dev->pdev->device = pci_get_device(dev->ha->pci_dev); -dev->pdev->vendor = pci_get_vendor(dev->ha->pci_dev); + linux_pci_attach_device(dev->ha->pci_dev, NULL, NULL, &dev->pdev); dev->rdma_ctx = &ha->cdev.hwfns[0]; dev->wq_multiplier = wq_multiplier; @@ -1210,6 +1206,8 @@ qlnxr_remove(void *eth_dev, void *qlnx_rdma_dev) qlnxr_remove_sysfiles(dev); ib_dealloc_device(&dev->ibdev); + linux_pci_detach_device(&dev->pdev); + QL_DPRINT12(ha, "exit ha = %p qlnx_rdma_dev = %p\n", ha, qlnx_rdma_dev); return (0); } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 9771af4942ec - main - cxgb: Use device_t in preference to struct device *
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9771af4942ec735d3f16d0697bb705a911a67266 commit 9771af4942ec735d3f16d0697bb705a911a67266 Author: Mark Johnston AuthorDate: 2021-04-12 13:32:04 + Commit: Mark Johnston CommitDate: 2021-04-12 13:32:04 + cxgb: Use device_t in preference to struct device * MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/cxgb/common/cxgb_ctl_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgb/common/cxgb_ctl_defs.h b/sys/dev/cxgb/common/cxgb_ctl_defs.h index fe8a4f7defc7..188e54fb0fc2 100644 --- a/sys/dev/cxgb/common/cxgb_ctl_defs.h +++ b/sys/dev/cxgb/common/cxgb_ctl_defs.h @@ -124,7 +124,7 @@ struct rdma_info { unsigned int udbell_len; /* user doorbell region length */ unsigned long udbell_physbase; /* user doorbell physical start addr */ void *kdb_addr; /* kernel doorbell register address */ - struct device *pdev;/* associated PCI device */ + device_t pdev; /* associated PCI device */ }; /* ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 3f322b22e02d - main - linuxkpi: Fix pcie_set_readrq()
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3f322b22e02d6aae147e9948ab50ca1bee9a9dd4 commit 3f322b22e02d6aae147e9948ab50ca1bee9a9dd4 Author: Mark Johnston AuthorDate: 2021-04-12 13:32:21 + Commit: Mark Johnston CommitDate: 2021-04-12 13:32:21 + linuxkpi: Fix pcie_set_readrq() We were passing a LinuxKPI struct device * to a pci(4) function that expects a device_t. Reviewed by:manu, hselasky, bz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29675 --- sys/compat/linuxkpi/common/include/linux/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 7962da994854..c718c674ea1f 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -709,7 +709,7 @@ lkpi_pci_restore_state(struct pci_dev *pdev) /* XXX This should not be necessary. */ #definepcix_set_mmrbc(d, v)0 #definepcix_get_max_mmrbc(d) 0 -#definepcie_set_readrq(d, v) pci_set_max_read_req(&(d)->dev, (v)) +#definepcie_set_readrq(d, v) pci_set_max_read_req((d)->dev.bsddev, (v)) #definePCI_DMA_BIDIRECTIONAL 0 #definePCI_DMA_TODEVICE1 ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: dfff37765ce4 - main - Rename struct device to struct _device
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dfff37765ce4ea4fd7db4d293b459dc84008f411 commit dfff37765ce4ea4fd7db4d293b459dc84008f411 Author: Mark Johnston AuthorDate: 2021-04-12 13:32:30 + Commit: Mark Johnston CommitDate: 2021-04-12 13:32:30 + Rename struct device to struct _device types.h defines device_t as a typedef of struct device *. struct device is defined in subr_bus.c and almost all of the kernel uses device_t. The LinuxKPI also defines a struct device, so type confusion can occur. This causes bugs and ambiguity for debugging tools. Rename the FreeBSD struct device to struct _device. Reviewed by:gbe (man pages) Reviewed by:rpokala, imp, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29676 --- share/man/man9/device.9 | 2 +- share/man/man9/rman.9 | 6 +++--- sys/kern/subr_bus.c | 15 +-- sys/powerpc/include/bus_dma.h | 4 +--- sys/sys/pcpu.h| 2 +- sys/sys/systm.h | 4 +--- sys/sys/types.h | 2 +- 7 files changed, 17 insertions(+), 18 deletions(-) diff --git a/share/man/man9/device.9 b/share/man/man9/device.9 index 40bd3f16d3ee..d5e30f0abefa 100644 --- a/share/man/man9/device.9 +++ b/share/man/man9/device.9 @@ -35,7 +35,7 @@ .Nm device .Nd an abstract representation of a device .Sh SYNOPSIS -.Vt typedef struct device *device_t ; +.Vt typedef struct _device *device_t ; .Sh DESCRIPTION The device object represents a piece of hardware attached to the system such as an expansion card, the bus which that card is plugged diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9 index 3e03c05f9088..3faea2a014fc 100644 --- a/share/man/man9/rman.9 +++ b/share/man/man9/rman.9 @@ -88,12 +88,12 @@ .Ft "struct resource *" .Fo rman_reserve_resource .Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" -.Fa "u_int flags" "struct device *dev" +.Fa "u_int flags" "device_t dev" .Fc .Ft "struct resource *" .Fo rman_reserve_resource_bound .Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" -.Fa "rman_res_t bound" "u_int flags" "struct device *dev" +.Fa "rman_res_t bound" "u_int flags" "device_t dev" .Fc .Ft uint32_t .Fn rman_make_alignment_flags "uint32_t size" @@ -101,7 +101,7 @@ .Fn rman_get_start "struct resource *r" .Ft rman_res_t .Fn rman_get_end "struct resource *r" -.Ft "struct device *" +.Ft "device_t" .Fn rman_get_device "struct resource *r" .Ft rman_res_t .Fn rman_get_size "struct resource *r" diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 2a8cf00b5700..08f1cb5886d2 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -95,7 +95,7 @@ struct driverlink { */ typedef TAILQ_HEAD(devclass_list, devclass) devclass_list_t; typedef TAILQ_HEAD(driver_list, driverlink) driver_list_t; -typedef TAILQ_HEAD(device_list, device) device_list_t; +typedef TAILQ_HEAD(device_list, _device) device_list_t; struct devclass { TAILQ_ENTRY(devclass) link; @@ -112,9 +112,12 @@ struct devclass { }; /** - * @brief Implementation of device. + * @brief Implementation of _device. + * + * The structure is named "_device" instead of "device" to avoid type confusion + * caused by other subsystems defining a (struct device). */ -struct device { +struct _device { /* * A device is a kernel object. The first field must be the * current ops table for the object. @@ -124,8 +127,8 @@ struct device { /* * Device hierarchy. */ - TAILQ_ENTRY(device) link; /**< list of devices in parent */ - TAILQ_ENTRY(device) devlink; /**< global device list membership */ + TAILQ_ENTRY(_device)link; /**< list of devices in parent */ + TAILQ_ENTRY(_device)devlink; /**< global device list membership */ device_tparent; /**< parent of this device */ device_list_t children; /**< list of child devices */ @@ -853,7 +856,7 @@ devctl_safe_quote_sb(struct sbuf *sb, const char *src) /* End of /dev/devctl code */ -static TAILQ_HEAD(,device) bus_data_devices; +static struct device_list bus_data_devices; static int bus_data_generation = 1; static kobj_method_t null_methods[] = { diff --git a/sys/powerpc/include/bus_dma.h b/sys/powerpc/include/bus_dma.h index ba4ebdab4c42..947a25819a7e 100644 --- a/sys/powerpc/include/bus_dma.h +++ b/sys/powerpc/include/bus_dma.h @@ -33,8 +33,6 @@ #include #include -struct device; - -int bus_dma_tag_set_iommu(bus_dma_tag_t, struct device *iommu, void *cookie); +int bus_dma_tag_set_iommu(bus_dma_tag_t, device_t iommu, void *cookie); #endif /* _POWERPC_BUS_DMA_H_ */ diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h index 43827b1af4fa..cfc8a215707c 100644 --- a/sys/sys/pcpu.h +++ b/sys/sys/pcpu.h
git: 7497dd588901 - main - Fix build of stand/usb .
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=7497dd58890131251441ab992016c9457295094b commit 7497dd58890131251441ab992016c9457295094b Author: Hans Petter Selasky AuthorDate: 2021-04-12 14:12:18 + Commit: Hans Petter Selasky CommitDate: 2021-04-12 14:13:33 + Fix build of stand/usb . MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- stand/kshim/bsd_kernel.h | 2 ++ sys/sys/gpio.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stand/kshim/bsd_kernel.h b/stand/kshim/bsd_kernel.h index d99d9ef0cecb..808b1b078db5 100644 --- a/stand/kshim/bsd_kernel.h +++ b/stand/kshim/bsd_kernel.h @@ -242,6 +242,8 @@ typedef signed long ssize_t; #define_OFF_T_DECLARED typedef unsigned long off_t; +typedef int64_t sbintime_t; + typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned intu_int; diff --git a/sys/sys/gpio.h b/sys/sys/gpio.h index 50b9b9dbb0e5..9ea1d6636c20 100644 --- a/sys/sys/gpio.h +++ b/sys/sys/gpio.h @@ -53,7 +53,7 @@ #define __GPIO_H__ #include -#ifndef _KERNEL +#if !defined(_KERNEL) && !defined(_STANDALONE) #include #endif ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 82431b7506d6 - main - rc: remove the 'archdep' script
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=82431b7506d646165d52f11bc2958e8ce8ec5cce commit 82431b7506d646165d52f11bc2958e8ce8ec5cce Author: Edward Tomasz Napierala AuthorDate: 2021-04-12 13:38:16 + Commit: Edward Tomasz Napierala CommitDate: 2021-04-12 14:18:17 + rc: remove the 'archdep' script It was unused since 405c3050f10, which removed iBCS support. This also moves the 'linux' rc script slightly earlier, which might help in some setups. The original version of this patch moved it even more, before 'mountcritlocal', which would fixe mount(8) errors due to missing /dev/shm in setups with entries for /path/to/chroot/dev/shm without the "late" flag; however, in the end 'kldxref' turned out to depend on 'mountcritlocal' anyway. Reported By:pstef Reviewed By:dchagin Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D29590 --- ObsoleteFiles.inc| 3 +++ libexec/rc/rc.d/Makefile | 1 - libexec/rc/rc.d/archdep | 26 -- libexec/rc/rc.d/linux| 2 +- libexec/rc/rc.d/sysvipc | 2 +- 5 files changed, 5 insertions(+), 29 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 373e014ba074..1019436f1e28 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20210410: remove unused libexec/rc.d/archdep +OLD_FILES+=etc/rc.d/archdep + # 20210408: remove tcp_hostcache.h OLD_FILES+=usr/include/netinet/tcp_hostcache.h diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 1a61e89aa215..7b15cab40bb8 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -13,7 +13,6 @@ CONFS=DAEMON \ SERVERS \ addswap \ adjkerntz \ - archdep \ bgfsck \ ${_blacklistd} \ bridge \ diff --git a/libexec/rc/rc.d/archdep b/libexec/rc/rc.d/archdep deleted file mode 100755 index 52a7ac684eed.. --- a/libexec/rc/rc.d/archdep +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: archdep -# REQUIRE: mountcritremote -# KEYWORD: nojail - -. /etc/rc.subr - -name="archdep" -start_cmd="archdep_start" -stop_cmd=":" - -archdep_start() -{ - local _arch - - _arch=`${SYSCTL_N} hw.machine_arch` - case $_arch in - esac -} - -load_rc_config $name -run_rc_command "$1" diff --git a/libexec/rc/rc.d/linux b/libexec/rc/rc.d/linux index c9c45ba8b338..882cf4012495 100755 --- a/libexec/rc/rc.d/linux +++ b/libexec/rc/rc.d/linux @@ -4,7 +4,7 @@ # # PROVIDE: linux -# REQUIRE: archdep +# REQUIRE: kldxref # KEYWORD: nojail . /etc/rc.subr diff --git a/libexec/rc/rc.d/sysvipc b/libexec/rc/rc.d/sysvipc index 0effbe7e22ca..bbec47d75e24 100755 --- a/libexec/rc/rc.d/sysvipc +++ b/libexec/rc/rc.d/sysvipc @@ -4,7 +4,7 @@ # # PROVIDE: sysvipc -# REQUIRE: archdep +# REQUIRE: kldxref # KEYWORD: nojail . /etc/rc.subr ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 034669e85621 - main - rc: replace NETWORK with NETWORKING
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=034669e856211cbc55d6ac7119629701d182647d commit 034669e856211cbc55d6ac7119629701d182647d Author: Edward Tomasz Napierala AuthorDate: 2021-04-05 15:57:44 + Commit: Edward Tomasz Napierala CommitDate: 2021-04-12 14:28:48 + rc: replace NETWORK with NETWORKING This improves consistency; the NETWORKING script provides both, so there should be no functional change. Differential Revision: https://reviews.freebsd.org/D29587 --- libexec/rc/rc.d/iscsictl | 2 +- libexec/rc/rc.d/iscsid | 2 +- libexec/rc/rc.d/kfd | 2 +- libexec/rc/rc.d/routed | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc.d/iscsictl b/libexec/rc/rc.d/iscsictl index 6ae3910f0628..471b030ff799 100755 --- a/libexec/rc/rc.d/iscsictl +++ b/libexec/rc/rc.d/iscsictl @@ -4,7 +4,7 @@ # # PROVIDE: iscsictl -# REQUIRE: NETWORK iscsid +# REQUIRE: NETWORKING iscsid # BEFORE: DAEMON # KEYWORD: nojail diff --git a/libexec/rc/rc.d/iscsid b/libexec/rc/rc.d/iscsid index 3b1cb6f40d1c..48a7b61d1533 100755 --- a/libexec/rc/rc.d/iscsid +++ b/libexec/rc/rc.d/iscsid @@ -4,7 +4,7 @@ # # PROVIDE: iscsid -# REQUIRE: NETWORK +# REQUIRE: NETWORKING # BEFORE: DAEMON # KEYWORD: nojail diff --git a/libexec/rc/rc.d/kfd b/libexec/rc/rc.d/kfd index 5a1a16c37af4..65feaf6102f4 100755 --- a/libexec/rc/rc.d/kfd +++ b/libexec/rc/rc.d/kfd @@ -4,7 +4,7 @@ # # PROVIDE: kfd -# REQUIRE: NETWORK +# REQUIRE: NETWORKING # KEYWORD: shutdown . /etc/rc.subr diff --git a/libexec/rc/rc.d/routed b/libexec/rc/rc.d/routed index 81ba077c85e4..ecf8f5a88b39 100755 --- a/libexec/rc/rc.d/routed +++ b/libexec/rc/rc.d/routed @@ -5,7 +5,7 @@ # PROVIDE: routed dynamicrouting # REQUIRE: netif routing -# BEFORE: NETWORK +# BEFORE: NETWORKING # KEYWORD: nojailvnet . /etc/rc.subr ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: dfff37765ce4 - main - Rename struct device to struct _device
In message <202104121336.13cdai5a029...@gitrepo.freebsd.org>, Mark Johnston wri tes: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=dfff37765ce4ea4fd7db4d293b459dc8 > 4008f411 > > commit dfff37765ce4ea4fd7db4d293b459dc84008f411 > Author: Mark Johnston > AuthorDate: 2021-04-12 13:32:30 + > Commit: Mark Johnston > CommitDate: 2021-04-12 13:32:30 + > > Rename struct device to struct _device > > types.h defines device_t as a typedef of struct device *. struct device > is defined in subr_bus.c and almost all of the kernel uses device_t. > The LinuxKPI also defines a struct device, so type confusion can occur. > > This causes bugs and ambiguity for debugging tools. Rename the FreeBSD > struct device to struct _device. > > Reviewed by:gbe (man pages) > Reviewed by:rpokala, imp, jhb > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D29676 > --- > share/man/man9/device.9 | 2 +- > share/man/man9/rman.9 | 6 +++--- > sys/kern/subr_bus.c | 15 +-- > sys/powerpc/include/bus_dma.h | 4 +--- > sys/sys/pcpu.h| 2 +- > sys/sys/systm.h | 4 +--- > sys/sys/types.h | 2 +- > 7 files changed, 17 insertions(+), 18 deletions(-) Not that a name matters much but struct _device gives me a sense that the struct is ancillary. Whereas freebsd_device or fbsd_device is more descriptive and gives the struct the status it deserves. Then again, maybe it's just me. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: dfff37765ce4 - main - Rename struct device to struct _device
Hi, On 4/12/21 4:30 PM, Cy Schubert wrote: Whereas freebsd_device or fbsd_device is more descriptive and gives the struct the status it deserves There are other non-FreeBSD OS'es using this structure too. I think freebsd_device is too specific. How about bsd_device? In this world of cross OS compatibility I see a point not being too generic when naming structures. --HPS ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: dfff37765ce4 - main - Rename struct device to struct _device
On Mon, Apr 12, 2021 at 07:30:30AM -0700, Cy Schubert wrote: > In message <202104121336.13cdai5a029...@gitrepo.freebsd.org>, Mark Johnston > wri > tes: > > The branch main has been updated by markj: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=dfff37765ce4ea4fd7db4d293b459dc8 > > 4008f411 > > > > commit dfff37765ce4ea4fd7db4d293b459dc84008f411 > > Author: Mark Johnston > > AuthorDate: 2021-04-12 13:32:30 + > > Commit: Mark Johnston > > CommitDate: 2021-04-12 13:32:30 + > > > > Rename struct device to struct _device > > > > types.h defines device_t as a typedef of struct device *. struct device > > is defined in subr_bus.c and almost all of the kernel uses device_t. > > The LinuxKPI also defines a struct device, so type confusion can occur. > > > > This causes bugs and ambiguity for debugging tools. Rename the FreeBSD > > struct device to struct _device. > > > > Reviewed by:gbe (man pages) > > Reviewed by:rpokala, imp, jhb > > MFC after: 1 week > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D29676 > > --- > > share/man/man9/device.9 | 2 +- > > share/man/man9/rman.9 | 6 +++--- > > sys/kern/subr_bus.c | 15 +-- > > sys/powerpc/include/bus_dma.h | 4 +--- > > sys/sys/pcpu.h| 2 +- > > sys/sys/systm.h | 4 +--- > > sys/sys/types.h | 2 +- > > 7 files changed, 17 insertions(+), 18 deletions(-) > > Not that a name matters much but struct _device gives me a sense that the > struct is ancillary. That's really the intent. struct _device is the internal name and device_t should be used by consumers. > Whereas freebsd_device or fbsd_device is more > descriptive and gives the struct the status it deserves. > > Then again, maybe it's just me. > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0dd13c77432a - main - libnv: Build PIC
On Mon, Apr 12, 2021 at 01:39:50PM +0200, Kristof Provost wrote: > On 10 Apr 2021, at 17:27, Shawn Webb wrote: > > On Sat, Apr 10, 2021 at 09:16:22AM +, Kristof Provost wrote: > > > The branch main has been updated by kp: > > > > > > URL: > > > https://cgit.FreeBSD.org/src/commit/?id=0dd13c77432ade1ae94c9661cbad5537e3e6ab1d > > > > > > commit 0dd13c77432ade1ae94c9661cbad5537e3e6ab1d > > > Author: Kristof Provost > > > AuthorDate: 2021-04-02 15:06:02 + > > > Commit: Kristof Provost > > > CommitDate: 2021-04-10 09:16:01 + > > > > > > libnv: Build PIC > > > > > > Build libnv as position independent code so we can use it from > > > shared > > > libraries. > > > > > > MFC after: 4 weeks > > > Sponsored by: Rubicon Communications, LLC ("Netgate") > > > Differential Revision: https://reviews.freebsd.org/D29561 > > > --- > > > lib/libnv/Makefile | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile > > > index b13758931c4e..854cd2c7f3f3 100644 > > > --- a/lib/libnv/Makefile > > > +++ b/lib/libnv/Makefile > > > @@ -10,6 +10,7 @@ SHLIB_MAJOR= 0 > > > > > > .PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys > > > CFLAGS+=-I${.CURDIR} > > > +CFLAGS+=-fPIC > > > > Wouldn't the better fix be renaming LIB to SHLIB like every other PIC > > lib? > > > Ed pointed me at INSTALL_PIC_ARCHIVE. I’m also pondering just making > libpfctl a .so, which should also fix the issue this addresses. > > The complication is that libpfctl is currently a .a, and can be used in a > shared library itself (for bsnmp), so it has to be - and use - PIC. Out of curiosity, is there a reason not to have the shared library depend on libnv as a shared library? Thanks, -- Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc signature.asc Description: PGP signature
git: 2816bd8442bc - main - rmlock(9): add an RM_DUPOK flag
The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2816bd8442bc323d50434d0e64cb4b7c10a195e8 commit 2816bd8442bc323d50434d0e64cb4b7c10a195e8 Author: Mitchell Horne AuthorDate: 2021-04-08 17:41:19 + Commit: Mitchell Horne CommitDate: 2021-04-12 14:42:21 + rmlock(9): add an RM_DUPOK flag Allows for duplicate locks to be acquired without witness complaining. Similar flags exists already for rwlock(9) and sx(9). Reviewed by:markj MFC after: 3 days Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 52 Differential Revision: https://reviews.freebsd.org/D29683n --- share/man/man9/rmlock.9 | 5 - sys/kern/kern_rmlock.c | 2 ++ sys/sys/rmlock.h| 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man9/rmlock.9 b/share/man/man9/rmlock.9 index 53de7c73b79a..6d128f986968 100644 --- a/share/man/man9/rmlock.9 +++ b/share/man/man9/rmlock.9 @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .\" Based on rwlock.9 man page -.Dd December 27, 2019 +.Dd April 12, 2021 .Dt RMLOCK 9 .Os .Sh NAME @@ -186,6 +186,9 @@ will assert that the has not been initialized multiple times without intervening calls to .Fn rm_destroy unless this option is specified. +.It Dv RM_DUPOK +.Xr witness 4 +should not log messages about duplicate locks being acquired. .El .It Fn rm_rlock "struct rmlock *rm" "struct rm_priotracker* tracker" Lock diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c index f661e209b633..7230a00e357b 100644 --- a/sys/kern/kern_rmlock.c +++ b/sys/kern/kern_rmlock.c @@ -289,6 +289,8 @@ rm_init_flags(struct rmlock *rm, const char *name, int opts) liflags |= LO_RECURSABLE; if (opts & RM_NEW) liflags |= LO_NEW; + if (opts & RM_DUPOK) + liflags |= LO_DUPOK; rm->rm_writecpus = all_cpus; LIST_INIT(&rm->rm_activeReaders); if (opts & RM_SLEEPABLE) { diff --git a/sys/sys/rmlock.h b/sys/sys/rmlock.h index 3e4db5d853c6..5aaf8f039026 100644 --- a/sys/sys/rmlock.h +++ b/sys/sys/rmlock.h @@ -48,6 +48,7 @@ #defineRM_RECURSE 0x0002 #defineRM_SLEEPABLE0x0004 #defineRM_NEW 0x0008 +#defineRM_DUPOK0x0010 void rm_init(struct rmlock *rm, const char *name); void rm_init_flags(struct rmlock *rm, const char *name, int opts); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0dd13c77432a - main - libnv: Build PIC
On 12 Apr 2021, at 16:40, Shawn Webb wrote: On Mon, Apr 12, 2021 at 01:39:50PM +0200, Kristof Provost wrote: On 10 Apr 2021, at 17:27, Shawn Webb wrote: On Sat, Apr 10, 2021 at 09:16:22AM +, Kristof Provost wrote: The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0dd13c77432ade1ae94c9661cbad5537e3e6ab1d commit 0dd13c77432ade1ae94c9661cbad5537e3e6ab1d Author: Kristof Provost AuthorDate: 2021-04-02 15:06:02 + Commit: Kristof Provost CommitDate: 2021-04-10 09:16:01 + libnv: Build PIC Build libnv as position independent code so we can use it from shared libraries. MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29561 --- lib/libnv/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile index b13758931c4e..854cd2c7f3f3 100644 --- a/lib/libnv/Makefile +++ b/lib/libnv/Makefile @@ -10,6 +10,7 @@ SHLIB_MAJOR= 0 .PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys CFLAGS+=-I${.CURDIR} +CFLAGS+=-fPIC Wouldn't the better fix be renaming LIB to SHLIB like every other PIC lib? Ed pointed me at INSTALL_PIC_ARCHIVE. I’m also pondering just making libpfctl a .so, which should also fix the issue this addresses. The complication is that libpfctl is currently a .a, and can be used in a shared library itself (for bsnmp), so it has to be - and use - PIC. Out of curiosity, is there a reason not to have the shared library depend on libnv as a shared library? That’s mostly an accident. Libpfctl is currently marked as INTERNALLIB=true, which makes it a static library and links it to the static library. I’m considering making libpfctl a shared library, if only because there are consumers of the pf ioctl interface in ports, and I intend to remove some of the old (for which there are now nvlist-based versions) ioctls. That will be a lot easier for those applications if they can just use libpfctl. The downside is that, if we consider libpfctl to be a stable ABI, we move the previous ABI problem from the kernel to userspace, rather than getting rid of it. Best regards, Kristof ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 0c6282e842b3 - main - bhyve: add SMBIOS Baseboard Information
The branch main has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=0c6282e842b33a1c86e01b27fc40af9c76fd404e commit 0c6282e842b33a1c86e01b27fc40af9c76fd404e Author: Chuck Tuffli AuthorDate: 2021-04-12 15:09:52 + Commit: Chuck Tuffli CommitDate: 2021-04-12 15:09:52 + bhyve: add SMBIOS Baseboard Information Add the System Management BIOS Baseboard (or Module) Information a.k.a. Type 2 structure to the SMBIOS emulation. Reviewed by:rgrimes, bcran, grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29657 --- usr.sbin/bhyve/smbiostbl.c | 49 ++ 1 file changed, 49 insertions(+) diff --git a/usr.sbin/bhyve/smbiostbl.c b/usr.sbin/bhyve/smbiostbl.c index 716fb48178c1..ca68f8d95363 100644 --- a/usr.sbin/bhyve/smbiostbl.c +++ b/usr.sbin/bhyve/smbiostbl.c @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #defineSMBIOS_TYPE_BIOS0 #defineSMBIOS_TYPE_SYSTEM 1 +#defineSMBIOS_TYPE_BOARD 2 #defineSMBIOS_TYPE_CHASSIS 3 #defineSMBIOS_TYPE_PROCESSOR 4 #defineSMBIOS_TYPE_MEMARRAY16 @@ -157,10 +158,31 @@ struct smbios_table_type1 { uint8_t family; /* family name string */ } __packed; +/* + * Baseboard (or Module) Information + */ +#define SMBIOS_BRF_HOSTING 0x1 +#define SMBIOS_BRT_MOTHERBOARD 0xa + +struct smbios_table_type2 { + struct smbios_structure header; + uint8_t manufacturer; /* manufacturer string */ + uint8_t product;/* product name string */ + uint8_t version;/* version string */ + uint8_t serial; /* serial number string */ + uint8_t asset; /* asset tag string */ + uint8_t fflags; /* feature flags */ + uint8_t location; /* location in chassis */ + uint16_tchandle;/* chassis handle */ + uint8_t type; /* board type */ + uint8_t n_objs; /* number of contained object handles */ +} __packed; + /* * System Enclosure or Chassis */ #defineSMBIOS_CHT_UNKNOWN 0x02/* unknown */ +#defineSMBIOS_CHT_DESKTOP 0x03/* desktop */ #defineSMBIOS_CHST_SAFE0x03/* safe */ @@ -360,6 +382,30 @@ const char *smbios_type1_strings[] = { NULL }; +struct smbios_table_type2 smbios_type2_template = { + { SMBIOS_TYPE_BOARD, sizeof (struct smbios_table_type2), 0 }, + 1, /* manufacturer string */ + 2, /* product string */ + 3, /* version string */ + 4, /* serial number string */ + 5, /* asset tag string */ + SMBIOS_BRF_HOSTING, /* feature flags */ + 6, /* location string */ + SMBIOS_CHT_DESKTOP, /* chassis handle */ + SMBIOS_BRT_MOTHERBOARD, /* board type */ + 0 +}; + +const char *smbios_type2_strings[] = { + "FreeBSD", /* manufacturer string */ + "BHYVE",/* product name string */ + "1.0", /* version string */ + "None", /* serial number string */ + "None", /* asset tag string */ + "None", /* location string */ + NULL +}; + struct smbios_table_type3 smbios_type3_template = { { SMBIOS_TYPE_CHASSIS, sizeof (struct smbios_table_type3), 0 }, 1, /* manufacturer string */ @@ -518,6 +564,9 @@ static struct smbios_template_entry smbios_template[] = { { (struct smbios_structure *)&smbios_type1_template, smbios_type1_strings, smbios_type1_initializer }, + { (struct smbios_structure *)&smbios_type2_template, + smbios_type2_strings, + smbios_generic_initializer }, { (struct smbios_structure *)&smbios_type3_template, smbios_type3_strings, smbios_generic_initializer }, ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 08d9c9202755 - main - tcp_input/syncache: acquire only read lock on PCB for SYN, !ACK packets
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=08d9c9202755a30f97617758595214a530afcaea commit 08d9c9202755a30f97617758595214a530afcaea Author: Gleb Smirnoff AuthorDate: 2021-03-19 02:06:13 + Commit: Gleb Smirnoff CommitDate: 2021-04-12 15:25:31 + tcp_input/syncache: acquire only read lock on PCB for SYN,!ACK packets When packet is a SYN packet, we don't need to modify any existing PCB. Normally SYN arrives on a listening socket, we either create a syncache entry or generate syncookie, but we don't modify anything with the listening socket or associated PCB. Thus create a new PCB lookup mode - rlock if listening. This removes the primary contention point under SYN flood - the listening socket PCB. Sidenote: when SYN arrives on a synchronized connection, we still don't need write access to PCB to send a challenge ACK or just to drop. There is only one exclusion - tcptw recycling. However, existing entanglement of tcp_input + stacks doesn't allow to make this change small. Consider this patch as first approach to the problem. Reviewed by:rrs Differential revision: https://reviews.freebsd.org/D29576 --- sys/netinet/in_pcb.c| 35 ++- sys/netinet/in_pcb.h| 3 ++- sys/netinet/tcp_input.c | 42 -- sys/netinet/tcp_subr.c | 2 +- sys/netinet/tcp_syncache.c | 10 +- sys/netinet6/in6_pcb.c | 34 ++ sys/security/mac/mac_inet.c | 2 +- 7 files changed, 61 insertions(+), 67 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 40a0b4c0676e..43cd469e0fcf 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2518,31 +2518,24 @@ in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in_addr faddr, struct inpcb *inp; inp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, - (lookupflags & ~(INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)), ifp, - numa_domain); + lookupflags & INPLOOKUP_WILDCARD, ifp, numa_domain); if (inp != NULL) { if (lookupflags & INPLOOKUP_WLOCKPCB) { INP_WLOCK(inp); - if (__predict_false(inp->inp_flags2 & INP_FREED)) { - INP_WUNLOCK(inp); - inp = NULL; - } } else if (lookupflags & INPLOOKUP_RLOCKPCB) { INP_RLOCK(inp); - if (__predict_false(inp->inp_flags2 & INP_FREED)) { - INP_RUNLOCK(inp); - inp = NULL; - } + } else if (lookupflags & INPLOOKUP_RLOCKLISTEN) { + if (inp->inp_socket != NULL && + SOLISTENING(inp->inp_socket)) + INP_RLOCK(inp); + else + INP_WLOCK(inp); } else panic("%s: locking bug", __func__); -#ifdef INVARIANTS - if (inp != NULL) { - if (lookupflags & INPLOOKUP_WLOCKPCB) - INP_WLOCK_ASSERT(inp); - else - INP_RLOCK_ASSERT(inp); + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + INP_UNLOCK(inp); + inp = NULL; } -#endif } return (inp); @@ -2564,8 +2557,8 @@ in_pcblookup(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_int fport, KASSERT((lookupflags & ~INPLOOKUP_MASK) == 0, ("%s: invalid lookup flags %d", __func__, lookupflags)); - KASSERT((lookupflags & (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)) != 0, - ("%s: LOCKPCB not set", __func__)); + KASSERT((lookupflags & (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB | + INPLOOKUP_RLOCKLISTEN)) != 0, ("%s: LOCKPCB not set", __func__)); /* * When not using RSS, use connection groups in preference to the @@ -2600,8 +2593,8 @@ in_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in_addr faddr, KASSERT((lookupflags & ~INPLOOKUP_MASK) == 0, ("%s: invalid lookup flags %d", __func__, lookupflags)); - KASSERT((lookupflags & (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)) != 0, - ("%s: LOCKPCB not set", __func__)); + KASSERT((lookupflags & (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB | + INPLOOKUP_RLOCKLISTEN)) != 0, ("%s: LOCKPCB not set", __func__)); #ifdef PCBGROUP /* diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 9604a837cfb4..4959fc238dfb 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -761,9 +761,10 @@ intinp_so_options(const struct inpcb *
git: 8d5719aa74f1 - main - syncache: simplify syncache_add() KPI to return struct socket pointer directly, not overwriting the listen socket pointer argument. Not a functional change.
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8d5719aa74f1d1441ee5ee365d45d53f934e81d6 commit 8d5719aa74f1d1441ee5ee365d45d53f934e81d6 Author: Gleb Smirnoff AuthorDate: 2021-03-19 05:05:22 + Commit: Gleb Smirnoff CommitDate: 2021-04-12 15:27:40 + syncache: simplify syncache_add() KPI to return struct socket pointer directly, not overwriting the listen socket pointer argument. Not a functional change. --- sys/netinet/tcp_input.c| 3 ++- sys/netinet/tcp_syncache.c | 32 +++- sys/netinet/tcp_syncache.h | 4 ++-- sys/netinet/toecore.c | 4 ++-- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index f69262230a05..cfb0989a7203 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1341,7 +1341,8 @@ tfo_socket_result: #endif TCP_PROBE3(debug__input, tp, th, m); tcp_dooptions(&to, optp, optlen, TO_SYN); - if (syncache_add(&inc, &to, th, inp, &so, m, NULL, NULL, iptos)) + if ((so = syncache_add(&inc, &to, th, inp, so, m, NULL, NULL, + iptos)) != NULL) goto tfo_socket_result; /* diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index b1a0c1f7e229..7c6bad415d7d 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1322,24 +1322,25 @@ failed: return (0); } -static void -syncache_tfo_expand(struct syncache *sc, struct socket **lsop, struct mbuf *m, +static struct socket * +syncache_tfo_expand(struct syncache *sc, struct socket *lso, struct mbuf *m, uint64_t response_cookie) { struct inpcb *inp; struct tcpcb *tp; unsigned int *pending_counter; + struct socket *so; NET_EPOCH_ASSERT(); - pending_counter = intotcpcb(sotoinpcb(*lsop))->t_tfo_pending; - *lsop = syncache_socket(sc, *lsop, m); - if (*lsop == NULL) { + pending_counter = intotcpcb(sotoinpcb(lso))->t_tfo_pending; + so = syncache_socket(sc, lso, m); + if (so == NULL) { TCPSTAT_INC(tcps_sc_aborted); atomic_subtract_int(pending_counter, 1); } else { - soisconnected(*lsop); - inp = sotoinpcb(*lsop); + soisconnected(so); + inp = sotoinpcb(so); tp = intotcpcb(inp); tp->t_flags |= TF_FASTOPEN; tp->t_tfo_cookie.server = response_cookie; @@ -1348,6 +1349,8 @@ syncache_tfo_expand(struct syncache *sc, struct socket **lsop, struct mbuf *m, tp->t_tfo_pending = pending_counter; TCPSTAT_INC(tcps_sc_completed); } + + return (so); } /* @@ -1369,20 +1372,19 @@ syncache_tfo_expand(struct syncache *sc, struct socket **lsop, struct mbuf *m, * be ACKed either when the application sends response data or the delayed * ACK timer expires, whichever comes first. */ -int +struct socket * syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, -struct inpcb *inp, struct socket **lsop, struct mbuf *m, void *tod, +struct inpcb *inp, struct socket *so, struct mbuf *m, void *tod, void *todctx, uint8_t iptos) { struct tcpcb *tp; - struct socket *so; + struct socket *rv = NULL; struct syncache *sc = NULL; struct syncache_head *sch; struct mbuf *ipopts = NULL; u_int ltflags; int win, ip_ttl, ip_tos; char *s; - int rv = 0; #ifdef INET6 int autoflowlabel = 0; #endif @@ -1405,7 +1407,6 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, * Combine all so/tp operations very early to drop the INP lock as * soon as possible. */ - so = *lsop; KASSERT(SOLISTENING(so), ("%s: %p not listening", __func__, so)); tp = sototcpcb(so); cred = crhold(so->so_cred); @@ -1734,9 +1735,8 @@ skip_alloc: SCH_UNLOCK(sch); if (tfo_cookie_valid) { - syncache_tfo_expand(sc, lsop, m, tfo_response_cookie); + rv = syncache_tfo_expand(sc, so, m, tfo_response_cookie); /* INP_RUNLOCK(inp) will be performed by the caller */ - rv = 1; goto tfo_expanded; } @@ -1761,10 +1761,8 @@ skip_alloc: done: TCP_PROBE5(receive, NULL, NULL, m, NULL, th); donenoprobe: - if (m) { - *lsop = NULL; + if (m) m_freem(m); - } /* * If tfo_pending is not NULL here, then a TFO SYN that did not * result in a new socket was processed and the associated pending diff --git a/sys/netinet/tcp_syncache.h b/sys/netinet/tcp_syncache.h index 37575a14467c..c56dce55f1c1 100644 --- a/sys/netinet/tcp_syncache.h +++ b/sys/netinet/tcp_s
git: b856b51d1498 - main - Merge commit 'd0e943077d94e6266ece9856789c5d5313676e38'
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b856b51d149811d68ab9e72daa609f00e13c2ec3 commit b856b51d149811d68ab9e72daa609f00e13c2ec3 Merge: 8d5719aa74f1 d0e943077d94 Author: Mark Johnston AuthorDate: 2021-04-12 15:29:47 + Commit: Mark Johnston CommitDate: 2021-04-12 15:29:47 + Merge commit 'd0e943077d94e6266ece9856789c5d5313676e38' contrib/capsicum-test/README.md| 2 +- contrib/capsicum-test/capmode.cc | 37 ++ contrib/capsicum-test/capsicum-test.cc | 5 - 3 files changed, 42 insertions(+), 2 deletions(-) diff --cc contrib/capsicum-test/README.md index 918534557725,..a8c8c6686759 mode 100644,00..100644 --- a/contrib/capsicum-test/README.md +++ b/contrib/capsicum-test/README.md @@@ -1,62 -1,0 +1,62 @@@ +# Capsicum User Space Tests + +This directory holds unit tests for [Capsicum](http://www.cl.cam.ac.uk/research/security/capsicum/) +object-capabilities. The tests exercise the syscall interface to a Capsicum-enabled operating system, +currently either [FreeBSD >=10.x](http://www.freebsd.org) or a modified Linux kernel (the +[capsicum-linux](http://github.com/google/capsicum-linux) project). + - The tests are written in C++98, and use the [Google Test](https://code.google.com/p/googletest/) ++The tests are written in C++11 and use the [Google Test](https://code.google.com/p/googletest/) +framework, with some additions to fork off particular tests (because a process that enters capability +mode cannot leave it again). + +## Provenance + +The original basis for these tests was: + + - [unit tests](https://github.com/freebsd/freebsd/tree/master/tools/regression/security/cap_test) + written by Robert Watson and Jonathan Anderson for the original FreeBSD 9.x Capsicum implementation + - [unit tests](http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel-capsicum.git;a=tree;f=tools/testing/capsicum_tests;hb=refs/heads/capsicum) written by Meredydd Luff for the original Capsicum-Linux port. + +These tests were coalesced and moved into an independent repository to enable +comparative testing across multiple OSes, and then substantially extended. + +## OS Configuration + +### Linux + +The following kernel configuration options are needed to run the tests: + + - `CONFIG_SECURITY_CAPSICUM`: enable the Capsicum framework + - `CONFIG_PROCDESC`: enable Capsicum process-descriptor functionality + - `CONFIG_DEBUG_FS`: enable debug filesystem + - `CONFIG_IP_SCTP`: enable SCTP support + +### FreeBSD (>= 10.x) + +The following kernel configuration options are needed so that all tests can run: + + - `options P1003_1B_MQUEUE`: Enable POSIX message queues (or `kldload mqueuefs`) + +## Other Dependencies + +### Linux + +The following additional development packages are needed to build the full test suite on Linux. + + - `libcaprights`: See below + - `libcap-dev`: Provides headers for POSIX.1e capabilities. + - `libsctp1`: Provides SCTP library functions. + - `libsctp-dev`: Provides headers for SCTP library functions. + + +## Linux libcaprights + +The Capsicum userspace library is held in the `libcaprights/` subdirectory. Ideally, this +library should be built (with `./configure; make` or `dpkg-buildpackage -uc -us`) and +installed (with `make install` or `dpkg -i libcaprights*.deb`) so that the tests will +use behave like a normal Capsicum-aware application. + +However, if no installed copy of the library is found, the `GNUmakefile` will attempt +to use the local `libcaprights/*.c` source; this requires `./configure` to have been +performed in the `libcaprights` subdirectory. The local code is also used for +cross-compiled builds of the test suite (e.g. `make ARCH=32` or `make ARCH=x32`). ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: dfff37765ce4 - main - Rename struct device to struct _device
On Mon, Apr 12, 2021 at 07:30:30AM -0700, Cy Schubert wrote: > Mark Johnston writes: > > > > Rename struct device to struct _device > > [...] > > Not that a name matters much but struct _device gives me a sense that > the struct is ancillary. Whereas freebsd_device or fbsd_device is more > descriptive and gives the struct the status it deserves. It should not be needed, AFAIR, as device_t is one of a few properly opaque typedefs for (opaque) struct pointers. Bruce had explained this in detail a couple of times, at least: https://lists.freebsd.org/pipermail/svn-src-head/2011-October/030894.html https://lists.freebsd.org/pipermail/svn-src-head/2016-May/085790.html ./danfe ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 600bd6ce0639 - main - pfctl, libpfctl: introduce pfctl_pool
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=600bd6ce0639c84b763516477250df5964e8edf6 commit 600bd6ce0639c84b763516477250df5964e8edf6 Author: Kurosawa Takahiro AuthorDate: 2021-04-12 14:03:40 + Commit: Kristof Provost CommitDate: 2021-04-12 16:30:29 + pfctl, libpfctl: introduce pfctl_pool Introduce pfctl_pool to be able to extend the pool part of the pf rule without breaking the ABI. Reviewed by:kp MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D29721 --- lib/libpfctl/libpfctl.c | 4 ++-- lib/libpfctl/libpfctl.h | 12 +++- sbin/pfctl/pfctl.c| 10 +- sbin/pfctl/pfctl_parser.c | 2 +- sbin/pfctl/pfctl_parser.h | 8 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 2a7b64f1cbc8..a487e5a20018 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -198,7 +198,7 @@ pf_nvrule_addr_to_rule_addr(const nvlist_t *nvl, struct pf_rule_addr *addr) static void pfctl_nv_add_pool(nvlist_t *nvparent, const char *name, -const struct pf_pool *pool) +const struct pfctl_pool *pool) { u_int64_t ports[2]; nvlist_t *nvl = nvlist_create(0); @@ -216,7 +216,7 @@ pfctl_nv_add_pool(nvlist_t *nvparent, const char *name, } static void -pf_nvpool_to_pool(const nvlist_t *nvl, struct pf_pool *pool) +pf_nvpool_to_pool(const nvlist_t *nvl, struct pfctl_pool *pool) { size_t len; const void *data; diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 95f6d4e3c77f..bc27c18cfbb6 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -38,6 +38,16 @@ struct pfctl_anchor; +struct pfctl_pool { + struct pf_palist list; + struct pf_pooladdr *cur; + struct pf_poolhashkeykey; + struct pf_addr counter; + int tblidx; + u_int16_tproxy_port[2]; + u_int8_t opts; +}; + struct pfctl_rule { struct pf_rule_addr src; struct pf_rule_addr dst; @@ -52,7 +62,7 @@ struct pfctl_rule { char overload_tblname[PF_TABLE_NAME_SIZE]; TAILQ_ENTRY(pfctl_rule) entries; - struct pf_pool rpool; + struct pfctl_poolrpool; u_int64_tevaluations; u_int64_tpackets[2]; diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index bc646ab335e1..879fc876826c 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -92,7 +92,7 @@ intpfctl_load_timeout(struct pfctl *, unsigned int, unsigned int); int pfctl_load_debug(struct pfctl *, unsigned int); int pfctl_load_logif(struct pfctl *, char *); int pfctl_load_hostid(struct pfctl *, u_int32_t); -int pfctl_get_pool(int, struct pf_pool *, u_int32_t, u_int32_t, int, +int pfctl_get_pool(int, struct pfctl_pool *, u_int32_t, u_int32_t, int, char *); voidpfctl_print_rule_counters(struct pfctl_rule *, int); int pfctl_show_rules(int, char *, int, enum pfctl_show, char *, int); @@ -805,7 +805,7 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) } int -pfctl_get_pool(int dev, struct pf_pool *pool, u_int32_t nr, +pfctl_get_pool(int dev, struct pfctl_pool *pool, u_int32_t nr, u_int32_t ticket, int r_action, char *anchorname) { struct pfioc_pooladdr pp; @@ -840,7 +840,7 @@ pfctl_get_pool(int dev, struct pf_pool *pool, u_int32_t nr, } void -pfctl_move_pool(struct pf_pool *src, struct pf_pool *dst) +pfctl_move_pool(struct pfctl_pool *src, struct pfctl_pool *dst) { struct pf_pooladdr *pa; @@ -851,7 +851,7 @@ pfctl_move_pool(struct pf_pool *src, struct pf_pool *dst) } void -pfctl_clear_pool(struct pf_pool *pool) +pfctl_clear_pool(struct pfctl_pool *pool) { struct pf_pooladdr *pa; @@ -1272,7 +1272,7 @@ pfctl_show_limits(int dev, int opts) /* callbacks for rule/nat/rdr/addr */ int -pfctl_add_pool(struct pfctl *pf, struct pf_pool *p, sa_family_t af) +pfctl_add_pool(struct pfctl *pf, struct pfctl_pool *p, sa_family_t af) { struct pf_pooladdr *pa; diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 903ea88c4b15..e0dd04cb4c3d 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -412,7 +412,7 @@ print_fromto(struct pf_rule_addr *src, pf_osfp_t osfp, struct pf_rule_addr *dst, } void -print_pool(struct pf_pool *pool, u_int16_t p1, u_int16_t p2, +print_pool(struct pfctl_pool *pool, u_int16_t p1, u_int16_t p2, sa_family_t af, int id) { struct pf_pooladdr *pooladdr; diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index f36e8f1d4ac8..43d8488dcab8 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -256,9 +256,9 @@ int pfctl_optimize_ruleset(struct pfc
git: eacc27affeff - main - bhyve: Move the gdb_active check to gdb_cpu_suspend().
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eacc27affeff17beb3791793ba54458444df7135 commit eacc27affeff17beb3791793ba54458444df7135 Author: John Baldwin AuthorDate: 2021-04-12 18:43:34 + Commit: John Baldwin CommitDate: 2021-04-12 18:43:34 + bhyve: Move the gdb_active check to gdb_cpu_suspend(). The check needs to be in the public routine (gdb_cpu_suspend()), not in the internal routine called from various places (_gdb_cpu_suspend()). All the other callers of _gdb_cpu_suspend() already check gdb_active, and this breaks the use of snapshots when the debug server is not enabled since gdb_cpu_suspend() tries to lock an uninitialized mutex. Reported by:Darius Mihai, Elena Mihailescu Reviewed by:elenamihailescu22_gmail.com Fixes: 621b5090487de9fed1b503769702a9a2a27cc7bb Differential Revision: https://reviews.freebsd.org/D29538 --- usr.sbin/bhyve/gdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index c4c37ab80bc7..5df10467cd62 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -731,8 +731,6 @@ static void _gdb_cpu_suspend(int vcpu, bool report_stop) { - if (!gdb_active) - return; debug("$vCPU %d suspending\n", vcpu); CPU_SET(vcpu, &vcpus_waiting); if (report_stop && CPU_CMP(&vcpus_waiting, &vcpus_suspended) == 0) @@ -807,6 +805,8 @@ void gdb_cpu_suspend(int vcpu) { + if (!gdb_active) + return; pthread_mutex_lock(&gdb_lock); _gdb_cpu_suspend(vcpu, true); gdb_cpu_resume(vcpu); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 82431b7506d6 - main - rc: remove the 'archdep' script
> The branch main has been updated by trasz: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=82431b7506d646165d52f11bc2958e8ce8ec5cce > > commit 82431b7506d646165d52f11bc2958e8ce8ec5cce > Author: Edward Tomasz Napierala > AuthorDate: 2021-04-12 13:38:16 + > Commit: Edward Tomasz Napierala > CommitDate: 2021-04-12 14:18:17 + > > rc: remove the 'archdep' script > > It was unused since 405c3050f10, which removed iBCS support. > > This also moves the 'linux' rc script slightly earlier, which > might help in some setups. The original version of this patch > moved it even more, before 'mountcritlocal', which would fixe > mount(8) errors due to missing /dev/shm in setups with entries > for /path/to/chroot/dev/shm without the "late" flag; however, > in the end 'kldxref' turned out to depend on 'mountcritlocal' > anyway. I would think that these hintts are built and kernel/module install time, not at the much later when the system is booting. Crazy idea, but first isnt it too late for hints by the time this runs? So... change this from a _start to a _shutdown action and build the hints files on the way down so that all things are ready next time the system boots. This would fix the /usr mount issue. > > Reported By:pstef > Reviewed By:dchagin > Sponsored By: EPSRC > Differential Revision: https://reviews.freebsd.org/D29590 > --- > ObsoleteFiles.inc| 3 +++ > libexec/rc/rc.d/Makefile | 1 - > libexec/rc/rc.d/archdep | 26 -- > libexec/rc/rc.d/linux| 2 +- > libexec/rc/rc.d/sysvipc | 2 +- > 5 files changed, 5 insertions(+), 29 deletions(-) > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > index 373e014ba074..1019436f1e28 100644 > --- a/ObsoleteFiles.inc > +++ b/ObsoleteFiles.inc > @@ -40,6 +40,9 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20210410: remove unused libexec/rc.d/archdep > +OLD_FILES+=etc/rc.d/archdep > + > # 20210408: remove tcp_hostcache.h > OLD_FILES+=usr/include/netinet/tcp_hostcache.h > > diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile > index 1a61e89aa215..7b15cab40bb8 100644 > --- a/libexec/rc/rc.d/Makefile > +++ b/libexec/rc/rc.d/Makefile > @@ -13,7 +13,6 @@ CONFS= DAEMON \ > SERVERS \ > addswap \ > adjkerntz \ > - archdep \ > bgfsck \ > ${_blacklistd} \ > bridge \ > diff --git a/libexec/rc/rc.d/archdep b/libexec/rc/rc.d/archdep > deleted file mode 100755 > index 52a7ac684eed.. > --- a/libexec/rc/rc.d/archdep > +++ /dev/null > @@ -1,26 +0,0 @@ > -#!/bin/sh > -# > -# $FreeBSD$ > -# > - > -# PROVIDE: archdep > -# REQUIRE: mountcritremote > -# KEYWORD: nojail > - > -. /etc/rc.subr > - > -name="archdep" > -start_cmd="archdep_start" > -stop_cmd=":" > - > -archdep_start() > -{ > - local _arch > - > - _arch=`${SYSCTL_N} hw.machine_arch` > - case $_arch in > - esac > -} > - > -load_rc_config $name > -run_rc_command "$1" > diff --git a/libexec/rc/rc.d/linux b/libexec/rc/rc.d/linux > index c9c45ba8b338..882cf4012495 100755 > --- a/libexec/rc/rc.d/linux > +++ b/libexec/rc/rc.d/linux > @@ -4,7 +4,7 @@ > # > > # PROVIDE: linux > -# REQUIRE: archdep > +# REQUIRE: kldxref > # KEYWORD: nojail > > . /etc/rc.subr > diff --git a/libexec/rc/rc.d/sysvipc b/libexec/rc/rc.d/sysvipc > index 0effbe7e22ca..bbec47d75e24 100755 > --- a/libexec/rc/rc.d/sysvipc > +++ b/libexec/rc/rc.d/sysvipc > @@ -4,7 +4,7 @@ > # > > # PROVIDE: sysvipc > -# REQUIRE: archdep > +# REQUIRE: kldxref > # KEYWORD: nojail > > . /etc/rc.subr > -- Rod Grimes rgri...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 5b20c5e1f8d5 - main - hptnr: Store the .o files directly in the repo
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5b20c5e1f8d59f14901f0c0e4b6b577eaa3f9569 commit 5b20c5e1f8d59f14901f0c0e4b6b577eaa3f9569 Author: Warner Losh AuthorDate: 2021-04-12 19:40:43 + Commit: Warner Losh CommitDate: 2021-04-12 19:47:55 + hptnr: Store the .o files directly in the repo We no longer need to use uuencode to uuencode files in our tree. Store the .o file directly instead. Adjust the build to cope with the new arrangement. Suggestions by: emaste, bz, donner Reviewed by:markm Sposnored by: Netflix, Inc Differential Revision: https://reviews.freebsd.org/D29632 --- sys/conf/files.x86 | 5 +- sys/dev/hptnr/amd64-elf.hptnr_lib.o| Bin 0 -> 494856 bytes sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu | 11000 --- sys/dev/hptnr/i386-elf.hptnr_lib.o | Bin 0 -> 355364 bytes sys/dev/hptnr/i386-elf.hptnr_lib.o.uu | 7900 -- sys/modules/hptnr/Makefile | 5 +- 6 files changed, 2 insertions(+), 18908 deletions(-) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index a3b6c6e5603b..11538b7e40eb 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -109,10 +109,7 @@ hptmvraid.ooptionalhptmv \ dev/hptnr/hptnr_os_bsd.c optionalhptnr dev/hptnr/hptnr_osm_bsd.c optionalhptnr dev/hptnr/hptnr_config.c optionalhptnr -hptnr_lib.ooptionalhptnr \ - dependency "$S/dev/hptnr/$M-elf.hptnr_lib.o.uu"\ - compile-with"uudecode < $S/dev/hptnr/$M-elf.hptnr_lib.o.uu" \ - no-implicit-rule +dev/hptnr/$M-elf.hptnr_lib.o optionalhptnr dev/hptrr/hptrr_os_bsd.c optionalhptrr dev/hptrr/hptrr_osm_bsd.c optionalhptrr dev/hptrr/hptrr_config.c optionalhptrr diff --git a/sys/dev/hptnr/amd64-elf.hptnr_lib.o b/sys/dev/hptnr/amd64-elf.hptnr_lib.o new file mode 100644 index ..4047e0dbcdd4 Binary files /dev/null and b/sys/dev/hptnr/amd64-elf.hptnr_lib.o differ diff --git a/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu b/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu deleted file mode 100644 index c5ec8827dfcd.. --- a/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu +++ /dev/null @@ -1,11000 +0,0 @@ -begin 644 hptnr_lib.o -M?T5,1@(!`0D```$`/@`!`.#T!``` -M`$```$``$``-`(GP9HEW",9'#@!FQT<,``!FA?9T'XU0_[D` -M9F:02(L'9HD4"$B#P0*#Z@%F@_K_=>SSPV9F9I!F9I!F9I!!B?!FB7<( -MQD<.`6;'1PP``&:%]G0>N@"Y`$B+!V:)%`B#P@%(@\$"9D0YPG7L -M\\-F9F:09F:09F:0@'\.`74J#[='#`^WR$B+%P^W%$J#P`%FB4<,9CM'"G(& -M9L='#```9H-O"`$/M\+#2(L7#[='"(/H`6:)1P@/M\`/MP1"PV9F9I!F9I!F -M9I"`?PX!=2H/MU<(#[='#`'"#[='"HG!B=#!^A_W^4ACTDB+!V:)-%!F@T<( -M`<-F9I`/MT<(#[?(2(L79HDT2H/``6:)1PC#9F9FD&9FD&9FD&:#?P@`#Y3` -M#[;`PY"0D)!(BP](.<]U"+D`ZP^02(L12(M!"$B)0@A(B1!(BH0@^(_#[9!"H/@P`G0B$$*PV9F9I`/MD0+_=0AFB3&(40+K#8/``4B#P01F/8``=>4/M\##9F:09F:09F:008G0 -M#[?&2(T$AX!X`O]U$&9$B0"(2`(/M\;#9F:09I`/MM%!#[?PZ``/M\## -M2(GYN``X40)U$V8Y,74.QD$"_V;'`?__ZQ!F9I"#P`%(@\$$9CV``'7; -M#[?`PV9F9I!F9F:09F9FD&9FD+D`B<@X5(\"=09F.32/=!"#P`%(@\$! -M2('Y@'7B#[?`PV9FD&9FD&9FD`^V1S@\"'0^/"AT.CRH#X3_/(@/ -MA#D!```\"F:0="0\*G0@/*H/A.4\B@^$'P$``#PO=`P\CV9F9I`/A90! -M```\+P^$D@```#PO=R(\"G1?/`IW"CP(9F9FD'5$ZU$\*'1X/"IF9I!F9I!U -M-.ML/(\/A-D\CV:0=Q4\B`^$RP```#R*9F9FD'44Z;X\J&9F9I!F -M9I!T<3RJ=&VY`+@`Z1,!```/MD`(#[97.PG0#[97.8/B'\'B -M$`G0B<$/MD<\Z>\```!F9F:09F:0#[97.L'B&`^V1SO!X!`)P@^V1ST)P@^V -M1SS!X`B)T0G!#[9'/\'@"`^V5T`)T.FU#[97.L'B&`^V1SO!X!`)P@^V -M1ST)P@^V1SS!X`B)T0G!#[97/L'B&`^V1S_!X!`)P@^V1T$)P@^V1T#!X`@) -MT.MS#[97.DC!XC@/MD<[2,'@,$@)P@^V1T%("<(/MD<\2,'@*$@)P@^V1SU( -MP>`@2`G"#[9'/DC!X!A("<(/MD<_2,'@$$@)P@^V1T!(P>`(2(G12`G!#[97 -M0L'B&`^V1T/!X!`)P@^V1T4)P@^V1T3!X`@)T$B)CX@```")AY!F@T\B -M`?/#9F9FD$B#[%A$#[9//$0/MD<[#[9/.@^V5SD/MG)@E0!``##9F:09F:09F:0B?%(BP>+D`0!``")%0`/MT<\9CV`9'0, -M9CV`D70&9CV`E'41#[;)@\$(N`$```#3X`G"ZQ!`#[;.@\$,N`$```#3X`G" -M2(L'B9`$`0``PV9F9I!F9F:09F:09F:0B?%(BP>+D`0!``")%0`/MT<\ -M9CV`9'0,9CV`D70&9CV`E'41#[;)@\$(N/[3P"'"ZQ!`#[;.@\$,N/[_ -M___3P"'"2(L'B9`$`0``PV9F9I!F9F:09F:09F:0B?%`@/[_=&]`@/X?=S*+ -MMQ@!``"Z`0```-/BB=#WT"'PB8<8`0``BX=8`0``B04`(=!T0(F'6`$` -M`,-FD(NW'`$```^VP8/H(+H!B<'3XHG0]]`A\(F''`$``(N'8`$``(D% -M`"'0=`:)AV`!``#SPV9F9I!F9I!(@^PH2(E<)`A(B6PD$$R)9"083(EL -M)"!(B=6)\$R++T"`_@,/AHD```!(C1S%`('C^`<``$V-I!T``@``0<<$ -M)`P!``"_$"<``.@`28V<'00"```/ME4#P>(8#[9%`L'@$`G"#[9%``G" -M#[9%`<'@"`G"B1-!QP0D$`$``+\0)P``Z``/ME4'P>(8#[9%!L'@$`G" -M#[9%!`G"#[9%!<'@"`G"B1/IA$B-',4`@>/X!P``3HVD*P`"``!! -MQP0D#`$``+\0)P``Z`!*C9PK!`(```^V50/!XA@/MD4"P>`0"<(/MD4` -M"<(/MD4!P>`("<*)$T''!"00`0``OQ`G``#H``^V50?!XA@/MD4&P>`0 -M"<(/MD4$"<(/MD4%P>`("<*)$TB+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-
git: 662053e8dcca - main - hptrr: Move to using .o files
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=662053e8dccae2e5d1534bf83acbe7bc49e5843e commit 662053e8dccae2e5d1534bf83acbe7bc49e5843e Author: Warner Losh AuthorDate: 2021-04-12 19:41:25 + Commit: Warner Losh CommitDate: 2021-04-12 19:47:55 + hptrr: Move to using .o files Use .o files directly. Replace the .o.uu files that we uudecode with .o files. Adjust the kernel and module build to cope. Suggestions by: markj@, emaste@ Sposnored by: Netflix, Inc Differential Revision: https://reviews.freebsd.org/D29636 --- sys/conf/files.x86 | 5 +- sys/dev/hptrr/amd64-elf.hptrr_lib.o| Bin 0 -> 608416 bytes sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu | 13551 --- sys/dev/hptrr/i386-elf.hptrr_lib.o | Bin 0 -> 399128 bytes sys/dev/hptrr/i386-elf.hptrr_lib.o.uu | 8900 sys/modules/hptrr/Makefile | 5 +- 6 files changed, 2 insertions(+), 22459 deletions(-) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 0a3e6b67b7db..0a2cd1554eb4 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -107,10 +107,7 @@ dev/hptnr/$M-elf.hptnr_lib.o optionalhptnr dev/hptrr/hptrr_os_bsd.c optionalhptrr dev/hptrr/hptrr_osm_bsd.c optionalhptrr dev/hptrr/hptrr_config.c optionalhptrr -hptrr_lib.ooptionalhptrr \ - dependency "$S/dev/hptrr/$M-elf.hptrr_lib.o.uu"\ - compile-with"uudecode < $S/dev/hptrr/$M-elf.hptrr_lib.o.uu" \ - no-implicit-rule +dev/hptrr/$M-elf.hptrr_lib.o optionalhptrr dev/hwpmc/hwpmc_amd.c optionalhwpmc dev/hwpmc/hwpmc_intel.coptionalhwpmc dev/hwpmc/hwpmc_core.c optionalhwpmc diff --git a/sys/dev/hptrr/amd64-elf.hptrr_lib.o b/sys/dev/hptrr/amd64-elf.hptrr_lib.o new file mode 100644 index ..57fda78e6107 Binary files /dev/null and b/sys/dev/hptrr/amd64-elf.hptrr_lib.o differ diff --git a/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu b/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu deleted file mode 100644 index 8f275f2a74a1.. --- a/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu +++ /dev/null @@ -1,13551 +0,0 @@ -/* - * Copyright (c) HighPoint Technologies, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ -begin 644 hptrr_lib.o -M?T5,1@(!`0D```$`/@`!`+!C!@`` -M`$```$``$``-`//#9F9FD&9F9I!F9I!F9I"X`,-F9F:0 -M9F:09F:0\\-F9F:09F9FD&9FD&9FD+@`.ST`?3=(8\=(Q\$` -M2(T$@$C!X`(/MQ0(9HD6#[=4"`)FB58"#[94"`B(5@@/MD0("8A&";@! -M\\-F9F:09F:09F:0055!5%530;P`0;K__P``1(LM`+L`1(GM -M0;D`08GK9F:09F:0O@!$.=Y]/4C'QP!%B=A(8\9(C02`2(T, -MA0`/MT0Y`L'@$`^W%#D)T$0YT'4*_T0Y#&9FD&9FD/_&1#G&?,U!_\%! -M@/D'=K#_PX#['W::0?_$08#\_W6)6UU!7$%=PV9FD&9FD&9FD%532(G]2(GS -M@ST``'4/QP4``0```.A`2(7;=`/&`P"Y`#L-`'U' -M2,?&`&9F9I!(8\%(C02`2(T4A0"+10`Y!#)U&TB%VW0(BX(` -MB`-(8\%(C02`#[9$A@SK#__!.PT`?,2X`%M=PV9F9I!F9F:09F9F -MD+C(,P``PV9F9I!F9I!F9I"XB`(``,-F9F:09F:09F:04TB)^TB#OY@R -M=1)(BW\0Z`"(0P%F9I!F9I"`>P$"=!=(@[N8,@```'0B2(N#F#(``(!X -M`0)U%;X`2(G?Z`!(B=_H`+@`2(.[F#(```!U!H![`0!T -M!;@!6\-FD$%455-(B?U!B?1(B=-(B<^Y`+K(,P``2(G89F:0B`A( -M_\!(_\IU]HL5`(U"`8D%`(@32(E["`^W10(]0"(```^$I@```#U` -M(@``?TT]$"(```^$J@```#T0(@``?R0]0!<``&9F9I`/A)0]0A<``&9F -MD&:0#X2$Z8<]("(``'1B/20B``!T6V9F9I!F9I#K<#T@(P``=$L] -M(",``&:0?Q(]`",``'1)/1`C``!FD'1`ZTX]0",``&9F9I!F9I!T(CU`(P`` -M
git: fddb3f4d7d6c - main - hptmv: use .o files directly
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fddb3f4d7d6c690ef066f90f0bfa949309fe2fdf commit fddb3f4d7d6c690ef066f90f0bfa949309fe2fdf Author: Warner Losh AuthorDate: 2021-04-12 19:41:20 + Commit: Warner Losh CommitDate: 2021-04-12 19:47:55 + hptmv: use .o files directly uudecode the .o.uu files and commit directly to the tree. Adjust the build infrastructure to cope with the new location, both for the kernel and modules. Sposnored by: Netflix, Inc Differential Revision: https://reviews.freebsd.org/D29635 --- sys/conf/files.x86 |5 +- sys/dev/hptmv/amd64-elf.hptmvraid.o | Bin 0 -> 85680 bytes sys/dev/hptmv/amd64-elf.raid.o.uu | 1934 --- sys/dev/hptmv/i386-elf.hptmvraid.o | Bin 0 -> 63448 bytes sys/dev/hptmv/i386-elf.raid.o.uu| 1440 -- sys/modules/hptmv/Makefile |5 +- 6 files changed, 2 insertions(+), 3382 deletions(-) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 363698332a6f..0a3e6b67b7db 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -99,10 +99,7 @@ dev/hptmv/mv.c optionalhptmv dev/hptmv/gui_lib.coptionalhptmv dev/hptmv/hptproc.coptionalhptmv dev/hptmv/ioctl.c optionalhptmv -hptmvraid.ooptionalhptmv \ - dependency "$S/dev/hptmv/$M-elf.raid.o.uu" \ - compile-with"uudecode < $S/dev/hptmv/$M-elf.raid.o.uu" \ - no-implicit-rule +dev/hptmv/$M-elf.hptmvraid.o optionalhptmv dev/hptnr/hptnr_os_bsd.c optionalhptnr dev/hptnr/hptnr_osm_bsd.c optionalhptnr dev/hptnr/hptnr_config.c optionalhptnr diff --git a/sys/dev/hptmv/amd64-elf.hptmvraid.o b/sys/dev/hptmv/amd64-elf.hptmvraid.o new file mode 100644 index ..0a3744526b9a Binary files /dev/null and b/sys/dev/hptmv/amd64-elf.hptmvraid.o differ diff --git a/sys/dev/hptmv/amd64-elf.raid.o.uu b/sys/dev/hptmv/amd64-elf.raid.o.uu deleted file mode 100644 index 333a8f6190e6.. --- a/sys/dev/hptmv/amd64-elf.raid.o.uu +++ /dev/null @@ -1,1934 +0,0 @@ -/* - * Copyright (c) 2004-2005 HighPoint Technologies, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ -begin 644 hptmvraid.o -M?T5,1@(!`0D```$`/@`!`"CA -M`$```$``#@`+`$B![$@"``!(B9PD&`(``$B)K"0@`@``3(FD -M)"@"``!,B:PD,`(``$R)M"0X`@``3(F\)$`"``!(B?M,BV\02(UOB$R-9"00 -MN`(```"`?P$`=0N`?P(!&<"#X`+_P(A%`$C'10@`@$T!!$B+0Q!(B440 -MBU,82(E5&$@/MD4`2(L$Q0!(B45H@'T``W4N2(U"]DB)11B+&Z($B)W^@`08$\)/,6>%IT(&9FD&9FD$@/MD4`2(L$Q0!( -MB45P@$T!!.E:!0``OI!,B>?H`(3`==5!]D0D"0)T'<9#"`%!#[9$ -M)`J(0PLZ0PES"P^V\$B)W^@`O@`"``!,B>?H`(3`=!=)C;PDD``` -M`+IP`0``O@#H`$$/MI0DDP```+X!(=8/MD,$@^#\B=�() -M\`G(O@0AUH/@\XG1@^$("?`)R+X0(=:#X,^)T8/A(`GP""`>!`( -M#X=7_O__2`^V0!!(@SS&``^$1_[".=%_UD6+?"0808N$))@```!(P>`@ -M20G'N@!(8\)(:`@2`G028E&&$$/MD0D(T&(1GH/MLBX`0```-/@ -M9D&)AI!)#[8&2(L$Q0!)B49H2`^V`TB+!,4`28E&<`^V1"0/ -M08A&`T@/MD0D#TR)M,.@_D-Y28UT)"Q)C;[@NA#H`$F- -M="0\28V^\+H$Z`!)C;0D@$F-OC0!``"Z$.@` -M28UT)$!)C;[TND#H`$'V1"0)`70%08!.`0%)#[9$)"))@[S& -MH`!U4R)=0A)#[8&2(L$Q0!( -MB45P33F^F'9!38F^F.LX2`^V1"0/2(.\PZ``=2=(B:S#H``` -M`$B)70C^0WD/MD0D#XA%`T@/M@-(BP3%`$B)17!(BYPD&`(``$B+K"0@ -M`@``3(ND)"@"``!,BZPD,`(``$R+M"0X`@``3(N\)$`"``!(@<1(`@``PV9F -M9I!54TB#[`A(B?.]``^V1GB)PH/X`
git: 550cb4ab85c7 - main - hpt27xx: store the .o files directly in the tree
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=550cb4ab85c7e514629c8bacbbb07085b81d916b commit 550cb4ab85c7e514629c8bacbbb07085b81d916b Author: Warner Losh AuthorDate: 2021-04-12 19:41:14 + Commit: Warner Losh CommitDate: 2021-04-12 19:47:55 + hpt27xx: store the .o files directly in the tree Store the .o files directly in the tree. We no longer need to play uuencode games like we did in the CVS days. Adjust the build infrastructure to match. Reviewed by:markj@ Sposnored by: Netflix, Inc Differential Revision: https://reviews.freebsd.org/D29634 --- sys/conf/files.x86 | 5 +- sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o| Bin 0 -> 1128536 bytes sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu | 25082 --- sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o | Bin 0 -> 820212 bytes sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu | 18230 --- sys/modules/hpt27xx/Makefile | 5 +- 6 files changed, 2 insertions(+), 43320 deletions(-) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 11538b7e40eb..363698332a6f 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -93,10 +93,7 @@ dev/gpio/chvgpio.c optionalchvgpio dev/hpt27xx/hpt27xx_os_bsd.c optionalhpt27xx dev/hpt27xx/hpt27xx_osm_bsd.c optionalhpt27xx dev/hpt27xx/hpt27xx_config.c optionalhpt27xx -hpt27xx_lib.o optionalhpt27xx \ - dependency "$S/dev/hpt27xx/$M-elf.hpt27xx_lib.o.uu"\ - compile-with"uudecode < $S/dev/hpt27xx/$M-elf.hpt27xx_lib.o.uu" \ - no-implicit-rule +dev/hpt27xx/$M-elf.hpt27xx_lib.o optional hpt27xx dev/hptmv/entry.c optionalhptmv dev/hptmv/mv.c optionalhptmv dev/hptmv/gui_lib.coptionalhptmv diff --git a/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o b/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o new file mode 100644 index ..60f97e086a52 Binary files /dev/null and b/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o differ diff --git a/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu b/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu deleted file mode 100644 index a258142332d9.. --- a/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu +++ /dev/null @@ -1,25082 +0,0 @@ -begin 644 hpt27xx_lib.o -M?T5,1@(!`0D```$`/@`!`)A?"P`` -M`$```$``$``-`(G0Q@<(QD0/A!0"``!,B>_H`$B)1"002(7`=15, -MB>9,B>_H`+@`Z>T!``!!QD0D1!I!QD0D10A!QD0D1@A!QD0D1P!! -MQD0D2/]!QD0D20!!QD0D):M!#[=&.&9!B40D($V);"0P0<=$)$#_0<>$ -M)*P(2(M$)!!(BT`028E$)%A(!?\```!)B40D8&9!QT0D."0`2(M$ -M)!!)B80DB$G'A"2X`$'&1"0D@$F-7"1HO@!(B=_H -M`$B+1"002(MP&+K_2(G?Z`!,B>9,B>_H`+O(ZQMFD+_H -M`P``Z`"#ZP%,B>_H`(3;=`Y!#[9$)"0\@'3=A,!T,4B-="003(GO -MZ`!!#[=T)#Q)BWY0Z`!,B>9,B>_H`+@`Z9,B>_H`$B+1"002(M8$$$/MMP3H -M`$&)Q,8#`,9#`0#&0P(`QD,#`$B)[DR)[^@`2(U51+@`Q@00`$B# -MP`%(@_@0=?)!C40D!,9%1!7&1441B$5(QD5)`$B-76A$#[;@1(EE0,>%K``` -M``!(BU0D$$B+0A!(B4582(F5B+X`2(G?Z`!(BT0D$$B+ -M)(B=_H`+@!2(/$&%M=05Q!74%>05_#D)"0D)"0D)"0D)"0 -MD)"0B?!FB7<(QD<.`&;'1PP``&:%]G0?C5#_N0!F9I!(BP=FB10(2(/! -M`H/J`6:#^O]U[//#9F9FD&9FD&9FD$&)\&:)=PC&1PX!9L='#```9H7V=!ZZ -M`+D`2(L'9HD4"(/"`4B#P0)F1#G"=>SSPV9F9I!F9I!F9I"`?PX! -M=2H/MT<,#[?(2(L7#[<42H/``6:)1PQF.T<*<@9FQT<,``!F@V\(`0^WPL-( -MBQ3K"[@`9F:09I##N`$```##9F:09F:09F:0QD`(#[971PG0#[9718/B'\'B -M$`G0B<$/MD=(Z>\```!F9F:09F:0#[971L'B&`^V1T?!X!`)P@^V1TD)P@^V -M1TC!X`B)T0G!#[9'2\'@"`^V5TP)T.FU#[971L'B&`^V1T?!X!`)P@^V -M1TD)P@^V1TC!X`B)T0G!#[972L'B&`^V1TO!X!`)P@^V1TT)P@^V1TS!X`@) -MT.MS#[971DC!XC@/MD='2,'@,$@)P@^V1TU("<(/MD=(2,'@*$@)P@^V1TE( -MP>`@2`G"#[9'2DC!X!A("<(/MD=+2,'@$$@)P@^V1TQ(P>`(2(G12`G!#[97 -M3L'B&`^V1T_!X!`)P@^V1U$)P@^V1U#!X`@)T$B)CZ")AZ@```!F@T\B -M`?/#9F9FD+K_9H7V=#%(B?F_`+K_2)@E0!``##9F:09F:09F:0B?%(BP>+D`0!``")%0`/MT<\ -M9CV`9'0,9CV`D70&9CV`E'41#[;)@\$(N`$```#3X`G"ZQ!`#[;.@\$,N`$` -M``#3X`G"2(L'B9`$`0``PV9F9I!F9F:09F:09F:0B?%(BP>+D`0!``")%0`` -M```/MT<\9CV`9'0,9CV`D70&9CV`E'41#[;)@\$(N/[3P"'"ZQ!`#[;. -M@\$,N/[3P"'"2(L'B9`$`0``PV9F9I!F9F:09F:09F:0B?%`@/[_=&]` -M@/X?=S*+MQ@!``"Z`0```-/BB=#WT"'PB8<8`0``BX=8`0``B04`(=!T -M0(F'6`$``,-FD(NW'`$```^VP8/H(+H!B<'3XHG0]]`A\(F''`$``(N' -M8`$``(D%`"'0=`:)AV`!``#SPV9F9I!F9I!(@^PH2(E<)`A(B6PD$$R) -M9"083(EL)"!(B=6)\$R++T"`_@,/AHD```!(C1S%`('C^`<``$V-I!T` -M`@``0<<$)`P!``"_$"<``.@`28V<'00"```/ME4#P>(8#[9%`L'@$`G" -M#[9%``G"#[9%`<'@"`G"B1-!QP0D$`$``+\0)P``Z``/ME4'P>(8#[9% -M!L'@$`G"#[9%!`G"#[9%!<'@"`G"B1/IA$B-',4`@>/X!P``3HVD -M*P`"``!!QP0D#`$``+\0)P``Z`!*C9PK!`(```^V50/!XA@/MD4"P>`0 -M"<(/MD4`"<(/MD4!P>`("<*)$T''!"00`0``OQ`G``#H``^V50?!XA@/ -MMD4&P>`0"<(/MD4$"<(/MD4%P>`("<*)$TB+7"0(2(ML)!!,BV0D&$R+;"0@ -M2(/$
git: 89df484739ef - main - iscsi: Kick threads out of iscsi_ioctl() during unload.
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=89df484739efe93b52da467f35255ae538bb946b commit 89df484739efe93b52da467f35255ae538bb946b Author: John Baldwin AuthorDate: 2021-04-12 20:56:16 + Commit: John Baldwin CommitDate: 2021-04-12 20:58:21 + iscsi: Kick threads out of iscsi_ioctl() during unload. iscsid can be sleeping in iscsi_ioctl() causing the destroy_dev() to sleep forever if iscsi.ko is unloaded while iscsid is running. Reported by:Jithesh Arakkan @ Chelsio Reviewed by:mav MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D29688 --- sys/dev/iscsi/iscsi.c | 11 +++ sys/dev/iscsi/iscsi.h | 1 + 2 files changed, 12 insertions(+) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 4367f780d84b..13a35c371c40 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1333,6 +1333,11 @@ iscsi_ioctl_daemon_wait(struct iscsi_softc *sc, } if (is == NULL) { + if (sc->sc_unloading) { + sx_sunlock(&sc->sc_lock); + return (ENXIO); + } + /* * No session requires attention from iscsid(8); wait. */ @@ -2560,6 +2565,12 @@ static int iscsi_unload(void) { + /* Awaken any threads asleep in iscsi_ioctl(). */ + sx_xlock(&sc->sc_lock); + sc->sc_unloading = true; + cv_signal(&sc->sc_cv); + sx_xunlock(&sc->sc_lock); + if (sc->sc_cdev != NULL) { ISCSI_DEBUG("removing device node"); destroy_dev(sc->sc_cdev); diff --git a/sys/dev/iscsi/iscsi.h b/sys/dev/iscsi/iscsi.h index 80ac9d877107..793b7529c7c0 100644 --- a/sys/dev/iscsi/iscsi.h +++ b/sys/dev/iscsi/iscsi.h @@ -132,6 +132,7 @@ struct iscsi_softc { TAILQ_HEAD(, iscsi_session) sc_sessions; struct cv sc_cv; unsigned intsc_last_session_id; + boolsc_unloading; eventhandler_tagsc_shutdown_pre_eh; eventhandler_tagsc_shutdown_post_eh; }; ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 568e69e4eb0a - main - cxgbe: Add counters for iSCSI PDUs transmitted via TOE.
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=568e69e4eb0ad1a5c69d8ea4592a4314bd6b6679 commit 568e69e4eb0ad1a5c69d8ea4592a4314bd6b6679 Author: John Baldwin AuthorDate: 2021-04-12 20:56:04 + Commit: John Baldwin CommitDate: 2021-04-12 20:57:45 + cxgbe: Add counters for iSCSI PDUs transmitted via TOE. Reviewed by:np MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D29297 --- sys/dev/cxgbe/adapter.h | 2 ++ sys/dev/cxgbe/t4_main.c | 2 ++ sys/dev/cxgbe/t4_sge.c| 10 ++ sys/dev/cxgbe/tom/t4_cpl_io.c | 3 +++ 4 files changed, 17 insertions(+) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 7dd4cb72c63c..c46f9626b95b 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -712,6 +712,8 @@ struct sge_wrq { /* ofld_txq: SGE egress queue + miscellaneous items */ struct sge_ofld_txq { struct sge_wrq wrq; + counter_u64_t tx_iscsi_pdus; + counter_u64_t tx_iscsi_octets; counter_u64_t tx_toe_tls_records; counter_u64_t tx_toe_tls_octets; } __aligned(CACHE_LINE_SIZE); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index b8500984fb8a..ce439b94aa6c 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -10756,6 +10756,8 @@ clear_stats(struct adapter *sc, u_int port_id) for_each_ofld_txq(vi, i, ofld_txq) { ofld_txq->wrq.tx_wrs_direct = 0; ofld_txq->wrq.tx_wrs_copied = 0; + counter_u64_zero(ofld_txq->tx_iscsi_pdus); + counter_u64_zero(ofld_txq->tx_iscsi_octets); counter_u64_zero(ofld_txq->tx_toe_tls_records); counter_u64_zero(ofld_txq->tx_toe_tls_octets); } diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 002b4892e110..2c7e8f348331 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -4507,8 +4507,16 @@ alloc_ofld_txq(struct vi_info *vi, struct sge_ofld_txq *ofld_txq, int idx, if (rc != 0) return (rc); + ofld_txq->tx_iscsi_pdus = counter_u64_alloc(M_WAITOK); + ofld_txq->tx_iscsi_octets = counter_u64_alloc(M_WAITOK); ofld_txq->tx_toe_tls_records = counter_u64_alloc(M_WAITOK); ofld_txq->tx_toe_tls_octets = counter_u64_alloc(M_WAITOK); + SYSCTL_ADD_COUNTER_U64(&vi->ctx, children, OID_AUTO, + "tx_iscsi_pdus", CTLFLAG_RD, &ofld_txq->tx_iscsi_pdus, + "# of iSCSI PDUs transmitted"); + SYSCTL_ADD_COUNTER_U64(&vi->ctx, children, OID_AUTO, + "tx_iscsi_octets", CTLFLAG_RD, &ofld_txq->tx_iscsi_octets, + "# of payload octets in transmitted iSCSI PDUs"); SYSCTL_ADD_COUNTER_U64(&vi->ctx, children, OID_AUTO, "tx_toe_tls_records", CTLFLAG_RD, &ofld_txq->tx_toe_tls_records, "# of TOE TLS records transmitted"); @@ -4529,6 +4537,8 @@ free_ofld_txq(struct vi_info *vi, struct sge_ofld_txq *ofld_txq) if (rc != 0) return (rc); + counter_u64_free(ofld_txq->tx_iscsi_pdus); + counter_u64_free(ofld_txq->tx_iscsi_octets); counter_u64_free(ofld_txq->tx_toe_tls_records); counter_u64_free(ofld_txq->tx_toe_tls_octets); diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 07340709934a..ee40d0646b71 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -1092,6 +1092,9 @@ t4_push_pdus(struct adapter *sc, struct toepcb *toep, int drop) } toep->txsd_avail--; + counter_u64_add(toep->ofld_txq->tx_iscsi_pdus, 1); + counter_u64_add(toep->ofld_txq->tx_iscsi_octets, plen); + t4_l2t_send(sc, wr, toep->l2te); } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 76681661be28 - main - OCF: Remove support for asymmetric cryptographic operations.
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=76681661be2859622872c3a8a1bd68260403ddd0 commit 76681661be2859622872c3a8a1bd68260403ddd0 Author: John Baldwin AuthorDate: 2021-04-12 21:27:42 + Commit: John Baldwin CommitDate: 2021-04-12 21:28:43 + OCF: Remove support for asymmetric cryptographic operations. There haven't been any non-obscure drivers that supported this functionality and it has been impossible to test to ensure that it still works. The only known consumer of this interface was the engine in OpenSSL < 1.1. Modern OpenSSL versions do not include support for this interface as it was not well-documented. Reviewed by:cem Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D29736 --- ObsoleteFiles.inc | 7 + share/man/man4/crypto.4| 145 +++-- share/man/man9/Makefile| 5 - share/man/man9/crypto.9| 32 +-- share/man/man9/crypto_asym.9 | 178 share/man/man9/crypto_driver.9 | 7 +- sys/dev/hifn/hifn7751.c| 2 +- sys/dev/safe/safe.c| 4 +- sys/mips/nlm/dev/sec/nlmsec.c | 2 +- sys/opencrypto/crypto.c| 404 + sys/opencrypto/cryptodev.c | 248 --- sys/opencrypto/cryptodev.h | 58 -- sys/opencrypto/cryptodev_if.m | 36 +--- tools/tools/crypto/Makefile| 5 +- tools/tools/crypto/cryptokeytest.c | 270 - 15 files changed, 56 insertions(+), 1347 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1019436f1e28..39cb638129e9 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20210412: Remove kernel asymmetric crypto +OLD_FILES+=usr/share/man/man9/crypto_asym.9 +OLD_FILES+=usr/share/man/man9/crypto_kdispatch.9 +OLD_FILES+=usr/share/man/man9/crypto_kdone.9 +OLD_FILES+=usr/share/man/man9/crypto_kregister.9 +OLD_FILES+=usr/share/man/man9/CRYPTODEV_KPROCESS.9 + # 20210410: remove unused libexec/rc.d/archdep OLD_FILES+=etc/rc.d/archdep diff --git a/share/man/man4/crypto.4 b/share/man/man4/crypto.4 index f146b50ecd4b..56fd4f484c3b 100644 --- a/share/man/man4/crypto.4 +++ b/share/man/man4/crypto.4 @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2020 +.Dd April 12, 2021 .Dt CRYPTO 4 .Os .Sh NAME @@ -93,53 +93,32 @@ then issue calls on the descriptor. User-mode access to .Pa /dev/crypto -is controlled by two +is controlled by the +.Ic kern.cryptodevallowsoft .Xr sysctl 8 -variables: -.Ic kern.userasymcrypto -and -.Ic kern.cryptodevallowsoft . -.Pp -The -.Nm -device provides two distinct modes of operation: one mode for -symmetric-keyed cryptographic requests and digests, and a second mode for -both asymmetric-key (public-key/private-key) requests and -modular arithmetic (for Diffie-Hellman key exchange and other -cryptographic protocols). -The two modes are described separately below. -.Sh DEPRECATION NOTICE -The asymmetric-key operations supported by this interface will not be -present in -.Fx 14.0 -and later. +variable. +If this variable is zero, +then user-mode sessions are only permitted to use cryptography coprocessors. .Sh THEORY OF OPERATION -Regardless of whether symmetric-key or asymmetric-key operations are -to be performed, use of the device requires a basic series of steps: +Use of the device requires a basic series of steps: .Bl -enum .It Open the .Pa /dev/crypto device. .It -If any symmetric-keyed cryptographic or digest operations will be performed, -create a session with +Create a session with .Dv CIOCGSESSION or .Dv CIOCGSESSION2 . -Most applications will require at least one symmetric session. +Applications will require at least one symmetric session. Since cipher and MAC keys are tied to sessions, many applications will require more. -Asymmetric operations do not use sessions. .It Submit requests, synchronously with .Dv CIOCCRYPT -(symmetric), -.Dv CIOCCRYPTAEAD -(symmetric), or -.Dv CIOCKEY -(asymmetric). +.Dv CIOCCRYPTAEAD . .It Optionally destroy a session with .Dv CIOCFSESSION . @@ -151,22 +130,27 @@ This will automatically close any remaining sessions associated with the file desriptor. .El .Sh SYMMETRIC-KEY OPERATION -The symmetric-key operation mode provides a context-based API +.Nm cryptodev +provides a context-based API to traditional symmetric-key encryption (or privacy) algorithms, -or to keyed and unkeyed one-way hash (HMAC and MAC) algorithms. -The symmetric-key mode also permits encrypt-then-authenticate fused operation, -where the hardware performs both a privacy algorithm and an integrity-check +keyed and unkeyed one-way hash (HMAC and MAC) algorithms, +encrypt-then-authenticate (ETA) fused operations, +and authen
git: 06cdfe2d8a3b - main - RELNOTES: Document removal of asym crypto from OCF.
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=06cdfe2d8a3b0080b60bde5fa7dfcd9e3c64f4d7 commit 06cdfe2d8a3b0080b60bde5fa7dfcd9e3c64f4d7 Author: John Baldwin AuthorDate: 2021-04-12 21:34:23 + Commit: John Baldwin CommitDate: 2021-04-12 21:34:45 + RELNOTES: Document removal of asym crypto from OCF. Sponsored by: Chelsio Communications --- RELNOTES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELNOTES b/RELNOTES index a4f276592a73..ec989a428f9e 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,3 +10,6 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +76681661be28 + Remove support for assymetric cryptographic operations from + the kernel open cryptographic framework (OCF). ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 45d5c28439f2 - main - cxgbe: Ignore doomed virtual interfaces when updating the clip table.
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=45d5c28439f2464dd5022abb0dd53f9da649686c commit 45d5c28439f2464dd5022abb0dd53f9da649686c Author: John Baldwin AuthorDate: 2021-04-12 21:36:40 + Commit: John Baldwin CommitDate: 2021-04-12 21:36:40 + cxgbe: Ignore doomed virtual interfaces when updating the clip table. A doomed VI does not have a valid ifnet. Reported by:Jithesh Arakkan @ Chelsio Reviewed by:np MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D29662 --- sys/dev/cxgbe/t4_clip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/cxgbe/t4_clip.c b/sys/dev/cxgbe/t4_clip.c index cc4a9b517a49..a93271103998 100644 --- a/sys/dev/cxgbe/t4_clip.c +++ b/sys/dev/cxgbe/t4_clip.c @@ -215,6 +215,9 @@ update_clip_table(struct adapter *sc) last_vnet = (uintptr_t)(-1); for_each_port(sc, i) for_each_vi(sc->port[i], j, vi) { + if (IS_DOOMED(vi)) + continue; + if (last_vnet == (uintptr_t)vi->ifp->if_vnet) continue; ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 1f64f32a4cc5 - main - Spellcheck.
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1f64f32a4cc5443ea19787e8af32de84ff8d711f commit 1f64f32a4cc5443ea19787e8af32de84ff8d711f Author: John Baldwin AuthorDate: 2021-04-12 22:12:19 + Commit: John Baldwin CommitDate: 2021-04-12 22:12:19 + Spellcheck. Reported by:0mp --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index ec989a428f9e..963ddd8c43a8 100644 --- a/RELNOTES +++ b/RELNOTES @@ -11,5 +11,5 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. 76681661be28 - Remove support for assymetric cryptographic operations from + Remove support for asymmetric cryptographic operations from the kernel open cryptographic framework (OCF). ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: bc54f5f1cd5c - main - route(8): Add an example how to print the routing tables
The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bc54f5f1cd5c01aa5f941234034839fb0b8f54ed commit bc54f5f1cd5c01aa5f941234034839fb0b8f54ed Author: Gordon Bergling AuthorDate: 2021-04-13 04:44:04 + Commit: Gordon Bergling CommitDate: 2021-04-13 04:45:22 + route(8): Add an example how to print the routing tables The manual page currently doesn't show an example how to print the routing table, so add one and .Xr netstat while here. PR: 231579 Reported by:Pekka Järvinen Reviewed by:debdrup MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D29702 --- sbin/route/route.8 | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sbin/route/route.8 b/sbin/route/route.8 index 6f34795ce883..c353bfb73d62 100644 --- a/sbin/route/route.8 +++ b/sbin/route/route.8 @@ -28,7 +28,7 @@ .\" @(#)route.88.3 (Berkeley) 3/19/94 .\" $FreeBSD$ .\" -.Dd January 9, 2019 +.Dd April 11, 2021 .Dt ROUTE 8 .Os .Sh NAME @@ -453,6 +453,10 @@ Delete a static route from the routing table: Remove all routes from the routing table: .Pp .Dl route flush +.Pp +List all routing tables: +.Pp +.Dl netstat -r .Sh DIAGNOSTICS .Bl -diag .It "add [host \&| network ] %s: gateway %s flags %x" @@ -493,6 +497,7 @@ The next-hop gateway should be reachable through a different route. .El .Sh SEE ALSO .\".Xr esis 4 , +.Xr netstat 1 , .Xr netintro 4 , .Xr route 4 , .Xr arp 8 , ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: e6ab1e365c06 - main - config(8): Correct the mentioned paper in the SEE ALSO section
The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e6ab1e365c06559e964667d2f5a6de856fa28be6 commit e6ab1e365c06559e964667d2f5a6de856fa28be6 Author: Gordon Bergling AuthorDate: 2021-04-13 04:49:00 + Commit: Gordon Bergling CommitDate: 2021-04-13 04:49:00 + config(8): Correct the mentioned paper in the SEE ALSO section FreeBSD's version of the config(8) utility is based on 4.3BSD not 4.4BSD. So correct the mentioned paper in the SEE ALSO section. Reported by:imp Reviewed by:imp X-MFC-with: 2b59392cb0da804e825c63469beb1934ec4267db Differential Revision: https://reviews.freebsd.org/D29701 --- usr.sbin/config/config.8 | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/config/config.8 b/usr.sbin/config/config.8 index 929607712ef8..1e874c3e8355 100644 --- a/usr.sbin/config/config.8 +++ b/usr.sbin/config/config.8 @@ -28,7 +28,7 @@ .\" @(#)config.8 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd April 9, 2021 +.Dd April 11, 2021 .Dt CONFIG 8 .Os .Sh NAME @@ -249,11 +249,12 @@ The .Sx SYNOPSIS portion of each device in section 4. .Rs -.\" 4.4BSD SMM:2 +.\" 4.3BSD SMM:2 .%A S. J. Leffler .%A M. J. Karels .%T "Building 4.3 BSD UNIX System with Config" -.%B 4.4BSD System Manager's Manual (SMM) +.%B 4.3BSD System Manager's Manual (SMM) +.%D June 3, 1986 .Re .Sh HISTORY The ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"