Create specific types for ofp and odp port
authorAlex Wang <alexw@nicira.com>
Wed, 19 Jun 2013 23:58:44 +0000 (16:58 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 20 Jun 2013 17:42:37 +0000 (10:42 -0700)
commit4e022ec09e14ac89add74c1b4b8e3ff3873edbf0
treea6817234d1d992d2a7970865c1464dfaaf247c7f
parente6cc0babc25de1800aeffad66d2804e64e5bd602
Create specific types for ofp and odp port

Until now, datapath ports and openflow ports were both represented by
unsigned integers of various sizes. With implicit conversions, etc., it is
easy to mix them up and use one where the other is expected.  This commit
creates two typedefs, ofp_port_t and odp_port_t.  Both of these two types
are marked by "__attribute__((bitwise))" so that sparse can be used to
detect any misuse.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
60 files changed:
include/openflow/openflow-1.0.h
include/openflow/openflow-1.1.h
include/openvswitch/types.h
lib/bundle.c
lib/bundle.h
lib/dpif-linux.c
lib/dpif-linux.h
lib/dpif-netdev.c
lib/dpif-provider.h
lib/dpif.c
lib/dpif.h
lib/flow.c
lib/flow.h
lib/learn.c
lib/learning-switch.c
lib/mac-learning.h
lib/match.c
lib/match.h
lib/meta-flow.c
lib/netlink.c
lib/netlink.h
lib/nx-match.c
lib/odp-util.c
lib/odp-util.h
lib/ofp-actions.c
lib/ofp-actions.h
lib/ofp-parse.c
lib/ofp-print.c
lib/ofp-util.c
lib/ofp-util.h
lib/util.c
lib/util.h
ofproto/connmgr.c
ofproto/connmgr.h
ofproto/in-band.c
ofproto/in-band.h
ofproto/netflow.c
ofproto/netflow.h
ofproto/ofproto-dpif-sflow.c
ofproto/ofproto-dpif-sflow.h
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif-xlate.h
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h
ofproto/ofproto-provider.h
ofproto/ofproto.c
ofproto/ofproto.h
ofproto/pinsched.c
ofproto/pinsched.h
ofproto/pktbuf.c
ofproto/pktbuf.h
ofproto/tunnel.c
ofproto/tunnel.h
tests/test-bundle.c
tests/test-classifier.c
tests/test-flows.c
tests/test-odp.c
utilities/ovs-dpctl.c
utilities/ovs-ofctl.c
vswitchd/bridge.c