aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib
Commit message (Collapse)AuthorAgeFilesLines
* Correct the identifier for the Unifi Security GatewayJustin Hibbits2018-07-102-5/+5
| | | | | | | The USG is really E120, not E110. Notes: svn path=/head/; revision=336173
* MFV: r335802Jung-uk Kim2018-06-2919-126/+140
|\ | | | | | | | | | | | | Merge ACPICA 20180629. Notes: svn path=/head/; revision=335809
* | Really fix the style.Li-Wen Hsu2018-06-191-1/+1
| | | | | | | | | | | | | | | | Approved by: oshogbo Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=335382
* | style(9) fix, I was also going to silence gcc.Li-Wen Hsu2018-06-191-0/+1
| | | | | | | | | | | | | | | | Approved by: emaste, oshogbo Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=335380
* | Set prev to NULL so its garaunteed to have a value of some kind andSean Bruno2018-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | gcc doesn't explode. Feel free to fix this correctly or whatever for gcc builds. This *should* quiesce tinderbox after r335347 for the gcc builds. Notes: svn path=/head/; revision=335379
* | libnv: Add nvlist_append_*_array() family of functions.Mariusz Zaborski2018-06-183-0/+174
| | | | | | | | | | | | | | | | | | | | The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions allows to dynamically extend array stored in the nvlist. Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org> Notes: svn path=/head/; revision=335347
* | libnv: clean parent in nvlist_array when removing it.Mariusz Zaborski2018-06-181-1/+3
| | | | | | | | | | | | | | | | | | | | When we are removing element form the nvlist we should also clean parent, because the array is not a part of the nvlist anymore. Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org> Notes: svn path=/head/; revision=335344
* | libnv: Remove nvlist argument from cnvlist_{take,free}_* functions.Mariusz Zaborski2018-06-181-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | All information which are need for those operations is already stored in the cookie. We decided not to bump libnv version because this API is not used yet in the base system. Reviewed by: pjd Notes: svn path=/head/; revision=335343
* | libnv: add const to cookies argumentsMariusz Zaborski2018-06-181-5/+5
| | | | | | | | | | | | | | Pointed out by: pjd@ Notes: svn path=/head/; revision=335342
* | libnv: change name of cookie from cookiep to cookie.Mariusz Zaborski2018-06-181-36/+36
| | | | | | | | | | | | | | | | | | | | The name was inconsistent with rest of the library. No functional change intended. Pointed out by: pjd@ Notes: svn path=/head/; revision=335341
* | [ath_hal] Return failure if noise floor calibration fails.Adrian Chadd2018-06-083-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we fail noise floor calibration then we may end up with a deaf NIC which we can't recover without a full chip reset. Earlier chips seem to get less stuck in this condition versus AR9280/later and AR9300/later, but whilst here just fix up the AR5212 era chips to also return NF calibration failures. This HAL routine would only return failure if the channel was not configured. This is a no-op until the driver side code for doing resets and the HAL code for being told about the reset type (and then handling it!) is implemented. Tested: * AR9280, STA mode * AR2425, STA mode * AR9380, STA mode Notes: svn path=/head/; revision=334849
* | MFV: r334448Jung-uk Kim2018-06-0422-60/+349
|\| | | | | | | | | | | | | Import ACPICA 20180531. Notes: svn path=/head/; revision=334643
* | malloc: try to use builtins for zeroing at the callsiteMateusz Guzik2018-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Plenty of allocation sites pass M_ZERO and sizes which are small and known at compilation time. Handling them internally in malloc loses this information and results in avoidable calls to memset. Instead, let the compiler take the advantage of it whenever possible. Discussed with: jeff Notes: svn path=/head/; revision=334545
* | [ath_hal] migrate the shared HAL_RESET_* pieces out into ath_hal.Adrian Chadd2018-05-251-6/+0
| | | | | | | | | | | | | | | | | | I'm in the process of reworking how the reset path works with an eye to better recovery when the chips hang and/or go RF/PHY deaf. This is the first step in a lot of unification and API changes. Notes: svn path=/head/; revision=334197
* | Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b.Olivier Houchard2018-05-241-101/+101
| | | | | | | | | | | | | | | | This brings us the renaming of fields in ck_queue, so that our own LIST/SLIST/TAILQ/etc won't accidentally work with them. Notes: svn path=/head/; revision=334189
* | ifnet: Replace if_addr_lock rwlock with epoch + mutexMatt Macy2018-05-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366 Notes: svn path=/head/; revision=333813
* | Quiesce a couple pages of clang warnings with a cast. DuplicatesSean Bruno2018-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | linux maintainer commit: https://github.com/torvalds/linux/commit/627871b71c89a6ec12fbed75063f238e0c7127b2#diff-8c6ddb4c3ad69a6fb9f289475821db56 ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int' to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167 [-Wconstant-conversion] /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)} ^~~~~~~~~~~~~~~~~~ ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN' (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5)) Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15476 Notes: svn path=/head/; revision=333801
* | ck: add support for executing callbacks outside of main poll loopMatt Macy2018-05-172-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull in change from upstream deca119d14bfffd440770eb67cbdbeaf7b57eb7b | ck_epoch: introduce ck_epoch_deferred | | Allow for deferral to occur outside epoch poll critical loop (which may access per-CPU structures). | Approved by: sbruno Notes: svn path=/head/; revision=333745
* | Add support for setting type of service, TOS, for outgoing RDMA connectionsHans Petter Selasky2018-05-151-0/+10
| | | | | | | | | | | | | | | | | | | | in the krping kernel test utility. MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=333623
* | Apply fixes in ena-comMarcin Wojtas2018-05-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change ena-com BIT macro to work on unsigned value. To make the shifting operations safer, they should be working on unsigned values. * Fix a mutex not owned ASSERT panic in ENA control path. A thread calling cv_broadcast()/cv_signal() must hold the mutex used for cv_wait(). Fix the ENA control path code that has this problem. Submitted by: Krishna Yenduri <kyenduri@brkt.com> Reviewed by: Michal Krawczyk <mk@semihalf.com> Tested by: Michal Krawczyk <mk@semihalf.com> Notes: svn path=/head/; revision=333453
* | Fix style error introduced in r333393.Cy Schubert2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | Reported by: jhb, imp, phk MFC after: 6 days X-MFC with: r333393 Notes: svn path=/head/; revision=333427
* | Document intentional fallthrough. (CID 976535)Cy Schubert2018-05-091-0/+1
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=333393
* | Fix memory leak. (CID 1199373).Cy Schubert2018-05-091-0/+1
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=333392
* | MFV: r333378Jung-uk Kim2018-05-087-28/+108
|\| | | | | | | | | | | | | Import ACPICA 20180508. Notes: svn path=/head/; revision=333380
* | MFV: r333077Jung-uk Kim2018-05-0122-230/+425
|\| | | | | | | | | | | | | Merge ACPICA 20180427. Notes: svn path=/head/; revision=333150
* | Import CK as of commit b19ed4c6a56ec93215ab567ba18ba61bf1cfbac8Olivier Houchard2018-04-0218-148/+268
| | | | | | | | | | | | | | | | | | | | | | | | It should fix ck_pr_[load|store]_ptr on mips and riscv, make sure no *fence instructions are used on i386, as older cpus don't support it, and make sure we don't rely on gcc builtins that can lead to calls to libatomic when linked with -O0. MFC after: 1 week Notes: svn path=/head/; revision=331898
* | [iwm] Add support for iwm 3168 cardsEitan Adler2018-03-281-0/+22849
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` iwm0@pci0:5:0:0: class=0x028000 card=0x21108086 chip=0x24fb8086 rev=0x10 hdr=0x00 vendor = 'Intel Corporation' device = 'Dual Band Wireless-AC 3168NGW [Stone Peak]' class = network [94829] iwm0: <Intel(R) Dual Band Wireless AC 3168> mem 0xef700000-0xef701fff at device 0.0 on pci5 [94829] iwm0: hw rev 0x220, fw ver 22.361476.0, address 28:c6:3f:15:43:c5 ``` MFC After: 2 weeks Reviewed by: ivadasz (over IRC) PR: 224886 Differential Revision: https://reviews.freebsd.org/D14865 Notes: svn path=/head/; revision=331665
* | MFV: libb2: use native calls for secure memory clearanceConrad Meyer2018-03-271-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Drop our local patch and restore full vanilla upstream code in contrib/libb2. No functional change intended. explicit_bzero() should continue to be used. Obtained from: libb2 b4b241a34824b51956a7866606329a065d397525 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331620
* | Update to Zstandard 1.3.4Conrad Meyer2018-03-2682-4470/+7418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes our local patch to conditionalize use of __builtin_clz(ll) on Clang's __has_builtin() (which is just defined to false when building with GCC). The issue is tracked upstream at https://github.com/facebook/zstd/pull/884 . Otherwise, these are vanilla Zstandard 1.3.4 files. Reported by: allanjude, Yann Collet Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331602
* | Exit krping on device removal to avoid endless hang situation.Hans Petter Selasky2018-03-231-0/+2
| | | | | | | | | | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=331438
* | Import Blake2 algorithms (blake2b, blake2s) from libb2Conrad Meyer2018-03-2117-0/+4345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upstream repository is on github BLAKE2/libb2. Files landed in sys/contrib/libb2 are the unmodified upstream files, except for one difference: secure_zero_memory's contents have been replaced with explicit_bzero() only because the previous implementation broke powerpc link. Preferential use of explicit_bzero() is in progress upstream, so it is anticipated we will be able to drop this diff in the future. sys/crypto/blake2 contains the source files needed to port libb2 to our build system, a wrapped (limited) variant of the algorithm to match the API of our auth_transform softcrypto abstraction, incorporation into the Open Crypto Framework (OCF) cryptosoft(4) driver, as well as an x86 SSE/AVX accelerated OCF driver, blake2(4). Optimized variants of blake2 are compiled for a number of x86 machines (anything from SSE2 to AVX + XOP). On those machines, FPU context will need to be explicitly saved before using blake2(4)-provided algorithms directly. Use via cryptodev / OCF saves FPU state automatically, and use via the auth_transform softcrypto abstraction does not use FPU. The intent of the OCF driver is mostly to enable testing in userspace via /dev/crypto. ATF tests are added with published KAT test vectors to validate correctness. Reviewed by: jhb, markj Obtained from: github BLAKE2/libb2 Differential Revision: https://reviews.freebsd.org/D14662 Notes: svn path=/head/; revision=331312
* | lib(private)zstd: Fix riscv buildConrad Meyer2018-03-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Link __bswap[ds]i2() intrinsics in to libzstd for riscv, where the C runtime apparently lacks such intrinsics. Broken in r330894. Reported by: asomers Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=331115
* | Merge ACPICA 20180313.Jung-uk Kim2018-03-1430-253/+456
|\| | | | | | | Notes: svn path=/head/; revision=330957
* | Update to Zstandard 1.3.3Conrad Meyer2018-03-1464-2770/+3036
| | | | | | | | | | | | | | | | | | | | | | | | | | Includes patch to conditionalize use of __builtin_clz(ll) on __has_builtin(). The issue is tracked upstream at https://github.com/facebook/zstd/pull/884 . Otherwise, these are vanilla Zstandard 1.3.3 files. Note that the 1.3.4 release should be due out soon. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=330894
* | MFV: zstd: FIO_addFInfo: Fully initialize output 'total' structConrad Meyer2018-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence a Coverity warning about 'windowSize' being uninitialized. (Yes, nothing that calls this routine actually uses the windowSize value. Still, appeasing Coverity is pretty harmless in this case.) Reported by: Coverity Reviewed by: Yann Collet Obtained from: zstd 606374269cf3485972c90b993fbb84dc20da032f Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=330521
* | Move the new AMD-Vi IVHD [ACPI_IVRS_HARDWARE_NEW]definitions added in ↵Anish Gupta2018-03-051-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | r329360 in contrib ACPI to local files till ACPI code adds new definitions reported by jkim. Rename ACPI_IVRS_HARDWARE_NEW to ACPI_IVRS_HARDWARE_EFRSUP, since new definitions add Extended Feature Register support. Use IvrsType to distinguish three types of IVHD - 0x10(legacy), 0x11 and 0x40(with EFR). IVHD 0x40 is also called mixed type since it supports HID device entries. Fix 2 coverity bugs reported by cem. Reported by:jkim, cem Approved by:grehan Differential Revision://reviews.freebsd.org/D14501 Notes: svn path=/head/; revision=330439
* | Define CK_MD_TSO for the relevant arches (i386, amd64 and sparc64).Olivier Houchard2018-02-161-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defaulting to CK_MD_RMO has the unfortunate side effect of generating memory barriers that are useless on those arches, and the even more unfortunate side effect of generating lfence/sfence/mfence on i386, even if older CPUs don't support it. This should fix the panic reported when using IPFW on a Pentium 3. Note that mfence and sfence might still be used in a few case, but that shouldn't happen in FreeBSD right now, and should be fixed upstream first. MFC after: 1 week Notes: svn path=/head/; revision=329388
* | This change fixes duplicate detection of same IOMMU/AMD-Vi device for Ryzen ↵Anish Gupta2018-02-161-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | with EFR support. IVRS can have entry of type legacy and non-legacy present at same time for same AMD-Vi device. ivhd driver will ignore legacy if new IVHD type is present as specified in AMD-Vi specification. Earlier both of IVHD entries used and two ivhd devices were created. Add support for new IVHD type 0x11 and 0x40 in ACPI. Create new struct of type acpi_ivrs_hardware_new for these new type of IVHDs. Legacy type 0x10 will continue to use acpi_ivrs_hardware. Reviewed by: avg Approved by: grehan Differential Revision:https://reviews.freebsd.org/D13160 Notes: svn path=/head/; revision=329360
* | Move zstd malloc()/free()/calloc() macros to stdlib.h.Mark Johnston2018-02-132-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | The definitions otherwise leak into anything that includes zstd.h, which is not desirable for native FreeBSD code. Reviewed by: allanjude, cem, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D14352 Notes: svn path=/head/; revision=329238
* | MFV: r329072Jung-uk Kim2018-02-0947-9750/+10944
|\| | | | | | | | | | | | | Merge ACPICA 20180209. Notes: svn path=/head/; revision=329085
* | MFV r328490: Update libfdt to github:f1879e1Kyle Evans2018-01-274-16/+143
| | | | | | | | | | | | | | | | | | | | Pulls in a patch, now upstreamed, from nwhitehorn to add limited read-only support for older (v2 and v3) FDT blobs. MFC after: 1 week Notes: svn path=/head/; revision=328491
* | Add SPDX tags for nv(9).Mariusz Zaborski2018-01-277-0/+14
| | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=328474
* | style: Remove remaining deprecated MALLOC/FREE macrosConrad Meyer2018-01-251-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mechanically replace uses of MALLOC/FREE with appropriate invocations of malloc(9) / free(9) (a series of sed expressions). Something like: * MALLOC(a, b, ... -> a = malloc(... * FREE( -> free( * free((caddr_t) -> free( No functional change. For now, punt on modifying contrib ipfilter code, leaving a definition of the macro in its KMALLOC(). Reported by: jhb Reviewed by: cy, imp, markj, rmacklem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D14035 Notes: svn path=/head/; revision=328417
* | libnv: Use mallocarray(9) for the nv_calloc.Pedro F. Giffuni2018-01-191-1/+1
| | | | | | | | Notes: svn path=/head/; revision=328164
* | libfdt: Update to 1.4.6, switch to using libfdt for overlay supportKyle Evans2018-01-1813-246/+2026
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libfdt highlights since 1.4.3: - fdt_property_placeholder added to create a property without specifying its value at creation time - stringlist helper functions added to libfdt - Improved overlay support - Various internal cleanup Also switch stand/fdt over to using libfdt for overlay support with this update. Our current overlay implementation works only for limited use cases with overlays generated only by some specific versions of our dtc(1). Swap it out for the libfdt implementation, which supports any properly generated overlay being applied to a properly generated base. This will be followed up fairly soon with an update to dtc(1) in tree to properly generate overlays. MFC note: the <stdlib.h> include this update introduces in libfdt_env.h is apparently not necessary in the context we use this in. It's not immediately clear to me the motivation for it being introduced, but it came in with overlay support. I've left it in for the sake of accuracy and because it's not harmful here on HEAD, but MFC'ing this to stable/11 will require wrapping the #include in an `#ifndef _STANDALONE` block or else it will cause build failures. Tested on: Banana Pi-M3 (ARMv7) Tested on: Pine64 (aarch64) Tested on: PowerPC [nwhitehorn] Reviewed by: manu, nwhitehorn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13893 Notes: svn path=/head/; revision=328106
* | zstd: Use mallocarray(9) for calloc macro.Pedro F. Giffuni2018-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is in contrib code but since we only have mallocarray(9) in current we will not upstream this. This effectively brings back r327934, which was reverted to correct the log message. Notes: svn path=/head/; revision=327940
* | Revert r327934 to fix the log message.Pedro F. Giffuni2018-01-131-1/+1
| | | | | | | | Notes: svn path=/head/; revision=327937
* | zstd: Use memalloc(9) for calloc macro.Pedro F. Giffuni2018-01-131-1/+1
| | | | | | | | | | | | | | | | This is in contrib code but since we only have memalloc(9) in current we will not upstream this. Notes: svn path=/head/; revision=327934
* | Remove redundant variable.Cy Schubert2018-01-131-2/+0
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=327913
* | Though this block of code is not used by FreeBSD, correct a call toCy Schubert2018-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | sprintf() with a macro call to SNPRINTF similar to other calls to SNPRINTF within this same block. MFC after: 1 week Notes: svn path=/head/; revision=327912