Commit Graph

1686 Commits

Author SHA1 Message Date
Justin Hibbits
a3b41b11db dpaa: fix 32-bit build
Book-E powerpc uses 64-bit vm_paddr_t, and 32-bit powerpc has 32-bit pointers,
so gcc errors with cast to pointer from integer of different size.  As this will
not actually be used in reality anyway, simply quiet the warning by casting
through uintptr_t.

MFC after:	3 weeks
MFC with:	r343168
2019-01-19 05:20:31 +00:00
Justin Hibbits
bb0e68335f powerpc/dpaa: Handle DMAP virtual addresses in DPAA
sendfile(2) appears to now use DMAP wherever possible.  These addresses are not
managed by pmap, so pmap_kextract() returns a 0 physical address, causing
failure.

This change fixes nginx running on P5020 SoC.

MFC after:	3 weeks
2019-01-19 04:54:12 +00:00
Marcin Wojtas
4c220feb7e Suppress excessive error prints in ENA TX hotpath
In FreeBSD, this is normal situation that the Tx ring is being full. In
hat case, the packet is put back into drbr and the next attempt to send
it is taken after the cleanup.

Too much logs like this can cause system instability and even cause the
device reset (because keep alive or cleanup could be missed).

To fix that, the log level of this message is changed to debug.

Upon this change upgrade the driver version to v0.8.2.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
2019-01-16 02:13:21 +00:00
Gleb Smirnoff
49d9607a12 Remove support for FreeBSD 9 kernel, which used to change byte order
of packet headers.
2019-01-10 23:27:29 +00:00
Jung-uk Kim
e5e1f58a87 MFV: r342867
Merge ACPICA 20190108.
2019-01-09 00:31:10 +00:00
Justin Hibbits
14843112b8 dtsec: Fix formatting of addresses in translation error messages
Don't clamp addresses to 8 hex digits, particularly since this is primarily
used now on a 64-bit platform.

MFC after:	1 week
2019-01-06 05:07:52 +00:00
Andriy Voskoboinyk
b3f3786e5d rtwn_pci(4): add support for RTL8188EE chipset.
Initially based on https://reviews.freebsd.org/D15692;
later deduplicated and improved a bit (Tx reports, IQ calibration support).

Submitted by:	Farhan Khan <khanzf@gmail.com>
MFC after:	4 days
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D15692
2019-01-02 06:48:53 +00:00
Conrad Meyer
a0483764f3 Update to Zstandard 1.3.8
This merge brings in a couple new files, which needed to be attached to the
build; a new dependency on <limits.h>, which must be stubbed; and a name
change in the Context parameter constants, from ZSTD_p_foo to ZSTD_c_foo.

Significantly, it fixes a kernel build error with GCC where floating-point
functions were included in the kernel build, by hiding them under the same
compile-time #ifdef that already covered their invocation.  That issue was
introduced to FreeBSD in the 1.3.7 update and tracked upstream here:

  https://github.com/facebook/zstd/issues/1386

The full 1.3.8 release notes can be found on Github:

  https://github.com/facebook/zstd/releases/tag/v1.3.8

Relnotes:	yes
2018-12-29 21:18:01 +00:00
Cy Schubert
5415a5a8bf Remove duplicate include of sys/mbuf.h.
Reported by:	Trond Endrest <Trond.Endrestol@ximalas.info>
MFC after:	3 days
2018-12-29 18:11:17 +00:00
Cy Schubert
af907c40da Remove another empty #ifdef block. This empty block also exists in
the upstream HEAD.

MFC after:	3 days
2018-12-27 04:53:53 +00:00
Cy Schubert
4db33e987e Remove an empty #if block.
The interesting thing is that looking through Darren's commit logs,
the line containing an extern ppsratecheck() definition was removed
from the v5-1-RELEASE branch but not from HEAD (I have taken his
CVS tree and converted it to GIT). There is a commit adding an
additional #if defined to the empty block. I can only assume that
this was intentional for something later. Looking through HEAD the
extern ppsratecheck() is there. However if we put it back it would
conflict with a static ppsratecheck() definition in fil.c when
building ipftest.

Therefore we remove this empty block.

