History log of /dragonfly/sys/net/if_ethersubr.c (Results 1 – 25 of 187)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 7485684f 03-Mar-2024 Aaron LI <aly@aaronly.me>

Whitespace cleanups


# 91edeaed 15-Feb-2023 Matthew Dillon <dillon@apollo.backplane.com>

vlan - syntax / cleanup

* Simple cleanups, but also make sure vlantrunks is zero'd when
allocated.


# d21ca33b 02-Feb-2023 Matthew Dillon <dillon@apollo.backplane.com>

net - Fix vlan input packet processing w/ if_bridge, if_carp, etc

* if_bridge does not understand VLAN-tagged packets, do not try to
bridge such packets from the primary interface. If the user wa

net - Fix vlan input packet processing w/ if_bridge, if_carp, etc

* if_bridge does not understand VLAN-tagged packets, do not try to
bridge such packets from the primary interface. If the user wants
to bridge such packets it can be done via the virtual vlan interface
and the vlan tag can be regenerated (or not) with appropriate bridge
groupings.

This was causing unicast vlan packets to be discarded in the bridge code.

* Unicast VLAN-tagged packets were not being properly bpf tapped on the
virtual vlan interface.

* Carp should operate on vlan interfaces, not the original interface, when
presented with a VLAN-tagged packet.

* Fix all of this by having ether_input_oncpu() bypass more or less directly
to ether_demux_oncpu() when a M_VLANTAG packet is encountered. What will
happen is that if_vlan will issue ether_reinput_oncpu() from the
appropriate virtual vlan interface, which ultimately re-enters
ether_input_oncpu() without the tag.

This is more along the lines of how we want vlans to be treated. They
really are supposed to be virtual LANs.

show more ...


Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.2.0, v6.3.0
# 7195ced1 31-Dec-2021 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Add SIOCGHWADDR, fix SIOCGIFADDR

* Add SIOCGHWADDR, this is more commonly used to obtain the
ether mac address of an interface these days.

* Fix SIOCGIFADDR which had a security problem

kernel - Add SIOCGHWADDR, fix SIOCGIFADDR

* Add SIOCGHWADDR, this is more commonly used to obtain the
ether mac address of an interface these days.

* Fix SIOCGIFADDR which had a security problem with a data field.

show more ...


Revision tags: v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0
# 91d9f448 09-Mar-2021 Sepherosa Ziehau <sephe@dragonflybsd.org>

ethernet: Add AF_ARP support.

Bump __DragonFly_version.

Submitted-by: dillon@ (minor changes from me)
Obtained-from: NetBSD


Revision tags: v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3
# 38ed05d2 11-Sep-2019 Roy Marples <roy@marples.name>

inet6: Introduce nd6_resolve, the mirror of arpresolve

nd6_output now just sends the packet, nd6_resolve handles the NUD
that nd6_output used to. nd6_resolve also returns sensible errors,
but we mas

inet6: Introduce nd6_resolve, the mirror of arpresolve

nd6_output now just sends the packet, nd6_resolve handles the NUD
that nd6_output used to. nd6_resolve also returns sensible errors,
but we mask out EWOULDBLOCK in the callers.

There is no longer a need for nd6_storelladdr and this makes the
code a lot easier to follow.

Heavily inspired by FreeBSD/Git 49332534.

show more ...


# e8e02c5a 09-Sep-2019 Roy Marples <roy@marples.name>

inet: return EHOSTDOWN if we cannot resolve an address in time

This allows programs to make informed decisions about what to do
if anything goes wrong trying to resolve the address.

For example, pi

inet: return EHOSTDOWN if we cannot resolve an address in time

This allows programs to make informed decisions about what to do
if anything goes wrong trying to resolve the address.

For example, ping(8) now reports sendto: Host is down, which is
more useful than not reporting anything.

Taken-from: NetBSD

show more ...


Revision tags: v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2
# e622598e 30-Sep-2017 Sepherosa Ziehau <sephe@dragonflybsd.org>

ipfw: Implement state based "redirect", i.e. without using libalias.

Redirection creates two states, i.e. one before the translation (xlat0)
and one after the translation (xlat1). If the hash of th

ipfw: Implement state based "redirect", i.e. without using libalias.

