Date: Thu, 17 Jan 2013 00:21:45 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245520 - head/tools/tools/cxgbetool Message-ID: <201301170021.r0H0Lj1M019218@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Jan 17 00:21:45 2013 New Revision: 245520 URL: http://svnweb.freebsd.org/changeset/base/245520 Log: Allow "ivlan" (inner VLAN) to be used as an alias for "vlan" when specifying match criteria. "vlan" continues to be valid here, and it continues to be valid when deleting, rewriting, inserting, or stacking an 802.1q tag to a matching packet. MFC after: 3 days Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Thu Jan 17 00:09:50 2013 (r245519) +++ head/tools/tools/cxgbetool/cxgbetool.c Thu Jan 17 00:21:45 2013 (r245520) @@ -955,7 +955,7 @@ set_filter(uint32_t idx, int argc, const t.fs.mask.vnic = mask; t.fs.val.vnic_vld = 1; t.fs.mask.vnic_vld = 1; - } else if (!parse_val_mask("vlan", args, &val, &mask)) { + } else if (!parse_val_mask("ivlan", args, &val, &mask)) { t.fs.val.vlan = val; t.fs.mask.vlan = mask; t.fs.val.vlan_vld = 1; @@ -1047,10 +1047,17 @@ set_filter(uint32_t idx, int argc, const 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)) { + 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>\" or" - " \"+<vlan>\"", argv[start_arg + 1]); + " be one of \"none\", \"=<vlan>\", " + " \"+<vlan>\", or \"<vlan>\"", + argv[start_arg + 1]); return (EINVAL); } if (t.fs.newvlan == VLAN_REWRITE ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301170021.r0H0Lj1M019218>