ppsratecheck() is a function in the FreeBSD kernel. However ipftest
cannot call the ppsratecheck() in the kernel. Therefore one exists in
fil.c for use when building the userland ipftest utility which
approximates the packet filter in userland for testing of ipfilter
rules against packets captured with tcpdump.

MFC after:	1 week
2018-12-24 01:12:43 +00:00
Cy Schubert
2686f69ed4 Remove NETBSD_PF. NETBSD_PF is a flag that defines whether the pfil(9)
framework is available. pfil(9) has been in FreeBSD since FreeBSD 5
and according to svn log was first committed to HEAD in 2000, therefore
it is safe to say the check is no longer needed in FreeBSD.

pfil(9) first appeared in NetBSD 1.3 (hence the name NETBSD_PF).
Therefore it is safe to say that it is supported by every NetBSD system
today. The framework also exists in illumos.

As ipfilter code is shared and exchanged between FreeBSD and NetBSD, and
at some point in the future illumos too, and as all three platforms have
pfil(9), the redundant NETBSD_PF #defines and #ifdefs are removed.

MFC after:	1 week
2018-12-23 05:10:36 +00:00
Cy Schubert
1e3ecb57e0 Remove the last vestiges of HP/UX from a FreeBSD-only ipfilter
source file.

MFC after:	1 week
2018-12-22 21:49:25 +00:00
Conrad Meyer
b937183e00 Revert accidentally included changes in r342108
If you're curious, please follow along in https://reviews.freebsd.org/D18537 .

Sorry for the noise.
2018-12-15 05:47:22 +00:00
Conrad Meyer
26649bb5e8 efirt: When present, attempt to use EFI runtime services to shutdown
PR:		maybe related to 233998 (inconclusive at this time)
Submitted by:	byuu <byuu AT tutanota.com> (previous version)
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D18506
2018-12-15 05:46:04 +00:00
Jung-uk Kim
90b566fde9 MFV: r342049
Merge ACPICA 20181213.
2018-12-14 00:40:38 +00:00
Cy Schubert
efc4145a6e Remove an ugly Ultrix hack. Ultrix has been AWOL since the last ice
age, more to come.

MFC after:	1 week
2018-12-06 20:15:54 +00:00
Mateusz Guzik
f26db6948d sx: retire SX_NOADAPTIVE
The flag is not used by anything for years and supporting it requires an
explicit read from the lock when entering slow path.

Flag value is left unused on purpose.

Sponsored by:	The FreeBSD Foundation
2018-12-05 16:43:03 +00:00
Slava Shwartsman
3006180863 krping: Fix for memory leak in error case.
Submitted by:   hselasky@
Approved by:    hselasky (mentor)
MFC after:      1 week
Sponsored by:   Mellanox Technologies
2018-12-05 13:27:48 +00:00
Conrad Meyer
23459e135d Restore build of the kernel, removed through r341377
Turns out we already had a path_mtu_discovery variable.

X-MFC-with:	r341377
2018-12-01 21:28:05 +00:00
Cy Schubert
a23b6c018b Remove IFF_DRVRLOCK as it is used in IRIX only (and we all know IRIX
is dead). This includes collaterally removing code shared by HP/UX,
SGI, and Linux, where IP Filter will in all likelihood for various
reasons never run again.

MFC after:	1 week
2018-12-01 20:30:18 +00:00
Cy Schubert
8a50297550 Restore handling of PMTU discovery, removed through an unifdef(1)
following the MFV of r254219 into r255332. In addition the 'FreeBSD'
macro was never defined in ipfilter 5.1.2 thus it never would have
been enabled in the first place.

This work is prompted by a general cleanup of the IP Filter code
prompted by working to resolve a PR. More to follow.

MFC after:	1 week
2018-12-01 17:59:41 +00:00
Cy Schubert
a85c2efc11 Clean up a rather useless conditional structure member definition.
MFC after:	1 week
2018-11-30 04:15:56 +00:00
Cy Schubert
a9af9f073c Clean up a redundant non-redefinition of IFNAMSIZ. IFNAMSIZ
is defined in net/if.h, therefore the condition is never met and
confusing to those who follow.

