OpenBSD CVS

CVS log for src/sys/net/Attic/switchctl.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24, Thu Nov 11 10:03:10 2021 UTC (2 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +1 -1 lines
FILE REMOVED

Retire switch(4) it never really was production ready and the OpenFlow
API implemented is a deadend.
OK akoshibe@ yasuoka@ deraadt@ kn@ patrick@ sthen@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Dec 25 12:59:53 2020 UTC (3 years, 5 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

Refactor klist insertion and removal

Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.

Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.

OK mpi@

Revision 1.22 / (download) - annotate - [select for diffs], Sat Dec 12 11:49:02 2020 UTC (3 years, 5 months ago) by jan
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.

OK dlg@, bluhm@
No Opinion mpi@
Not against it claudio@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 7 13:27:52 2020 UTC (4 years, 2 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

Abstract the head of knote lists. This allows extending the lists,
for example, with locking assertions.

OK mpi@, anton@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Feb 20 16:56:52 2020 UTC (4 years, 3 months ago) by visa
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

Replace field f_isfd with field f_flags in struct filterops to allow
adding more filter properties without cluttering the struct.

OK mpi@, anton@

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jan 28 16:26:09 2020 UTC (4 years, 4 months ago) by visa
Branch: MAIN
Changes since 1.18: +1 -12 lines
Diff to previous 1.18 (colored)

Simplify filterops routines where klist_invalidate() is used.
klist_invalidate() detaches knotes from the list and rewires them
synchronously so that the original filterops routines do not get
called after the invalidation.

OK anton@, mpi@

Revision 1.18 / (download) - annotate - [select for diffs], Tue Dec 31 13:48:32 2019 UTC (4 years, 5 months ago) by visa
Branch: MAIN
Changes since 1.17: +12 -5 lines
Diff to previous 1.17 (colored)

Use C99 designated initializers with struct filterops. In addition,
make the structs const so that the data are put in .rodata.

OK mpi@, deraadt@, anton@, bluhm@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Dec 19 12:04:38 2019 UTC (4 years, 5 months ago) by reyk
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

poll handlers must return a poll(2) revents value, not errno(2) values.

Some drivers have returned ENXIO (6) if the device is not available
which incorrectly translates into POLLPRI|POLLOUT (2|4) in userland.

Change it to POLLERR for now, but it might as well be POLLHUP.

OK mpi@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Oct 16 10:20:48 2019 UTC (4 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

tsleep(9) -> tsleep_nsec(9)

ok cheloha@, visa@, akoshibe@

Revision 1.15 / (download) - annotate - [select for diffs], Sun May 12 16:38:02 2019 UTC (5 years, 1 month ago) by sashan
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.14: +1 -3 lines
Diff to previous 1.14 (colored)

pushing NET_LOCK() further down from if_clone_{create,destroy}()

OK mpi@

Revision 1.14 / (download) - annotate - [select for diffs], Fri Dec 28 14:32:47 2018 UTC (5 years, 5 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.13: +4 -2 lines
Diff to previous 1.13 (colored)

Fix mbuf releated crashes in switch(4).  They have been found by
syzkaller as pool corruption panic.  It is unclear which bug caused
what, but it should be better now.
- Check M_PKTHDR with assertion before accessing m_pkthdr.
- Do not access oh_length without m_pullup().
- After checking if there is space at the end of the mbuf, don't
  overwrite the data at the beginning.  Append the new content.
- Do not set m_len and m_pkthdr.len when it is unclear whether
  the ofp_error header fits at all.  Use m_makespace() to adjust
  the mbuf.
Reported-by: syzbot+6efc0a9d5b700b54392e@syzkaller.appspotmail.com
test akoshibe@; OK claudio@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 9 14:14:31 2018 UTC (5 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

M_LEADINGSPACE() and M_TRAILINGSPACE() are just wrappers for
m_leadingspace() and m_trailingspace(). Convert all callers to call
directly the functions and remove the defines.
OK krw@, mpi@

Revision 1.12 / (download) - annotate - [select for diffs], Fri Aug 11 21:24:19 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Remove NET_LOCK()'s argument.

Tested by Hrvoje Popovski, ok bluhm@

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jan 16 11:25:14 2017 UTC (7 years, 4 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Fix declaration: vsw_dev2sc has been renamed to switch_dev2sc.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Dec 22 15:06:47 2016 UTC (7 years, 5 months ago) by mikeb
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Grab the netlock when device is opened;  ok mpi, rzalamena

Revision 1.9 / (download) - annotate - [select for diffs], Mon Dec 12 09:51:30 2016 UTC (7 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.8: +6 -3 lines
Diff to previous 1.8 (colored)

Remove most of the splsoftnet() recursions related to cloned interfaces.

inputs and ok bluhm@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 11 16:19:09 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.7: +1 -10 lines
Diff to previous 1.7 (colored)

Remove mutexes protection from the switchctl as they don't seem to be
doing anything for us, and remove some whitespaces from the header that
can be found near the removed lines.

ok mikeb@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Nov 10 17:32:40 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.6: +81 -24 lines
Diff to previous 1.6 (colored)

Add support for partial writes in switchwrite so we can use multiple
write() to write one packet. With this we also get support for writing
multiple ofp packets with a single write.

ok mikeb@

Revision 1.6 / (download) - annotate - [select for diffs], Wed Nov 9 12:26:55 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.5: +25 -23 lines
Diff to previous 1.5 (colored)

Simplify the switchread loop and fix the case where only first mbuf in
the chain was being read. While here rename mbuf variable and remove
unused ones.

ok mikeb@

Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 8 19:11:57 2016 UTC (7 years, 7 months ago) by rzalamena
Branch: MAIN
Changes since 1.4: +37 -7 lines
Diff to previous 1.4 (colored)

Teach switch(4) device read(2) operations to behave like a stream socket,
so the userland programs can use it without having to do any special
treatment (e.g. having to read() whole packets with just 1 call or lose it).
This also allows userland to read more than one ofp header/payload with one
syscall.

ok mikeb@

Revision 1.4 / (download) - annotate - [select for diffs], Sun Sep 4 15:46:39 2016 UTC (7 years, 9 months ago) by reyk
Branch: MAIN
Changes since 1.3: +5 -2 lines
Diff to previous 1.3 (colored)

When auto-creating an interface when opening a /dev/{tun,tap,switch}
device, inherit the rdomain from the calling process.  This adds an
rdomain argument to if_clone_create().

OK mpi@ henning@

Revision 1.3 / (download) - annotate - [select for diffs], Sun Sep 4 08:26:48 2016 UTC (7 years, 9 months ago) by yasuoka
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

Do "goto failed" in case returning EAGAIN as well.

ok goda

Revision 1.2 / (download) - annotate - [select for diffs], Sat Sep 3 18:33:55 2016 UTC (7 years, 9 months ago) by goda
Branch: MAIN
Changes since 1.1: +25 -8 lines
Diff to previous 1.1 (colored)

Fixed missing null check in switchctl.c

ok yasuoka@

Revision 1.1 / (download) - annotate - [select for diffs], Thu Sep 1 10:06:33 2016 UTC (7 years, 9 months ago) by goda
Branch: MAIN

Import switch(4), an in-kernel OpenFlow switch which can work alone.
switch(4) currently supports OpenFlow 1.3.5.
Currently, it's disabled by the kernel config.

With help from yasuoka@ reyk@ jsg@.

ok deraadt@ yasuoka@ reyk@ henning@

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.