Page MenuHomeFreeBSD

netgraph/ng_vlan_rotate: IEEE 802.1ad VLAN manipulation netgraph node type (new type)
Needs ReviewPublic

Authored by lutz_donnerhacke.de on Oct 18 2019, 1:50 PM.

Details

Reviewers
brueffer
julian
Group Reviewers
manpages
network
Summary

This node is part of an A10-NSP development.

Carrier networks tend to stack three or more tags for internal purposes and therefore hiding the service tags deep inside of the stack. When decomposing such an access network frame, the processing order is typically reversed: First distinguish by service, than by other means.

This new netgragh node allows to bring the relevant VLAN in front (to the out-most position). This way other netgraph nodes (like ng_vlan) can operate on this specific type.

Test Plan

The example section of the man page contains two examples, how to use this node.
It also contains the sniffer insight of the manipulation process.

Diff Detail

Repository
rS FreeBSD src repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29706
Build 27555: arc lint + arc unit

Event Timeline

lutz_donnerhacke.de edited the summary of this revision. (Show Details)Oct 18 2019, 1:54 PM
lutz_donnerhacke.de added a reviewer: network.
lutz_donnerhacke.de edited the summary of this revision. (Show Details)
brueffer requested changes to this revision.Oct 21 2019, 7:39 AM
brueffer added a subscriber: brueffer.

Minor notes on the manpage, that one looks good otherwise. Can't comment on the code.

share/man/man4/ng_vlan_rotate.4
77

stray comma

94

stray comma

98

on -> on the

158

stray comma

254

This can simply be ".Fx 12.1", we don't count prereleases, betas etc here.

This revision now requires changes to proceed.Oct 21 2019, 7:39 AM

Fixed manpage bugs.

lutz_donnerhacke.de marked 5 inline comments as done.Oct 21 2019, 8:04 AM

Update inline notes.

kevans added a subscriber: kevans.

Just some style nits, some of which are applicable in places other than just where I left them. Functionally, it appears to be OK, but adding Julian while I'm still diving into netgraph for bluetooth bits.

sys/netgraph/ng_vlan_rotate.c
225

Spurious whitespace on blank lines in a couple spots

229

The various case lines should line up with the switch

247

Space between if and opening paren, error assignments should move to the next line

254

Indentation on this guy should be tabs all the way

363

We don't traditionally space assignments out like this, but I don't know that anyone's going to hassle over it.

416

Opening comment marker should rest on its own line

474

Operator belongs to the line before it, with the wrapping starting just after.

Run indent(1) on the source files.
Reduced comments from the boilerplate.
Changed hard coded ethertypes by global definitions introduced by D21846.

lutz_donnerhacke.de marked 7 inline comments as done.Jan 4 2020, 9:12 PM

Rebase to r357812

rebase to r358008.

Updated to revision 358170.

Updated to revision 358500.

We are going to hard production now.
Any interest in reviewing it?

@brueffer Are your concerns resolved?