MFC after:	1 month
2018-11-30 04:15:42 +00:00
Cy Schubert
f0fea829d0 Remove an old comment/code and replace with a comment that
directly references a NetBSD commit.

MFC after:	1 week
2018-11-29 21:20:53 +00:00
Marius Strobl
f993117205 Import CK as of 21d3e319407d19dece16ee317c757ffc54a452bc, which makes its
sparcv9 atomics compatible with the FreeBSD kernel by using instructions
which access the appropriate address space.
Atomic operations within the kernel must access the nucleus address space
instead of the default primary one. Without this change but the increased
use of CK in the kernel, machines started to panic after some minutes of
uptime due to an unresolvable fault in ck_pr_cas_64_value().
2018-11-27 12:35:51 +00:00
Cy Schubert
aca1c28a0a Combine two lines into one following unifdef for r255332.
MFC after:	1 week
2018-11-24 18:23:05 +00:00
Cy Schubert
c35c6b9344 An OSF/1 ifdef makes absolutley no sense in a FreeBSD specific source
file.
MFC after:	1 week
2018-11-24 07:16:44 +00:00
Cy Schubert
4510f08de0 FreeBSD 7 has been history for many moons. Remove some dead code.
MFC after:	1 week
2018-11-24 06:49:41 +00:00
Mark Johnston
991666adc7 Ensure that libnv can be used when kern.trap_enotcap=1.
libnv used fcntl(fd, F_GETFL) to test whether fd is a valid file
descriptor.  Aside from being racy, this check requires CAP_FCNTL
rights on fd.  Instead, use fcntl(fd, F_GETFD), which does not require
any capability rights.

Also remove some redundant fd_is_valid() checks to avoid extra system
calls; in many cases we were performing this check immediately before
dup()ing the descriptor.

Reviewed by:	cem, oshogbo (previous version)
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17963
2018-11-13 20:07:55 +00:00
Ed Maste
1d3ffc719e Octeon SDK: avoid use of uninitialized variable
Reported by:	Clang
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-11-09 19:17:25 +00:00
Jung-uk Kim
4a38ee6de7 MFV: r339981
Merge ACPICA 20181031.
2018-11-02 22:50:13 +00:00
Conrad Meyer
0f743729ab Update to Zstandard 1.3.7
Relnotes:	yes
Sponsored by:	Dell EMC Isilon
2018-10-22 18:29:12 +00:00
Jonathan T. Looney
8064dab643 Import CK as of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb.
This fixes two problems, one where epoch calls could occur before all
the readers had exited the epoch section, and one where the epoch calls
could be unnecessarily delayed.

Approved by:	re (glebius)
2018-10-16 02:30:13 +00:00
Jung-uk Kim
6f1f1a6395 Update ACPICA to 20181003.
Approved by:	re (gjb)
2018-10-09 18:40:36 +00:00
Hans Petter Selasky
58c277d846 Add proper support for VIMAGE to krping.
Make sure we pass the correct VNET when allocating the RDMA ID.

MFC after:		3 days
Approved by:		re (gjb)
Sponsored by:		Mellanox Technologies
2018-09-06 14:03:11 +00:00
Warner Losh
592ffb2175 Revert drm2 removal.
Revert r338177, r338176, r338175, r338174, r338172

After long consultations with re@, core members and mmacy, revert
these changes. Followup changes will be made to mark them as
deprecated and prent a message about where to find the up-to-date
driver.  Followup commits will be made to make this clear in the
installer. Followup commits to reduce POLA in ways we're still
exploring.

It's anticipated that after the freeze, this will be removed in
13-current (with the residual of the drm2 code copied to
sys/arm/dev/drm2 for the TEGRA port's use w/o the intel or
radeon drivers).

Due to the impending freeze, there was no formal core vote for
this. I've been talking to different core members all day, as well as
Matt Macey and Glen Barber. Nobody is completely happy, all are
grudgingly going along with this. Work is in progress to mitigate
the negative effects as much as possible.

Requested by: re@ (gjb, rgrimes)
2018-08-24 00:02:00 +00:00
Matt Macy
92c151322b r338172 follow - remove firmwares 2018-08-22 02:53:35 +00:00
Cy Schubert
683a58eeb9 The bucket index is subtracted by one at lines 2304 and 2314. When 0 it
becomes -1, except these are unsigned integers, so they become very large
numbers. Thus are always larger than the maximum bucket; the hash table
insertion fails causing NAT to fail.

