OpenBSD CVS

CVS log for src/sys/net/if_bpe.c


[BACK] Up to [local] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.22 / (download) - annotate - [select for diffs], Sat Dec 23 10:52:54 2023 UTC (5 months, 2 weeks ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

Backout always allocate per-CPU statistics counters for network
interface descriptor.  It panics during attach of em(4) device at
boot.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Dec 22 23:01:50 2023 UTC (5 months, 2 weeks ago) by mvs
Branch: MAIN
Changes since 1.20: +1 -2 lines
Diff to previous 1.20 (colored)

Always allocate per-CPU statistics counters for network interface
descriptor.

We have the mess in network interface statistics. Only pseudo drivers
do per-CPU counters allocation, all other network devices use the old
`if_data'. The network stack partially uses per-CPU counters and
partially use `if_data', but the protection is inconsistent: some times
counters accessed with exclusive netlock, some times with shared
netlock, some times with kernel lock, but without netlock, some times
with another locks.

To make network interfaces statistics more consistent, always allocate
per-CPU counters at interface attachment time and use it instead of
`if_data'. At this step only move counters allocation to the if_attach()
internals. The `if_data' removal will be performed with the following
diffs to make review and tests easier.

ok bluhm

Revision 1.20 / (download) - annotate - [select for diffs], Fri Oct 27 20:56:47 2023 UTC (7 months, 2 weeks ago) by jan
Branch: MAIN
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

Forward TCP LRO disabling to parent devices.

Also disable TCP LRO on bridged vlan(4) and default for bpe(4), nvgre(4) and
vxlan(4).

ok bluhm@

Revision 1.19 / (download) - annotate - [select for diffs], Mon Nov 8 04:54:44 2021 UTC (2 years, 7 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

whitespace tweak, no functional change

Revision 1.18 / (download) - annotate - [select for diffs], Fri Feb 26 01:28:51 2021 UTC (3 years, 3 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

use a uint64_t for the ethernet address in the etherbridge table.

testing has shown up to a 30% improvement in the veb forwarding
rate with this change.

an earlier diff was tested by hrvoje popovski
tested on amd64 and sparc64

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 24 02:04:03 2021 UTC (3 years, 3 months ago) by dlg
Branch: MAIN
Changes since 1.16: +52 -1 lines
Diff to previous 1.16 (colored)

add support for adding and deleting address table entries.

the guts of this are in the etherbridge code which i just added for
veb, so this code is very minimal. it's hard to use though cos
ifconfig doesnt (yet) know how to put ethernet addresses into the
"add address" ioctl.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Feb 21 03:35:17 2021 UTC (3 years, 3 months ago) by dlg
Branch: MAIN
Changes since 1.15: +124 -289 lines
Diff to previous 1.15 (colored)

cut bpe(4) over to using the common etherbridge code.

it's pretty straightforward since etherbridge was mostly based on
this code in the first place. the etherbridge_ops that bpe provides
to etherbridge set entries up to point at mac addresses in the
underlay network.

ok patrick@ jmatthew@

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jan 19 07:30:19 2021 UTC (3 years, 4 months ago) by mvs
Branch: MAIN
Changes since 1.14: +15 -8 lines
Diff to previous 1.14 (colored)

bpe(4): convert ifunit() to if_unit(9)

ok dlg@

Revision 1.14 / (download) - annotate - [select for diffs], Fri Aug 21 22:59:27 2020 UTC (3 years, 9 months ago) by kn
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.13: +1 -2 lines
Diff to previous 1.13 (colored)

Leave default ifq_maxlen handling to ifq_init()

Most clonable interface drivers (except bridge, enc, loop, pppx,
switch, trunk and vlan) initialise the send queue's length to IFQ_MAXLEN
during *_clone_create() even though ifq_init(), which is eventually called
through if_attach(), does the same.

Remove all early "ifq_set_maxlen(&ifq->if_snd, IFQ_MAXLEN);" lines to leave
it to ifq_init() and have clonable drivers a tad more in sync.

OK mvs

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jul 22 08:38:51 2020 UTC (3 years, 10 months ago) by dlg
Branch: MAIN
Changes since 1.12: +1 -3 lines
Diff to previous 1.12 (colored)

gc some ifmedia stuff that this driver doesnt use.

no functional change.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jul 10 13:26:41 2020 UTC (3 years, 11 months ago) by patrick
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.

ok dlg@ tobhe@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 24 22:03:43 2020 UTC (3 years, 11 months ago) by cheloha
Branch: MAIN
Changes since 1.10: +6 -6 lines
Diff to previous 1.10 (colored)

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t.  However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel.  Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Nov 7 07:36:31 2019 UTC (4 years, 7 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.9: +5 -5 lines
Diff to previous 1.9 (colored)

turn the linkstate hooks into a task list, like the detach hooks.

this is largely mechanical, except for carp. this moves the addition
of the carp link state hook after we're committed to using the new
interface as a carpdev. because the add can't fail, we avoid a
complicated unwind dance. also, this tweaks the carp linkstate hook
so it only updates the relevant carp interface, not all of the
carpdevs on the parent.

hrvoje popovski has tested an early version of this diff and it's
generally ok, but there's some splasserts that this diff fires that
i'll fix in an upcoming diff.

ok claudio@

Revision 1.9 / (download) - annotate - [select for diffs], Wed Nov 6 03:51:26 2019 UTC (4 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.8: +6 -5 lines
Diff to previous 1.8 (colored)

replace the hooks used with if_detachhooks with a task list.

the main semantic change is that things registering detach hooks
have to allocate and set a task structure that then gets added to
the list. this means if the task is allocated up front (eg, as part
of carps softc or bridges port structure), it avoids the possibility
that adding a hook can fail. a lot of drivers weren't checking for
failure, and unwinding state in the event of failure in other parts
was error prone.

while doing this i discovered that the list operations have to be
in a particular order, but drivers weren't doing that consistently
either. this diff wraps the list ops up so you have to seriously
go out of your way to screw them up.

ive also sprinkled some NET_ASSERT_LOCKED around the list operations
so we can make sure there's no potential for the list to be corrupted,
especially while it's being run.

hrvoje popovski has tested this a bit, and some issues he discovered
have been fixed.

ok sashan@

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jul 17 16:46:17 2019 UTC (4 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.7: +3 -7 lines
Diff to previous 1.7 (colored)

Introduce ETHER_IS_BROADCAST/ANYADDR/EQ() and use them where appropriate.

ok dlg@, sthen@, millert@

Revision 1.7 / (download) - annotate - [select for diffs], Tue May 21 10:11:10 2019 UTC (5 years ago) by dlg
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

init sc_rxhprio properly instead of sc_txhprio twice; CID 1480289

the cid thing was via jmatthew@

Revision 1.6 / (download) - annotate - [select for diffs], Tue May 21 10:08:13 2019 UTC (5 years ago) by dlg
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

don't fall through SIOCSVNETID into SIOCGVNETID; CID 1480290

the cid was via jmatthew@

Revision 1.5 / (download) - annotate - [select for diffs], Tue Apr 23 10:53:45 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.4: +3 -4 lines
Diff to previous 1.4 (colored)

a first cut at converting some virtual ethernet interfaces to if_vinput

this let's input processing bypass ifiqs. there's a performance
benefit from this, and it will let me tweak the backpressure detection
mechanism that ifiqs use without impacting on a stack of virtual
interfaces.

ive tested all of these except mpw, which i will end up testing
soon anyway.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Apr 19 07:39:37 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.3: +5 -14 lines
Diff to previous 1.3 (colored)

use the factored out txhprio and rxhprio checks

reduces code duplication and chance for error.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Apr 19 06:40:00 2019 UTC (5 years, 1 month ago) by dlg
Branch: MAIN
Changes since 1.2: +33 -1 lines
Diff to previous 1.2 (colored)

add rxprio support

this is modelled on vlan(4) where the packet prio is put in the bpe
header in tx, and the bpe header prio is put on the packet in rx.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jan 16 00:26:45 2019 UTC (5 years, 4 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

include pf.h for #if NPF > 0 test
ok patrick@ sashan@

Revision 1.1 / (download) - annotate - [select for diffs], Thu Dec 20 23:00:55 2018 UTC (5 years, 5 months ago) by dlg
Branch: MAIN

add bpe(4) or Backbone Provider Edge interfaces

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 form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.