svn commit: r342060 - head/sys/dev/mrsas
Author: kadesai Date: Fri Dec 14 07:59:09 2018 New Revision: 342060 URL: https://svnweb.freebsd.org/changeset/base/342060 Log: This patch will add support for new Dynamic RaidMap to have different sizes for different number of supported VDs for SAS3.5 MegaRAID adapters. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c == --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 07:57:00 2018(r342059) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 07:59:09 2018(r342060) @@ -1757,8 +1757,8 @@ mrsas_map_mpt_cmd_status(struct mrsas_mpt_cmd *cmd, u_ static int mrsas_alloc_mem(struct mrsas_softc *sc) { - u_int32_t verbuf_size, io_req_size, reply_desc_size, sense_size, - chain_frame_size, evt_detail_size, count; + u_int32_t verbuf_size, io_req_size, reply_desc_size, sense_size, chain_frame_size, + evt_detail_size, count; /* * Allocate parent DMA tag @@ -2163,7 +2163,7 @@ mrsas_init_fw(struct mrsas_softc *sc) u_int32_t max_sectors_1; u_int32_t max_sectors_2; u_int32_t tmp_sectors; - u_int32_t scratch_pad_2; + u_int32_t scratch_pad_2, scratch_pad_3; int msix_enable = 0; int fw_msix_count = 0; @@ -2172,6 +2172,15 @@ mrsas_init_fw(struct mrsas_softc *sc) if (ret != SUCCESS) { return (ret); } + if (sc->is_ventura) { + scratch_pad_3 = mrsas_read_reg(sc, offsetof(mrsas_reg_set, outbound_scratch_pad_3)); +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, "scratch_pad_3 0x%x\n", scratch_pad_3); +#endif + sc->maxRaidMapSize = ((scratch_pad_3 >> + MR_MAX_RAID_MAP_SIZE_OFFSET_SHIFT) & + MR_MAX_RAID_MAP_SIZE_MASK); + } /* MSI-x index 0- reply post host index register */ sc->msix_reg_offset[0] = MPI2_REPLY_POST_HOST_INDEX_OFFSET; /* Check if MSI-X is supported while in ready state */ @@ -3395,8 +3404,10 @@ dcmd_timeout: static void mrsas_update_ext_vd_details(struct mrsas_softc *sc) { + u_int32_t ventura_map_sz = 0; sc->max256vdSupport = - sc->ctrl_info->adapterOperations3.supportMaxExtLDs; + sc->ctrl_info->adapterOperations3.supportMaxExtLDs; + /* Below is additional check to address future FW enhancement */ if (sc->ctrl_info->max_lds > 64) sc->max256vdSupport = 1; @@ -3413,20 +3424,33 @@ mrsas_update_ext_vd_details(struct mrsas_softc *sc) sc->fw_supported_pd_count = MAX_PHYSICAL_DEVICES; } - sc->old_map_sz = sizeof(MR_FW_RAID_MAP) + - (sizeof(MR_LD_SPAN_MAP) * - (sc->fw_supported_vd_count - 1)); - sc->new_map_sz = sizeof(MR_FW_RAID_MAP_EXT); - sc->drv_map_sz = sizeof(MR_DRV_RAID_MAP) + - (sizeof(MR_LD_SPAN_MAP) * - (sc->drv_supported_vd_count - 1)); + if (sc->maxRaidMapSize) { + ventura_map_sz = sc->maxRaidMapSize * + MR_MIN_MAP_SIZE; + sc->current_map_sz = ventura_map_sz; + sc->max_map_sz = ventura_map_sz; + } else { + sc->old_map_sz = sizeof(MR_FW_RAID_MAP) + + (sizeof(MR_LD_SPAN_MAP) * (sc->fw_supported_vd_count - 1)); + sc->new_map_sz = sizeof(MR_FW_RAID_MAP_EXT); + sc->max_map_sz = max(sc->old_map_sz, sc->new_map_sz); + if (sc->max256vdSupport) + sc->current_map_sz = sc->new_map_sz; + else + sc->current_map_sz = sc->old_map_sz; + } - sc->max_map_sz = max(sc->old_map_sz, sc->new_map_sz); - - if (sc->max256vdSupport) - sc->current_map_sz = sc->new_map_sz; - else - sc->current_map_sz = sc->old_map_sz; + sc->drv_map_sz = sizeof(MR_DRV_RAID_MAP_ALL); +#if VD_EXT_DEBUG + device_printf(sc->mrsas_dev, "sc->maxRaidMapSize 0x%x \n", + sc->maxRaidMapSize); + device_printf(sc->mrsas_dev, + "new_map_sz = 0x%x, old_map_sz = 0x%x, " + "ventura_map_sz = 0x%x, current_map_sz = 0x%x " + "fusion->drv_map_sz =0x%x, size of driver raid map 0x%lx \n", + sc->new_map_sz, sc->old_map_sz, ventura_map_sz, + sc->current_map_sz, sc->drv_map_sz, sizeof(MR_DRV_RAID_MAP_ALL)); +#endif } /* Modified: head/sys/dev/mrsas/mrsas.h == --- head/sys/dev/mrsas/mrsas.h Fri Dec 14 07:57:00 2018(r342059) +++ head/sys/dev/mrsas/mrsas.h Fri Dec 14 07:59:09 2018(r342060) @@ -661,6 +661,7 @@ Mpi2IOCInitRequest_t, MPI2_POINTER
svn commit: r342059 - head/sys/dev/mrsas
Author: kadesai Date: Fri Dec 14 07:57:00 2018 New Revision: 342059 URL: https://svnweb.freebsd.org/changeset/base/342059 Log: This patch will add support for next generation(SAS3.5) of Tri mode(SAS, SATA, NVMe) MegaRAID adapters. Submitted by: Sumit Saxena Reviewed by: Kashyap Desai Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c == --- head/sys/dev/mrsas/mrsas.c Fri Dec 14 03:55:08 2018(r342058) +++ head/sys/dev/mrsas/mrsas.c Fri Dec 14 07:57:00 2018(r342059) @@ -190,6 +190,12 @@ MRSAS_CTLR_ID device_table[] = { {0x1000, MRSAS_INTRUDER_24, 0x, 0x, "AVAGO Intruder_24 SAS Controller"}, {0x1000, MRSAS_CUTLASS_52, 0x, 0x, "AVAGO Cutlass_52 SAS Controller"}, {0x1000, MRSAS_CUTLASS_53, 0x, 0x, "AVAGO Cutlass_53 SAS Controller"}, + {0x1000, MRSAS_VENTURA, 0x, 0x, "AVAGO Ventura SAS Controller"}, + {0x1000, MRSAS_CRUSADER, 0x, 0x, "AVAGO Crusader SAS Controller"}, + {0x1000, MRSAS_HARPOON, 0x, 0x, "AVAGO Harpoon SAS Controller"}, + {0x1000, MRSAS_TOMCAT, 0x, 0x, "AVAGO Tomcat SAS Controller"}, + {0x1000, MRSAS_VENTURA_4PORT, 0x, 0x, "AVAGO Ventura_4Port SAS Controller"}, + {0x1000, MRSAS_CRUSADER_4PORT, 0x, 0x, "AVAGO Crusader_4Port SAS Controller"}, {0, 0, 0, 0, NULL} }; @@ -815,7 +821,7 @@ static int mrsas_attach(device_t dev) { struct mrsas_softc *sc = device_get_softc(dev); - uint32_t cmd, bar, error; + uint32_t cmd, error; memset(sc, 0, sizeof(struct mrsas_softc)); @@ -830,7 +836,14 @@ mrsas_attach(device_t dev) (sc->device_id == MRSAS_CUTLASS_52) || (sc->device_id == MRSAS_CUTLASS_53)) { sc->mrsas_gen3_ctrl = 1; -} + } else if ((sc->device_id == MRSAS_VENTURA) || + (sc->device_id == MRSAS_CRUSADER) || + (sc->device_id == MRSAS_HARPOON) || + (sc->device_id == MRSAS_TOMCAT) || + (sc->device_id == MRSAS_VENTURA_4PORT) || + (sc->device_id == MRSAS_CRUSADER_4PORT)) { + sc->is_ventura = true; + } mrsas_get_tunables(sc); @@ -845,9 +858,12 @@ mrsas_attach(device_t dev) cmd |= PCIM_CMD_BUSMASTEREN; pci_write_config(dev, PCIR_COMMAND, cmd, 2); - bar = pci_read_config(dev, MRSAS_PCI_BAR1, 4); + /* For Ventura system registers are mapped to BAR0 */ + if (sc->is_ventura) + sc->reg_res_id = PCIR_BAR(0); /* BAR0 offset */ + else + sc->reg_res_id = PCIR_BAR(1); /* BAR1 offset */ - sc->reg_res_id = MRSAS_PCI_BAR1;/* BAR1 offset */ if ((sc->reg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &(sc->reg_res_id), RF_ACTIVE)) == NULL) { @@ -1648,7 +1664,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M */ if (threshold_reply_count >= THRESHOLD_REPLY_COUNT) { if (sc->msix_enable) { - if (sc->mrsas_gen3_ctrl) + if (sc->msix_combined) mrsas_write_reg(sc, sc->msix_reg_offset[MSIxIndex / 8], ((MSIxIndex & 0x7) << 24) | sc->last_reply_idx[MSIxIndex]); @@ -1669,7 +1685,7 @@ mrsas_complete_cmd(struct mrsas_softc *sc, u_int32_t M /* Clear response interrupt */ if (sc->msix_enable) { - if (sc->mrsas_gen3_ctrl) { + if (sc->msix_combined) { mrsas_write_reg(sc, sc->msix_reg_offset[MSIxIndex / 8], ((MSIxIndex & 0x7) << 24) | sc->last_reply_idx[MSIxIndex]); @@ -2177,6 +2193,15 @@ mrsas_init_fw(struct mrsas_softc *sc) >> MR_MAX_REPLY_QUEUES_EXT_OFFSET_SHIFT) + 1; fw_msix_count = sc->msix_vectors; + if ((sc->mrsas_gen3_ctrl && (sc->msix_vectors > 8)) || + (sc->is_ventura && (sc->msix_vectors > 16))) + sc->msix_combined = true; + /* +* Save 1-15 reply post index +* address to local memory Index 0 +* is already saved from reg offset +* MPI2_REPLY_POST_HOST_INDEX_OFFSET +*/ for (loop = 1; loop < MR_MAX_MSIX_REG_ARRAY; loop++) { sc->msix_reg_offset[loop] = @@ -2199,6 +2224,14 @@
svn commit: r342058 - in head/sys: kern sys
Author: mjg Date: Fri Dec 14 03:55:08 2018 New Revision: 342058 URL: https://svnweb.freebsd.org/changeset/base/342058 Log: vfs: mostly depessimize NDINIT_ALL 1) filecaps_init was unnecesarily a function call 2) an asignment at the end was preventing tail calling of cap_rights_init Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_descrip.c head/sys/kern/vfs_lookup.c head/sys/sys/filedesc.h Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cFri Dec 14 01:06:34 2018 (r342057) +++ head/sys/kern/kern_descrip.cFri Dec 14 03:55:08 2018 (r342058) @@ -1465,17 +1465,6 @@ out: } /* - * Initialize filecaps structure. - */ -void -filecaps_init(struct filecaps *fcaps) -{ - - bzero(fcaps, sizeof(*fcaps)); - fcaps->fc_nioctls = -1; -} - -/* * Copy filecaps structure allocating memory for ioctls array if needed. * * The last parameter indicates whether the fdtable is locked. If it is not and Modified: head/sys/kern/vfs_lookup.c == --- head/sys/kern/vfs_lookup.c Fri Dec 14 01:06:34 2018(r342057) +++ head/sys/kern/vfs_lookup.c Fri Dec 14 03:55:08 2018(r342058) @@ -1302,12 +1302,12 @@ NDINIT_ALL(struct nameidata *ndp, u_long op, u_long fl ndp->ni_dirp = namep; ndp->ni_dirfd = dirfd; ndp->ni_startdir = startdir; + filecaps_init(>ni_filecaps); + ndp->ni_cnd.cn_thread = td; if (rightsp != NULL) ndp->ni_rightsneeded = *rightsp; else cap_rights_init(>ni_rightsneeded); - filecaps_init(>ni_filecaps); - ndp->ni_cnd.cn_thread = td; } /* Modified: head/sys/sys/filedesc.h == --- head/sys/sys/filedesc.h Fri Dec 14 01:06:34 2018(r342057) +++ head/sys/sys/filedesc.h Fri Dec 14 03:55:08 2018(r342058) @@ -154,7 +154,13 @@ enum { struct thread; -void filecaps_init(struct filecaps *fcaps); +static __inline void +filecaps_init(struct filecaps *fcaps) +{ + +bzero(fcaps, sizeof(*fcaps)); +fcaps->fc_nioctls = -1; +} bool filecaps_copy(const struct filecaps *src, struct filecaps *dst, bool locked); void filecaps_move(struct filecaps *src, struct filecaps *dst); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r342057 - head/crypto/openssl/crypto/engine
But why, you can trivially see the open() call with truss or more advanced tracers if you are debugging this On Thu, Dec 13, 2018 at 6:39 PM Kubilay Kocak wrote: > On 14/12/2018 12:06 pm, Jung-uk Kim wrote: > > Author: jkim > > Date: Fri Dec 14 01:06:34 2018 > > New Revision: 342057 > > URL: https://svnweb.freebsd.org/changeset/base/342057 > > > > Log: > >Do not complain when /dev/crypto does not exist. > > > >Now the new devcrypto engine is enabled since r342009, many users > started > >seeing "Could not open /dev/crypto: No such file or directory". > Disable > >the annoying error message as it is not very useful anyway. > > > >Note the patch was submitted upstream. > > > >https://github.com/openssl/openssl/pull/7896 > > > > Modified: > >head/crypto/openssl/crypto/engine/eng_devcrypto.c > > > > Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c > > > == > > --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 > 00:40:38 2018(r342056) > > +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 > 01:06:34 2018(r342057) > > @@ -24,6 +24,8 @@ > > > > #include "internal/engine.h" > > > > +/* #define ENGINE_DEVCRYPTO_DEBUG */ > > + > > #ifdef CRYPTO_ALGORITHM_MIN > > # define CHECK_BSD_STYLE_MACROS > > #endif > > @@ -615,6 +617,9 @@ void engine_load_devcrypto_int() > > ENGINE *e = NULL; > > > > if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) { > > +#ifndef ENGINE_DEVCRYPTO_DEBUG > > +if (errno != ENOENT) > > +#endif > > fprintf(stderr, "Could not open /dev/crypto: %s\n", > strerror(errno)); > > return; > > } > > How trivially could devcrypto_debug be modified to be a runtime > configuration (say sysctl) setting? > ___ > svn-src-h...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r342057 - head/crypto/openssl/crypto/engine
On 14/12/2018 12:06 pm, Jung-uk Kim wrote: Author: jkim Date: Fri Dec 14 01:06:34 2018 New Revision: 342057 URL: https://svnweb.freebsd.org/changeset/base/342057 Log: Do not complain when /dev/crypto does not exist. Now the new devcrypto engine is enabled since r342009, many users started seeing "Could not open /dev/crypto: No such file or directory". Disable the annoying error message as it is not very useful anyway. Note the patch was submitted upstream. https://github.com/openssl/openssl/pull/7896 Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c == --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 00:40:38 2018(r342056) +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 01:06:34 2018(r342057) @@ -24,6 +24,8 @@ #include "internal/engine.h" +/* #define ENGINE_DEVCRYPTO_DEBUG */ + #ifdef CRYPTO_ALGORITHM_MIN # define CHECK_BSD_STYLE_MACROS #endif @@ -615,6 +617,9 @@ void engine_load_devcrypto_int() ENGINE *e = NULL; if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) { +#ifndef ENGINE_DEVCRYPTO_DEBUG +if (errno != ENOENT) +#endif fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno)); return; } How trivially could devcrypto_debug be modified to be a runtime configuration (say sysctl) setting? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342057 - head/crypto/openssl/crypto/engine
Author: jkim Date: Fri Dec 14 01:06:34 2018 New Revision: 342057 URL: https://svnweb.freebsd.org/changeset/base/342057 Log: Do not complain when /dev/crypto does not exist. Now the new devcrypto engine is enabled since r342009, many users started seeing "Could not open /dev/crypto: No such file or directory". Disable the annoying error message as it is not very useful anyway. Note the patch was submitted upstream. https://github.com/openssl/openssl/pull/7896 Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c == --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 00:40:38 2018(r342056) +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14 01:06:34 2018(r342057) @@ -24,6 +24,8 @@ #include "internal/engine.h" +/* #define ENGINE_DEVCRYPTO_DEBUG */ + #ifdef CRYPTO_ALGORITHM_MIN # define CHECK_BSD_STYLE_MACROS #endif @@ -615,6 +617,9 @@ void engine_load_devcrypto_int() ENGINE *e = NULL; if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) { +#ifndef ENGINE_DEVCRYPTO_DEBUG +if (errno != ENOENT) +#endif fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno)); return; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342056 - in head/sys/contrib/dev/acpica: . common compiler components/dispatcher components/executer components/namespace components/parser components/utilities include
Author: jkim Date: Fri Dec 14 00:40:38 2018 New Revision: 342056 URL: https://svnweb.freebsd.org/changeset/base/342056 Log: MFV: r342049 Merge ACPICA 20181213. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/dmswitch.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslhelp.c head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/excreate.c head/sys/contrib/dev/acpica/components/executer/exoparg2.c head/sys/contrib/dev/acpica/components/executer/exserial.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actypes.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt == --- head/sys/contrib/dev/acpica/changes.txt Thu Dec 13 23:49:20 2018 (r342055) +++ head/sys/contrib/dev/acpica/changes.txt Fri Dec 14 00:40:38 2018 (r342056) @@ -1,7 +1,68 @@ -31 October 2018. Summary of changes for version 20181031: +13 December 2018. Summary of changes for version 20181213: -This release is available at https://acpica.org/downloads + +1) ACPICA Kernel-resident Subsystem: + +Fixed some buffer length issues with the GenericSerialBus, related to two +of the bidirectional protocols: AttribRawProcessBytes and AttribRawBytes, +which are rarely seen in the field. For these, the LEN field of the ASL +buffer is now ignored. Hans de Goede + +Implemented a new object evaluation trace mechanism for control methods +and data objects. This includes nested control methods. It is +particularly useful for examining the ACPI execution during system +initialization since the output is relatively terse. The flag below +enables the output of the trace via the ACPI_DEBUG_PRINT_RAW interface: + #define ACPI_LV_EVALUATION 0x0008 + +Examples: + Enter evaluation : _SB.PCI0._INI (Method) + Exit evaluation: _SB.PCI0._INI + Enter evaluation : _OSI (Method) + Exit evaluation: _OSI + Enter evaluation : _SB.PCI0.TEST (Method) + Nested method call : _SB.PCI0.NST1 + Exit nested method : _SB.PCI0.NST1 + Exit evaluation: _SB.PCI0.TEST + +Added two recently-defined _OSI strings. See +https://docs.microsoft.com/en-us/windows-hardware/drivers/acpi/winacpi- +osi. + "Windows 2018" + "Windows 2018.2" + +Update for buffer-to-string conversions via the ToHexString ASL operator. +A "0x" is now prepended to each of the hex values in the output string. +This provides compatibility with other ACPI implementations. The ACPI +specification is somewhat vague on this issue. + Example output string after conversion: +"0x01,0x02,0x03,0x04,0x05,0x06" + +Return a run-time error for TermArg expressions within individual package +elements. Although this is technically supported by the ASL grammar, +other ACPI implementations do not support this either. Also, this fixes a +fault if this type of construct is ever encountered (it never has been). + + +2) iASL Compiler/Disa
svn commit: r342055 - head/stand/efi/loader
Author: bcran Date: Thu Dec 13 23:49:20 2018 New Revision: 342055 URL: https://svnweb.freebsd.org/changeset/base/342055 Log: Cast error message in efi_main.c to CHAR16* to avoid build error Modified: head/stand/efi/loader/efi_main.c Modified: head/stand/efi/loader/efi_main.c == --- head/stand/efi/loader/efi_main.cThu Dec 13 23:20:58 2018 (r342054) +++ head/stand/efi/loader/efi_main.cThu Dec 13 23:49:20 2018 (r342055) @@ -95,7 +95,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *sy status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, EFI_SIZE_TO_PAGES(heapsize), ); if (status != EFI_SUCCESS) { - ST->ConOut->OutputString(ST->ConOut, L"Failed to allocate memory for heap.\r\n"); + ST->ConOut->OutputString(ST->ConOut, (CHAR16 *)L"Failed to allocate memory for heap.\r\n"); BS->Exit(IH, status, 0, NULL); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342054 - head/stand/efi/loader
Author: bcran Date: Thu Dec 13 23:20:58 2018 New Revision: 342054 URL: https://svnweb.freebsd.org/changeset/base/342054 Log: Print an error message in efi_main.c if we can't allocate memory for the heap With the default Qemu parameters, only 128MB RAM gets given to a VM. This causes the loader to be unable to allocate the 64MB it needs for the heap. This change makes the cause of the error more obvious. Differential Revision:https://reviews.freebsd.org/D17958 Modified: head/stand/efi/loader/efi_main.c Modified: head/stand/efi/loader/efi_main.c == --- head/stand/efi/loader/efi_main.cThu Dec 13 20:09:38 2018 (r342053) +++ head/stand/efi/loader/efi_main.cThu Dec 13 23:20:58 2018 (r342054) @@ -94,8 +94,10 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *sy heapsize = 64 * 1024 * 1024; status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, EFI_SIZE_TO_PAGES(heapsize), ); - if (status != EFI_SUCCESS) + if (status != EFI_SUCCESS) { + ST->ConOut->OutputString(ST->ConOut, L"Failed to allocate memory for heap.\r\n"); BS->Exit(IH, status, 0, NULL); + } setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342053 - head/sys/cddl/dev/dtrace/amd64
Author: mjg Date: Thu Dec 13 20:09:38 2018 New Revision: 342053 URL: https://svnweb.freebsd.org/changeset/base/342053 Log: dtrace: fix userspace access on boxes with SMAP dtrace has its own routines which were not updated after SMAP support got implemented. Use ifunc just like for other routines. This in particular fixes ustack(). Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D18542 Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S head/sys/cddl/dev/dtrace/amd64/dtrace_isa.c Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S == --- head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S Thu Dec 13 20:00:16 2018 (r342052) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_asm.S Thu Dec 13 20:09:38 2018 (r342053) @@ -208,7 +208,7 @@ dtrace_caller(int aframes) void dtrace_copy(uintptr_t src, uintptr_t dest, size_t size) */ - ENTRY(dtrace_copy) + ENTRY(dtrace_copy_nosmap) pushq %rbp movq%rsp, %rbp @@ -218,14 +218,28 @@ dtrace_copy(uintptr_t src, uintptr_t dest, size_t size smovb /* move from %ds:rsi to %ed:rdi */ leave ret - END(dtrace_copy) + END(dtrace_copy_nosmap) + ENTRY(dtrace_copy_smap) + pushq %rbp + movq%rsp, %rbp + + xchgq %rdi, %rsi /* make %rsi source, %rdi dest */ + movq%rdx, %rcx /* load count */ + stac + repz/* repeat for count ... */ + smovb /* move from %ds:rsi to %ed:rdi */ + clac + leave + ret + END(dtrace_copy_smap) + /* void dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size, volatile uint16_t *flags) */ - ENTRY(dtrace_copystr) + ENTRY(dtrace_copystr_nosmap) pushq %rbp movq%rsp, %rbp @@ -248,55 +262,120 @@ dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_ leave ret - END(dtrace_copystr) + END(dtrace_copystr_nosmap) + ENTRY(dtrace_copystr_smap) + pushq %rbp + movq%rsp, %rbp + + stac +0: + movb(%rdi), %al /* load from source */ + movb%al, (%rsi) /* store to destination */ + addq$1, %rdi/* increment source pointer */ + addq$1, %rsi/* increment destination pointer */ + subq$1, %rdx/* decrement remaining count */ + cmpb$0, %al + je 2f + testq $0xfff, %rdx/* test if count is 4k-aligned */ + jnz 1f /* if not, continue with copying */ + testq $CPU_DTRACE_BADADDR, (%rcx) /* load and test dtrace flags */ + jnz 2f +1: + cmpq$0, %rdx + jne 0b +2: + clac + leave + ret + + END(dtrace_copystr_smap) + /* uintptr_t dtrace_fulword(void *addr) */ - ENTRY(dtrace_fulword) + ENTRY(dtrace_fulword_nosmap) movq(%rdi), %rax ret - END(dtrace_fulword) + END(dtrace_fulword_nosmap) + ENTRY(dtrace_fulword_smap) + stac + movq(%rdi), %rax + clac + ret + END(dtrace_fulword_smap) + /* uint8_t dtrace_fuword8_nocheck(void *addr) */ - ENTRY(dtrace_fuword8_nocheck) + ENTRY(dtrace_fuword8_nocheck_nosmap) xorq%rax, %rax movb(%rdi), %al ret - END(dtrace_fuword8_nocheck) + END(dtrace_fuword8_nocheck_nosmap) + ENTRY(dtrace_fuword8_nocheck_smap) + stac + xorq%rax, %rax + movb(%rdi), %al + clac + ret + END(dtrace_fuword8_nocheck_smap) + /* uint16_t dtrace_fuword16_nocheck(void *addr) */ - ENTRY(dtrace_fuword16_nocheck) + ENTRY(dtrace_fuword16_nocheck_nosmap) xorq%rax, %rax movw(%rdi), %ax ret - END(dtrace_fuword16_nocheck) + END(dtrace_fuword16_nocheck_nosmap) + ENTRY(dtrace_fuword16_nocheck_smap) + stac + xorq%rax, %rax + movw(%rdi), %ax + clac + ret + END(dtrace_fuword16_nocheck_smap) + /* uint32_t dtrace_fuword32_nocheck(void *addr) */ - ENTRY(dtrace_fuword32_nocheck) + ENTRY(dtrace_fuword32_nocheck_nosmap) xorq%rax, %rax movl(%rdi), %eax ret - END(dtrace_fuword32_nocheck) + END(dtrace_fuword32_nocheck_nosmap) + ENTRY(dtrace_fuword32_nocheck_smap) + stac + xorq%rax, %rax + movl(%rdi), %eax + clac + ret + END(dtrace_fuword32_nocheck_smap) + /* uint64_t dtrace_fuword64_nocheck(void *addr) */ - ENTRY(dtrace_fuword64_nocheck) + ENTRY(dtrace_fuword64_nocheck_nosmap) movq(%rdi),
svn commit: r342052 - in stable/11: share/man/man4 sys/netpfil/pf
Author: kp Date: Thu Dec 13 20:00:16 2018 New Revision: 342052 URL: https://svnweb.freebsd.org/changeset/base/342052 Log: pfsync: Performance improvement pfsync code is called for every new state, state update and state deletion in pf. While pf itself can operate on multiple states at the same time (on different cores, assuming the states hash to a different hashrow), pfsync only had a single lock. This greatly reduced throughput on multicore systems. Address this by splitting the pfsync queues into buckets, based on the state id. This ensures that updates for a given connection always end up in the same bucket, which allows pfsync to still collapse multiple updates into one, while allowing multiple cores to proceed at the same time. The number of buckets is tunable, but defaults to 2 x number of cpus. Benchmarking has shown improvement, depending on hardware and setup, from ~30% to ~100%. Sponsored by: Orange Business Services Modified: stable/11/share/man/man4/pfsync.4 stable/11/sys/netpfil/pf/if_pfsync.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/pfsync.4 == --- stable/11/share/man/man4/pfsync.4 Thu Dec 13 20:00:11 2018 (r342051) +++ stable/11/share/man/man4/pfsync.4 Thu Dec 13 20:00:16 2018 (r342052) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2017 +.Dd December 6, 2018 .Dt PFSYNC 4 .Os .Sh NAME @@ -130,6 +130,13 @@ See .Xr carp 4 for more information. Default value is 240. +.It Va net.pfsync.pfsync_buckets +The number of +.Nm +buckets. +This affects the performance and memory tradeoff. +Defaults to twice the number of CPUs. +Change only if benchmarks show this helps on your workload. .El .Sh EXAMPLES .Nm Modified: stable/11/sys/netpfil/pf/if_pfsync.c == --- stable/11/sys/netpfil/pf/if_pfsync.cThu Dec 13 20:00:11 2018 (r342051) +++ stable/11/sys/netpfil/pf/if_pfsync.cThu Dec 13 20:00:16 2018 (r342052) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -104,6 +105,8 @@ __FBSDID("$FreeBSD$"); sizeof(struct pfsync_header) + \ sizeof(struct pfsync_subheader) ) +struct pfsync_bucket; + struct pfsync_pkt { struct ip *ip; struct in_addr src; @@ -162,7 +165,7 @@ static struct pfsync_q pfsync_qs[] = { }; static voidpfsync_q_ins(struct pf_state *, int, bool); -static voidpfsync_q_del(struct pf_state *, bool); +static voidpfsync_q_del(struct pf_state *, bool, struct pfsync_bucket *); static voidpfsync_update_state(struct pf_state *); @@ -181,6 +184,28 @@ struct pfsync_deferral { struct mbuf *pd_m; }; +struct pfsync_sofct; + +struct pfsync_bucket +{ + int b_id; + struct pfsync_softc *b_sc; + struct mtx b_mtx; + struct callout b_tmo; + int b_flags; +#definePFSYNCF_BUCKET_PUSH 0x0001 + + size_t b_len; + TAILQ_HEAD(, pf_state) b_qs[PFSYNC_S_COUNT]; + TAILQ_HEAD(, pfsync_upd_req_item) b_upd_req_list; + TAILQ_HEAD(, pfsync_deferral) b_deferrals; + u_int b_deferred; + void*b_plus; + size_t b_pluslen; + + struct ifaltq b_snd; +}; + struct pfsync_softc { /* Configuration */ struct ifnet*sc_ifp; @@ -190,20 +215,12 @@ struct pfsync_softc { uint32_tsc_flags; #definePFSYNCF_OK 0x0001 #definePFSYNCF_DEFER 0x0002 -#definePFSYNCF_PUSH0x0004 uint8_t sc_maxupdates; struct ip sc_template; - struct callout sc_tmo; struct mtx sc_mtx; /* Queued data */ - size_t sc_len; - TAILQ_HEAD(, pf_state) sc_qs[PFSYNC_S_COUNT]; - TAILQ_HEAD(, pfsync_upd_req_item) sc_upd_req_list; - TAILQ_HEAD(, pfsync_deferral) sc_deferrals; - u_int sc_deferred; - void*sc_plus; - size_t sc_pluslen; + struct pfsync_bucket*sc_buckets; /* Bulk update info */ struct mtx sc_bulk_mtx; @@ -221,6 +238,10 @@ struct pfsync_softc { #definePFSYNC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) #definePFSYNC_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define PFSYNC_BUCKET_LOCK(b) mtx_lock(&(b)->b_mtx) +#define PFSYNC_BUCKET_UNLOCK(b)mtx_unlock(&(b)->b_mtx) +#define
svn commit: r342051 - in stable/12: share/man/man4 sys/netpfil/pf
Author: kp Date: Thu Dec 13 20:00:11 2018 New Revision: 342051 URL: https://svnweb.freebsd.org/changeset/base/342051 Log: pfsync: Performance improvement pfsync code is called for every new state, state update and state deletion in pf. While pf itself can operate on multiple states at the same time (on different cores, assuming the states hash to a different hashrow), pfsync only had a single lock. This greatly reduced throughput on multicore systems. Address this by splitting the pfsync queues into buckets, based on the state id. This ensures that updates for a given connection always end up in the same bucket, which allows pfsync to still collapse multiple updates into one, while allowing multiple cores to proceed at the same time. The number of buckets is tunable, but defaults to 2 x number of cpus. Benchmarking has shown improvement, depending on hardware and setup, from ~30% to ~100%. Sponsored by: Orange Business Services Modified: stable/12/share/man/man4/pfsync.4 stable/12/sys/netpfil/pf/if_pfsync.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/pfsync.4 == --- stable/12/share/man/man4/pfsync.4 Thu Dec 13 19:05:02 2018 (r342050) +++ stable/12/share/man/man4/pfsync.4 Thu Dec 13 20:00:11 2018 (r342051) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2017 +.Dd December 6, 2018 .Dt PFSYNC 4 .Os .Sh NAME @@ -130,6 +130,13 @@ See .Xr carp 4 for more information. Default value is 240. +.It Va net.pfsync.pfsync_buckets +The number of +.Nm +buckets. +This affects the performance and memory tradeoff. +Defaults to twice the number of CPUs. +Change only if benchmarks show this helps on your workload. .El .Sh EXAMPLES .Nm Modified: stable/12/sys/netpfil/pf/if_pfsync.c == --- stable/12/sys/netpfil/pf/if_pfsync.cThu Dec 13 19:05:02 2018 (r342050) +++ stable/12/sys/netpfil/pf/if_pfsync.cThu Dec 13 20:00:11 2018 (r342051) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -106,6 +107,8 @@ __FBSDID("$FreeBSD$"); sizeof(struct pfsync_header) + \ sizeof(struct pfsync_subheader) ) +struct pfsync_bucket; + struct pfsync_pkt { struct ip *ip; struct in_addr src; @@ -164,7 +167,7 @@ static struct pfsync_q pfsync_qs[] = { }; static voidpfsync_q_ins(struct pf_state *, int, bool); -static voidpfsync_q_del(struct pf_state *, bool); +static voidpfsync_q_del(struct pf_state *, bool, struct pfsync_bucket *); static voidpfsync_update_state(struct pf_state *); @@ -183,6 +186,28 @@ struct pfsync_deferral { struct mbuf *pd_m; }; +struct pfsync_sofct; + +struct pfsync_bucket +{ + int b_id; + struct pfsync_softc *b_sc; + struct mtx b_mtx; + struct callout b_tmo; + int b_flags; +#definePFSYNCF_BUCKET_PUSH 0x0001 + + size_t b_len; + TAILQ_HEAD(, pf_state) b_qs[PFSYNC_S_COUNT]; + TAILQ_HEAD(, pfsync_upd_req_item) b_upd_req_list; + TAILQ_HEAD(, pfsync_deferral) b_deferrals; + u_int b_deferred; + void*b_plus; + size_t b_pluslen; + + struct ifaltq b_snd; +}; + struct pfsync_softc { /* Configuration */ struct ifnet*sc_ifp; @@ -192,20 +217,12 @@ struct pfsync_softc { uint32_tsc_flags; #definePFSYNCF_OK 0x0001 #definePFSYNCF_DEFER 0x0002 -#definePFSYNCF_PUSH0x0004 uint8_t sc_maxupdates; struct ip sc_template; - struct callout sc_tmo; struct mtx sc_mtx; /* Queued data */ - size_t sc_len; - TAILQ_HEAD(, pf_state) sc_qs[PFSYNC_S_COUNT]; - TAILQ_HEAD(, pfsync_upd_req_item) sc_upd_req_list; - TAILQ_HEAD(, pfsync_deferral) sc_deferrals; - u_int sc_deferred; - void*sc_plus; - size_t sc_pluslen; + struct pfsync_bucket*sc_buckets; /* Bulk update info */ struct mtx sc_bulk_mtx; @@ -223,6 +240,10 @@ struct pfsync_softc { #definePFSYNC_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) #definePFSYNC_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) +#define PFSYNC_BUCKET_LOCK(b) mtx_lock(&(b)->b_mtx) +#define PFSYNC_BUCKET_UNLOCK(b)mtx_unlock(&(b)->b_mtx) +#define
svn commit: r342049 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/dispatcher source/components/executer source/components/namespace source/components/parser source/...
Author: jkim Date: Thu Dec 13 19:04:25 2018 New Revision: 342049 URL: https://svnweb.freebsd.org/changeset/base/342049 Log: Import ACPICA 20181213. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmswitch.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelp.c vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exserial.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c Modified: vendor-sys/acpica/dist/changes.txt == --- vendor-sys/acpica/dist/changes.txt Thu Dec 13 16:07:35 2018 (r342048) +++ vendor-sys/acpica/dist/changes.txt Thu Dec 13 19:04:25 2018 (r342049) @@ -1,7 +1,68 @@ -31 October 2018. Summary of changes for version 20181031: +13 December 2018. Summary of changes for version 20181213: -This release is available at https://acpica.org/downloads + +1) ACPICA Kernel-resident Subsystem: + +Fixed some buffer length issues with the GenericSerialBus, related to two +of the bidirectional protocols: AttribRawProcessBytes and AttribRawBytes, +which are rarely seen in the field. For these, the LEN field of the ASL +buffer is now ignored. Hans de Goede + +Implemented a new object evaluation trace mechanism for control methods +and data objects. This includes nested control methods. It is +particularly useful for examining the ACPI execution during system +initialization since the output is relatively terse. The flag below +enables the output of the trace via the ACPI_DEBUG_PRINT_RAW interface: + #define ACPI_LV_EVALUATION 0x0008 + +Examples: + Enter evaluation : _SB.PCI0._INI (Method) + Exit evaluation: _SB.PCI0._INI + Enter evaluation : _OSI (Method) + Exit evaluation: _OSI + Enter evaluation : _SB.PCI0.TEST (Method) + Nested method call : _SB.PCI0.NST1 + Exit nested method : _SB.PCI0.NST1 + Exit evaluation: _SB.PCI0.TEST + +Added two recently-defined _OSI strings. See +https://docs.microsoft.com/en-us/windows-hardware/drivers/acpi/winacpi- +osi. + "Windows 2018" + "Windows 2018.2" + +Update for buffer-to-string conversions via the ToHexString ASL operator. +A "0x" is now prepended to each of the hex values in the output string. +This provides compatibility with other ACPI implementations. The ACPI +specification is somewhat vague on this issue. + Example output string after conversion: +"0x01,0x02,0x03,0x04,0x05,0x06" + +Return
svn commit: r342050 - vendor-sys/acpica/20181213
Author: jkim Date: Thu Dec 13 19:05:02 2018 New Revision: 342050 URL: https://svnweb.freebsd.org/changeset/base/342050 Log: Tag ACPICA 20181213. Added: vendor-sys/acpica/20181213/ - copied from r342049, vendor-sys/acpica/dist/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342048 - stable/12/sys/vm
Author: markj Date: Thu Dec 13 16:07:35 2018 New Revision: 342048 URL: https://svnweb.freebsd.org/changeset/base/342048 Log: MFC r340405: Add accounting to per-domain UMA full bucket caches. Modified: stable/12/sys/vm/uma_core.c stable/12/sys/vm/uma_int.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c == --- stable/12/sys/vm/uma_core.c Thu Dec 13 15:51:07 2018(r342047) +++ stable/12/sys/vm/uma_core.c Thu Dec 13 16:07:35 2018(r342048) @@ -459,7 +459,37 @@ bucket_zone_drain(void) zone_drain(ubz->ubz_zone); } +static uma_bucket_t +zone_try_fetch_bucket(uma_zone_t zone, uma_zone_domain_t zdom, const bool ws) +{ + uma_bucket_t bucket; + + ZONE_LOCK_ASSERT(zone); + + if ((bucket = LIST_FIRST(>uzd_buckets)) != NULL) { + MPASS(zdom->uzd_nitems >= bucket->ub_cnt); + LIST_REMOVE(bucket, ub_link); + zdom->uzd_nitems -= bucket->ub_cnt; + if (ws && zdom->uzd_imin > zdom->uzd_nitems) + zdom->uzd_imin = zdom->uzd_nitems; + } + return (bucket); +} + static void +zone_put_bucket(uma_zone_t zone, uma_zone_domain_t zdom, uma_bucket_t bucket, +const bool ws) +{ + + ZONE_LOCK_ASSERT(zone); + + LIST_INSERT_HEAD(>uzd_buckets, bucket, ub_link); + zdom->uzd_nitems += bucket->ub_cnt; + if (ws && zdom->uzd_imax < zdom->uzd_nitems) + zdom->uzd_imax = zdom->uzd_nitems; +} + +static void zone_log_warning(uma_zone_t zone) { static const struct timeval warninterval = { 300, 0 }; @@ -509,6 +539,23 @@ uma_timeout(void *unused) } /* + * Update the working set size estimate for the zone's bucket cache. + * The constants chosen here are somewhat arbitrary. With an update period of + * 20s (UMA_TIMEOUT), this estimate is dominated by zone activity over the + * last 100s. + */ +static void +zone_domain_update_wss(uma_zone_domain_t zdom) +{ + long wss; + + MPASS(zdom->uzd_imax >= zdom->uzd_imin); + wss = zdom->uzd_imax - zdom->uzd_imin; + zdom->uzd_imax = zdom->uzd_imin = zdom->uzd_nitems; + zdom->uzd_wss = (3 * wss + 2 * zdom->uzd_wss) / 5; +} + +/* * Routine to perform timeout driven calculations. This expands the * hashes and does per cpu statistics aggregation. * @@ -560,8 +607,14 @@ keg_timeout(uma_keg_t keg) static void zone_timeout(uma_zone_t zone) { + int i; zone_foreach_keg(zone, _timeout); + + ZONE_LOCK(zone); + for (i = 0; i < vm_ndomains; i++) + zone_domain_update_wss(>uz_domain[i]); + ZONE_UNLOCK(zone); } /* @@ -772,16 +825,16 @@ cache_drain_safe_cpu(uma_zone_t zone) cache = >uz_cpu[curcpu]; if (cache->uc_allocbucket) { if (cache->uc_allocbucket->ub_cnt != 0) - LIST_INSERT_HEAD(>uz_domain[domain].uzd_buckets, - cache->uc_allocbucket, ub_link); + zone_put_bucket(zone, >uz_domain[domain], + cache->uc_allocbucket, false); else b1 = cache->uc_allocbucket; cache->uc_allocbucket = NULL; } if (cache->uc_freebucket) { if (cache->uc_freebucket->ub_cnt != 0) - LIST_INSERT_HEAD(>uz_domain[domain].uzd_buckets, - cache->uc_freebucket, ub_link); + zone_put_bucket(zone, >uz_domain[domain], + cache->uc_freebucket, false); else b2 = cache->uc_freebucket; cache->uc_freebucket = NULL; @@ -844,8 +897,8 @@ bucket_cache_drain(uma_zone_t zone) */ for (i = 0; i < vm_ndomains; i++) { zdom = >uz_domain[i]; - while ((bucket = LIST_FIRST(>uzd_buckets)) != NULL) { - LIST_REMOVE(bucket, ub_link); + while ((bucket = zone_try_fetch_bucket(zone, zdom, false)) != + NULL) { ZONE_UNLOCK(zone); bucket_drain(zone, bucket); bucket_free(zone, bucket, NULL); @@ -2523,11 +2576,9 @@ zalloc_start: zdom = >uz_domain[0]; else zdom = >uz_domain[domain]; - if ((bucket = LIST_FIRST(>uzd_buckets)) != NULL) { + if ((bucket = zone_try_fetch_bucket(zone, zdom, true)) != NULL) { KASSERT(bucket->ub_cnt != 0, ("uma_zalloc_arg: Returning an empty bucket.")); - - LIST_REMOVE(bucket, ub_link); cache->uc_allocbucket = bucket; ZONE_UNLOCK(zone); goto zalloc_start; @@ -2556,6 +2607,7 @@ zalloc_start: critical_enter(); cpu = curcpu; cache =
svn commit: r342047 - stable/12/sys/kern
Author: markj Date: Thu Dec 13 15:51:07 2018 New Revision: 342047 URL: https://svnweb.freebsd.org/changeset/base/342047 Log: MFC r341638: Let kern.trap_enotcap be set as a tunable. Modified: stable/12/sys/kern/sys_capability.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sys_capability.c == --- stable/12/sys/kern/sys_capability.c Thu Dec 13 13:25:37 2018 (r342046) +++ stable/12/sys/kern/sys_capability.c Thu Dec 13 15:51:07 2018 (r342047) @@ -86,7 +86,7 @@ __FBSDID("$FreeBSD$"); #include bool __read_frequently trap_enotcap; -SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RW, _enotcap, 0, +SYSCTL_BOOL(_kern, OID_AUTO, trap_enotcap, CTLFLAG_RWTUN, _enotcap, 0, "Deliver SIGTRAP on ENOTCAPABLE"); #ifdef CAPABILITY_MODE ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342046 - in head/sys: cam/nvme dev/nvme
Author: chuck Date: Thu Dec 13 13:25:37 2018 New Revision: 342046 URL: https://svnweb.freebsd.org/changeset/base/342046 Log: nda(4) fix check for Dataset Management support In the nda(4) driver, only set DISKFLAG_CANDELETE (a.k.a. can support BIO_DELETE) if the drive supports Dataset Management. There are reports that without this check, VMWare Workstation does not work reliably. Fix is to check the ONCS field in the NVMe Controller Data structure for support. This check previously existed but did not survive the big-endian changes. Reported by: yur...@yuripv.net Reviewed by: imp, mav, jimharris Approved by: imp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18493 Modified: head/sys/cam/nvme/nvme_da.c head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ns.c Modified: head/sys/cam/nvme/nvme_da.c == --- head/sys/cam/nvme/nvme_da.c Thu Dec 13 12:58:42 2018(r342045) +++ head/sys/cam/nvme/nvme_da.c Thu Dec 13 13:25:37 2018(r342046) @@ -798,7 +798,7 @@ ndaregister(struct cam_periph *periph, void *arg) disk->d_mediasize = (off_t)(disk->d_sectorsize * nsd->nsze); disk->d_delmaxsize = disk->d_mediasize; disk->d_flags = DISKFLAG_DIRECT_COMPLETION; -// if (cd->oncs.dsm) // XXX broken? + if (nvme_ctrlr_has_dataset_mgmt(cd)) disk->d_flags |= DISKFLAG_CANDELETE; vwc_present = (cd->vwc >> NVME_CTRLR_DATA_VWC_PRESENT_SHIFT) & NVME_CTRLR_DATA_VWC_PRESENT_MASK; Modified: head/sys/dev/nvme/nvme.h == --- head/sys/dev/nvme/nvme.hThu Dec 13 12:58:42 2018(r342045) +++ head/sys/dev/nvme/nvme.hThu Dec 13 13:25:37 2018(r342046) @@ -1259,6 +1259,13 @@ void nvme_unregister_consumer(struct nvme_consumer *c device_t nvme_ctrlr_get_device(struct nvme_controller *ctrlr); const struct nvme_controller_data * nvme_ctrlr_get_data(struct nvme_controller *ctrlr); +static inline bool +nvme_ctrlr_has_dataset_mgmt(const struct nvme_controller_data *cd) +{ + /* Assumes cd was byte swapped by nvme_controller_data_swapbytes() */ + return ((cd->oncs >> NVME_CTRLR_DATA_ONCS_DSM_SHIFT) & + NVME_CTRLR_DATA_ONCS_DSM_MASK); +} /* Namespace helper functions */ uint32_t nvme_ns_get_max_io_xfer_size(struct nvme_namespace *ns); Modified: head/sys/dev/nvme/nvme_ns.c == --- head/sys/dev/nvme/nvme_ns.c Thu Dec 13 12:58:42 2018(r342045) +++ head/sys/dev/nvme/nvme_ns.c Thu Dec 13 13:25:37 2018(r342046) @@ -498,8 +498,6 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t struct nvme_completion_poll_status status; int res; int unit; - uint16_toncs; - uint8_t dsm; uint8_t flbas_fmt; uint8_t vwc_present; @@ -569,9 +567,7 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t return (ENXIO); } - oncs = ctrlr->cdata.oncs; - dsm = (oncs >> NVME_CTRLR_DATA_ONCS_DSM_SHIFT) & NVME_CTRLR_DATA_ONCS_DSM_MASK; - if (dsm) + if (nvme_ctrlr_has_dataset_mgmt(>cdata)) ns->flags |= NVME_NS_DEALLOCATE_SUPPORTED; vwc_present = (ctrlr->cdata.vwc >> NVME_CTRLR_DATA_VWC_PRESENT_SHIFT) & ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342045 - head/etc/mtree
Author: des Date: Thu Dec 13 12:58:42 2018 New Revision: 342045 URL: https://svnweb.freebsd.org/changeset/base/342045 Log: Create /etc/authpf, used by authpf(8) and authpf-noip(8). MFC after:1 week Modified: head/etc/mtree/BSD.root.dist Modified: head/etc/mtree/BSD.root.dist == --- head/etc/mtree/BSD.root.distThu Dec 13 11:55:18 2018 (r342044) +++ head/etc/mtree/BSD.root.distThu Dec 13 12:58:42 2018 (r342045) @@ -30,6 +30,8 @@ etc X11 .. +authpf +.. autofs .. bluetooth ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342042 - in head/contrib/libarchive/libarchive: . test
Author: mm Date: Thu Dec 13 11:18:45 2018 New Revision: 342042 URL: https://svnweb.freebsd.org/changeset/base/342042 Log: MFV r341771,342040,342041: Sync libarchive with vendor. Relevant vendor changes: PR #1102: RAR5 reader - fix big-endian problems PR #1105: Fix various crash, memory corruption and infinite loop conditions PR #1107: RAR5 reader: removed an unused function: bf_is_last_block MFC after:1 week Modified: head/contrib/libarchive/libarchive/archive_acl.c head/contrib/libarchive/libarchive/archive_read_support_format_rar.c head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_acl.c == --- head/contrib/libarchive/libarchive/archive_acl.cThu Dec 13 11:15:14 2018(r342041) +++ head/contrib/libarchive/libarchive/archive_acl.cThu Dec 13 11:18:45 2018(r342042) @@ -1723,6 +1723,11 @@ archive_acl_from_text_l(struct archive_acl *acl, const st = field[n].start + 1; len = field[n].end - field[n].start; + if (len == 0) { + ret = ARCHIVE_WARN; + continue; + } + switch (*s) { case 'u': if (len == 1 || (len == 4 Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar.c == --- head/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu Dec 13 11:15:14 2018(r342041) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu Dec 13 11:18:45 2018(r342042) @@ -258,6 +258,7 @@ struct rar struct data_block_offsets *dbo; unsigned int cursor; unsigned int nodes; + char filename_must_match; /* LZSS members */ struct huffman_code maincode; @@ -1560,6 +1561,12 @@ read_header(struct archive_read *a, struct archive_ent } return ret; } + else if (rar->filename_must_match) + { +archive_set_error(>archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Mismatch of file parts split across multi-volume archive"); +return (ARCHIVE_FATAL); + } rar->filename_save = (char*)realloc(rar->filename_save, filename_size + 1); @@ -2300,6 +2307,11 @@ parse_codes(struct archive_read *a) new_size = DICTIONARY_MAX_SIZE; else new_size = rar_fls((unsigned int)rar->unp_size) << 1; +if (new_size == 0) { + archive_set_error(>archive, ARCHIVE_ERRNO_FILE_FORMAT, +"Zero window size is invalid."); + return (ARCHIVE_FATAL); +} new_window = realloc(rar->lzss.window, new_size); if (new_window == NULL) { archive_set_error(>archive, ENOMEM, @@ -2928,12 +2940,14 @@ rar_read_ahead(struct archive_read *a, size_t min, ssi else if (*avail == 0 && rar->main_flags & MHD_VOLUME && rar->file_flags & FHD_SPLIT_AFTER) { + rar->filename_must_match = 1; ret = archive_read_format_rar_read_header(a, a->entry); if (ret == (ARCHIVE_EOF)) { rar->has_endarc_header = 1; ret = archive_read_format_rar_read_header(a, a->entry); } + rar->filename_must_match = 0; if (ret != (ARCHIVE_OK)) return NULL; return rar_read_ahead(a, min, avail); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c == --- head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Thu Dec 13 11:15:14 2018(r342041) +++ head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c Thu Dec 13 11:18:45 2018(r342042) @@ -24,6 +24,7 @@ */ #include "archive_platform.h" +#include "archive_endian.h" #ifdef HAVE_ERRNO_H #include @@ -225,18 +226,17 @@ struct bit_reader { int in_addr;/* Current byte pointer. */ }; -/* RARv5 block header structure. */ +/* RARv5 block header structure. Use bf_* functions to get values from + * block_flags_u8 field. I.e. bf_byte_count, etc. */ struct compressed_block_header { -union { -struct { -uint8_t bit_size : 3; -uint8_t byte_count : 3; -uint8_t is_last_block : 1; -uint8_t is_table_present : 1; -} block_flags; -uint8_t block_flags_u8; -}; - +/* block_flags_u8 contain fields encoded in little-endian bitfield: + * + * - table present flag (shr 7, and 1), + * - last block flag
svn commit: r342041 - vendor/libarchive/dist/libarchive
Author: mm Date: Thu Dec 13 11:15:14 2018 New Revision: 342041 URL: https://svnweb.freebsd.org/changeset/base/342041 Log: Update vendor/libarchive/dist to git cef97307a3f681fcbb2cc02db6df3619a3f8b69c Relevant vendor changes: PR #1105: Fix various crash, memory corruption and infinite loop conditions Modified: vendor/libarchive/dist/libarchive/archive_acl.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Modified: vendor/libarchive/dist/libarchive/archive_acl.c == --- vendor/libarchive/dist/libarchive/archive_acl.c Thu Dec 13 11:04:59 2018(r342040) +++ vendor/libarchive/dist/libarchive/archive_acl.c Thu Dec 13 11:15:14 2018(r342041) @@ -1723,6 +1723,11 @@ archive_acl_from_text_l(struct archive_acl *acl, const st = field[n].start + 1; len = field[n].end - field[n].start; + if (len == 0) { + ret = ARCHIVE_WARN; + continue; + } + switch (*s) { case 'u': if (len == 1 || (len == 4 Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c == --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c Thu Dec 13 11:04:59 2018(r342040) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c Thu Dec 13 11:15:14 2018(r342041) @@ -258,6 +258,7 @@ struct rar struct data_block_offsets *dbo; unsigned int cursor; unsigned int nodes; + char filename_must_match; /* LZSS members */ struct huffman_code maincode; @@ -1560,6 +1561,12 @@ read_header(struct archive_read *a, struct archive_ent } return ret; } + else if (rar->filename_must_match) + { +archive_set_error(>archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Mismatch of file parts split across multi-volume archive"); +return (ARCHIVE_FATAL); + } rar->filename_save = (char*)realloc(rar->filename_save, filename_size + 1); @@ -2300,6 +2307,11 @@ parse_codes(struct archive_read *a) new_size = DICTIONARY_MAX_SIZE; else new_size = rar_fls((unsigned int)rar->unp_size) << 1; +if (new_size == 0) { + archive_set_error(>archive, ARCHIVE_ERRNO_FILE_FORMAT, +"Zero window size is invalid."); + return (ARCHIVE_FATAL); +} new_window = realloc(rar->lzss.window, new_size); if (new_window == NULL) { archive_set_error(>archive, ENOMEM, @@ -2928,12 +2940,14 @@ rar_read_ahead(struct archive_read *a, size_t min, ssi else if (*avail == 0 && rar->main_flags & MHD_VOLUME && rar->file_flags & FHD_SPLIT_AFTER) { + rar->filename_must_match = 1; ret = archive_read_format_rar_read_header(a, a->entry); if (ret == (ARCHIVE_EOF)) { rar->has_endarc_header = 1; ret = archive_read_format_rar_read_header(a, a->entry); } + rar->filename_must_match = 0; if (ret != (ARCHIVE_OK)) return NULL; return rar_read_ahead(a, min, avail); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c == --- vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Thu Dec 13 11:04:59 2018(r342040) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Thu Dec 13 11:15:14 2018(r342041) @@ -386,6 +386,11 @@ _warc_read(struct archive_read *a, const void **buf, s return (ARCHIVE_EOF); } + if (w->unconsumed) { + __archive_read_consume(a, w->unconsumed); + w->unconsumed = 0U; + } + rab = __archive_read_ahead(a, 1U, ); if (nrd < 0) { *bsz = 0U; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342040 - vendor/libarchive/dist/libarchive
Author: mm Date: Thu Dec 13 11:04:59 2018 New Revision: 342040 URL: https://svnweb.freebsd.org/changeset/base/342040 Log: Update vendor/libarchive/dist to git 7d6da880ae3e379d463137510bb4e8c65b6bfb36 Relevant vendor changes: PR #1107: RAR5 reader: removed an unused function: bf_is_last_block Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c == --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Thu Dec 13 10:55:48 2018(r342039) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c Thu Dec 13 11:04:59 2018(r342040) @@ -229,7 +229,14 @@ struct bit_reader { /* RARv5 block header structure. Use bf_* functions to get values from * block_flags_u8 field. I.e. bf_byte_count, etc. */ struct compressed_block_header { -uint8_t block_flags_u8; /* Fields encoded in little-endian bitfield */ +/* block_flags_u8 contain fields encoded in little-endian bitfield: + * + * - table present flag (shr 7, and 1), + * - last block flag(shr 6, and 1), + * - byte_count (shr 3, and 7), + * - bit_size (shr 0, and 7). + */ +uint8_t block_flags_u8; uint8_t block_cksum; }; @@ -430,11 +437,6 @@ uint8_t bf_bit_size(const struct compressed_block_head static inline uint8_t bf_byte_count(const struct compressed_block_header* hdr) { return (hdr->block_flags_u8 >> 3) & 7; -} - -static inline -uint8_t bf_is_last_block(const struct compressed_block_header* hdr) { -return (hdr->block_flags_u8 >> 6) & 1; } static inline ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342039 - stable/11/sbin/ipfw
Author: eugen Date: Thu Dec 13 10:55:48 2018 New Revision: 342039 URL: https://svnweb.freebsd.org/changeset/base/342039 Log: MFC r340394: ipfw.8: Fix part of the SYNOPSIS documenting LIST OF RULES AND PREPROCESSING that is still referred as last section of the SYNOPSIS later but was erroneously situated in the section IN-KERNEL NAT. Modified: stable/11/sbin/ipfw/ipfw.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 == --- stable/11/sbin/ipfw/ipfw.8 Thu Dec 13 10:52:40 2018(r342038) +++ stable/11/sbin/ipfw/ipfw.8 Thu Dec 13 10:55:48 2018(r342039) @@ -105,16 +105,6 @@ in-kernel NAT. .Ar number .Cm config .Ar config-options -.Pp -.Nm -.Op Fl cfnNqS -.Oo -.Fl p Ar preproc -.Oo -.Ar preproc-flags -.Oc -.Oc -.Ar pathname .Ss STATEFUL IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION .Nm .Oo Cm set Ar N Oc Cm nat64lsn Ar name Cm create Ar create-options @@ -166,6 +156,16 @@ in-kernel NAT. .Cm internal talist .Nm .Cm internal vlist +.Ss LIST OF RULES AND PREPROCESSING +.Nm +.Op Fl cfnNqS +.Oo +.Fl p Ar preproc +.Oo +.Ar preproc-flags +.Oc +.Oc +.Ar pathname .Sh DESCRIPTION The .Nm ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342038 - stable/12/sbin/ipfw
Author: eugen Date: Thu Dec 13 10:52:40 2018 New Revision: 342038 URL: https://svnweb.freebsd.org/changeset/base/342038 Log: MFC r340394: ipfw.8: Fix part of the SYNOPSIS documenting LIST OF RULES AND PREPROCESSING that is still referred as last section of the SYNOPSIS later but was erroneously situated in the section IN-KERNEL NAT. Modified: stable/12/sbin/ipfw/ipfw.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipfw.8 == --- stable/12/sbin/ipfw/ipfw.8 Thu Dec 13 10:34:26 2018(r342037) +++ stable/12/sbin/ipfw/ipfw.8 Thu Dec 13 10:52:40 2018(r342038) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2018 +.Dd November 13, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -105,16 +105,6 @@ in-kernel NAT. .Ar number .Cm config .Ar config-options -.Pp -.Nm -.Op Fl cfnNqS -.Oo -.Fl p Ar preproc -.Oo -.Ar preproc-flags -.Oc -.Oc -.Ar pathname .Ss STATEFUL IPv6/IPv4 NETWORK ADDRESS AND PROTOCOL TRANSLATION .Nm .Oo Cm set Ar N Oc Cm nat64lsn Ar name Cm create Ar create-options @@ -166,6 +156,16 @@ in-kernel NAT. .Cm internal talist .Nm .Cm internal vlist +.Ss LIST OF RULES AND PREPROCESSING +.Nm +.Op Fl cfnNqS +.Oo +.Fl p Ar preproc +.Oo +.Ar preproc-flags +.Oc +.Oc +.Ar pathname .Sh DESCRIPTION The .Nm ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342036 - in stable/11/sys/dev/usb: . serial
Author: hselasky Date: Thu Dec 13 10:33:17 2018 New Revision: 342036 URL: https://svnweb.freebsd.org/changeset/base/342036 Log: MFC r334648: Add support for SIMCom SIM7600E. PR: 226066 Sponsored by: MSI/FUNTORO Modified: stable/11/sys/dev/usb/serial/u3g.c stable/11/sys/dev/usb/usbdevs Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/u3g.c == --- stable/11/sys/dev/usb/serial/u3g.c Thu Dec 13 10:18:31 2018 (r342035) +++ stable/11/sys/dev/usb/serial/u3g.c Thu Dec 13 10:33:17 2018 (r342036) @@ -208,6 +208,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3G, 0), U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), + U3G_DEV(ALINK, SIM7600E, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), Modified: stable/11/sys/dev/usb/usbdevs == --- stable/11/sys/dev/usb/usbdevs Thu Dec 13 10:18:31 2018 (r342035) +++ stable/11/sys/dev/usb/usbdevs Thu Dec 13 10:33:17 2018 (r342036) @@ -1011,6 +1011,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter /* Alink products */ product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem +product ALINK SIM7600E 0x9001 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342037 - in stable/10/sys/dev/usb: . serial
Author: hselasky Date: Thu Dec 13 10:34:26 2018 New Revision: 342037 URL: https://svnweb.freebsd.org/changeset/base/342037 Log: MFC r334648: Add support for SIMCom SIM7600E. PR: 226066 Sponsored by: MSI/FUNTORO Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c == --- stable/10/sys/dev/usb/serial/u3g.c Thu Dec 13 10:33:17 2018 (r342036) +++ stable/10/sys/dev/usb/serial/u3g.c Thu Dec 13 10:34:26 2018 (r342037) @@ -213,6 +213,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3G, 0), U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), + U3G_DEV(ALINK, SIM7600E, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), Modified: stable/10/sys/dev/usb/usbdevs == --- stable/10/sys/dev/usb/usbdevs Thu Dec 13 10:33:17 2018 (r342036) +++ stable/10/sys/dev/usb/usbdevs Thu Dec 13 10:34:26 2018 (r342037) @@ -1008,6 +1008,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter /* Alink products */ product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem +product ALINK SIM7600E 0x9001 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342035 - stable/11/tools/tools/netmap
Author: vmaffione Date: Thu Dec 13 10:18:31 2018 New Revision: 342035 URL: https://svnweb.freebsd.org/changeset/base/342035 Log: MFC r341726 tools: netmap: pkt-gen: check packet length against interface MTU Validate the value of the -l argument (packet length) against the MTU of the netmap port. In case the netmap port does not refer to a physical interface (e.g. VALE port or pipe), then the netmap buffer size is used as MTU. This change also sets a better default value for the -M option, so that pkt-gen uses the largest possible fragments in case of multi-slot packets. Differential Revision: https://reviews.freebsd.org/D18436 Modified: stable/11/tools/tools/netmap/pkt-gen.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/tools/netmap/pkt-gen.c == --- stable/11/tools/tools/netmap/pkt-gen.c Thu Dec 13 10:17:32 2018 (r342034) +++ stable/11/tools/tools/netmap/pkt-gen.c Thu Dec 13 10:18:31 2018 (r342035) @@ -195,7 +195,7 @@ struct virt_header { uint8_t fields[VIRT_HDR_MAX]; }; -#define MAX_BODYSIZE 16384 +#define MAX_BODYSIZE 65536 struct pkt { struct virt_header vh; @@ -238,7 +238,6 @@ struct mac_range { /* ifname can be netmap:foo- */ #define MAX_IFNAMELEN 64 /* our buffer for ifname */ -//#define MAX_PKTSIZE 1536 #define MAX_PKTSIZEMAX_BODYSIZE/* XXX: + IP_HDR + ETH_HDR */ /* compact timestamp to fit into 60 byte packet. (enough to obtain RTT) */ @@ -263,7 +262,7 @@ struct glob_arg { int forever; uint64_t npackets; /* total packets to send */ int frags; /* fragments per packet */ - u_int mtu; /* size of each fragment */ + u_int frag_size;/* size of each fragment */ int nthreads; int cpus; /* cpus used for running */ int system_cpus;/* cpus on the system */ @@ -308,6 +307,11 @@ struct glob_arg { }; enum dev_type { DEV_NONE, DEV_NETMAP, DEV_PCAP, DEV_TAP }; +enum { + TD_TYPE_SENDER = 1, + TD_TYPE_RECEIVER, + TD_TYPE_OTHER, +}; /* * Arguments for a new thread. The same structure is used by @@ -509,6 +513,42 @@ extract_mac_range(struct mac_range *r) return 0; } +static int +get_if_mtu(const struct glob_arg *g) +{ + char ifname[IFNAMSIZ]; + struct ifreq ifreq; + int s, ret; + + if (!strncmp(g->ifname, "netmap:", 7) && !strchr(g->ifname, '{') + && !strchr(g->ifname, '}')) { + /* Parse the interface name and ask the kernel for the +* MTU value. */ + strncpy(ifname, g->ifname+7, IFNAMSIZ-1); + ifname[strcspn(ifname, "-*^{}/@")] = '\0'; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) { + D("socket() failed: %s", strerror(errno)); + return s; + } + + memset(, 0, sizeof(ifreq)); + strncpy(ifreq.ifr_name, ifname, IFNAMSIZ); + + ret = ioctl(s, SIOCGIFMTU, ); + if (ret) { + D("ioctl(SIOCGIFMTU) failed: %s", strerror(errno)); + } + + return ifreq.ifr_mtu; + } + + /* This is a pipe or a VALE port, where the MTU is very large, +* so we use some practical limit. */ + return 65536; +} + static struct targ *targs; static int global_nthreads; @@ -1581,18 +1621,18 @@ sender_body(void *data) #endif /* NO_PCAP */ } else { int tosend = 0; - u_int bufsz, mtu = targ->g->mtu; + u_int bufsz, frag_size = targ->g->frag_size; nifp = targ->nmd->nifp; txring = NETMAP_TXRING(nifp, targ->nmd->first_tx_ring); bufsz = txring->nr_buf_size; - if (bufsz < mtu) - mtu = bufsz; + if (bufsz < frag_size) + frag_size = bufsz; targ->frag_size = targ->g->pkt_size / targ->frags; - if (targ->frag_size > mtu) { - targ->frags = targ->g->pkt_size / mtu; - targ->frag_size = mtu; - if (targ->g->pkt_size % mtu != 0) + if (targ->frag_size > frag_size) { + targ->frags = targ->g->pkt_size / frag_size; + targ->frag_size = frag_size; + if (targ->g->pkt_size % frag_size != 0) targ->frags++; } D("frags %u frag_size %u", targ->frags, targ->frag_size); @@ -2441,12 +2481,6 @@ usage(int errcode) exit(errcode); } -enum { - TD_TYPE_SENDER = 1, - TD_TYPE_RECEIVER, - TD_TYPE_OTHER, -}; - static void start_threads(struct glob_arg *g) { int i; @@ -2779,8 +2813,8 @@ main(int arc, char **argv) g.cpus = 1; /* default */ g.forever = 1; g.tx_rate = 0; - g.frags =1; - g.mtu =
svn commit: r342034 - stable/11/sys/dev/netmap
Author: vmaffione Date: Thu Dec 13 10:17:32 2018 New Revision: 342034 URL: https://svnweb.freebsd.org/changeset/base/342034 Log: MFC r341624 netmap: netmap_transmit should honor bpf packet tap hook This allows tcpdump to capture outbound kernel packets while in netmap mode Submitted by: Marc de la Gueronniere Reviewed by:vmaffione MFC after: 1 week Sponsored by: Verisign, Inc. Differential Revision: https://reviews.freebsd.org/D17896 Modified: stable/11/sys/dev/netmap/netmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap.c == --- stable/11/sys/dev/netmap/netmap.c Thu Dec 13 10:13:29 2018 (r342033) +++ stable/11/sys/dev/netmap/netmap.c Thu Dec 13 10:17:32 2018 (r342034) @@ -447,6 +447,7 @@ ports attached to the switch) #include/* bus_dmamap_* */ #include #include +#include /* ETHER_BPF_MTAP */ #elif defined(linux) @@ -3860,6 +3861,10 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) RD(1, "%s drop mbuf that needs generic segmentation offload", na->name); goto done; } + +#ifdef __FreeBSD__ + ETHER_BPF_MTAP(ifp, m); +#endif /* __FreeBSD__ */ /* protect against netmap_rxsync_from_host(), netmap_sw_to_nic() * and maybe other instances of netmap_transmit (the latter ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342033 - in stable/11/sys: conf dev/netmap modules/netmap net
Author: vmaffione Date: Thu Dec 13 10:13:29 2018 New Revision: 342033 URL: https://svnweb.freebsd.org/changeset/base/342033 Log: MFC r341516, r341589 netmap: align codebase to the current upstream (760279cfb2730a585) Changelist: - Replace netmap passthrough host support with a more general mechanism to call TXSYNC/RXSYNC from an in-kernel event-loop. No kernel threads are used to use this feature: the application is required to spawn a thread (or a process) and issue a SYNC_KLOOP_START (NIOCCTRL) command in the thread body. The kernel loop is executed by the ioctl implementation, which returns to userspace only when a different thread calls SYNC_KLOOP_STOP or the netmap file descriptor is closed. - Update the if_ptnet driver to cope with the new data structures, and prune all the obsolete ptnetmap code. - Add support for "null" netmap ports, useful to allocate netmap_if, netmap_ring and netmap buffers to be used by specialized applications (e.g. hypervisors). TXSYNC/RXSYNC on these ports have no effect. - Various fixes and code refactoring. Sponsored by: Sunny Valley Networks Differential Revision: https://reviews.freebsd.org/D18015 Added: stable/11/sys/dev/netmap/netmap_kloop.c - copied unchanged from r341815, stable/12/sys/dev/netmap/netmap_kloop.c stable/11/sys/dev/netmap/netmap_null.c - copied unchanged from r341815, stable/12/sys/dev/netmap/netmap_null.c Modified: stable/11/sys/conf/files stable/11/sys/dev/netmap/if_ixl_netmap.h stable/11/sys/dev/netmap/if_vtnet_netmap.h stable/11/sys/dev/netmap/netmap.c stable/11/sys/dev/netmap/netmap_bdg.c stable/11/sys/dev/netmap/netmap_bdg.h stable/11/sys/dev/netmap/netmap_freebsd.c stable/11/sys/dev/netmap/netmap_generic.c stable/11/sys/dev/netmap/netmap_kern.h stable/11/sys/dev/netmap/netmap_legacy.c stable/11/sys/dev/netmap/netmap_mem2.c stable/11/sys/dev/netmap/netmap_mem2.h stable/11/sys/dev/netmap/netmap_pipe.c stable/11/sys/dev/netmap/netmap_vale.c stable/11/sys/modules/netmap/Makefile stable/11/sys/net/netmap.h stable/11/sys/net/netmap_user.h stable/11/sys/net/netmap_virt.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files == --- stable/11/sys/conf/filesThu Dec 13 09:40:06 2018(r342032) +++ stable/11/sys/conf/filesThu Dec 13 10:13:29 2018(r342033) @@ -2469,17 +2469,19 @@ dev/ncr/ncr.c optional ncr pci dev/ncv/ncr53c500.coptional ncv dev/ncv/ncr53c500_pccard.c optional ncv pccard dev/netmap/netmap.coptional netmap +dev/netmap/netmap_bdg.coptional netmap dev/netmap/netmap_freebsd.coptional netmap dev/netmap/netmap_generic.coptional netmap +dev/netmap/netmap_kloop.c optional netmap +dev/netmap/netmap_legacy.c optional netmap dev/netmap/netmap_mbq.coptional netmap dev/netmap/netmap_mem2.c optional netmap dev/netmap/netmap_monitor.coptional netmap +dev/netmap/netmap_null.c optional netmap dev/netmap/netmap_offloadings.coptional netmap dev/netmap/netmap_pipe.c optional netmap dev/netmap/netmap_pt.c optional netmap dev/netmap/netmap_vale.c optional netmap -dev/netmap/netmap_legacy.c optional netmap -dev/netmap/netmap_bdg.coptional netmap # compile-with "${NORMAL_C} -Wconversion -Wextra" dev/nfsmb/nfsmb.c optional nfsmb pci dev/nge/if_nge.c optional nge Modified: stable/11/sys/dev/netmap/if_ixl_netmap.h == --- stable/11/sys/dev/netmap/if_ixl_netmap.hThu Dec 13 09:40:06 2018 (r342032) +++ stable/11/sys/dev/netmap/if_ixl_netmap.hThu Dec 13 10:13:29 2018 (r342033) @@ -130,7 +130,7 @@ ixl_netmap_attach(struct ixl_vsi *vsi) na.ifp = vsi->ifp; na.na_flags = NAF_BDG_MAYSLEEP; // XXX check that queues is set. - nm_prinf("queues is %p\n", vsi->queues); + nm_prinf("queues is %p", vsi->queues); if (vsi->queues) { na.num_tx_desc = vsi->queues[0].num_desc; na.num_rx_desc = vsi->queues[0].num_desc; Modified: stable/11/sys/dev/netmap/if_vtnet_netmap.h == --- stable/11/sys/dev/netmap/if_vtnet_netmap.h Thu Dec 13 09:40:06 2018 (r342032) +++ stable/11/sys/dev/netmap/if_vtnet_netmap.h Thu Dec 13 10:13:29 2018 (r342033) @@ -79,7 +79,7 @@ vtnet_free_used(struct virtqueue *vq, int netmap_bufs, } if (deq) - nm_prinf("%d sgs dequeued from %s-%d (netmap=%d)\n", + nm_prinf("%d sgs dequeued from %s-%d (netmap=%d)", deq, nm_txrx2str(t), idx, netmap_bufs); } @@ -230,7
svn commit: r342032 - stable/12/tools/tools/netmap
Author: vmaffione Date: Thu Dec 13 09:40:06 2018 New Revision: 342032 URL: https://svnweb.freebsd.org/changeset/base/342032 Log: MFC r341726 tools: netmap: pkt-gen: check packet length against interface MTU Validate the value of the -l argument (packet length) against the MTU of the netmap port. In case the netmap port does not refer to a physical interface (e.g. VALE port or pipe), then the netmap buffer size is used as MTU. This change also sets a better default value for the -M option, so that pkt-gen uses the largest possible fragments in case of multi-slot packets. Differential Revision: https://reviews.freebsd.org/D18436 Modified: stable/12/tools/tools/netmap/pkt-gen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/netmap/pkt-gen.c == --- stable/12/tools/tools/netmap/pkt-gen.c Thu Dec 13 09:39:05 2018 (r342031) +++ stable/12/tools/tools/netmap/pkt-gen.c Thu Dec 13 09:40:06 2018 (r342032) @@ -195,7 +195,7 @@ struct virt_header { uint8_t fields[VIRT_HDR_MAX]; }; -#define MAX_BODYSIZE 16384 +#define MAX_BODYSIZE 65536 struct pkt { struct virt_header vh; @@ -238,7 +238,6 @@ struct mac_range { /* ifname can be netmap:foo- */ #define MAX_IFNAMELEN 64 /* our buffer for ifname */ -//#define MAX_PKTSIZE 1536 #define MAX_PKTSIZEMAX_BODYSIZE/* XXX: + IP_HDR + ETH_HDR */ /* compact timestamp to fit into 60 byte packet. (enough to obtain RTT) */ @@ -263,7 +262,7 @@ struct glob_arg { int forever; uint64_t npackets; /* total packets to send */ int frags; /* fragments per packet */ - u_int mtu; /* size of each fragment */ + u_int frag_size;/* size of each fragment */ int nthreads; int cpus; /* cpus used for running */ int system_cpus;/* cpus on the system */ @@ -308,6 +307,11 @@ struct glob_arg { }; enum dev_type { DEV_NONE, DEV_NETMAP, DEV_PCAP, DEV_TAP }; +enum { + TD_TYPE_SENDER = 1, + TD_TYPE_RECEIVER, + TD_TYPE_OTHER, +}; /* * Arguments for a new thread. The same structure is used by @@ -509,6 +513,42 @@ extract_mac_range(struct mac_range *r) return 0; } +static int +get_if_mtu(const struct glob_arg *g) +{ + char ifname[IFNAMSIZ]; + struct ifreq ifreq; + int s, ret; + + if (!strncmp(g->ifname, "netmap:", 7) && !strchr(g->ifname, '{') + && !strchr(g->ifname, '}')) { + /* Parse the interface name and ask the kernel for the +* MTU value. */ + strncpy(ifname, g->ifname+7, IFNAMSIZ-1); + ifname[strcspn(ifname, "-*^{}/@")] = '\0'; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) { + D("socket() failed: %s", strerror(errno)); + return s; + } + + memset(, 0, sizeof(ifreq)); + strncpy(ifreq.ifr_name, ifname, IFNAMSIZ); + + ret = ioctl(s, SIOCGIFMTU, ); + if (ret) { + D("ioctl(SIOCGIFMTU) failed: %s", strerror(errno)); + } + + return ifreq.ifr_mtu; + } + + /* This is a pipe or a VALE port, where the MTU is very large, +* so we use some practical limit. */ + return 65536; +} + static struct targ *targs; static int global_nthreads; @@ -1581,18 +1621,18 @@ sender_body(void *data) #endif /* NO_PCAP */ } else { int tosend = 0; - u_int bufsz, mtu = targ->g->mtu; + u_int bufsz, frag_size = targ->g->frag_size; nifp = targ->nmd->nifp; txring = NETMAP_TXRING(nifp, targ->nmd->first_tx_ring); bufsz = txring->nr_buf_size; - if (bufsz < mtu) - mtu = bufsz; + if (bufsz < frag_size) + frag_size = bufsz; targ->frag_size = targ->g->pkt_size / targ->frags; - if (targ->frag_size > mtu) { - targ->frags = targ->g->pkt_size / mtu; - targ->frag_size = mtu; - if (targ->g->pkt_size % mtu != 0) + if (targ->frag_size > frag_size) { + targ->frags = targ->g->pkt_size / frag_size; + targ->frag_size = frag_size; + if (targ->g->pkt_size % frag_size != 0) targ->frags++; } D("frags %u frag_size %u", targ->frags, targ->frag_size); @@ -2441,12 +2481,6 @@ usage(int errcode) exit(errcode); } -enum { - TD_TYPE_SENDER = 1, - TD_TYPE_RECEIVER, - TD_TYPE_OTHER, -}; - static void start_threads(struct glob_arg *g) { int i; @@ -2779,8 +2813,8 @@ main(int arc, char **argv) g.cpus = 1; /* default */ g.forever = 1; g.tx_rate = 0; - g.frags =1; - g.mtu =
svn commit: r342031 - stable/12/sys/dev/netmap
Author: vmaffione Date: Thu Dec 13 09:39:05 2018 New Revision: 342031 URL: https://svnweb.freebsd.org/changeset/base/342031 Log: MFC r341624 netmap: netmap_transmit should honor bpf packet tap hook This allows tcpdump to capture outbound kernel packets while in netmap mode Submitted by: Marc de la Gueronniere Reviewed by:vmaffione MFC after: 1 week Sponsored by: Verisign, Inc. Differential Revision: https://reviews.freebsd.org/D17896 Modified: stable/12/sys/dev/netmap/netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/netmap.c == --- stable/12/sys/dev/netmap/netmap.c Thu Dec 13 08:59:51 2018 (r342030) +++ stable/12/sys/dev/netmap/netmap.c Thu Dec 13 09:39:05 2018 (r342031) @@ -449,6 +449,7 @@ ports attached to the switch) #include/* bus_dmamap_* */ #include #include +#include /* ETHER_BPF_MTAP */ #elif defined(linux) @@ -3859,6 +3860,10 @@ netmap_transmit(struct ifnet *ifp, struct mbuf *m) RD(1, "%s drop mbuf that needs generic segmentation offload", na->name); goto done; } + +#ifdef __FreeBSD__ + ETHER_BPF_MTAP(ifp, m); +#endif /* __FreeBSD__ */ /* protect against netmap_rxsync_from_host(), netmap_sw_to_nic() * and maybe other instances of netmap_transmit (the latter ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r342030 - head/sys/opencrypto
Author: ae Date: Thu Dec 13 08:59:51 2018 New Revision: 342030 URL: https://svnweb.freebsd.org/changeset/base/342030 Log: Plug memory leak for AES_*_NIST_GMAC algorithms. swcr_newsession() allocates sw_ictx for these algorithms, thus we need to free() it in swcr_freesession(). PR: 233907 MFC after:1 week Modified: head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/cryptosoft.c == --- head/sys/opencrypto/cryptosoft.cThu Dec 13 06:59:55 2018 (r342029) +++ head/sys/opencrypto/cryptosoft.cThu Dec 13 08:59:51 2018 (r342030) @@ -1091,6 +1091,9 @@ swcr_freesession(device_t dev, crypto_session_t cses) case CRYPTO_SHA2_256: case CRYPTO_SHA2_384: case CRYPTO_SHA2_512: + case CRYPTO_AES_128_NIST_GMAC: + case CRYPTO_AES_192_NIST_GMAC: + case CRYPTO_AES_256_NIST_GMAC: axf = swd->sw_axf; if (swd->sw_ictx) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"