aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Add device location wiring to the pci bus.Warner Losh2017-12-201-0/+28
| | | | | | | | | | | | | | | | | | | | | | | This allows one to specify, for example, that if there's an igb card in bus 12, slot 0, function 0, it should be assigned igb5. If there isn't, or there's one in a different slot, normal numbering rules apply (hinted units are skipped). Adding 'hint.igb.5.at="pci12:0:0"' or 'hint.igb.5.at="pci0:12:0:0"' to /boot/device.hints will accomplish this. The double quotes are important. The kernel only accepts the strings (in shell notation): pci$d:$b:$s:$f and pci$b:$s:$f where $d is the pci domain, $b is the pci bus number, $s is the slot number and $f is the function number. A string compare is done with the current device to avoid another string parser in the kernel. All numbers are unsigned decimal without leading zeros. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13546 Notes: svn path=/head/; revision=327035
* Return domain, bus, slot, and function for the transport settings inWarner Losh2017-12-202-1/+12
| | | | | | | | | | PATH_INQ requests for nvme. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13546 Notes: svn path=/head/; revision=327034
* Add a new kernel config option, MD_ROOT_READONLY, which forces on theIan Lepore2017-12-204-4/+15
| | | | | | | | | | | | | | | | | MD_READONLY flag for the md device automatically instantiated during kernel init for an mdroot filesystem. Note that there is specifically and by design no tunable or sysctl control over this feature. Without this option, you already have control over whether the mdroot fs is writeable using vfs.root.mountfrom.options from loader(8), the root_rw_mount rcvar, and by using "mount -u[rw] /" or equivelent on the fly. This option is being added to provide a way to make the mdroot fs truly immutable before userland code begins running. Differential Revision: https://reviews.freebsd.org/D13411 Notes: svn path=/head/; revision=327032
* ixgbe(4): Convert driver to use iflibEric Joyner2017-12-2020-6137/+2519
| | | | | | | | | | | | | | | | | Initial update to the ixgbe PF and VF drivers to support the iflib interface. The PF driver version is bumped to 4.0.0, and the VF driver version is bumped to 2.0.0. Special thanks to sbruno@ for the support in helping make this conversion happen. Submitted by: Jeb Cramer <cramerj@intel.com>, Krzysztof Galazka (Chris) <krzysztof.galazka@intel.com>, Piotr Pietruszewski <piotr.pietruszewski@intel.com> Reviewed by: sbruno@, shurd@, #IntelNetworking Tested by: Jeffrey Pieper <jeffrey.e.pieper@intel.com>, Sergey Kozlov <kozlov.sergey.404@gmail.com> Sponsored by: Limelight Networks, Intel Corporation Differential Revision: https://reviews.freebsd.org/D11727 Notes: svn path=/head/; revision=327031
* Don't ignore trailing spaces after numerical IP addresses.Hajimu UMEMOTO2017-12-201-1/+2
| | | | | | | | | | PR: 224403 Reported by: Michael Kaufmann Reviewed by: Michael Kaufmann MFC after: 1 week Notes: svn path=/head/; revision=327029
* Increase default MAXDSIZ to 32G on powerpc64Justin Hibbits2017-12-201-0/+4
| | | | | | | | | | Linking LLVM now seems to require more than 1GB data size, so increase the default to 32G, which matches amd64. Reviewed by: nwhitehorn Notes: svn path=/head/; revision=327028
* Flesh out the reason for the need for tmpfs a little.Warner Losh2017-12-201-1/+4
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=327027
* Save others some forehead damange by noting that -r require tmpfs.Brad Davis2017-12-201-1/+4
| | | | | | | Reviewed by: bapt Notes: svn path=/head/; revision=327025
* Make truss(8) work for 32-bit CloudABI executables on ARM64.Ed Schouten2017-12-202-0/+113
| | | | | | | | This change effectively merges the existing 64-bit support for ARM64 with the 32-on-64-bit support for AMD64. Notes: svn path=/head/; revision=327022
* Add missing `;`Li-Wen Hsu2017-12-201-1/+1
| | | | | | | Approved by: kevlo Notes: svn path=/head/; revision=327017
* Support attaching tx queues to cpusStephen Hurd2017-12-201-11/+131
| | | | | | | | | | | | | | This will attempt to use a different thread/core on the same L2 cache when possible, or use the same cpu as the rx thread when not. If SMP isn't enabled, don't go looking for cores to use. This is mostly useful when using shared TX/RX queues. Reviewed by: sbruno Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12446 Notes: svn path=/head/; revision=327013
* Don't return early for non-failure for one of the EMLINK checks.John Baldwin2017-12-191-3/+1
| | | | | | | | | | | | | | r326987 enabled two #if 0'd-out EMLINK checks in zfs_link_create() for link overflow. However, one of the checks (when the vnode adding a link is a directory such as for mkdir) always returned even if the link did not overflow. Change this to only return early if it needs to report an EMLINK error. Reported by: db, shurd Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=327009
* Replace one more LINK_MAX with NFS_LINK_MAX missed in r326991.John Baldwin2017-12-191-1/+1
| | | | | | | Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=327007
* Update link count handling in fuse for post-ino64.John Baldwin2017-12-192-2/+2
| | | | | | | | | | Set FUSE_LINK_MAX to UINT32_MAX instead of LINK_MAX to match the maximum link count possible in the 'nlink' field of 'struct fuse_attr'. Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=327006
* SPDX: These are fundamentally BSD-2-Clause.Pedro F. Giffuni2017-12-1910-10/+24
| | | | | | | They just omit the introductory line and numbering. Notes: svn path=/head/; revision=327005
* Rework pathconf handling for FIFOs.John Baldwin2017-12-1911-52/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the one hand, FIFOs should respect other variables not supported by the fifofs vnode operation (such as _PC_NAME_MAX, _PC_LINK_MAX, etc.). These values are fs-specific and must come from a fs-specific method. On the other hand, filesystems that support FIFOs are required to support _PC_PIPE_BUF on directory vnodes that can contain FIFOs. Given this latter requirement, once the fs-specific VOP_PATHCONF method supports _PC_PIPE_BUF for directories, it is also suitable for FIFOs permitting a single VOP_PATHCONF method to be used for both FIFOs and non-FIFOs. To that end, retire all of the FIFO-specific pathconf methods from filesystems and change FIFO-specific vnode operation switches to use the existing fs-specific VOP_PATHCONF method. For fifofs, set it's VOP_PATHCONF to VOP_PANIC since it should no longer be used. While here, move _PC_PIPE_BUF handling out of vop_stdpathconf() so that only filesystems supporting FIFOs will report a value. In addition, only report a valid _PC_PIPE_BUF for directories and FIFOs. Discussed with: bde Reviewed by: kib (part of a larger patch) MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D12572 Notes: svn path=/head/; revision=327004
* Add log messages for unknown and unhandled phy typesStephen Hurd2017-12-191-1/+6
| | | | | | | | | | | | Previously, it silently only supported auto, instead, log a message indicating why only auto is supported. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D13358 Notes: svn path=/head/; revision=327003
* On Link up & down, update media typesStephen Hurd2017-12-191-0/+4
| | | | | | | | | | | It's possible to change the SFP module when link is down, which would change the available media types. This is part of D13358. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=327001
* Support short HWRM commandsStephen Hurd2017-12-194-1/+61
| | | | | | | | | | | | | New Stratus bnxt devices require support for short HWRM commands for VFs to function. Enable their use, but only use them if it's both supported and required... prefer the long HWRM commands when possible. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D13269?id=36180 Notes: svn path=/head/; revision=327000
* Don't populate NVRAM sysctls for VFsStephen Hurd2017-12-192-25/+34
| | | | | | | | | | Only the PF allows NVRAM interaction on bnxt devices. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=326999
* Update tmpfs link count handling for ino64.John Baldwin2017-12-193-6/+9
| | | | | | | | | | | | | Add a new TMPFS_LINK_MAX to use in place of LINK_MAX for link overflow checks and pathconf() reporting. Rather than storing a full 64-bit link count, just use a plain int and use INT_MAX as TMPFS_LINK_MAX. Discussed with: bde Reviewed by: kib (part of a larger patch) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326998
* Honor NANDFS_LINK_MAX for post-ino64.John Baldwin2017-12-191-4/+4
| | | | | | | | | | This uses NANDFS_LINK_MAX instead of LINK_MAX for link overflow checks and the value reported by pathconf() / fpathconf(). Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326997
* Report INT_MAX for LINK_MAX for devfs' VOP_PATHCONF().John Baldwin2017-12-191-1/+1
| | | | | | | | | | devfs uses int's for link counts internally and already reports the the full link count via stat() post ino64. Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326996
* Use FUSE_LINK_MAX for LINK_MAX in fuse' VOP_PATHCONF().John Baldwin2017-12-191-1/+1
| | | | | | | | | | Should have included this in r326993. MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326995
* Handle _PC_FILESIZEBITS and _PC_SYMLINK_MAX for devfs' VOP_PATHCONF().John Baldwin2017-12-191-0/+6
| | | | | | | | MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326994
* Move NAME_MAX, LINK_MAX, and CHOWN_RESTRICTED out of vop_stdpathconf().John Baldwin2017-12-1910-15/+61
| | | | | | | | | | | | | | | | | | | Having all filesystems fall through to default values isn't always correct and these values can vary for different filesystem implementations. Most of these changes just use the existing default values with a few exceptions: - Don't report CHOWN_RESTRICTED for ZFS since it doesn't do the exact permissions check this claims for chown(). - Use NANDFS_NAME_LEN for NAME_MAX for nandfs. - Don't report a LINK_MAX of 0 on smbfs. Now fail with EINVAL to indicate hard links aren't supported. Requested by: bde (though perhaps not this exact implementation) Reviewed by: kib (earlier version) MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326993
* embed_mfs: support embedding mfs into loaderEd Maste2017-12-191-9/+32
| | | | | | | | | | | | | | | | | | The script originally supported embedding an mfs into ELF files or any other type of file, because it searched for magic strings to mark the beginning and end of the embeddable section. It was later modified to read the section offset and length via readelf, which made it work for ELF only. Restore the ability to update arbitrary file types by using the readelf technique for ELF, and the magic string technique for all others (including PE/COFF files like loader.efi). Submitted by: Zakary Nafziger <worldofzak@gmail.com> MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12746 Notes: svn path=/head/; revision=326992
* Update NFS to handle larger link counts post ino64.John Baldwin2017-12-195-6/+8
| | | | | | | | | | | | | | | | - Define a NFS_LINK_MAX as UINT32_MAX to match the wire protocol. - Use NFS_LINK_MAX instead of LINK_MAX as the fallback value reported for a PATHCONF RPC by the NFS server. - Use NFS_LINK_MAX instead of LINK_MAX as the default value reported by the NFS client pathconf() if not overridden by the NFS server. - When reading the link count out of an RPC reply, read the full 32 bits instead of the lower 16 bits. Reviewed by: rmacklem (earlier version) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326991
* Handle _PC_FILESIZEBITS and _PC_NO_TRUNC for smbfs' VOP_PATHCONF().John Baldwin2017-12-191-0/+9
| | | | | | | | MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326990
* Support _PC_FILESIZEBITS in msdosfs' VOP_PATHCONF().John Baldwin2017-12-191-0/+3
| | | | | | | | MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326989
* Add a custom VOP_PATHCONF method for fuse.John Baldwin2017-12-191-1/+21
| | | | | | | | | | | This method handles _PC_FILESIZEBITS, _PC_SYMLINK_MAX, and _PC_NO_TRUNC. For other values it defers to vop_stdpathconf(). MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326988
* Adjust ZFS' link count handling for ino64.John Baldwin2017-12-193-11/+10
| | | | | | | | | | | | | | | | | | | - Define a ZFS_LINK_MAX as the ZFS version of LINK_MAX which is set to UINT64_MAX to match the on-disk format. - Enable the currently #if 0'd code to check for link overflows and return EMLINK. - Don't clamp the link count reported in stat() to LINK_MAX as that is still the 16-bit limit, but report the full link counts. Also, avoid possibly overflowing the reported link count to 0 when adjusting the link count to account for ".snapshot". - Update the LINK_MAX reported by pathconf() to report ZFS_LINK_MAX rather than LINK_MAX (but clamped to LONG_MAX for 32-bit systems). Reviewed by: avg (earlier version) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326987
* Add a custom VOP_PATHCONF method for fdescfs.John Baldwin2017-12-193-5/+43
| | | | | | | | | | | | | | | The method handles NAME_MAX and LINK_MAX explicitly. For all other pathconf variables, the method passes the request down to the underlying file descriptor. This requires splitting a kern_fpathconf() syscallsubr routine out of sys_fpathconf(). Also, to avoid lock order reversals with vnode locks, the fdescfs vnode is unlocked around the call to kern_fpathconf(), but with the usecount of the vnode bumped. MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326986
* Add byte swapping in bnxt_cfg_async_cr() requestStephen Hurd2017-12-191-3/+3
| | | | | | | | | | | The firmware is always in little endian, use htole*() for all request fields larger than one byte. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=326985
* Update Matthew Macy contact infoStephen Hurd2017-12-1911-11/+11
| | | | | | | | | | Email address has changed, uses consistent name (Matthew, not Matt) Reported by: Matthew Macy <mmacy@mattmacy.io> Differential Revision: https://reviews.freebsd.org/D13537 Notes: svn path=/head/; revision=326984
* Avoid using bioq_* in gmirror.Mark Johnston2017-12-192-49/+58
| | | | | | | | | | | | | | | | gmirror does not perform any sorting of I/O requests, so the bioq API doesn't provide any advantages over plain TAILQs. The API also does not provide operations needed by an upcoming change. No functional change intended. The diff shrinks the geom_mirror.ko text and the gmirror softc slightly. Tested by: pho (part of a larger patch) MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=326983
* Document the semantics of atomic_thread_fence operations.Alan Cox2017-12-191-60/+116
| | | | | | | | | | | | | | | | | Add atomic_load_<type> and atomic_store_<type>, and explain why they exist. Define the synchronizes-with relationship and its effects. Reorder and revise some of the existing text. For example, more precisely describe when ordinary accesses are atomic. Reviewed by: jhb, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13522 Notes: svn path=/head/; revision=326982
* The highest-order bit of the bootloader cookie is 1, with the result thatNathan Whitehorn2017-12-192-3/+3
| | | | | | | | | | | | | the 32-bit cookie can be sign-extended on its way out of the loader and through Open Firmware. If sign-extended, the in-kernel check of its value would fail on 64-bit systems, resulting in a mountroot prompt. Solve this by telling the kernel to ignore the high-order bits. PR: kern/224437 Submitted by: Gustavo Romero Notes: svn path=/head/; revision=326981
* Make __startkernel line up with KERNBASE, so that the math to compute theNathan Whitehorn2017-12-191-1/+1
| | | | | | | | | | | | | applied relocation offset in link_elf.c works as intended. We may want to revisit how that works in future, for example by having elf_reloc_self() actually store the numbers it is using rather than computing them later, but this fixes symbol lookup after r326203. Reported by: andreast@ Pointy hat to: me Notes: svn path=/head/; revision=326978
* mlx5en: Avoid SFENCe on x86Konstantin Belousov2017-12-191-2/+2
| | | | | | | | | | | | | | | | | | | The IA32 memory model guarantees that all writes are seen in the program order. Also, any access to the uncacheable memory flushes the store buffers. As the consequence, SFENCE instruction is (almost) never needed, in particular, it is not needed to ensure the correct order of updates as seen by a PCIe device. Use atomic_thread_fence_rel() instead of wb() to only emit compiler barriers on x86 there. Other architectures get the right barrier instruction as well. Reviewed by: hselasky Sponsored by: Mellanox Technologies MFC after: 1 week Notes: svn path=/head/; revision=326977
* Perform all accesses to uma_reclaim_needed using atomic(9) KPI.Konstantin Belousov2017-12-191-2/+2
| | | | | | | | | | Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534 Notes: svn path=/head/; revision=326974
* Use atomic_load(9) to read ppsinfo sequence numbers.Konstantin Belousov2017-12-191-4/+4
| | | | | | | | | | | | | In this case volatile qualifiers enusre that a compiler does not optimize the accesses out. Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534 Notes: svn path=/head/; revision=326973
* Add atomic_load(9) and atomic_store(9) operations.Konstantin Belousov2017-12-199-0/+89
| | | | | | | | | | | | | | | | | | | | | | | They provide relaxed-ordered atomic access semantic. Due to the FreeBSD memory model, the operations are syntaxical wrappers around the volatile accesses. The volatile qualifier is used to ensure that the access not optimized out and in turn depends on the volatile semantic as implemented by supported compilers. The motivation for adding the operation is to help people coming from other systems or knowing the C11/C++ standards where atomics have special type and require use of the special access operations. It is still the case that FreeBSD requires plain load and stores of aligned integer types to be atomic. Suggested by: jhb Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534 Notes: svn path=/head/; revision=326971
* When doing a dump, the scheduler is normally not running, so thisWarner Losh2017-12-191-7/+14
| | | | | | | | | | | | | | | changed worked to capture dumps for me. However, the test for SCHEDULER_STOPPED() isn't right. We can also call the dump routine from ddb, in which case the scheduler is still running. This leads to an assertion panic that we're sleeping when we shouldn't. Instead, use the proper test for dumping or not. This brings us in line with other places that do special things while we're doing polled I/O like this. Noticed by: pho@ Differential Revision: https://reviews.freebsd.org/D13531 Notes: svn path=/head/; revision=326964
* No need to use relative paths like this here.Warner Losh2017-12-191-2/+2
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326963
* Hoist btx include stuff to i386/Makefile.incWarner Losh2017-12-197-8/+2
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326962
* Interact is always called with NULL. Simplify code a little byWarner Losh2017-12-1912-27/+19
| | | | | | | | | | | | removing this argument, and expanding when rc is NULL. This effectively completes the back out of custom scripts for tftp booted loaders from r269153 that was started in r292344 with the new path tricks that obsoleted it. Submitted by: Netflix Notes: svn path=/head/; revision=326961
* Simplify things a little. The RETURN macro isn't required. It's onlyWarner Losh2017-12-191-8/+2
| | | | | | | | | used once, inside an #ifdef where it would be defined to be return. Sponsored by: Netflix Notes: svn path=/head/; revision=326960
* arc lint: ignore /tests/ in chmodEitan Adler2017-12-191-1/+2
| | | | | | | | | | | | | | | shell scripts in scripts don't need to be chmod +x to work. In fact most are not. Of the tests I found from a simple search: 65 are chmod +x 84 are chmod -x simply disable the check for test shell scripts. Recommit requested by: cem, rgrimes Notes: svn path=/head/; revision=326959
* arclint: revert in prep for recommittingEitan Adler2017-12-191-3/+1
| | | | Notes: svn path=/head/; revision=326958