projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofp-util: Make ofputil_encode_set_protocol() able to return failure.
[openvswitch]
/
lib
/
ofp-util.c
diff --git
a/lib/ofp-util.c
b/lib/ofp-util.c
index 14ac7c13d1ad5076afaf911c611459b6895f2935..ad3fb369219fe8f666219719be1ef1fa40f4d9a4 100644
(file)
--- a/
lib/ofp-util.c
+++ b/
lib/ofp-util.c
@@
-581,15
+581,15
@@
struct proto_abbrev {
/* Most users really don't care about some of the differences between
* protocols. These abbreviations help with that. */
static const struct proto_abbrev proto_abbrevs[] = {
/* Most users really don't care about some of the differences between
* protocols. These abbreviations help with that. */
static const struct proto_abbrev proto_abbrevs[] = {
- { OFPUTIL_P_ANY, "any" },
- { OFPUTIL_P_OF10_ANY, "OpenFlow10" },
- { OFPUTIL_P_NXM_ANY, "NXM" },
+ { OFPUTIL_P_ANY,
"any" },
+ { OFPUTIL_P_OF10_
STD_
ANY, "OpenFlow10" },
+ { OFPUTIL_P_
OF10_
NXM_ANY, "NXM" },
};
#define N_PROTO_ABBREVS ARRAY_SIZE(proto_abbrevs)
enum ofputil_protocol ofputil_flow_dump_protocols[] = {
};
#define N_PROTO_ABBREVS ARRAY_SIZE(proto_abbrevs)
enum ofputil_protocol ofputil_flow_dump_protocols[] = {
- OFPUTIL_P_NXM,
- OFPUTIL_P_OF10,
+ OFPUTIL_P_
OF10_
NXM,
+ OFPUTIL_P_OF10
_STD
,
};
size_t ofputil_n_flow_dump_protocols = ARRAY_SIZE(ofputil_flow_dump_protocols);
};
size_t ofputil_n_flow_dump_protocols = ARRAY_SIZE(ofputil_flow_dump_protocols);
@@
-603,9
+603,9
@@
ofputil_protocol_from_ofp_version(enum ofp_version version)
{
switch (version) {
case OFP10_VERSION:
{
switch (version) {
case OFP10_VERSION:
- return OFPUTIL_P_OF10;
+ return OFPUTIL_P_OF10
_STD
;
case OFP12_VERSION:
case OFP12_VERSION:
- return OFPUTIL_P_OF12;
+ return OFPUTIL_P_OF12
_OXM
;
case OFP11_VERSION:
default:
return 0;
case OFP11_VERSION:
default:
return 0;
@@
-618,12
+618,12
@@
enum ofp_version
ofputil_protocol_to_ofp_version(enum ofputil_protocol protocol)
{
switch (protocol) {
ofputil_protocol_to_ofp_version(enum ofputil_protocol protocol)
{
switch (protocol) {
- case OFPUTIL_P_OF10:
- case OFPUTIL_P_OF10_TID:
- case OFPUTIL_P_NXM:
- case OFPUTIL_P_NXM_TID:
+ case OFPUTIL_P_OF10
_STD
:
+ case OFPUTIL_P_OF10_
STD_
TID:
+ case OFPUTIL_P_
OF10_
NXM:
+ case OFPUTIL_P_
OF10_
NXM_TID:
return OFP10_VERSION;
return OFP10_VERSION;
- case OFPUTIL_P_OF12:
+ case OFPUTIL_P_OF12
_OXM
:
return OFP12_VERSION;
}
return OFP12_VERSION;
}
@@
-652,16
+652,16
@@
enum ofputil_protocol
ofputil_protocol_set_tid(enum ofputil_protocol protocol, bool enable)
{
switch (protocol) {
ofputil_protocol_set_tid(enum ofputil_protocol protocol, bool enable)
{
switch (protocol) {
- case OFPUTIL_P_OF10:
- case OFPUTIL_P_OF10_TID:
- return enable ? OFPUTIL_P_OF10_
TID : OFPUTIL_P_OF10
;
+ case OFPUTIL_P_OF10
_STD
:
+ case OFPUTIL_P_OF10_
STD_
TID:
+ return enable ? OFPUTIL_P_OF10_
STD_TID : OFPUTIL_P_OF10_STD
;
- case OFPUTIL_P_NXM:
- case OFPUTIL_P_NXM_TID:
- return enable ? OFPUTIL_P_
NXM_TID : OFPUTIL_P
_NXM;
+ case OFPUTIL_P_
OF10_
NXM:
+ case OFPUTIL_P_
OF10_
NXM_TID:
+ return enable ? OFPUTIL_P_
OF10_NXM_TID : OFPUTIL_P_OF10
_NXM;
- case OFPUTIL_P_OF12:
- return OFPUTIL_P_OF12;
+ case OFPUTIL_P_OF12
_OXM
:
+ return OFPUTIL_P_OF12
_OXM
;
default:
NOT_REACHED();
default:
NOT_REACHED();
@@
-686,16
+686,16
@@
ofputil_protocol_set_base(enum ofputil_protocol cur,
bool tid = (cur & OFPUTIL_P_TID) != 0;
switch (new_base) {
bool tid = (cur & OFPUTIL_P_TID) != 0;
switch (new_base) {
- case OFPUTIL_P_OF10:
- case OFPUTIL_P_OF10_TID:
- return ofputil_protocol_set_tid(OFPUTIL_P_OF10, tid);
+ case OFPUTIL_P_OF10
_STD
:
+ case OFPUTIL_P_OF10_
STD_
TID:
+ return ofputil_protocol_set_tid(OFPUTIL_P_OF10
_STD
, tid);
- case OFPUTIL_P_NXM:
- case OFPUTIL_P_NXM_TID:
- return ofputil_protocol_set_tid(OFPUTIL_P_NXM, tid);
+ case OFPUTIL_P_
OF10_
NXM:
+ case OFPUTIL_P_
OF10_
NXM_TID:
+ return ofputil_protocol_set_tid(OFPUTIL_P_
OF10_
NXM, tid);
- case OFPUTIL_P_OF12:
- return ofputil_protocol_set_tid(OFPUTIL_P_OF12, tid);
+ case OFPUTIL_P_OF12
_OXM
:
+ return ofputil_protocol_set_tid(OFPUTIL_P_OF12
_OXM
, tid);
default:
NOT_REACHED();
default:
NOT_REACHED();
@@
-713,20
+713,20
@@
ofputil_protocol_to_string(enum ofputil_protocol protocol)
/* Use a "switch" statement for single-bit names so that we get a compiler
* warning if we forget any. */
switch (protocol) {
/* Use a "switch" statement for single-bit names so that we get a compiler
* warning if we forget any. */
switch (protocol) {
- case OFPUTIL_P_NXM:
+ case OFPUTIL_P_
OF10_
NXM:
return "NXM-table_id";
return "NXM-table_id";
- case OFPUTIL_P_NXM_TID:
+ case OFPUTIL_P_
OF10_
NXM_TID:
return "NXM+table_id";
return "NXM+table_id";
- case OFPUTIL_P_OF10:
+ case OFPUTIL_P_OF10
_STD
:
return "OpenFlow10-table_id";
return "OpenFlow10-table_id";
- case OFPUTIL_P_OF10_TID:
+ case OFPUTIL_P_OF10_
STD_
TID:
return "OpenFlow10+table_id";
return "OpenFlow10+table_id";
- case OFPUTIL_P_OF12:
- return
NULL
;
+ case OFPUTIL_P_OF12
_OXM
:
+ return
"OXM"
;
}
/* Check abbreviations. */
}
/* Check abbreviations. */
@@
-969,71
+969,71
@@
ofputil_usable_protocols(const struct match *match)
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 17);
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 17);
- /* NXM
and OF1.1+ supports
bitwise matching on ethernet addresses. */
+ /* NXM
, OXM, and OF1.1 support
bitwise matching on ethernet addresses. */
if (!eth_mask_is_exact(wc->masks.dl_src)
&& !eth_addr_is_zero(wc->masks.dl_src)) {
if (!eth_mask_is_exact(wc->masks.dl_src)
&& !eth_addr_is_zero(wc->masks.dl_src)) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
if (!eth_mask_is_exact(wc->masks.dl_dst)
&& !eth_addr_is_zero(wc->masks.dl_dst)) {
}
if (!eth_mask_is_exact(wc->masks.dl_dst)
&& !eth_addr_is_zero(wc->masks.dl_dst)) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /* NXM and OF1.1+ support matching metadata. */
+ /* NXM
, OXM,
and OF1.1+ support matching metadata. */
if (wc->masks.metadata != htonll(0)) {
if (wc->masks.metadata != htonll(0)) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
matching ARP hardware addresses. */
+ /*
NXM and OXM support
matching ARP hardware addresses. */
if (!eth_addr_is_zero(wc->masks.arp_sha) ||
!eth_addr_is_zero(wc->masks.arp_tha)) {
if (!eth_addr_is_zero(wc->masks.arp_sha) ||
!eth_addr_is_zero(wc->masks.arp_tha)) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
matching IPv6 traffic. */
+ /*
NXM and OXM support
matching IPv6 traffic. */
if (match->flow.dl_type == htons(ETH_TYPE_IPV6)) {
if (match->flow.dl_type == htons(ETH_TYPE_IPV6)) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
matching registers. */
+ /*
NXM and OXM support
matching registers. */
if (!regs_fully_wildcarded(wc)) {
if (!regs_fully_wildcarded(wc)) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
matching tun_id. */
+ /*
NXM and OXM support
matching tun_id. */
if (wc->masks.tunnel.tun_id != htonll(0)) {
if (wc->masks.tunnel.tun_id != htonll(0)) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
matching fragments. */
+ /*
NXM and OXM support
matching fragments. */
if (wc->masks.nw_frag) {
if (wc->masks.nw_frag) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
matching IPv6 flow label. */
+ /*
NXM and OXM support
matching IPv6 flow label. */
if (wc->masks.ipv6_label) {
if (wc->masks.ipv6_label) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
matching IP ECN bits. */
+ /*
NXM and OXM support
matching IP ECN bits. */
if (wc->masks.nw_tos & IP_ECN_MASK) {
if (wc->masks.nw_tos & IP_ECN_MASK) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
matching IP TTL/hop limit. */
+ /*
NXM and OXM support
matching IP TTL/hop limit. */
if (wc->masks.nw_ttl) {
if (wc->masks.nw_ttl) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
non-CIDR IPv4 address masks. */
+ /*
NXM and OXM support
non-CIDR IPv4 address masks. */
if (!ip_is_cidr(wc->masks.nw_src) || !ip_is_cidr(wc->masks.nw_dst)) {
if (!ip_is_cidr(wc->masks.nw_src) || !ip_is_cidr(wc->masks.nw_dst)) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
- /*
Only NXM supports
bitwise matching on transport port. */
+ /*
NXM and OXM support
bitwise matching on transport port. */
if ((wc->masks.tp_src && wc->masks.tp_src != htons(UINT16_MAX)) ||
(wc->masks.tp_dst && wc->masks.tp_dst != htons(UINT16_MAX))) {
if ((wc->masks.tp_src && wc->masks.tp_src != htons(UINT16_MAX)) ||
(wc->masks.tp_dst && wc->masks.tp_dst != htons(UINT16_MAX))) {
- return OFPUTIL_P_
NXM_ANY
;
+ return OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
/* Other formats can express this rule. */
}
/* Other formats can express this rule. */
@@
-1188,6
+1188,8
@@
ofputil_encode_hello(uint32_t allowed_versions)
oheh->type = htons(OFPHET_VERSIONBITMAP);
oheh->length = htons(map_len + sizeof *oheh);
*(ovs_be32 *)(oheh + 1) = htonl(allowed_versions);
oheh->type = htons(OFPHET_VERSIONBITMAP);
oheh->length = htons(map_len + sizeof *oheh);
*(ovs_be32 *)(oheh + 1) = htonl(allowed_versions);
+
+ ofpmsg_update_length(msg);
}
return msg;
}
return msg;
@@
-1199,32
+1201,42
@@
ofputil_encode_hello(uint32_t allowed_versions)
* connection if the switch processes the returned message correctly. (If
* '*next != want' then the caller will have to iterate.)
*
* connection if the switch processes the returned message correctly. (If
* '*next != want' then the caller will have to iterate.)
*
- * If 'current == want', returns NULL and stores 'current' in '*next'. */
+ * If 'current == want', or if it is not possible to transition from 'current'
+ * to 'want' (because, for example, 'current' and 'want' use different OpenFlow
+ * protocol versions), returns NULL and stores 'current' in '*next'. */
struct ofpbuf *
ofputil_encode_set_protocol(enum ofputil_protocol current,
enum ofputil_protocol want,
enum ofputil_protocol *next)
{
struct ofpbuf *
ofputil_encode_set_protocol(enum ofputil_protocol current,
enum ofputil_protocol want,
enum ofputil_protocol *next)
{
+ enum ofp_version cur_version, want_version;
enum ofputil_protocol cur_base, want_base;
bool cur_tid, want_tid;
enum ofputil_protocol cur_base, want_base;
bool cur_tid, want_tid;
+ cur_version = ofputil_protocol_to_ofp_version(current);
+ want_version = ofputil_protocol_to_ofp_version(want);
+ if (cur_version != want_version) {
+ *next = current;
+ return NULL;
+ }
+
cur_base = ofputil_protocol_to_base(current);
want_base = ofputil_protocol_to_base(want);
if (cur_base != want_base) {
*next = ofputil_protocol_set_base(current, want_base);
switch (want_base) {
cur_base = ofputil_protocol_to_base(current);
want_base = ofputil_protocol_to_base(want);
if (cur_base != want_base) {
*next = ofputil_protocol_set_base(current, want_base);
switch (want_base) {
- case OFPUTIL_P_NXM:
+ case OFPUTIL_P_
OF10_
NXM:
return ofputil_encode_nx_set_flow_format(NXFF_NXM);
return ofputil_encode_nx_set_flow_format(NXFF_NXM);
- case OFPUTIL_P_OF10:
+ case OFPUTIL_P_OF10
_STD
:
return ofputil_encode_nx_set_flow_format(NXFF_OPENFLOW10);
return ofputil_encode_nx_set_flow_format(NXFF_OPENFLOW10);
- case OFPUTIL_P_OF12:
+ case OFPUTIL_P_OF12
_OXM
:
return ofputil_encode_nx_set_flow_format(NXFF_OPENFLOW12);
return ofputil_encode_nx_set_flow_format(NXFF_OPENFLOW12);
- case OFPUTIL_P_OF10_TID:
- case OFPUTIL_P_NXM_TID:
+ case OFPUTIL_P_OF10_
STD_
TID:
+ case OFPUTIL_P_
OF10_
NXM_TID:
NOT_REACHED();
}
}
NOT_REACHED();
}
}
@@
-1266,13
+1278,13
@@
ofputil_nx_flow_format_to_protocol(enum nx_flow_format flow_format)
{
switch (flow_format) {
case NXFF_OPENFLOW10:
{
switch (flow_format) {
case NXFF_OPENFLOW10:
- return OFPUTIL_P_OF10;
+ return OFPUTIL_P_OF10
_STD
;
case NXFF_NXM:
case NXFF_NXM:
- return OFPUTIL_P_NXM;
+ return OFPUTIL_P_
OF10_
NXM;
case NXFF_OPENFLOW12:
case NXFF_OPENFLOW12:
- return OFPUTIL_P_OF12;
+ return OFPUTIL_P_OF12
_OXM
;
default:
return 0;
default:
return 0;
@@
-1497,7
+1509,7
@@
ofputil_encode_flow_mod(const struct ofputil_flow_mod *fm,
struct ofpbuf *msg;
switch (protocol) {
struct ofpbuf *msg;
switch (protocol) {
- case OFPUTIL_P_OF12: {
+ case OFPUTIL_P_OF12
_OXM
: {
struct ofp11_flow_mod *ofm;
msg = ofpraw_alloc(OFPRAW_OFPT11_FLOW_MOD, OFP12_VERSION,
struct ofp11_flow_mod *ofm;
msg = ofpraw_alloc(OFPRAW_OFPT11_FLOW_MOD, OFP12_VERSION,
@@
-1523,8
+1535,8
@@
ofputil_encode_flow_mod(const struct ofputil_flow_mod *fm,
break;
}
break;
}
- case OFPUTIL_P_OF10:
- case OFPUTIL_P_OF10_TID: {
+ case OFPUTIL_P_OF10
_STD
:
+ case OFPUTIL_P_OF10_
STD_
TID: {
struct ofp10_flow_mod *ofm;
msg = ofpraw_alloc(OFPRAW_OFPT10_FLOW_MOD, OFP10_VERSION,
struct ofp10_flow_mod *ofm;
msg = ofpraw_alloc(OFPRAW_OFPT10_FLOW_MOD, OFP10_VERSION,
@@
-1543,8
+1555,8
@@
ofputil_encode_flow_mod(const struct ofputil_flow_mod *fm,
break;
}
break;
}
- case OFPUTIL_P_NXM:
- case OFPUTIL_P_NXM_TID: {
+ case OFPUTIL_P_
OF10_
NXM:
+ case OFPUTIL_P_
OF10_
NXM_TID: {
struct nx_flow_mod *nfm;
int match_len;
struct nx_flow_mod *nfm;
int match_len;
@@
-1595,9
+1607,9
@@
ofputil_flow_mod_usable_protocols(const struct ofputil_flow_mod *fms,
usable_protocols &= OFPUTIL_P_TID;
}
usable_protocols &= OFPUTIL_P_TID;
}
- /* Matching of the cookie is only supported through NXM. */
+ /* Matching of the cookie is only supported through NXM
or OF1.1+
. */
if (fm->cookie_mask != htonll(0)) {
if (fm->cookie_mask != htonll(0)) {
- usable_protocols &= OFPUTIL_P_
NXM_ANY
;
+ usable_protocols &= OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
}
assert(usable_protocols);
}
}
assert(usable_protocols);
@@
-1718,7
+1730,7
@@
ofputil_encode_flow_stats_request(const struct ofputil_flow_stats_request *fsr,
enum ofpraw raw;
switch (protocol) {
enum ofpraw raw;
switch (protocol) {
- case OFPUTIL_P_OF12: {
+ case OFPUTIL_P_OF12
_OXM
: {
struct ofp11_flow_stats_request *ofsr;
raw = (fsr->aggregate
struct ofp11_flow_stats_request *ofsr;
raw = (fsr->aggregate
@@
-1735,8
+1747,8
@@
ofputil_encode_flow_stats_request(const struct ofputil_flow_stats_request *fsr,
break;
}
break;
}
- case OFPUTIL_P_OF10:
- case OFPUTIL_P_OF10_TID: {
+ case OFPUTIL_P_OF10
_STD
:
+ case OFPUTIL_P_OF10_
STD_
TID: {
struct ofp10_flow_stats_request *ofsr;
raw = (fsr->aggregate
struct ofp10_flow_stats_request *ofsr;
raw = (fsr->aggregate
@@
-1750,8
+1762,8
@@
ofputil_encode_flow_stats_request(const struct ofputil_flow_stats_request *fsr,
break;
}
break;
}
- case OFPUTIL_P_NXM:
- case OFPUTIL_P_NXM_TID: {
+ case OFPUTIL_P_
OF10_
NXM:
+ case OFPUTIL_P_
OF10_
NXM_TID: {
struct nx_flow_stats_request *nfsr;
int match_len;
struct nx_flow_stats_request *nfsr;
int match_len;
@@
-1789,7
+1801,7
@@
ofputil_flow_stats_request_usable_protocols(
usable_protocols = ofputil_usable_protocols(&fsr->match);
if (fsr->cookie_mask != htonll(0)) {
usable_protocols = ofputil_usable_protocols(&fsr->match);
if (fsr->cookie_mask != htonll(0)) {
- usable_protocols &= OFPUTIL_P_
NXM_ANY
;
+ usable_protocols &= OFPUTIL_P_
OF10_NXM_ANY | OFPUTIL_P_OF12_OXM
;
}
return usable_protocols;
}
}
return usable_protocols;
}
@@
-2201,7
+2213,7
@@
ofputil_encode_flow_removed(const struct ofputil_flow_removed *fr,
struct ofpbuf *msg;
switch (protocol) {
struct ofpbuf *msg;
switch (protocol) {
- case OFPUTIL_P_OF12: {
+ case OFPUTIL_P_OF12
_OXM
: {
struct ofp12_flow_removed *ofr;
msg = ofpraw_alloc_xid(OFPRAW_OFPT11_FLOW_REMOVED,
struct ofp12_flow_removed *ofr;
msg = ofpraw_alloc_xid(OFPRAW_OFPT11_FLOW_REMOVED,
@@
-2222,8
+2234,8
@@
ofputil_encode_flow_removed(const struct ofputil_flow_removed *fr,
break;
}
break;
}
- case OFPUTIL_P_OF10:
- case OFPUTIL_P_OF10_TID: {
+ case OFPUTIL_P_OF10
_STD
:
+ case OFPUTIL_P_OF10_
STD_
TID: {
struct ofp_flow_removed *ofr;
msg = ofpraw_alloc_xid(OFPRAW_OFPT10_FLOW_REMOVED, OFP10_VERSION,
struct ofp_flow_removed *ofr;
msg = ofpraw_alloc_xid(OFPRAW_OFPT10_FLOW_REMOVED, OFP10_VERSION,
@@
-2241,8
+2253,8
@@
ofputil_encode_flow_removed(const struct ofputil_flow_removed *fr,
break;
}
break;
}
- case OFPUTIL_P_NXM:
- case OFPUTIL_P_NXM_TID: {
+ case OFPUTIL_P_
OF10_
NXM:
+ case OFPUTIL_P_
OF10_
NXM_TID: {
struct nx_flow_removed *nfr;
int match_len;
struct nx_flow_removed *nfr;
int match_len;
@@
-2394,7
+2406,7
@@
ofputil_encode_packet_in(const struct ofputil_packet_in *pin,
struct ofpbuf *packet;
/* Add OFPT_PACKET_IN. */
struct ofpbuf *packet;
/* Add OFPT_PACKET_IN. */
- if (protocol == OFPUTIL_P_OF12) {
+ if (protocol == OFPUTIL_P_OF12
_OXM
) {
struct ofp12_packet_in *opi;
struct match match;
struct ofp12_packet_in *opi;
struct match match;