svn commit: r338872 - head/usr.sbin/cxgbetool

Navdeep Parhar np at FreeBSD.org
Fri Sep 21 23:48:42 UTC 2018


Author: np
Date: Fri Sep 21 23:48:40 2018
New Revision: 338872
URL: https://svnweb.freebsd.org/changeset/base/338872

Log:
  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

Modified:
  head/usr.sbin/cxgbetool/cxgbetool.8
  head/usr.sbin/cxgbetool/cxgbetool.c

Modified: head/usr.sbin/cxgbetool/cxgbetool.8
==============================================================================
--- head/usr.sbin/cxgbetool/cxgbetool.8	Fri Sep 21 23:31:04 2018	(r338871)
+++ head/usr.sbin/cxgbetool/cxgbetool.8	Fri Sep 21 23:48:40 2018	(r338872)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Sep 18, 2018
+.Dd Sep 21, 2018
 .Dt CXGBETOOL 8
 .Os
 .Sh NAME
@@ -450,11 +450,11 @@ eport.
 .It Cm vlan
 Insert, remove, or rewrite the VLAN tag before switching the packet out of
 eport.
-.Cm vlan=none
+.Cm none
 removes the tag,
-.Cm vlan= Ns Ar tag
+.Cm = Ns Ar tag
 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.
 .It Cm nat
 Specify the desired NAT mode. Valid NAT modes values are:

Modified: head/usr.sbin/cxgbetool/cxgbetool.c
==============================================================================
--- head/usr.sbin/cxgbetool/cxgbetool.c	Fri Sep 21 23:31:04 2018	(r338871)
+++ head/usr.sbin/cxgbetool/cxgbetool.c	Fri Sep 21 23:48:40 2018	(r338872)
@@ -1327,17 +1327,10 @@ set_filter(uint32_t idx, int argc, const char *argv[],
 				t.fs.newvlan = VLAN_REWRITE;
 			} else if (argv[start_arg + 1][0] == '+') {
 				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 {
 				warnx("unknown vlan parameter \"%s\"; must"
 				     " be one of \"none\", \"=<vlan>\", "
-				     " \"+<vlan>\", or \"<vlan>\"",
-				     argv[start_arg + 1]);
+				     " \"+<vlan>\"", argv[start_arg + 1]);
 				return (EINVAL);
 			}
 			if (t.fs.newvlan == VLAN_REWRITE ||


More information about the svn-src-all mailing list