Redirection creates two states, i.e. one before the translation (xlat0)
and one after the translation (xlat1). If the hash of the translated
packet indicates that it is owned by a remote CPU:
- If the packet triggers the state pair creation, the 'xlat1' will be
piggybacked by the translated packet, which will be forwarded to the
remote CPU for further evalution. And the 'xlat1' will be installed
on the remote CPU before the evalution of the translated packet.
- Else only the translated packet will be forwarded to the remote CPU
for further evalution.

The 'xlat1' is called the slave state, which will be deleted only when
the 'xlat0' (the master state) is deleted. The state pair is always
deleted on the CPU owning the 'xlat1'; the 'xlat0' will be forwarded
there.

The reference counting of the state pair is maintained independently
in each state, the memory of the state pair will be freed only after
the sum of the counter in each state reaches 0. This avoids expensive
per-packet atomic ops.

As far as I have tested, this implementation of "redirect" does _not_
introduce any noticeable performance reduction, latency increasing or
latency destability.

This commit makes most of the necessary bits for NAT ready too.

show more ...


Revision tags: v5.1.0, v5.0.0rc1
# 87170528 25-Sep-2017 Sepherosa Ziehau <sephe@dragonflybsd.org>

ethernet: Restructure vlan check.


# 8d0afa86 23-Sep-2017 Sepherosa Ziehau <sephe@dragonflybsd.org>

polling: Implement direct input support.

When "direct input" is enabled by driver, driver's RX polling handler
will run ethernet/ip/tcp processing directly, which avoids cache-miss
on mbufs themselv

polling: Implement direct input support.

When "direct input" is enabled by driver, driver's RX polling handler
will run ethernet/ip/tcp processing directly, which avoids cache-miss
on mbufs themselves. Currently it is enabled on ix(4) by default.

The normal IP forwarding performance is improved by %12, while the fast
IP forwarding performance is improved by 10%. 13.2Mpps is achieved for
dual side IP forwarding!

1 request/connection HTTP/1.1 performance and avg-latency stay same,
but the latency is further stablized:
1K 5.20ms -> 4.60ms
8K 6.43ms -> 5.76ms
16K 16.30ms -> 14.90ms

show more ...


# 6998b243 16-Sep-2017 Sepherosa Ziehau <sephe@dragonflybsd.org>

ipfw: Add defrag action.

IP fragment reassembling is almost required for stateful firewall,
and will be needed for in-kernel NAT.

NOTE: Reassemabled IP packets will be passed to the next rule for
f

ipfw: Add defrag action.

IP fragment reassembling is almost required for stateful firewall,
and will be needed for in-kernel NAT.

NOTE: Reassemabled IP packets will be passed to the next rule for
further evaluation.

show more ...


# b089787f 16-Sep-2017 Sepherosa Ziehau <sephe@dragonflybsd.org>

dummynet: Don't deliver freed mbuf to callers.


# af1cde64 11-Aug-2017 Sepherosa Ziehau <sephe@dragonflybsd.org>

ethernet: ether_output should only run in the first netisr_ncpus netisrs


Revision tags: v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc
# a9821961 12-Feb-2017 Sepherosa Ziehau <sephe@dragonflybsd.org>

net: Make sure that local variable is really used.


Revision tags: v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc
# c660ad18 10-Sep-2015 Sascha Wildner <saw@online.de>

kernel/net: Change function definitions to static (to match declaration).


Revision tags: v4.2.4, v4.3.1
# ae6d2ace 25-Jul-2015 Sepherosa Ziehau <sephe@dragonflybsd.org>

ifnet: Allow drivers to adjust mbuf cluster/jcluster limits

This is mainly for raising mbuf clusters/jclusters limits to a high
enough value for device reception queues, e.g. modern network devices

ifnet: Allow drivers to adjust mbuf cluster/jcluster limits

This is mainly for raising mbuf clusters/jclusters limits to a high
enough value for device reception queues, e.g. modern network devices
w/ multiple reception queues and each reception queue could consume
>=512 mbuf clusters.

show more ...


Revision tags: v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5
# 6a03354e 12-Mar-2015 Matthew Dillon <dillon@apollo.backplane.com>

ipfw2 - Rename FreeBSD ipfw port to ipfw3

* Rename all elements of the port to ipfw3 to reduce confusion.


Revision tags: v4.0.4
# 5d45c610 25-Feb-2015 Bill Yuan <bycn82@gmail.com>

allow layer2 filtering on ipfw2 when net.link.ether.ipfw=1


# b5523eac 19-Feb-2015 Sascha Wildner <saw@online.de>

kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.

The main reason is that our having to use the MB_WAIT and MB_DONTWAIT
flags was a recurring issue when porting drivers from FreeBSD

kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.

The main reason is that our having to use the MB_WAIT and MB_DONTWAIT
flags was a recurring issue when porting drivers from FreeBSD because
it tended to get forgotten and the code would compile anyway with the
wrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflags
for an objcache_get() or objcache_reclaimlist call (which use M_WAITOK
and M_NOWAIT), it was just one big converting back and forth with some
sanitization in between.

This commit allows M_* again for the mbuf functions and keeps the
sanitizing as it was before: when M_WAITOK is among the passed flags,
objcache functions will be called with M_WAITOK and when it is absent,
they will be called with M_NOWAIT. All other flags are scrubbed by the
MB_OCFLAG() macro which does the same as the former MBTOM().

Approved-by: dillon

show more ...


Revision tags: v4.0.3
# 25407a1e 06-Jan-2015 Sascha Wildner <saw@online.de>

kernel/if_ethersubr.c: Fix -Wundef.


Revision tags: v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1
# 50b1e235 22-Nov-2013 Markus Pfeiffer <markus.pfeiffer@morphism.de>

net: import FreeBSD's if_lagg


# 376a6a2a 29-Jun-2014 Franco Fichtner <franco@lastsummer.de>

kernel: remove layer of indirection for ether_input()

Mop up after the recent changes by pulling the old switcheroo
on ether_input_pkt(), effectively renaming the function to
ether_input(). Also up

kernel: remove layer of indirection for ether_input()

Mop up after the recent changes by pulling the old switcheroo
on ether_input_pkt(), effectively renaming the function to
ether_input(). Also updates comments accordingly.

show more ...


# 73029d08 29-Jun-2014 Franco Fichtner <franco@lastsummer.de>

kernel: make pktinfo and cpuid native to ip_input()

In order to remove ether_input_pkt(), switch the prototype
of if_input() and adjust all callers. While there, consolidate
the style of the invoke

kernel: make pktinfo and cpuid native to ip_input()

In order to remove ether_input_pkt(), switch the prototype
of if_input() and adjust all callers. While there, consolidate
the style of the invoke.

Suggested and reviewed by: sephe

show more ...


# 6f25d555 20-Apr-2014 Sascha Wildner <saw@online.de>

Remove support for the IPX and NCP protocols, and for NWFS.

This was on the list for a longer time now. FreeBSD removed it
recently, too. Their commit msg has some more info:

"IPX was a network tra

Remove support for the IPX and NCP protocols, and for NWFS.

This was on the list for a longer time now. FreeBSD removed it
recently, too. Their commit msg has some more info:

"IPX was a network transport protocol in Novell's NetWare network
operating system from late 80s and then 90s. The NetWare itself
switched to TCP/IP as default transport in 1998. Later, in this
century the Novell Open Enterprise Server became successor of
Novell NetWare. The last release that claimed to still support
IPX was OES 2 in 2007. Routing equipment vendors (e.g. Cisco)
discontinued support for IPX in 2011."

The commit removes support for NCP (NetWare Core Protocol) and
NWFS (NetWare File System) along with it (both gone from FreeBSD
too since a while).

show more ...


# ff37a356 09-Mar-2014 Sepherosa Ziehau <sephe@dragonflybsd.org>

ethernet: If caller thread cpu is fixed, pass cpuid to ether_input_pkt()

So we could use optimized lwkt_sendmsg_oncpu() instead of lwkt_sendmsg(),
if the target netisr is on the same cpu as caller t

ethernet: If caller thread cpu is fixed, pass cpuid to ether_input_pkt()

So we could use optimized lwkt_sendmsg_oncpu() instead of lwkt_sendmsg(),
if the target netisr is on the same cpu as caller thread cpu. Mainly to
avoid unnecessary wakeup() IPIs to other cpus.

THE RESULT:

On i7-3770 w/ HT enabled (8 logical cpus); NIC is 82599ES w/ 8 RX rings
and 8 TX rings. Run:
repeat 10 tcp_stream -H ... -i 256 -l 10 -r
(256 netperf TCP_MAERTS instances for 10 seconds, 10 rounds)

Total amount of cross IPIs before this commit is 6946097. Total amount
of cross IPIs as of this commit is 5445324. ~22% unnecessary wakeup()
IPIs are avoided!

show more ...


12345678