2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ofproto: Break apart into generic and hardware-specific parts.

In addition to the changes to ofproto, this commit changes all of the
instances of "struct flow" in the tree so that the "in_port" member is an
OpenFlow port number.  Previously, this member was an OpenFlow port number
in some cases and an ODP port number in other cases.
This commit is contained in:
Ben Pfaff
2011-05-11 12:13:10 -07:00
parent f79e673f3d
commit abe529af47
20 changed files with 5188 additions and 3832 deletions

View File

@@ -403,7 +403,8 @@ odp_flow_key_from_flow(struct ofpbuf *buf, const struct flow *flow)
nl_msg_put_be64(buf, ODP_KEY_ATTR_TUN_ID, flow->tun_id);
}
nl_msg_put_u32(buf, ODP_KEY_ATTR_IN_PORT, flow->in_port);
nl_msg_put_u32(buf, ODP_KEY_ATTR_IN_PORT,
ofp_port_to_odp_port(flow->in_port));
eth_key = nl_msg_put_unspec_uninit(buf, ODP_KEY_ATTR_ETHERNET,
sizeof *eth_key);
@@ -551,7 +552,7 @@ odp_flow_key_to_flow(const struct nlattr *key, size_t key_len,
if (nl_attr_get_u32(nla) >= UINT16_MAX) {
return EINVAL;
}
flow->in_port = nl_attr_get_u32(nla);
flow->in_port = odp_port_to_ofp_port(nl_attr_get_u32(nla));
break;
case TRANSITION(ODP_KEY_ATTR_IN_PORT, ODP_KEY_ATTR_ETHERNET):