diff options
author | Ben Pfaff <blp@ovn.org> | 2018-02-16 11:43:56 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-03-14 11:34:41 -0700 |
commit | d8790c08437106f1d71960330e4e35de4fef16f6 (patch) | |
tree | c836a578fed177a7f4e574413042017a14a54108 /utilities | |
parent | 225c33ba64a4de1aa30b05f8549c0628fe7fe6e3 (diff) | |
download | openvswitch-d8790c08437106f1d71960330e4e35de4fef16f6.tar.gz |
ofp-packet: Better abstract packet-in format.
This commit relieves the caller of code that deals with the format of
packet-in messages from some of the burden of understanding the packet
format. It also renames the constants to appear to be at a higher level of
abstraction.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'utilities')
-rw-r--r-- | utilities/ovs-ofctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 358177ed5..77aa49649 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -1820,13 +1820,13 @@ ofctl_del_flows(struct ovs_cmdl_context *ctx) static bool set_packet_in_format(struct vconn *vconn, - enum nx_packet_in_format packet_in_format, + enum ofputil_packet_in_format packet_in_format, bool must_succeed) { struct ofpbuf *spif; - spif = ofputil_make_set_packet_in_format(vconn_get_version(vconn), - packet_in_format); + spif = ofputil_encode_set_packet_in_format(vconn_get_version(vconn), + packet_in_format); if (must_succeed) { transact_noreply(vconn, spif); } else { @@ -2303,13 +2303,13 @@ ofctl_monitor(struct ovs_cmdl_context *ctx) set_packet_in_format(vconn, preferred_packet_in_format, true); } else { /* Otherwise, we always prefer NXT_PACKET_IN2. */ - if (!set_packet_in_format(vconn, NXPIF_NXT_PACKET_IN2, false)) { + if (!set_packet_in_format(vconn, OFPUTIL_PACKET_IN_NXT2, false)) { /* We can't get NXT_PACKET_IN2. For OpenFlow 1.0 only, request * NXT_PACKET_IN. (Before 2.6, Open vSwitch will accept a request * for NXT_PACKET_IN with OF1.1+, but even after that it still * sends packet-ins in the OpenFlow native format.) */ if (vconn_get_version(vconn) == OFP10_VERSION) { - set_packet_in_format(vconn, NXPIF_NXT_PACKET_IN, false); + set_packet_in_format(vconn, OFPUTIL_PACKET_IN_NXT, false); } } } |