Commit Graph

257359 Commits

Author SHA1 Message Date
maya 6cc5caf4f6 Replace early interrupt disable code.
As suggested by dh, carefully disable interrupts before frobbing
interrupt mask, which might trigger more interrupts.

Don't bother with keeping BEV and such.
Note that we are zeroing out STATUS later on in the (NOFPU || emips)
case right now.

This change is risky for emips which wasn't tested and didn't reach
userland before.
2018-03-07 15:44:15 +00:00
maya d3a0c8241a Remove more unused functions with COMPAT_AS=library 2018-03-07 15:20:50 +00:00
maya 352659a8be Build compat code as .a if not MODULAR.
Removes some more unused functions.
2018-03-07 15:02:36 +00:00
christos 6f51a051f3 cleanup debugging code so that it compiles again. 2018-03-07 14:59:14 +00:00
knakahara ddadeae1c5 Fix another poll mode assumption breaking. Implemented by msaitoh@n.o, I just commit by proxy.
ixgbe_rearm_queues() writes EICS register(s). 82599, X540 and X550
specifications say "Following a write of 1b to any bit in the EICS register
(interrupt cause set), its corresponding bit in the EIMS register is auto
set as well enabling its interrupt." in "Extended Interrupt Auto Mask Enable
(EIAM) Register" section. That is, ixgbe_rearm_queues() causes interrupts
regardless of the status managed by ixgbe_enable_queue()/ixgbe_disable_queue().
That can break poll mode assumption.

In fact, the problem occurs in the following situation
    - CPU#A has high load traffic, in contrast, CPU#B has not so high load traffic
    - CPU#A is occurred interrupt by its NIC queue
      - CPU#A calls ixgbe_disable_queue() in interrupt handler(ixgbe_msix_que())
      - CPU#A kick softint handler(ixgbe_handle_que())
        - CPU#A begins softint
        - CPU#A's NIC queue is set que->txr->busy flag
        - With some reason, CPU#A can do ixg interrupt handler
          E.g. when one of CPU#A's softnet handlers sleeps, ipl is lowered
    - CPU#B starts callout
      - CPU#B calls ixgbe_local_timer1()
        - CPU#B writes EICS bit corresponding CPU#A's NIC queue bit
    - CPU#A's NIC queue causes interrupt whie CPU#A is running in poll mode
      - CPU#A calls ixgbe_disable_queue() in interrupt handler *again*
    - CPU#A has done polling, and then CPU#A calls ixgbe_enable_queue() *once*
    - CPU#A's NIC queue interrupt is disabled until ixg is detached as
      ixgbe_disable_queue() is called twice though ixgbe_disable_queue() is
      called once only

NOTE:
82598 does not say so, but it is treated in the same way because of no harm.

By the way, we will refactor ixgbe_local_timer(watchdog processing) later.

XXX pullup-8
2018-03-07 11:18:29 +00:00
kamil 42ffdafce3 ATF: Correct a race bug in attach2 (t_ptrace_wait*)
At the end of the test we resume a tracer and expect to observe it to
collect the debuggee. We cannot from a parent point of view wait for
collecting it with WNOHANG without a race.

Remove the WNOHANG option from wait*(2) call. This corrects one type of
race.

This test is still racy for some other and unknown reason and this is being
investigated.

Sponsored by <The NetBSD Foundation>
2018-03-07 10:53:55 +00:00
roy 1914784e96 Remove case labels we will never trigger due to filtering. 2018-03-07 10:06:41 +00:00
mrg 7d6ca5ebbe also disable SYSCTL_INCLUDE_DESCR.
copy sun3 disables to sun3x mostly.  it has the same ufsboot 2MB limit.
2018-03-07 09:44:22 +00:00
msaitoh 8ecbb809ea Add NCT6796D. Some functions of NCT6796D is extended from NCT6795D,
but this commit doesn't support them yet.
2018-03-07 09:25:56 +00:00
eadler 31ce73e04a wtf(6): use character classes
ok pgoyette@ silence dholland@
2018-03-07 08:25:43 +00:00
eadler 7c4228cc00 wtf(6): quote "$f"
ok pgoyette@ silence dholland@
2018-03-07 08:24:16 +00:00
msaitoh 5e23e2314a Don't increment que->req.ev_count in MSI-X interrupt because it's not
reschedule.
2018-03-07 08:01:32 +00:00
mlelstv 847d546cb0 Use local ELF labels and avoid an unsupported 16bit relocation. 2018-03-07 06:55:01 +00:00
msaitoh 671bd52ed6 - Make "Handled queue in softint" and "Requeued in softint" evcnt(9) per queue
and count them correctly.
- Remove #if 0'ed code.
2018-03-07 03:29:10 +00:00
ozaki-r d0486ec90d Tweak tests; increase the size of NS packets for the addition of a nonce 2018-03-07 02:30:37 +00:00
ozaki-r 6963349e89 Provide more informative reports on failures 2018-03-07 02:30:00 +00:00
ozaki-r c0c12d96ec Avoid passing NULL to nd6_dad_duplicated
Fix PR kern/53075
2018-03-07 01:37:24 +00:00
christos 964ee1888f fix typo (thanks gcc-6). There is no "pxaiis" 2018-03-06 22:21:01 +00:00
christos 95f49f9366 fix build, KNF, simplify. 2018-03-06 22:13:14 +00:00
htodd ea01913fc3 Fix typo in function name. 2018-03-06 21:21:27 +00:00
kamil aad35b0998 Correct all ATF failures in t_ptrace_x86_wait.h (debug registers)
This code after refactoring stopped calling functions that were designed
to trigger expected behavior and thus, tests were breaking.

