History log of /dragonfly/sys/netgraph/iface/ng_iface.c (Results 1 – 25 of 36)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b272101a 30-Oct-2023 Aaron LI <aly@aaronly.me>

Various minor whitespace cleanups

Accumulated along the way.


# 3bd69058 15-Nov-2023 Aaron LI <aly@aaronly.me>

Use sizeof(uint32_t) for bpfattach(DLT_NULL) for clarity

The DLT_NULL link-layer header is a 4-byte field in host byte order. So
use 'sizeof(uint32_t)' instead of 'sizeof(u_int)' to make it clear.


Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, 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, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, 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, v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4, v4.0.3, 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
# 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 ...


# 811e811b 20-Apr-2014 Sascha Wildner <saw@online.de>

Remove some XEROX Network Systems (NS) protocol remains.

We removed most of it in 2011 (62b5ec1d702a90f4c4f06347b3ad258a29ff8929).


Revision tags: v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0, v3.4.3
# 0ab80df8 07-Jul-2013 Sascha Wildner <saw@online.de>

kernel/net*: Remove some #include duplicates.


Revision tags: v3.4.2
# dfc385dd 27-Apr-2013 Sascha Wildner <saw@online.de>

kernel/ng_iface: Add missing braces.


Revision tags: v3.4.0, v3.4.1, v3.4.0rc, v3.5.0
# bfefe4a6 15-Mar-2013 Sepherosa Ziehau <sephe@dragonflybsd.org>

ifsq: Let ifaltq_subque know its related hardware TX queue's serializer

This avoids following operations on packet transmission hot path:
- Dereferening device driver supplied serialize function poi

ifsq: Let ifaltq_subque know its related hardware TX queue's serializer

This avoids following operations on packet transmission hot path:
- Dereferening device driver supplied serialize function pointers
- Locating hardware TX queue's serializer

Comparing to the lwkt_serialize functions, the above two operations are
costful.

Driver changes:
- For device drivers which use the default ifnet serializer, no additional
code will be needed, if_attach() will assign ifnet serializer to
ifaltq_subque.
- For device drivers which use independent serializers for main function,
RX queues and TX queues, ifsq_set_hw_serialize() must be called to
properly assign the hardware TX queue's serializer to ifaltq_subque.
Drivers in this category are bce(4), emx(4), igb(4) and jme(4).

show more ...


# d40991ef 13-Feb-2013 Sepherosa Ziehau <sephe@dragonflybsd.org>

if: Per-cpu ifnet/ifaddr statistics, step 1/3

Wrap ifnet/ifaddr stats updating, setting and extraction into macros;
ease upcoming changes.


# 3c4cd924 13-Jan-2013 Sepherosa Ziehau <sephe@dragonflybsd.org>

if: Multiple TX queue support step 2 of many

ifnet_{serialize,deserialize,tryserialize}_tx and hardware TX serializer
asserion macros now require subqueue, so the proper hardware TX queue's
serializ

if: Multiple TX queue support step 2 of many

ifnet_{serialize,deserialize,tryserialize}_tx and hardware TX serializer
asserion macros now require subqueue, so the proper hardware TX queue's
serializer could be held, released and asserted.

show more ...


# f0a26983 11-Jan-2013 Sepherosa Ziehau <sephe@dragonflybsd.org>

if: Multiple TX queue support step 1 of many; introduce ifaltq subqueue

Put the plain queue information, e.g. queue header and tail, serializer,
packet staging scoreboard and ifnet.if_start schedule

if: Multiple TX queue support step 1 of many; introduce ifaltq subqueue

Put the plain queue information, e.g. queue header and tail, serializer,
packet staging scoreboard and ifnet.if_start schedule netmsg etc. into
its own structure (subqueue). ifaltq structure could have multiple of
subqueues based on the count that drivers can specify.

Subqueue's enqueue, dequeue, purging and states updating are protected
by the subqueue's serializer, so for hardwares supporting multiple TX
queues, contention on queuing operation could be greatly reduced.

The subqueue is passed to if_start to let the driver know which hardware
TX queue to work on. Only the related driver's TX queue serializer will
be held, so for hardwares supporting multiple TX queues, contention on
driver's TX queue serializer could be greatly reduced.

Bunch of ifsq_ prefixed functions are added, which is used to perform
various operations on subqueues. Commonly used ifq_ prefixed functions
are still kept mainly for the drivers which do not support multiple TX
queues (well, these functions also ease the netif/ convertion in this
step :).

All of the pseudo network devices under sys/net are converted to use the
new subqueue operation. netproto/802_11 is converted too. igb(4) is
converted to use the new subqueue operation, the rest of the network
drivers are only changed for the if_start interface modification.

For ALTQs which have packet scheduler enabled, only the first subqueue
is used (*).

(*) Whether we should utilize multiple TX queues if ALTQ's packet scheduler
is enabled is quite questionable. Mainly because hardware's multiple TX
queue packet dequeue mechanism could have negative impact on ALTQ's packet
scheduler's decision.

show more ...


