diff options
author | Ben Pfaff <blp@nicira.com> | 2015-03-03 15:36:28 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-03-03 16:22:12 -0800 |
commit | 72c642e5ab553fd11eb69208b3949065f689f17d (patch) | |
tree | 8c9c0778cc39d2bc45e6976ad138a11b18357bfb /lib/ovs-lldp.h | |
parent | 135706b39307f84fb0c9a5d1ffeebb9f7f556b9e (diff) | |
download | openvswitch-72c642e5ab553fd11eb69208b3949065f689f17d.tar.gz |
ovs-lldp: Use better types for ISID and VLANs.
An ISID is 24 bits, so it fits in a uint32_t. A VLAN is 12 bits, so it
fits in a uint16_t. Use these types consistently, instead of int64_t.
This removes a check in aa_mapping_unregister() that seems a little
mysterious to me: it previously checked for ISID and VLAN values >= 0. I
don't see a way that they could be < 0 in this situation though.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ovs-lldp.h')
-rw-r--r-- | lib/ovs-lldp.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ovs-lldp.h b/lib/ovs-lldp.h index c629aa095..51d668fba 100644 --- a/lib/ovs-lldp.h +++ b/lib/ovs-lldp.h @@ -1,4 +1,5 @@ /* + * Copyright (c) 2015 Nicira, Inc. * Copyright (c) 2014 Wind River Systems, Inc. * Copyright (c) 2015 Avaya, Inc. * @@ -64,8 +65,8 @@ struct aa_settings { /* Configuration of Auto Attach mappings. */ struct aa_mapping_settings { - int64_t isid; - int64_t vlan; + uint32_t isid; + uint16_t vlan; }; enum bridge_aa_vlan_oper { @@ -80,7 +81,7 @@ enum bridge_aa_vlan_oper { struct bridge_aa_vlan { struct ovs_list list_node; char *port_name; - uint32_t vlan; + uint16_t vlan; enum bridge_aa_vlan_oper oper; }; |