258197 Commits

Author SHA1 Message Date
christos
213d895173 use the proper station nodeid read command. 2018-04-27 12:04:23 +00:00
knakahara
b0c61d654b Fix LOCKDEBUG kernel panic when many(about 200) tunnel interfaces is created.
The tunnel interfaces are gif(4), l2tp(4), and ipsecif(4). They use mutex
itself in percpu area. When percpu_cpu_enlarge() run, the address of the
mutex in percpu area becomes different from the address which lockdebug
saved. That can cause "already initialized" false detection.
2018-04-27 09:55:27 +00:00
wiz
d4593e87a1 Fix xrefs. 2018-04-27 09:33:43 +00:00
wiz
e54c25f543 New sentence, new line. 2018-04-27 09:33:09 +00:00
maxv
b615efb12f Remove _MCLGET, merge its content into m_clget(). The code is slightly
modified to reduce the indentation level.
2018-04-27 09:22:28 +00:00
ryo
5b5022b696 remove suspicious compare, and cleanup complex conditionals.
pointed out PR/53159 by dcb314, thanks.
2018-04-27 09:05:26 +00:00
maxv
354fb9ed32 Fix a bug introduced in rev1.154 (2009). mcl_cache still has a size of
MCLBYTES, so the area allocated is still too small.

I think it should have been MEXTMALLOC, and of course I can't test my
change.
2018-04-27 09:02:16 +00:00
maxv
4070f54bcc M_CLUSTER -> M_EXT_CLUSTER, and remove M_CLUSTER completely. 2018-04-27 08:51:26 +00:00
maxv
f5b99fb7f5 Reorder, to group related functions. 2018-04-27 08:23:18 +00:00
ryo
5c64b812f4 fix instability behavior of bufcache on aarch64.
* fix to return correct ref/mod when PMAP_WIRED.
* changed to keep wired flags in pte instead of pv_entry, and cleanup.
2018-04-27 08:07:08 +00:00
maxv
f8f3c934e0 M_CLUSTER -> M_EXT_CLUSTER 2018-04-27 07:53:07 +00:00
maxv
6bcbbb2d9d Rename m_reclaim -> mb_drain, and localify. 2018-04-27 07:41:58 +00:00
maxv
ca2e857672 Implement M_COPY_PKTHDR as a function, like m_move_pkthdr. 2018-04-27 07:20:33 +00:00
maxv
3f23c9efec Move m_align and m_append into iee80211_netbsd.c. They are part of
net80211, and shouldn't be used outside.
2018-04-27 06:56:21 +00:00
ragge
31c431270b Remove the old unneccessary cksum files. 2018-04-27 06:36:32 +00:00
maxv
b68c1786cf Simplify m_copydata, use unsigned int, and change its last argument to
match that of the man page.
2018-04-27 06:36:16 +00:00
maxv
4814d4311b Style and simplify. 2018-04-27 06:27:36 +00:00
ryo
06fef18adc define __HAVE_ATOMIC64_OPS
pointed out by nonaka@, thanks
2018-04-27 06:23:34 +00:00
maxv
85bdc711fa Panic in m_copypacket if no header is present, that's a requirement. 2018-04-27 06:15:49 +00:00
maxv
04ce492590 Improve the documentation of m_copypacket(), to say explicitly that a
header must be present, contrary to m_copym().

While here fix a variable name (from yesterday).
2018-04-27 06:06:43 +00:00
knakahara
f6621122fb Fix "how" argument of MGET(). Pointed out by maxv@n.o, thanks.
MGET() does not have M_ZERO flag, so add memset when it is required.
2018-04-27 00:06:40 +00:00
maxv
2679f01cd0 Hum. This should be M_READONLY, not M_ROMAP.
M_ROMAP tells us whether the mbuf storage is mapped on a read-only page.
But an mbuf can still be read-only in the sense that the storage is
shared with other mbufs.
2018-04-26 20:10:44 +00:00
maxv
ecb801f971 m_copy -> m_copym 2018-04-26 19:56:55 +00:00
maxv
eee3723d53 Stop using m_copy(), use m_copym() directly. m_copy is useless,
undocumented and confusing.
2018-04-26 19:50:09 +00:00
maxv
02dd989063 Fix inverted arguments in m_gethdr(). 2018-04-26 19:33:02 +00:00
maxv
3c78537229 Fix inverted arguments in MGET(). 2018-04-26 19:27:04 +00:00
maxv
de9cefcf44 Remove unused mbuf argument from sbsavetimestamp. 2018-04-26 19:22:17 +00:00
maxv
a3e322b567 Change MCLGET, so that it calls m_clget instead of doing the work in a
macro. Macros are inefficient when they contain too many instructions and
are used too often, because of cache coherency (and also register use).