# 9ed293e0 28-Dec-2012 Sepherosa Ziehau <sephe@dragonflybsd.org>

if: Move IFF_OACTIVE bit into ifaltq; prepare multiple TX queues support

ifaltq.altq_hw_oactive is now used to record that NIC's TX queue is full.
IFF_OACTIVE is removed from kernel. User space IFF

if: Move IFF_OACTIVE bit into ifaltq; prepare multiple TX queues support

ifaltq.altq_hw_oactive is now used to record that NIC's TX queue is full.
IFF_OACTIVE is removed from kernel. User space IFF_OACTIVE is kept for
compability.

ifaltq.altq_hw_oactive should not be accessed directly. Following set of
functions are provided and should be used:
ifq_is_oactive(ifnet.if_snd) - Whether NIC's TX queue is full or not
ifq_set_oactive(ifnet.if_snd) - NIC's TX queue is full
ifq_clr_oactive(ifnet.if_snd) - NIC's TX queue is no longer full

show more ...


# ef9870ec 27-Dec-2012 Sepherosa Ziehau <sephe@dragonflybsd.org>

ifq: Use ifq_set_maxlen for ifnet.if_snd


Revision tags: v3.2.2
# fda7d388 29-Nov-2012 Sepherosa Ziehau <sephe@dragonflybsd.org>

bpf: Use bpf global token instead mplock to protect bpf stuffs

Submitted-by: tuxillo@ w/ modification


Revision tags: v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0
# 884717e1 06-Dec-2011 Sascha Wildner <saw@online.de>

kernel: Replace all usage of MALLOC()/FREE() with kmalloc()/kfree().


# b370aff7 04-Dec-2011 Sascha Wildner <saw@online.de>

kernel: Use NELEM() in some more places.


# 86d7f5d3 26-Nov-2011 John Marino <draco@marino.st>

Initial import of binutils 2.22 on the new vendor branch

Future versions of binutils will also reside on this branch rather
than continuing to create new binutils branches for each new version.


# d22a69a4 11-Nov-2011 Sascha Wildner <saw@online.de>

Nuke AppleTalk support.

It has been broken for a while, too.

Various bits and pieces still remain, mainly in documentation, which
I'll mop up on the weekend.

I hope I haven't cut too deep but I do

Nuke AppleTalk support.

It has been broken for a while, too.

Various bits and pieces still remain, mainly in documentation, which
I'll mop up on the weekend.

I hope I haven't cut too deep but I don't think so.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2169>

show more ...


Revision tags: v2.12.0, v2.13.0
# db11cb20 07-Aug-2011 Sascha Wildner <saw@online.de>

Move static & inline to the beginnings of declarations.


Revision tags: v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0, v2.3.2, v2.3.1, v2.2.1
# a3dd34d2 05-Apr-2009 Sepherosa Ziehau <sephe@dragonflybsd.org>

Split ifnet serialize step 1/many: Add if_{serialize,deserialize,tryserialize}()
function pointers to ifnet.

These three function pointers accept ifnet struct and ifnet_serialize
enumeration.

The i

Split ifnet serialize step 1/many: Add if_{serialize,deserialize,tryserialize}()
function pointers to ifnet.

These three function pointers accept ifnet struct and ifnet_serialize
enumeration.

The ifnet_serialize enumeration indicates the serialization type:
IFNET_SERIALIZE_ALL:
All of the serializers should be held. Except for if_start and if_input,
this enumeration must be used when call ifnet function pointers.
IFNET_SERIALIZE_TX:
Only transmit serializer should be held. This enumeration could be used
when calling ifnet.if_start.
IFNET_SERIALIZE_RX:
Only receive serializer should be held. This enumeration could be used
when calling ifnet.if_input.

If the NIC driver does not set these three function pointer, then if_attach()
will set them to the default ones: only one serializer (if_serializer) is used
and ifnet_serialize parameter is ignored.

Following several inline functions are added which are sheer wrappers of the
three ifnet serialize function pointers:
ifnet_serialize_{all,tx,rx}()
ifnet_deserialize_{all,tx,rx}()
ifnet_tryserialize_{all,tx,rx}()

All of the protocol layers and most of the pseudo drivers are converted.

Discussed-with: dillon@

show more ...


Revision tags: v2.2.0, v2.3.0, v2.1.1, v2.0.1
# 9db4b353 14-May-2008 Sepherosa Ziehau <sephe@dragonflybsd.org>

Reduce ifnet.if_serializer contention on output path:
- Push ifnet.if_serializer holding down into each ifnet.if_output implementation
- Add a serializer into ifaltq, which is used to protect send qu

