Age | Commit message (Collapse) | Author |
|
|
|
even if m_prepend allocates a new mbuf in front of the current one.
this is done by asking M_PREPEND for ETHER_HDR_LEN + ETHER_ALIGN bytes,
and then calling m_adj(ETHER_ALIGN) after.
in the case M_PREPEND does not allocate a new mbuf and ends up with the
same layout as before.
in the allocation case, the requested length is provided on a long
boundary. an ETHER_HDR_LEN request would therefore be 6 bytes
allocated on a long boundary, when we want it to be at ETHER_ALIGN.
by asking for ETHER_HDR_LEN plus ETHER_ALIGN, we can m_adj ETHER_ALIGN
off to get us to the ETHER_ALIGN offset.
ok yasuoka@ mikeb@
|
|
input handlers.
ok dlg@
|
|
rename it to nd6_resolve().
This allows us to get rid of non-Ethernet hacks by moving Ethernet
specific logic in the appropriate layer.
ok sthen@
|
|
resolution is required.
This will allow us to enforce that no route entry is inserted in
the routing table after ether_output().
This is now possible because if_output() is no longer called with
a NULL route argument.
Tested by Hrvoje Popovski, ok visa@, bluhm@
|
|
routines are call directly by ether_input().
ok visa@, dlg@
|
|
eleven years, remove it.
Despite what the wildly outdated time(9) claims, there is no longer
globally visible "struct timeval mono_time" or "struct timeval time".
ok mpi@ sthen@ mikeb@
|
|
|
|
only when in promiscuous mode
This necessary for NICs like virtio, where the unicast MAC filter is
'best effort' only.
ok dlg@
encouragement from mpi@
|
|
Packets of types ARP and REVARP are now processed in the softnet task,
directly from ether_input() and without holding the KERNEL_LOCK.
Tested by many, ok dlg@
|
|
them and they make everything so much harder with no gain. Remove the
ifp argument from mpls_input since it is not needed. On the input side
the lookup side is modified a bit when it comes to BOS handling.
Tested in a L3VPN setup with ldpd and bgpd. Commiting now so we can move
on with cleaning up rt_ifp usage. If this breaks L2VPN I will fix it once
reported. OK mpi@
|
|
L2 resolution depends on the protocol (encoded in the route entry) and
an ``ifp''. Not having to care about an ``ifa'' makes our life easier
in our MP effort. Fewer dependencies between data structures implies
fewer headaches.
Discussed with bluhm@, ok claudio@
|
|
Instead of casts they check wether the incoming object has the
expected type. So introduce satosdl() and sdltosa() in the kernel.
OK mpi@
|
|
ok mpi
|
|
Can be used to check if a MAC address is all zeros.
Will be used by iwm(4) soon.
ok kettenis@
|
|
so packets can get enqueued for the arp netisr to process.
fixes jsgs nfs mountroot problem.
|
|
the kernel lock.
"do it" claudio@ mpi@
|
|
the protocol queues.
It basically does what looutput() was doing but having a generic
function will allow us to get rid of the loopback hack overwwritting
the rt_ifp field of RTF_LOCAL routes.
ok mikeb@, dlg@, claudio@
|
|
to pass additional context or transient data with the similar life
time.
ok mpi, suggestions, hand holding and ok from dlg
|
|
instead of having every driver that manipulates the ifih list
understand SRPLs, this moves that processing into if_ih_insert and
if_ih_remove functions.
we rely on the kernel lock to serialise the modifications to the
list.
tested by mpi@
ok mpi@ claudio@ mikeb@
|
|
directly. Also protect non mp-safe functions while at it.
ok mpi@.
|
|
with MPLS packets.
ok mpi@, claudio@
|
|
vlan(4) clears M_VLANTAG when a tag matches but if the tag is still there
it means that the vlan is not configured on the interface.
Found with mpi@ and rzalamena@ while discussing various vlan troubles.
|
|
ok claudio@, phessler@, mpi@
|
|
ok stsp mpi
|
|
pipex and bridge. this puts KERNEL_LOCK/KERNEL_UNLOCK around the pipex
chunk till we can give it some mp love.
ok yasuoka@ mpi@
|
|
if a pseudo-interface is on a different rdomain than its parent.
Sorry for the inconvenience, I hope you'll fly again with us.
Regression reported by and ok semarie@, ok phessler@
|
|
ifp in order to access its ifih handlers.
So get rid of if_get() in the various ifih handlers we know the ifp is
live at this point.
ok dlg@
|
|
compatibility with 4.3BSD in September 1989.
*Pick your own definition for "temporary".
ok bluhm@, claudio@, dlg@
|
|
talking about (*ifp->if_output)().
ok claudio@, dlg@
|
|
tweaks and ok mpi@
|
|
|
|
This fix some weird bridge(4) configurations involving pseudo-drivers
stacked on top of interfaces in a bridge.
Also simplifies the loop prevention logic to match bridge's input path.
Instead of using a tag per port/bridge simply flag output mbufs to make
sure only one copy per bridge go through bridge_output().
ok bluhm@, claudio@
|
|
Not all drivers make use of ether_output() and there's no real reason to
call it when no ARP resolution is needed. But in this case we still want
to make sure we're sending packets in the correct rdomain.
ok bluhm@, claudio@ as part of a larger diff.
|
|
Most of the ARP layer already take an ifp pointer and this makes clear
wich chunks of code are messing with ac_enaddr.
Note that our Ethernet code assume that these pointer are interchangeable
since the first element of the "struct arpcom" is a "struct ifnet".
|
|
Move bridge_input() outside of ether_input() in order to duplicate packets
flowing through a bridge port before applying any transformation on mbufs.
This saves a various m_adj(9)/M_PREPEND(9) dances and remove the bridge(4)
hack from vlan(4).
Tested by mxb <mxb AT alumni DOT chalmers DOT se> and kettenis@
ok bluhm@
|
|
receiving interface in the packet header of every mbuf.
The interface pointer should now be retrieved when necessary with
if_get(). If a NULL pointer is returned by if_get(), the interface
has probably been destroy/removed and the mbuf should be freed.
Such mechanism will simplify garbage collection of mbufs and limit
problems with dangling ifp pointers.
Tested by jmatthew@ and krw@, discussed with many.
ok mikeb@, bluhm@, dlg@
|
|
vlan_start().
ok sthen@, phessler@
|
|
ok sthen@, phessler@
|
|
Tested by <mxb AT alumni DOT chalmers DOT se>, thanks!
ok bluhm@, dlg@
|
|
the second (unused) argument of the input packet handlers.
ok dlg@
|
|
change it from feeding the ethertype of the packet (which is almost
certainly an ip packet or vlan packet, so not that variable) to the
number of packets about to be processed.
ok deraadt@ mpi@
|
|
To keep the list of input handlers short, multiple vlans share the
same ifih.
if_input_process() now looks if the interface of a mbuf changed to
make sure the corresponding handlers are executed. This is a hack
and will be improved later.
ok dlg@
|
|
a packet on the sending queue of an interface.
Tested by many, thanks a lot!
ok dlg@, claudio@
|
|
function.
ok claudio@, reyk@
|
|
Each physical interface of a trunk now gets a specific ifih (interface
input handler) that runs before ether_input().
Tested by sthen@, dlg@, Theo Buehler and <mxb AT alumni.chalmers DOT se>
ok sthen@, dlg@
|
|
m_adj(9) to keep bridge(4) working while other pseudo-drivers are
converted to if_input().
Tested by mxb <mxb AT alumni DOT chalmers DOT se>, thanks!
ok henning@
|
|
to of vlan(4) from ether_input() to bridge_input().
One of the goal of the if_input() plumbing is to stop doing all possible
pseudo-drivers checks on every packets. There's no reason that even if
you're not running a bridge(4) you've to run this code.
This change also will also makes it easier to convert vlan(4) to if_input().
Reviewed by Rafael Zalamena and mikeb@, ok markus@
|
|
with niqueues.
this change is so big because there's a lot of code that takes
pointers to different input queues (eg, ether_input picks between
ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through
to code to enqueue packets against the pointer. if i changed only
one of the input queues id have to add sepearate code paths, one
for ifqueues and one for niqueues in each of these places
by flipping all these input queues at once i can keep the currently
common code common.
testing by mpi@ sthen@ and rafael zalamena
ok mpi@ sthen@ claudio@ henning@
|
|
an interface is destroyed/removed. This way we can ensure pseudo-driver
changes done after attaching an interface are undone before detaching it.
Note: it is safe to call if_deactivate() multiple times as the interface
should not have any attached pseudo-interface after the first call.
ok deraadt@, dlg@
|