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:
@@ -150,8 +150,7 @@ ofputil_cls_rule_from_match(const struct ofp_match *match,
|
||||
/* Initialize most of rule->flow. */
|
||||
rule->flow.nw_src = match->nw_src;
|
||||
rule->flow.nw_dst = match->nw_dst;
|
||||
rule->flow.in_port = (match->in_port == htons(OFPP_LOCAL) ? ODPP_LOCAL
|
||||
: ntohs(match->in_port));
|
||||
rule->flow.in_port = ntohs(match->in_port);
|
||||
rule->flow.dl_type = ofputil_dl_type_from_openflow(match->dl_type);
|
||||
rule->flow.tp_src = match->tp_src;
|
||||
rule->flow.tp_dst = match->tp_dst;
|
||||
@@ -272,8 +271,7 @@ ofputil_cls_rule_to_match(const struct cls_rule *rule,
|
||||
|
||||
/* Compose most of the match structure. */
|
||||
match->wildcards = htonl(ofpfw);
|
||||
match->in_port = htons(rule->flow.in_port == ODPP_LOCAL ? OFPP_LOCAL
|
||||
: rule->flow.in_port);
|
||||
match->in_port = htons(rule->flow.in_port);
|
||||
memcpy(match->dl_src, rule->flow.dl_src, ETH_ADDR_LEN);
|
||||
memcpy(match->dl_dst, rule->flow.dl_dst, ETH_ADDR_LEN);
|
||||
match->dl_type = ofputil_dl_type_to_openflow(rule->flow.dl_type);
|
||||
|
Reference in New Issue
Block a user