24356657 OVS adds VLAN flows with CFI set, but packets don't have that set
authorCathy Zhou <Cathy.Zhou@Oracle.COM>
Tue, 02 Aug 2016 13:15:22 -0700
changeset 6538 a53c8be7d7b3
parent 6537 26eef25e017a
child 6540 a6868ecc80b4
24356657 OVS adds VLAN flows with CFI set, but packets don't have that set 24378933 OFTest 1.0 case counters.LookupMatchedCount FAIL on s12_103
components/openvswitch/files/lib/dpif-solaris.c
components/openvswitch/files/lib/util-solaris.c
components/openvswitch/openvswitch.p5m
--- a/components/openvswitch/files/lib/dpif-solaris.c	Tue Aug 02 09:22:09 2016 -0700
+++ b/components/openvswitch/files/lib/dpif-solaris.c	Tue Aug 02 13:15:22 2016 -0700
@@ -430,7 +430,7 @@
 				instance = zid;
 			}
 			(void) snprintf(kuri, sizeof (kuri),
-			    "kstat:/net/link/%s/%d", name, instance);
+			    "kstat:/net/%s/link/%d", name, instance);
 			stat = kstat2_lookup_map(dpif_khandle, kuri, &map);
 
 			if (stat != KSTAT2_S_OK) {
--- a/components/openvswitch/files/lib/util-solaris.c	Tue Aug 02 09:22:09 2016 -0700
+++ b/components/openvswitch/files/lib/util-solaris.c	Tue Aug 02 13:15:22 2016 -0700
@@ -1624,6 +1624,12 @@
 			goto out;
 	}
 
+	/*
+	 * when "f" is filled in by the parse_vlan() function, VLAN_CFI bit is
+	 * set blindly. Unset this bit now since we don't set this bit in
+	 * Solaris for VLAN packets.
+	 */
+	f->vlan_tci &= htons(~VLAN_CFI);
 	if ((f->vlan_tci != 0) || (m->vlan_tci != htons(0xffff))) {
 		err = dlmgr_DLValue_fm_putulong(ddvp, ddmp,
 		    "vlan-tci", ntohs(f->vlan_tci),
--- a/components/openvswitch/openvswitch.p5m	Tue Aug 02 09:22:09 2016 -0700
+++ b/components/openvswitch/openvswitch.p5m	Tue Aug 02 13:15:22 2016 -0700
@@ -39,7 +39,7 @@
 set name=info.classification value=org.opensolaris.category.2008:System/Services
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
-set name=org.opensolaris.arc-caseid value=PSARC/2015/999
+set name=org.opensolaris.arc-caseid value=PSARC/2015/311
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 file ovs.user_attr path=etc/security/auth_attr.d/application:openswitch:ovs \
     group=sys