From owner-svn-src-head@FreeBSD.ORG Thu Jan 17 00:21:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 26A7CA38; Thu, 17 Jan 2013 00:21:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 18855A4C; Thu, 17 Jan 2013 00:21:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0H0LjKq019219; Thu, 17 Jan 2013 00:21:45 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0H0Lj1M019218; Thu, 17 Jan 2013 00:21:45 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201301170021.r0H0Lj1M019218@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 17 Jan 2013 00:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245520 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2013 00:21:46 -0000 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\", \"=\" or" - " \"+\"", argv[start_arg + 1]); + " be one of \"none\", \"=\", " + " \"+\", or \"\"", + argv[start_arg + 1]); return (EINVAL); } if (t.fs.newvlan == VLAN_REWRITE ||