| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
interface descriptor corresponding to the unique name. This descriptor
is guaranteed to be valid until if_put(9) is called on the returned
pointer. if_unit(9) should replace already existent ifunit() which
returns descriptor not safe for dereference when context was switched.
This allow us to avoid some use-after-free issues in ioctl(2) path.
Also this unifies interface descriptor usage.
ok claudio@ sashan@
|
|
|
|
|
|
| |
This allows us to unlock getppid(2).
ok mpi@
|
|
|
|
| |
ok kettenis@
|
|
|
|
| |
ok stsp jsg
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deliver file descriptor close notification for __EV_POLL knotes through
struct kevent that kqueue_scan() returns. This replaces the previous way
of returning EBADF from kqueue_scan(), making it easier to determine
what exactly has changed.
When a file descriptor is closed, its __EV_POLL knotes are turned into
one-shot events and queued for delivery. These knotes are "unregistered"
as they are reachable only through the queue of active events. This
reduces interference with the normal workings of kqueue. However, more
care is needed to avoid leaking knotes. In addition, the unregistering
removes a limit on the number of issued knotes. To prevent accumulation
of pending fd close notifications, kqpoll_init() flushes the active
queue at the start of a kqpoll scan.
OK mpi@
|
|
|
|
| |
OK mpi@ as part of a larger diff
|
|
|
|
|
|
|
|
| |
this raises performance of tcpbench on an m3000 from ~3kpps and
~8MB/s to ~70kpps and ~191MB/s when transmitting, and ~10kpps and
~15MB/s to ~120kpps and 174MB/s when receiving.
i also tested this on a v245 and an m4000 a while back.
|
|
|
|
|
|
|
|
|
| |
the vlan tag we're injecting into the mbuf chain is either straight
off the wire and therefore already has the vlan priority encoded,
or is straight after it's been set up by vlan(4), which also has
the prio already encoded.
ok kn@ visa@ mvs@
|
|
|
|
|
|
|
| |
Fix a regression where the valye wasn't correctly overwritten for wired
mapping, introduced in previous refactoring.
ok mvs@
|
|
|
|
|
|
|
|
|
| |
ip_input() passes the packet to ip_forward(). But with an af-to
rule, pf(4) calls ip_forward() directly. Check the forwarding
sysctl also in pf to get consistent behavior. This requires to set
both ip and ip6 forwarding to get packet flow in both directions
over af-to rules.
OK kn@
|
|
|
|
|
|
|
|
| |
struct ip_mreq or a struct ip_mreqn. Using struct ip_mreqn allows to
pass a interface index instead of specifying the multicast interface
via its IP address. This is also the API implemented by Linux and
FreeBSD and should help porting software.
OK bluhm@ phessler@ robert@
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
when NAT was implemented differently. Now it does not seem to make
sense anymore. sashan@ has identified cases where it does harm.
dlg@ wants to remove it to simplify route-to code.
from dlg@; OK sashan@
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
| |
the generic IORT node information but also the Root Complex's attributes.
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
| |
so that it can be used by more drivers.
ok kettenis@
|
|
|
|
|
| |
Relax input validation and use integer comparison.
OK kn@ mvs@ sthen@
|
|
|
|
|
|
| |
here 10 years ago, xdr isn't scary at all.
ok dlg@
|
|
|
|
|
|
|
|
|
|
| |
region reporting table. Since the extent only covered memory starting
at 16M, these regions could not be reserved and would in turn cause a
panic. Make the extent start at 0 and immediately reserve the first
16M right away, so that we can change the reserved memory allocator to
EX_CONFLICTOK to make allocations succeed if they are already reserved.
ok kettenis@
|
|
|
|
| |
ok kn mvs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The syncer_thread() uses lbolt to perform periodic execution. We can
do this without lbolt.
- Adding a local wakeup(9) channel (syncer_chan) and sleep on it.
- Use a local copy of getnsecuptime() to get 1/hz resolution for time
measurements. This is much better than using gettime(9), which is
wholly unsuitable for this use case. Measure how long we spend in
the loop and use this to calculate how long to sleep until the next
execution.
NB: getnsecuptime() is probably ready to be moved to kern_tc.c and
documented.
- Using the system uptime instead of the UTC time avoids issues with
time jumps.
ok mpi@
|
|
|
|
|
|
|
| |
allocated as part of the softc, though it's always been the same buffer
so far.
ok dlg@
|
|
|
|
| |
ok dlg@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The global "tickadj" variable is a remnant of the old NTP adjustment
code we used in the kernel before the current timecounter subsystem
was imported from FreeBSD circa 2004 or 2005.
Fifteen years hence it is completely vestigial and we can remove it.
We probably should have removed it long ago but I guess it slipped
through the cracks. FreeBSD removed it in 2002:
https://cgit.freebsd.org/src/commit/?id=e1d970f1811e5e1e9c912c032acdcec6521b2a6d
NetBSD and DragonflyBSD can probably remove it, too.
We export tickadj via the kern.clockrate sysctl(2), so update sysctl.2
and sysctl(8) accordingly. Hypothetically this change could break
someone's sysctl(8) parsing script. I don't think that's very likely.
ok mvs@
|
|
|
|
|
| |
Should prevent to use uninitialized value as bogus counter index.
OK mvs@ claudio@ anton@
|
|
|
|
| |
ok kurt@
|
|
|
|
|
|
|
|
|
|
|
|
| |
`pflogifs' array. This was done to prevent panics caused by internal
malloc(9) limit.
Also we avoid the case while single pflog(4) interface with a high index
allocates an array for all indices below and eats up kernel memory.
Since we have a very little count of pflog(4) interfaces linear search
does not performance impact.
ok bluhm@ claudio@ kn@
|
|
|
|
|
|
|
|
| |
The output path can run without kernel lock just fine as is.
Looking at CVS log, it seems this was not done during import
because IFXF_MPSAFE only became a thing afterwards.
OK mvs
|
|
|
|
|
|
|
| |
It is suspected they were to blame for a machine with inteldrm running X
(xterms and chromium) running out of resources after a few days.
ok kettenis@
|
|
|
|
|
|
|
|
|
|
| |
the rule did not specify it. Check the option again for the log
rule in case another rule has triggered a socket lookup. Remove
logopt group, it is not documented and cannot work as struct pfloghdr
does not contain a gid. Rename PF_LOG_SOCKET_LOOKUP to PF_LOG_USER
to express what it does. The lookup involved is only an implemntation
detail.
OK kn@ sashan@ mvs@
|
|
|
|
|
|
| |
pflog(4) does not send or generate packets by design.
OK mvs sashan
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
|
| |
Original port from NetBSD by guenther@, required for upcoming amap & anon
locking.
ok kettenis@
|
|
|
|
| |
ok miod@, deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
| |
usbd_clear_endpoint_stall(), which in turn will call
usbd_clear_endpoint_toggle(). It can be a common situation that when
this happens, there is still a transfer in the stalled queue being
in progress. The ehci(4) clear toggle function is currently doing a
panic() in the diagnostic code in this situation, which is a bit of
an overkill. The device still can be recovered by detaching/attaching
it. Therefore change the panic() in to a printf().
ok mpi@
|
|
|
|
|
|
|
| |
The common code is moved to sleep_signal_check() and instead of multiple
state variables for sls_sig and sls_unwind only one sls_sigerr is set.
This simplifies the checks in sleep_finish_signal() a great bit.
Idea from and OK mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
code is copied from IPv4 and adapted. Some things are changed in
v4 to make it look similar.
- ip6_forward increases the noroute error counter, do that in
ip_forward, too.
- Pass more specific sockaddr_in6 to icmp6_mtudisc_clone().
- IPv6 may also use reject routes for IPsec PMTU clones.
- To pass a route_in6 to ip6_output_ipsec_send() introduce one in
ip6_forward(). That is the same what IPv4 does. Note
that dst and sin6 switch roles.
- Copy comments from ip_output_ipsec_send() to ip6_output_ipsec_send()
to make code similar.
- Implement dynamic IPv6 IPsec PMTU routes.
OK tobhe@
|
|
|
|
|
|
|
| |
quirks.
Original diff from Sven M. Hallberg < pesco () khjk ! org >
Diff updated and tested by Timo Myyra
ok phessler@
|
| |
|
| |
|
|
|
|
|
|
| |
Removed a rash of +/-1 and made both functions shorter and more focused.
OK millert@
|
|
|
|
|
|
|
| |
This changes amd64 GENERIC.MP .text size of kern_sysctl.o from 6440 to 6400.
Surprisingly, RAMDISK grows from 1645 to 1678.
OK millert@, mglocker@
|