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
glebius
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 35104
Build 32069: arc lint + arc unit

Event Timeline

lutz_donnerhacke.de added a reviewer: network.
lutz_donnerhacke.de edited the summary of this revision. (Show Details)
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
76

stray comma

93

stray comma

97

on -> on the

157

stray comma

253

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

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
224

Spurious whitespace on blank lines in a couple spots

228

The various case lines should line up with the switch

246

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

253

Indentation on this guy should be tabs all the way

362

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

415

Opening comment marker should rest on its own line

473

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.

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

gbe added a subscriber: gbe.

LGTM

LGTM.

share/man/man4/ng_vlan_rotate.4
2

The "All rights reserved." should be dropped.

sys/netgraph/ng_vlan_rotate.c
5

The "All rights reserved." should be dropped.

sys/netgraph/ng_vlan_rotate.h
5

The "All rights reserved." should be dropped.

afedorov added inline comments.
share/man/man4/ng_vlan_rotate.4
2

While we're here, maybe it should be added: "SPDX-License-Identifier: BSD-2-Clause-FreeBSD"

lutz_donnerhacke.de marked 3 inline comments as done.

Updated to latest revision and fixed copyright annotations.