This commit ensures that if the index is already zero it is not reduced
prior to insertion into the hash table.

PR:		208566
2018-08-19 13:45:03 +00:00
Cy Schubert
58a290b9f4 Add handy DTrace probes useful in diagnosing NAT issues. DTrace probes
are situated next to error counters and/or in one instance prior to the
-1 return from various functions. This was useful in diagnosis of
PR/208566 and will be handy in the future diagnosing NAT failures.

PR:		208566
MFC after:	3 days
2018-08-19 13:44:59 +00:00
Cy Schubert
1d6e9fe75c Expose np (nat_t - an entry in the nat table structure) in the DTrace
probe when nat fails (label badnat). This is useful in diagnosing
failed NAT issues and was used in PR/208566.

PR:		208566
MFC after:	3 days
2018-08-19 13:44:56 +00:00
Conrad Meyer
0ac341f145 Bring in libsodium to sys/contrib
Bring in https://github.com/jedisct1/libsodium at
461ac93b260b91db8ad957f5a576860e3e9c88a1 (August 7, 2018), unmodified.

libsodium is derived from Daniel J. Bernstein et al.'s 2011 NaCl
("Networking and Cryptography Library," pronounced "salt") software library.
At the risk of oversimplifying, libsodium primarily exists to make it easier
to use NaCl.  NaCl and libsodium provide high quality implementations of a
number of useful cryptographic concepts (as well as the underlying
primitics) seeing some adoption in newer network protocols.

I considered but dismissed cleaning up the directory hierarchy and
discarding artifacts of other build systems in favor of remaining close to
upstream (and easing future updates).

Nothing is integrated into the build system yet, so in that sense, no
functional change.
2018-08-17 00:23:50 +00:00
Jung-uk Kim
51f42bad71 Merge ACPICA 20180810. 2018-08-13 16:26:26 +00:00
Cy Schubert
79476a1c3e Correct a comment. Should have been detected by ipf_nat_in() not
ipf_nat_out().

MFC after:	1 week
X-MFC-with:	r337558
2018-08-10 00:30:15 +00:00
Cy Schubert
e6191e11f0 Identify the return value (rval) that led to the IPv4 NAT failure
in ipf_nat_checkout() and report it in the frb_natv4out and frb_natv4in
dtrace probes.

This is currently being used to diagnose NAT failures in PR/208566. It's
rather handy so this commit makes it available for future diagnosis and
debugging efforts.

PR:		208566
MFC after:	1 week
2018-08-10 00:04:32 +00:00
Olivier Houchard
d8f1ed8d94 Import CK as of commit 08813496570879fbcc2adcdd9ddc0a054361bfde, mostly
to avoid using lwsync on ppc32.
2018-08-09 12:11:49 +00:00
Cy Schubert
95bdea60e0 Remove redundant and incorrect default definition of AF_INET6. AF_INET6
is defined in sys/socket.h where it's defined as 28.

A bit of trivia: On NetBSD AF_INET6 is defined as 24. On Solaris it is
defined as 26. This is probably why Darren defaulted to 26, because
ipfilter was originally written for SunOS 4 and Solaris many moons ago.

MFC after:	2 weeks
2018-08-07 07:12:59 +00:00
Andrew Turner
5f901c92a8 Use the new VNET_DEFINE_STATIC macro when we are defining static VNET
variables.

Reviewed by:	bz
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D16147
2018-07-24 16:35:52 +00:00
Andriy Gapon
725de58112 MFV CK@r336629: Import CK as of commit 1c1f9901c2dea7a883342cd03d3906a1bc482583
This adds CK_SLIST_INSERT_PREVPTR and CK_SLIST_REMOVE_PREVPTR macros
as well as ck_pr_dec_is_zero family of functions.

MFC after:	3 weeks
2018-07-23 11:21:43 +00:00
Justin Hibbits
07eb643e20 Correct the identifier for the Unifi Security Gateway
The USG is really E120, not E110.
2018-07-10 17:01:19 +00:00