diff options
author | Ben Pfaff <blp@nicira.com> | 2012-02-15 14:23:38 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-03-07 14:05:09 -0800 |
commit | 6c0386119d614d5e26ca08cc3d8e527806b87ef9 (patch) | |
tree | ff134fefb9dfd21cb99408fbd9089085b86ef34d /lib/ofp-util.h | |
parent | 7887679be26e75b897494580f280870d9a1fa318 (diff) | |
download | openvswitch-6c0386119d614d5e26ca08cc3d8e527806b87ef9.tar.gz |
netdev: Abstract "features" interface away from OpenFlow 1.0.
netdev_get_features() and other functions have always used OpenFlow 1.0
"enum ofp_port_features" bits as part of their interface. This commit
switches over to using an internally defined interface that is not tied
directly to any OpenFlow version, making evolution of each side of the
interface easier in the future.
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ofp-util.h')
-rw-r--r-- | lib/ofp-util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ofp-util.h b/lib/ofp-util.h index 980f5eafd..781bfc52e 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -23,6 +23,7 @@ #include <stdint.h> #include "classifier.h" #include "flow.h" +#include "netdev.h" #include "openflow/nicira-ext.h" #include "openvswitch/types.h" @@ -325,6 +326,10 @@ enum ofperr ofputil_decode_packet_out(struct ofputil_packet_out *, const struct ofp_packet_out *); struct ofpbuf *ofputil_encode_packet_out(const struct ofputil_packet_out *); +/* OFPFF_* bits. */ +enum netdev_features ofputil_netdev_port_features_from_ofp10(ovs_be32 ofp10); +ovs_be32 ofputil_netdev_port_features_to_ofp10(enum netdev_features); + /* OpenFlow protocol utility functions. */ void *make_openflow(size_t openflow_len, uint8_t type, struct ofpbuf **); void *make_nxmsg(size_t openflow_len, uint32_t subtype, struct ofpbuf **); |