Reduce ifnet.if_serializer contention on output path:
- Push ifnet.if_serializer holding down into each ifnet.if_output implementation
- Add a serializer into ifaltq, which is used to protect send queue instead of
its parent's if_serializer. This change has following implication:
o On output path, enqueueing packets and calling ifnet.if_start are decoupled
o In device drivers, poll->dev_encap_ok->dequeue operation sequence is no
longer safe, instead dequeue->dev_encap_fail->prepend should be used
This serializer will be held by using lwkt_serialize_adaptive_enter()
- Add altq_started field into ifaltq, which is used to interlock the calling
of its parent's if_start, to reduce ifnet.if_serializer contention.
if_devstart(), a helper function which utilizes ifaltq.altq_started, is added
to reduce code duplication in ethernet device drivers.
- Add if_cpuid into ifnet. This field indicates on which CPU device driver's
interrupt will happen.
- Add ifq_dispatch(). This function will try to hold ifnet.if_serializer in
order to call ifnet.if_start. If this attempt fails, this function will
schedule ifnet.if_start to be called on CPU located by ifnet.if_start_cpuid
if_start_nmsg, which is per-CPU netmsg, is added to ifnet to facilitate
ifnet.if_start scheduling. ifq_dispatch() is called by ether_output_frame()
currently
- Use ifq_classic_ functions, if altq is not enabled
- Fix various device drivers bugs in their if_start implementation
- Add ktr for ifq classic enqueue and dequeue
- Add ktr for ifnet.if_start

show more ...


# b2632176 07-Mar-2008 Sepherosa Ziehau <sephe@dragonflybsd.org>

Parallelize ifnet.if_addrhead accessing by duplicating the list itself
on each CPU, each list element points to ifaddr:
- Add SI_SUB_PRE_DRIVERS before SI_SUB_DRIVERS, so action could be taken
befo

Parallelize ifnet.if_addrhead accessing by duplicating the list itself
on each CPU, each list element points to ifaddr:
- Add SI_SUB_PRE_DRIVERS before SI_SUB_DRIVERS, so action could be taken
before drivers' initialization (mainly before NIC driver's if_attach())
- Move netisr_init() to the FIRST of SI_SUB_PRE_DRIVERS, so that
netmsg_service_port_init() could be called in earlier stage of system
initialization.
- Create one thread on each CPU to propagate changes to ifnet.if_addrhead.
Their thread ports are registered with netmsg_service_port_init() for
port syncing operation.
- Change to ifnet.if_addrhead begins in netisr0, i.e. serial of changes
to ifnet.if_addrhead are serialized by netisr0
- ifaddr's refcnt is moved to its list elements, i.e. per-CPU refcnt.
They are initialized to 1 instead of 0.
- A magic field is added to ifaddr list element to make sure that IFAREF
and IFAFREE are called on valid ifaddr list element. This field is
initialized to a magic value and is wiped out once the list element's
refcnt drops to 0
- To close the gap between testing and freeing, once the ifaddr list
element's refcnt drops to 0, ifa_portfn(0) (a thread's port on CPU0) is
poked to check whether ifaddr is referenced on other CPUs, if not, then
ifaddr is freed on ifa_portfn(0)

Reviewed-by: dillon@ (earlier version)

show more ...


# e7b4468c 05-Jan-2008 Sascha Wildner <swildner@dragonflybsd.org>

For kmalloc(), MALLOC() and contigmalloc(), use M_ZERO instead of
explicitly bzero()ing.

Reviewed-by: sephe


# 4b1cf444 22-Dec-2006 Sascha Wildner <swildner@dragonflybsd.org>

Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).


# 78195a76 28-Nov-2005 Matthew Dillon <dillon@dragonflybsd.org>

Make all network interrupt service routines MPSAFE part 1/3.

Replace the critical section that was previously used to serialize access
with the LWKT serializer. Integrate the serializer into the IF

Make all network interrupt service routines MPSAFE part 1/3.

Replace the critical section that was previously used to serialize access
with the LWKT serializer. Integrate the serializer into the IFNET structure.
Note that kern.intr_mpsafe must be set to 1 for network interrupts to actually
run MPSAFE. Also note that any interrupts shared with othre non-MP drivers
will cause all drivers on that interrupt to run with the Big Giant Lock.

Network interrupt - Each network driver then simply passes that serializer
to bus_setup_intr() so only a single serializer is required to process the
entire interrupt path. LWKT serialization support is already 100% integrated
into the interrupt subsystem so it will already be held as of when the
registered interrupt procedure is called.

Ioctl and if_* functions - All callers of if_* functions (such as if_start,
if_ioctl, etc) now obtain the IFNET serializer before making the call. Thus
all of these entry points into the driver will now be serialized.

if_input - All code that calls if_input now ensures that the serializer
is held. It will either already be held (when called from a driver), or
the serializer will be wrapped around the call. When packets are forwarded
or bridged between interfaces, the target interface serializer will be
dropped temporarily to avoid a deadlock.

Device Driver access - dev_* entry points into certain pseudo-network
devices now obtain and release the serializer. This had to be done on
a device-by-device basis (but there are only a few such devices).

Thanks to several people for helping test the patch, in particular
Sepherosa Ziehau.

show more ...


# 41e90fed 02-Jun-2005 Sascha Wildner <swildner@dragonflybsd.org>

Remove spl*() calls in netgraph and replace them with critical sections.


12