| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sending an MPLS frame is weird compared to other address families.
other families figure out and pass the address on the local link
for ether_output to use for resolution, but AF_MPLS basically passes
a dummy sockaddr so ether_output can get the ethernet protocol field
right. ether_output then has to pull the route apart to figure out
which address and family to use for address resolution on the local
net. eg, MPLS tagged routes via ip addresess need to pull the route
apart and get at the AF_INET sockaddr to pass to arpresolve. that
code currently uses the destination address of the route, but if
that destination is not on the local network, we'd end up using it
for arp requests that don't work.
this change uses the rt_gateway sockaddr if RTF_GATEWAY is set.
this solves the problem in my testing and doesn't seem to break
other uses cases ive tried.
reported by adrian close via bugs@
ok deraadt@ claudio@
|
|
|
|
| |
no functional change
|
|
|
|
| |
input and OK mpi@
|
|
|
|
|
|
|
|
| |
Backbone refers to 802.1ah or 802.1Q Provider Backbone Bridges
(PBB), or mac-in-mac, which is like vlans except it completely
encapsulates the inner packet rather than just add a shim to it.
This removes the need for Backbone Core Bridges (ie, switches between
bpe instances) to know all the addresses on all the networks.
|
|
|
|
|
|
|
|
|
| |
this will be mostly useful for virtual interfaces like vlan and
etherip, where they can bypass queueing on an ifq, and instead
encapsulate in on multiple cpus concurrently and push the packet
onto the next layer directly.
ok visa@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if if_output can be overridden on ethernet interfaces, it will allow
things like vlan to do it's packet encapsulation during output
before putting the packet directly on the underlying interface for
output.
this has two benefits. first, it can avoid having ether_output on
pseudo interfaces recurse, which makes profiling of the network
stack a lot clearer. secondly, and more importantly, it allows
pseudo ethernet interface packet encapsulation to by run concurrently
by the stack, rather than having packets unnecessarily serialied
by an ifq.
this diff just splits ether_output up, it doesnt have any interface
take advantage of it yet.
tweaks and ok claudio@
|
|
|
|
|
|
|
|
|
|
|
|
| |
if the mac address is not for the interface, it must be multicast
or broadcast. this is instead of if the packet is not
multicast/broadcast, it must be for the interface.
this allows ethernet interfaces to have multicast mac addresses
without having to special case it themselves. eg, carp load balancing
should become easier with this.
ok mpi@
|
|
|
|
| |
ok mpi@
|
|
|
|
|
|
| |
and return. Change sizeof(etherbroadcastaddr) to ETHER_ADDR_LEN
for consistency.
from Michele Curti
|
|
|
|
|
|
|
|
| |
the main change is to defer chopping the ethernet header off until the
ether_type is looked at. the main advantage of this is pppoe doesn't have
to reattach the ether header anymore, which simplifies the code a lot.
ok mpi@ visa@ bluhm@
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
the code was broken and noone noticed. this argues that we don't
need it.
ok mpi@
|
|
|
|
| |
OK claudio@ jca@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
rectification.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|