This change saves 32KB of kernel .text.
2018-04-26 19:13:34 +00:00
alnsn
8fa5a65e9e Add SVS. It may not be disabled at securelevel 1 and above. 2018-04-26 18:56:18 +00:00
alnsn
6ae79384f8 Add KAUTH_MACHDEP_SVS_DISABLE and add support to secmodel_securelevel(9).
Disabling SVS is denied at securelevel 1 and above.
2018-04-26 18:54:09 +00:00
macallan
416a4792c2 bump message buffer size 2018-04-26 18:33:02 +00:00
scole
098fbe0974 Update some of the _UC_MACHINE* macros even though gregs[] aren't tied to anything yet 2018-04-26 18:06:25 +00:00
scole
c4c8c26cd0 Rename "cpu_switch" to "cpu_switchto" 2018-04-26 14:59:11 +00:00
maxv
ce89a5e39f Rename
m_copyback0 -> m_copyback_internal
	M_COPYBACK0_* -> CB_*

That's a lot less misleading. While here, fix a bunch of panic messages.
2018-04-26 08:31:36 +00:00
maxv
af1cee9c55 Stop adding '0's in parameter and function names, that's just misleading.
Some remain, they need more investigation.
2018-04-26 08:13:30 +00:00
roy
e3e276e2f2 Test for valid interface for ioctls that demand it.
Thanks to Robert Swindells for the patch.
2018-04-26 08:11:18 +00:00
maxv
aaf2c2df36 Remove m_prepend from the man page, it's a helper, and is not supposed to
be part of the API.
2018-04-26 07:48:21 +00:00
maxv
a2f5e53a1f Change comment, to clearly say that m_prepend should not be used directly. 2018-04-26 07:46:24 +00:00
maxv
e64bc0451a Use M_UNWRITABLE, no functional change. 2018-04-26 07:28:21 +00:00
maxv
1cf079b88f Move the address checks into one function, ip6_badaddr(). In this function,
reinstate the "IPv4-compatible IPv6 addresses" check; these addresses are
deprecated by RFC4291 (2006).
2018-04-26 07:01:38 +00:00
maxv
8ad8ab65b1 Remove ping6_opts_hops, "-g" does not exist anymore (RH0 removed). 2018-04-26 06:23:33 +00:00
ragge
1cb48e477a Enable CPU_IN_CKSUM. 2018-04-25 11:12:55 +00:00
ragge
09fcb8c02e Add cpu_in_cksum.S. 2018-04-25 11:08:21 +00:00
ragge
6c80cbc78d VAX version of cpu_in_checksum(). Increases network performance significantly. 2018-04-25 11:06:49 +00:00
ragge
9e14291720 Extract M_DATA, M_LEN, M_NEXT. 2018-04-25 09:28:42 +00:00
ragge
9b168bab66 Add __KERNEL_RCSID() macro. 2018-04-25 09:23:00 +00:00
msaitoh
d1f63c06dc Don't free and reallocate bus_dmamem when it's not required. Currently,
the watchdog timer is completely broken and never fire (it's from FreeBSD
(pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always
calls ixgbe_jcl_reinit() and it causes panic. The reason is that
ixgbe_local_timer1(it includes watchdog function) is softint and
xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called
from interrupt context.

 One of the way to prevent panic is use worqueue for the timer, but it's
not a small change. (I'll do it in future).

 Another way is not reallocate dmamem if it's not required. If both the MTU
(rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's
not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this
change save time of ixgbe_init().

 I have a code to fix broken watchdog timer but it sometime causes watchdog
timeout, so I don't commit it yet.
2018-04-25 08:46:19 +00:00
yamaguchi
bb9c38f4bf Use spin mutex to fix a panic
The GPIO part of wbsio(4) has a lock to keep the register access
order. In addition to the lock, gpio(4) has a look to prevent
multiple control through gpio_pin_ctl(). Those locks hold at
once when gpio_pin_ctl() is called, and the lock of gpio(4) hold
before that of wbsio(4).

Therefore, the wbsio(4) has to use spin lock if gpio(4) uses
spin lock.
2018-04-25 08:29:45 +00:00
ozaki-r
9a87af0fbd Fix a deadlock (rt_free vs. route_intr on rt_so_mtx)
It occurs only if NET_MPSAFE is enabled.
2018-04-25 03:49:57 +00:00
ozaki-r
144c8d0724 Remove a unnecessary wrong cast (fix build of ALL) 2018-04-25 03:45:21 +00:00