2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

classifier: Omit all-1-bits mask for VLAN TCI in cls_rule_format().

To me, this seems to be easier to read.
This commit is contained in:
Ben Pfaff
2011-03-10 14:51:30 -08:00
parent fbc7ed06a7
commit ce0307c473
2 changed files with 19 additions and 17 deletions

View File

@@ -526,6 +526,8 @@ cls_rule_format(const struct cls_rule *rule, struct ds *s)
ds_put_format(s, "dl_vlan_pcp=%d,",
vlan_tci_to_pcp(f->vlan_tci));
}
} else if (wc->vlan_tci_mask == htons(0xffff)) {
ds_put_format(s, "vlan_tci=0x%04"PRIx16",", ntohs(f->vlan_tci));
} else {
ds_put_format(s, "vlan_tci=0x%04"PRIx16"/0x%04"PRIx16",",
ntohs(f->vlan_tci), ntohs(wc->vlan_tci_mask));