Sponsored by <The NetBSD Foundation>
2018-03-06 21:11:51 +00:00
christos cf226b6835 need CRYPTO_memcmp 2018-03-06 19:32:16 +00:00
christos 33c1542bb7 need CRYPTO_memequal 2018-03-06 19:30:56 +00:00
christos c79601bd37 fix v8 PMULL detection (Robert Swindells) 2018-03-06 18:36:09 +00:00
christos ac465b1fa5 For mips64:
Avoid branch delay spot warnings: Warning: macro instruction expanded into
multiple instructions in a branch delay slot
2018-03-06 18:32:37 +00:00
bouyer 151eee193a fdtbus_get_string_index(): decrease len when going to the next string,
otherwise we may read past the end of names.
2018-03-06 17:40:04 +00:00
maxv f50e60a23f Perform the IP (src/dst) checks _before_ calling the packet filter, because
if the filter has a "return-icmp" rule it may call icmp6_error with an src
field that was not entirely validated.
2018-03-06 17:39:36 +00:00
bouyer 45076dbf13 I guess fdtbus_regulator_get_voltage() should check for the get_voltage()
callback, not set_voltage()
2018-03-06 17:24:57 +00:00
christos 1e125808a4 Avoid branch delay spot warnings: Warning: macro instruction expanded into
multiple instructions in a branch delay slot
XXX: Manually need to fix in auto-generation.
2018-03-06 13:47:25 +00:00
christos 30f7db8025 Add a case for 7, remove arm64crypto.S 2018-03-06 13:37:43 +00:00
martin c3f6db91cd Remove unused variables 2018-03-06 11:21:31 +00:00
roy 89bda1e316 nd6: add a nonce to DaD probes in-case they are looped back to us
This implements RFC 7527, based a similar change in FreeBSD.
2018-03-06 10:57:00 +00:00
knakahara 4fda12c619 Fix fragment processing in ipsec4_fragout(). Pointed out by maxv@n.o, thanks.
XXX need pullup-8
2018-03-06 10:07:06 +00:00
skrll e440185826 Sprinkle __volatile on asm instructions 2018-03-06 08:20:22 +00:00
skrll cfbaf78b43 Convert decimal to hex to make comparison to arm arm (slightly) easier. 2018-03-06 08:14:17 +00:00
mlelstv 1261ded27d Add DIOCLWEDGES 2018-03-06 07:59:59 +00:00
mlelstv 92e3f65502 Fix cmap bounds checking. 2018-03-06 07:49:36 +00:00
mlelstv f52084a9af print quota pointers in superblock 2018-03-06 07:45:38 +00:00
mlelstv 52f4944bed correct whitespace in attach message 2018-03-06 07:41:55 +00:00
skrll 4550382950 Another harmless typo 2018-03-06 07:36:09 +00:00
skrll 9d5ec8537d Fix harmless typo 2018-03-06 07:31:57 +00:00
ozaki-r f502c3b602 Use pool(9) for llentry allocations
llentry is easy to be leaked and pool suits for it because pool is usable to
detect leaks.

Also sweep unnecessary wrappers for llentry, in_llentry and in6_llentry.
2018-03-06 07:27:55 +00:00
ozaki-r 9891458159 Fix memory leaks on arp -d and ndp -d for static entries
We have to delete entries on in_lltable_delete and in6_lltable_delete
unconditionally.  Note that we don't need to worry about LLE_IFADDR because
there is no such entries now.
2018-03-06 07:25:27 +00:00
ozaki-r 0e7f921617 Fix reference leaks of llentry
callout_reset and callout_halt can cancel a pending callout without telling us.
Detect a cancel and remove a reference by using callout_pending and
callout_stop (it's a bit tricy though, we can detect it).

While here, we can remove remaining abuses of mutex_owned for softnet_lock.
2018-03-06 07:24:01 +00:00
ozaki-r bcf876e060 Add assertions
We must not destroy llentries holding mbufs.
2018-03-06 07:20:41 +00:00
ozaki-r e3a4d36d02 Tweak sanity checks
Scheduling a timer of static entries is wrong.
2018-03-06 07:19:03 +00:00
spz 6a3be784bd if_xsh needs mii_bitbang; make a pared down kernel build 2018-03-06 06:04:21 +00:00
msaitoh 4b9f14a6da Move the location of "struct work" as FreeBSD's "struct task" in ixgbe.h.
No functional change.
2018-03-06 03:47:23 +00:00
eadler c197dbace7 [tail] Fix type of 'len'
ok pgoyette
2018-03-06 03:33:26 +00:00
christos 462103bc5a avoid negative shift 2018-03-06 01:14:41 +00:00