Age | Commit message (Collapse) | Author |
|
Interface Identifiers with IPv6 Stateless Address Autoconfiguration."
"An IPv6 address configured using this method is stable within each
subnet, but the corresponding Interface Identifier changes when the
host moves from one network to another. This method is meant to be an
alternative to generating Interface Identifiers based on hardware
addresses."
OK naddy, sthen
|
|
as loopback interfaces for each rdomain (including lo0). This is done when
the interface is brought up. This is now also done by default (either on
attach of lo0 or when creating the rdomain).
OK mpi@
|
|
|
|
|
|
|
|
if_deactivate looked for carp parent interfaces and called carp_ifdetach
to have children interfaces unplug themselves. this diff has the
carp interfaces register detach hooks on the parent instead. the
effect is the same, but using the standard every other interface
uses.
while im here i shuffle the order the hooks carp_set_ifp are
estabilshed so it will fail if they arent allocated.
ok visa@ mpi@
|
|
currently carp uses a struct carp_if to hold an srp list head, which
is accessed by both if_carp in struct ifnet, and via the if input
handlers list.
this gets rid of some indirection by making if_carp itself the list
head, rather than a pointer to the list head via a struct carp_if.
it also makes accessing the list consistent by only using if_carp
to get to it.
ok mpi@
|
|
The NET_LOCK() is already held in this thread and is now enough.
People interested in ARP/bridge(4)/switch(4)/pipex(4)/pppoe(4)
performances can now push the KERNEL_LOCK() without depending on
other subsystems/drivers.
Tested by Hrvoje Popovski.
ok bluhm@, visa@
|
|
this makes it like all our other protocol family input functions.
mpls_input always looks up the interface the mbuf was received on,
but it's always called by code that already has a reference to that
interface anyway. the result of this is a few less if_get/if_put
calls.
ok mpi@ bluhm@ visa@ claudio@
|
|
them as M_TEMP.
ok visa@
|
|
is protected by which lock.
ok bluhm@, visa@
|
|
or other states more consistent.
OK visa@ sashan@ on a previous version
|
|
currently there is a single mbuf_queue per interface, which all
rings on a nic shove packets onto. while the list inside this queue
is protected by a mutex, the counters around it (ie, ipackets,
ibytes, idrops) are not. this means updates can be lost, and reading
the statistics is also inconsistent. having a single queue means
that busy rx rings can dominate and then starve the others.
ifiqueue structs are like ifqueue structs. they provide per ring
queues, and independent counters for each ring. when ifdata is read
for userland, these counters are aggregated. having a queue per
ring now allows for per ring backpressure to be applied. MCLGETI
will have it's day again.
right now we assume every interface wants an input queue and
unconditionally provide one. individual interfaces can opt into
more.
im not completely happy about the shape of this atm, but shuffling
it around more makes the diff bigger.
ok visa@
|
|
As soon as the interface will be brough UP, its device driver will
recognize it has the IFF_PROMISC flag and will configure its filters
accordingly.
ok visa@
|
|
right now the rx ring moderation code makes a decision globally
that a machine is livelocked, and uses that to apply backpressure
on all the rx rings. we're moving toward having the network stack
run on multiple cpus, and fed from multiple rx rings. if_rxr_livelocked
lets a driver apply backpressure explicitely if something tells it
that whatever is consuming previous packets cannot keep up.
while here expose the current ring watermark with if_rxr_cwm.
tweaks and ok visa@
|
|
In particular, this allows SIOCGIF* requests to run in parallel.
lots of help & ok mpi, ok visa, sashan
|
|
this keeps the knowledge of ifq locking in ifq.c
ok visa@
|
|
IPsec is enabled.
This is currently a no-op since we still use a single taskq. But it
will allows us to experiment with multiple forwarding threads and the
PF_LOCK() without having to fix IPsec at the same time.
ok sashan@, visa@
|
|
This will be used to first allow read-only ioctl(2) to be executed while
the softnet taskq is running. Then it will allows us to execute multiple
softnet taskq in parallel.
Tested by Hrvoje Popovski, ok kettenis@, sashan@, visa@, tb@
|
|
purged. Remove it and move the prototype to if.c since ifconf() is
not used outside of this file.
ok mpi
|
|
function ifioctl_get(). This simplifies an upcoming diff.
suggested by & ok mpi, input & ok florian
|
|
Instead return EOPNOTSUPP and call it from ifioctl(). This will help
getting per-driver ioctl routines outside of need the NET_LOCK().
While here always return ENXIO when ``ifp'' is NULL.
ok visa@, florian@
|
|
NOTE: code still runs with single softnet task. change definition of
SOFTNET_TASKS in net/if.c, if you want to have more than one softnet task
OK mpi@, OK phessler@
|
|
is set.
Accesses to IPsec global data structure are now serialized by the
NET_LOCK().
Tested by many, ok visa@, bluhm@
|
|
- SIOCSIFPHYADDR
- SIOCSIFPHYADDR_IN6
- SIOCGIFPSRCADDR
- SIOCGIFPSRCADDR_IN6
- SIOCGIFPDSTADDR
- SIOCGIFPDSTADDR_IN6
ok bluhm@
|
|
- Assert that all drivers declare a if_ioctl function pointer and stop
checking it against NULL.
- Do not use return statements in ifioctl() where a lock is needed.
- Call if_setlladdr() only if the underlying driver did not report an
error.
ok bluhm@
|
|
While here add error checks for SIOC{A,D}IFGROUP.
ok sashan@, bluhm@, visa@
|
|
ok visa@, bluhm@, deraadt@
|
|
routing socket.
When clang became the default compiler, `if_flags' from `struct ifnet'
was changed from "short" to "unsigned short", to silence a warning.
Sadly the copy of these flags on the stack was still a "short" which
made the flags comparison always true, which in turn made ifioctl()
generates a RTM_INFO message for many ioctl(2).
Since my last commit, the flag comparison is done for every ioctl(2).
This made the kernel generate at least one routing message per ioctl,
resulting in a lot of RTM_DESYNC.
RTM_DESYNC problem reported by krw@ thanks to dhclient(8)'s noisiness!
ok krw@, patrick@
|
|
Only one semantic chance for SIOCSIFXFLAGS, rtm_ifchg() is now only called
when the flags changed, not always.
ok bluhm@, visa@
|
|
Exposes per-CPU counters to real parrallelism.
ok visa@, bluhm@, jca@
|
|
Problem reported and fix tested by Hrvoje Popovski.
ok bluhm@, visa@
|
|
Tested by Hrvoje Popovski.
|
|
Tested by Hrvoje Popovski, ok bluhm@
|
|
OK mpi@ visa@
|
|
flag. Notify userland about this via the route socket, otherwise
slaacd gets confused about the state the interface is in.
OK on a previous version sthen
input & OK bluhm
|
|
ok mpi
|
|
tasks from `systq' to `softnettq'.
ok kettenis@, visa@
|
|
shall all be cleansed.
Remove sending of router solicitations and processing of router
advertisements from the kernel. It's handled by slaacd(8) these days.
Input & OK bluhm@, mpi@
|
|
M_LOOP flag. This broke IPv6 multicast. Always set M_LOOP when
going through if_input_local() and adjust the flag's comment.
report rzalamena@; OK mpi@
|
|
IPv4 & IPv6 dispatch functions outside the KERNEL_LOCK().
We currently rely on the NET_LOCK() serializing access to most global
data structures for that. IP input queues are no longer used in the
forwarding case. They still exist as boundary between the network and
transport layers because TCP/UDP & friends still need the KERNEL_LOCK().
Since we do not want to grab the NET_LOCK() for every packet, the
softnet thread will do it once before processing a batch. That means
the L2 processing path, which is currently running without lock, will
now run with the NET_LOCK().
IPsec isn't ready to run without KERNEL_LOCK(), so the softnet thread
will grab the KERNEL_LOCK() as soon as ``ipsec_in_use'' is set.
Tested by Hrvoje Popovski.
ok visa@, bluhm@, henning@
|
|
This will help transitionning to an un-KERNEL_LOCK()ed IP
forwarding path.
Disucssed with bluhm@, ok claudio@
|
|
remaining ifp references are released *without* the NET_LOCK().
It's safe to do so because the KERNEL_LOCK() serializes accesses
to ``if_map''.
More importantly this fix possible deadlocks between if_get() and
the NET_LOCK(). It is now possible to call them in whatever order.
ok visa@, dlg@
|
|
Fix a deadlock with a thread trying to detach the corresponding interface.
ok sashan@, bluhm@
|
|
them by NET_LOCK/NET_UNLOCK. Also make the timeout for pipex_timer
run with a thread context and replace pipex softintr by NETISR_PIPEX.
ok mpi
|
|
Grab the lock before calling carpdetach().
ok bluhm@
|
|
ok visa@
|
|
Recursions are still marked as XXXSMP.
ok deraadt@, bluhm@
|
|
ok bluhm@
|
|
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@
|