cxgbetool(8): The VLAN tag provided in the action for a filter must be prefixed

with either '=' or '+'.  Fix the description of the parameter in the man page
while here.

Approved by:	re@ (kib@)
Sponsored by:	Chelsio Communications
This commit is contained in:
np 2018-09-21 23:48:40 +00:00
parent f9be2a2d63
commit 1ea393c373
2 changed files with 5 additions and 12 deletions

View File

@ -31,7 +31,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd Sep 18, 2018 .Dd Sep 21, 2018
.Dt CXGBETOOL 8 .Dt CXGBETOOL 8
.Os .Os
.Sh NAME .Sh NAME
@ -450,11 +450,11 @@ eport.
.It Cm vlan .It Cm vlan
Insert, remove, or rewrite the VLAN tag before switching the packet out of Insert, remove, or rewrite the VLAN tag before switching the packet out of
eport. eport.
.Cm vlan=none .Cm none
removes the tag, removes the tag,
.Cm vlan= Ns Ar tag .Cm = Ns Ar tag
replaces the existing tag with the one provided, and replaces the existing tag with the one provided, and
.Cm vlan=+ Ns Ar tag .Cm + Ns Ar tag
inserts the given tag into the frame. inserts the given tag into the frame.
.It Cm nat .It Cm nat
Specify the desired NAT mode. Valid NAT modes values are: Specify the desired NAT mode. Valid NAT modes values are:

View File

@ -1327,17 +1327,10 @@ set_filter(uint32_t idx, int argc, const char *argv[], int hash)
t.fs.newvlan = VLAN_REWRITE; t.fs.newvlan = VLAN_REWRITE;
} else if (argv[start_arg + 1][0] == '+') { } else if (argv[start_arg + 1][0] == '+') {
t.fs.newvlan = VLAN_INSERT; t.fs.newvlan = VLAN_INSERT;
} else if (isdigit(argv[start_arg + 1][0]) &&
!parse_val_mask("vlan", args, &val, &mask, hash)) {
t.fs.val.vlan = val;
t.fs.mask.vlan = mask;
t.fs.val.vlan_vld = 1;
t.fs.mask.vlan_vld = 1;
} else { } else {
warnx("unknown vlan parameter \"%s\"; must" warnx("unknown vlan parameter \"%s\"; must"
" be one of \"none\", \"=<vlan>\", " " be one of \"none\", \"=<vlan>\", "
" \"+<vlan>\", or \"<vlan>\"", " \"+<vlan>\"", argv[start_arg + 1]);
argv[start_arg + 1]);
return (EINVAL); return (EINVAL);
} }
if (t.fs.newvlan == VLAN_REWRITE || if (t.fs.newvlan == VLAN_REWRITE ||