ngie [Tue, 15 Dec 2015 18:01:05 +0000 (18:01 +0000)]
MFC r271401:
r271401 (by asomers):
Conditionalize build of etcupdate(8) on MK_RCS. Since etcupdate calls
merge(1), which is part of the RCS package, it must not be installed if
WITHOUT_RCS update is set. Otherwise, it will produce confusing errors.
ngie [Tue, 15 Dec 2015 17:58:10 +0000 (17:58 +0000)]
MFC r284408,r289151,r289158:
r284408:
Ensure TESTSDIR is defined before bsd.test.mk is .include'd
r289151:
Simplify netbsd-tests.test.mk
- projects/bmake and subsequent commits provide SRCTOP; there's no need to
manually specify it now.
- Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually
specifying this is probably no longer needed, but it persists just in case
(supporting commits will need to be made to move it out of some of the meta
.mk files).
- Compute a sane default for TESTSRC. Error out if the path cannot be found.
Sponsored by: EMC / Isilon Storage Division
r289158:
Default TESTSDIR to /usr/tests/${RELDIR:H}
When run from bin/ls/tests, for example, the value of TESTSDIR would be
${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. ->
/usr/tests/bin/ls
rmacklem [Mon, 14 Dec 2015 23:09:02 +0000 (23:09 +0000)]
MFC: r291536
Add support for the new "-manage-gids" option for the nfsuserd daemon
to the rc scripts. With these changes, setting nfs_server_managegids="YES"
in /etc/rc.conf will enable this capability.
rmacklem [Mon, 14 Dec 2015 22:43:43 +0000 (22:43 +0000)]
MFC: r291534
Add support for the "-manage-gids" option to the nfsuserd daemon.
When this option is set, the NFS server uses the list of groups
acquired via getgrouplist(3) for the uid instead of the list of
groups in the RPC request. This can be used to avoid the 16 gid
limit for the group list in the RPC request.
bdrewery [Mon, 14 Dec 2015 21:33:31 +0000 (21:33 +0000)]
MFC r266566:
Add .../share/mk to the default system make path. This will fix the problem
with broken in-tree builds (which are used far more pervasively than I'd
known outside the tree). However, weird results may now happen if at any
point in the tree above you there happens to be a directory that has
subdirectory of share/mk, as unpredictable results will follow. This was
considered the lessor of the two evils, at least for now. In the future this
will be removed again when the underlying issues are resolved.
For MFCing, this is to ensure that when upgrading to head the share/mk
in-tree is always used. Otherwise several build features will not work.
This passes a build using head's bmake which has this as the default
already.
rmacklem [Mon, 14 Dec 2015 21:30:28 +0000 (21:30 +0000)]
Bump __FreeBSD_version since r292223 changed the internal interface
between the nfsd.ko and nfscommon.ko modules such that they need
to be upgraded to-gether.
rmacklem [Mon, 14 Dec 2015 21:21:43 +0000 (21:21 +0000)]
MFC: r291527
Add kernel support to the NFS server for the "-manage-gids"
option that will be added to the nfsuserd daemon in a future
commit. It modifies the cache used by NFSv4 for name<-->id
translation (both username/uid and group/gid) to support this.
When "-manage-gids" is set, the server looks up each uid
for the RPC and uses the list of groups cached in the server
instead of the list of groups provided in the RPC request.
The cached group list is acquired for the cache by the nfsuserd
daemon via getgrouplist(3).
This avoids the 16 groups limit for the list in the RPC request.
Since the cache is now used for every RPC when "-manage-gids"
is enabled, the code also modifies the cache to use a separate
mutex for each hash list instead of a single global mutex.
ngie [Mon, 14 Dec 2015 14:44:23 +0000 (14:44 +0000)]
Unbreak the powerpc/powerpc64 tinderbox
PR: 198805
Submitted by: sbruno
MFC r280430:
r280430 (by bz):
Make ix_crcstrip a public symbol for the moment; it probably is not
the right solution but I will leave it to experts to untangle this
problem to properly stop the build failures.
At the moment only if_ix.c includes dev/netmap/ixgbe_netmap.h which is
good as ixgbe_netmap.h defines a couple of (file) static variables--thus
local to if_ix.c.
static int ix_crcstrip however now also got checked from ix_txrx.c
(as an extern) and should not be visible there. In fact we do see
powerpc and powerpc64 build failures because of this. It is unclear
to me why on other (clang built?) architectures this does not lead
to a reference of an undefined symbol and similar build breakage.
hselasky [Mon, 14 Dec 2015 10:31:03 +0000 (10:31 +0000)]
MFC r291939:
Update the mlx5 shared driver code to the latest version, which
include the following list of changes:
- Added eswitch ACL table management
Introduce API for managing ACL table.
This API include the following features:
1) vlan filter - for VST/VGT+ support.
2) spoofcheck.
3) robust functionality to allow/drop general untagged/tagged traffic.
4) support for both ingress and egress ACL types.
- Added loopback filter to the vacl table.
- Added multicast list set in the vPort context
- Added promiscuous mode set in the vPort context
- Set the vlan list in vPort context
1) Check caps if VLAN list is not longer than FW supports
2) Set MODIFY_NIC_VPORT_CONTEXT command
- Changed MLX5_EEPROM_MAX_BYTES from 48 to 32 so that a single EEPROM
reading cannot cross the 128-byte boundary. Previously reading the
MCIA register was done in batches of 48 bytes. The third reading
would then by-pass the 127th byte, which means that part of the low
page and part of the high page would be read at the same time, which
created a bug:
1st: 0-47 bytes
2nd: 48-95 bytes
3rd: 96-143 bytes
hselasky [Mon, 14 Dec 2015 10:18:04 +0000 (10:18 +0000)]
MFC r291938:
Add full support for Receive Side Scaling, RSS, to the mlx5en
driver. This includes binding all interrupt and worker threads
according to the RSS configuration, setting up correct Toeplitz
hashing keys as given by RSS and setting the correct mbuf
hashtype for all received traffic.
hselasky [Mon, 14 Dec 2015 09:59:21 +0000 (09:59 +0000)]
MFC r291932:
Add support for setting the TX moderation mode via a sysctl entry. TX
completion events can be moderated in the same way like RX completion
events. Expose this functionality by a sysctl variable.
hselasky [Mon, 14 Dec 2015 09:46:46 +0000 (09:46 +0000)]
MFC r291953:
When setting up VLANs on a Raspberry Pi ethernet port, the MTU drops
from 1500 to 1496 bytes. The MTU should remain at 1500, extending the
frame size as per IEEE 802.3. Adding IFCAP_VLAN_MTU to the
if_capabilities field in the smsc driver solves the problem. The
datasheet for the LAN9512 chip, section 3.2.3 states that the chip
supports the extended frame.
Remove old ioctl use and support, once and for all.
r289369 (by emaste):
newfs_msdos: rework option parsing to match NetBSD
NetBSD split newfs_msdos in two so that they can reuse the file system
creation part in makefs. This change is a step on the path of bringing
that support to FreeBSD.
Reviewed by: kib, pfg
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3905
r289376 (by emaste):
newfs_msdos: move mkfs_msdos to separate file for later use in makefs
Sponsored by: The FreeBSD Foundation
r289424 (by emaste):
newfs_msdos: prefer snprintf to sprintf
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
r291219 (by emaste):
newfs_msdos: rework error handling for eventual use in makefs
Return -1 on errors from mkfs_msdos() instead of err()/errx(), to
allow different consumers to handle errors as appropriate.
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
r291382 (by emaste):
mkfs_msdos: sync with NetBSD
Add a sanity test and clean up whitespace.
Obtained from: NetBSD
r291385 (by emaste):
Use netbsd usage() implementation in newfs_msdos
In r289629 newfs_msdos option descriptions are available in
mkfs_msdos.h.
Obtained from: NetBSD
r291908:
Fix leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the end
of the function
hselasky [Fri, 11 Dec 2015 14:21:58 +0000 (14:21 +0000)]
MFC r290710, r291694, r291699 and r291793:
- Fix print formatting compile warnings for Sparc64 and PowerPC platforms.
- Updated the mlx4 and mlxen drivers to the latest version, v2.1.6:
- Added support for dumping the SFP EEPROM content to dmesg.
- Fixed handling of network interface capability IOCTLs.
- Fixed race when loading and unloading the mlxen driver by applying
appropriate locking.
- Removed two unused C-files.
- Convert the mlxen driver to use the BUSDMA(9) APIs instead of
vtophys() when loading mbufs for transmission and reception. While at
it all pointer arithmetic and cast qualifier issues were fixed, mostly
related to transmission and reception.
- Fix i386 build WITH_OFED=YES. Remove some redundant KASSERTs.
The main change is the addition of RSS, which is not supported in stable/10,
however these commits also include other bug fixes. In order to bring those
fixes in and facilitate easier merge of future updates the RSS changes are
maintained but left disabled by the removal of the opt_rss.h include.
bapt [Wed, 9 Dec 2015 21:38:26 +0000 (21:38 +0000)]
MFC: r291658
pw_checkname since the beginning is too strict on GECOS field,
relax it a bit so gecos can be used to store multibytes data.
This was unseen before FreeBSD 10.2 as this validation function was motly unused
since FreeBSD 10.2 the usage of this function has been generalized to improve
MFC r291579:
In the same way fix the problem described in r291578 for IGMPv3.
In case when router has a lot of multicast groups, the reply can take
several packets due to MTU limitation.
Also we have a limit IGMP_MAX_RESPONSE_BURST == 4, that limits the number
of packets we send in one shot. Then we recalculate the timer value and
schedule the remaining packets for sending.
The problem is that when we call igmp_v3_dispatch_general_query() to send
remaining packets, we queue new reply in the same mbuf queue. And when
number of packets is bigger than IGMP_MAX_RESPONSE_BURST, we get endless
reply of IGMPv3 reports.
To fix this, add the check for remaining packets in the queue.
MFC r291578:
mld_v2_dispatch_general_query() is used by mld_fasttimo_vnet() to send
a reply to the MLDv2 General Query. In case when router has a lot of
multicast groups, the reply can take several packets due to MTU limitation.
Also we have a limit MLD_MAX_RESPONSE_BURST == 4, that limits the number
of packets we send in one shot. Then we recalculate the timer value and
schedule the remaining packets for sending.
The problem is that when we call mld_v2_dispatch_general_query() to send
remaining packets, we queue new reply in the same mbuf queue. And when
number of packets is bigger than MLD_MAX_RESPONSE_BURST, we get endless
reply of MLDv2 reports.
To fix this, add the check for remaining packets in the queue.
kib [Mon, 7 Dec 2015 11:14:57 +0000 (11:14 +0000)]
MFC r290917:
Provide the OOM-specific vm_pageout_oom_pagecount() function which
estimates the amount of reclamaible memory which could be stolen if
the process is killed.
rmacklem [Sat, 5 Dec 2015 21:38:53 +0000 (21:38 +0000)]
MFC: r291150
When the nfsd threads are terminated, the NFSv4 server state
(opens, locks, etc) is retained, which I believe is correct behaviour.
However, for NFSv4.1, the server also retained a reference to the xprt
(RPC transport socket structure) for the backchannel. This caused
svcpool_destroy() to not call SVC_DESTROY() for the xprt and allowed
a socket upcall to occur after the mutexes in the svcpool were destroyed,
causing a crash.
This patch fixes the code so that the backchannel xprt structure is
dereferenced just before svcpool_destroy() is called, so the code
does do an SVC_DESTROY() on the xprt, which shuts down the socket upcall.
rmacklem [Sat, 5 Dec 2015 21:28:54 +0000 (21:28 +0000)]
MFC: r291117
Revert r283330 since it broke directory caching in the client.
At this time I cannot see a way to fix directory caching when it
has partial blocks in the buffer cache, due to the fact that the
syscall's uio_offset won't stay the same as the lblkno * NFS_DIRBLKSIZ
offset.
Integrate tools/regression/lib/libc/stdio into the FreeBSD test suite
as lib/libc/tests/stdio
- Fix some whitespace
- Convert the testcases to ATF
- Convert "/dev/null" to _PATH_DEVNULL
Sponsored by: EMC / Isilon Storage Division
r290540:
printfloat_test and scanfloat_test need symbols from msun; these are automatically
provided on amd64, but not i386. Add libm to DPADD/LDADD to unbreak the i386
tinderbox
Pointyhat to: ngie
Sponsored by: EMC / Isilon Storage Division
r290560:
Convert print_positional_test over to ATF
Somehow missed in r290537
Sponsored by: EMC / Isilon Storage Division
r290856 (by bapt):
also skip the definition of ':fopen_regular' to avoid the build to fail due to
unused variables defined by ATF macros
r290871:
Disable -Wformat with scanfloat_test when compiling with gcc to avoid a
"use of assignment suppression and length modifier together in scanf format"
warning on line 90 (it's intentional)
Sponsored by: EMC / Isilon Storage Division
r291839:
Initialize errno to 0 in the nul testcase before testing it
For some odd reason stable/10 requires this, otherwise it always fails
the errno == 0 check on line 196.
bapt [Fri, 4 Dec 2015 20:41:44 +0000 (20:41 +0000)]
MFC: r291091
install: do not follow symlinks
In case the target of install is a dead symlink, install(1) used to not
consider it as "existing" because of the usage of stat(2) instead of
lstat(2). meaning the old file (the symlink) is not removed before the new
file is created. The symlink is being followed and the new file becoming the
target of the symlink instead of the target of install(1)