diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-03-18 15:03:24 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-03-22 09:52:39 -0700 |
| commit | 1bfe968160d7cc030e44481ba3a2ac68824c2869 (patch) | |
| tree | 68ac6ba75f4873d3e2ae7ee5c04c254a8facbab7 /lib/learning-switch.c | |
| parent | db8077c315f12fd523ace965cc22778ed8d5939a (diff) | |
| download | openvswitch-1bfe968160d7cc030e44481ba3a2ac68824c2869.tar.gz | |
mac-learning: Change 'port' member to a union.
This allow the client a little more flexibility. The next commit shows
how this can be useful.
Diffstat (limited to 'lib/learning-switch.c')
| -rw-r--r-- | lib/learning-switch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/learning-switch.c b/lib/learning-switch.c index 5fa3a53b0..97aaf9fe5 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -326,12 +326,12 @@ lswitch_choose_destination(struct lswitch *sw, const struct flow *flow) /* Learn the source MAC. */ if (mac_learning_may_learn(sw->ml, flow->dl_src, 0)) { struct mac_entry *mac = mac_learning_insert(sw->ml, flow->dl_src, 0); - if (mac_entry_is_new(mac) || mac->port != flow->in_port) { + if (mac_entry_is_new(mac) || mac->port.i != flow->in_port) { VLOG_DBG_RL(&rl, "%016llx: learned that "ETH_ADDR_FMT" is on " "port %"PRIu16, sw->datapath_id, ETH_ADDR_ARGS(flow->dl_src), flow->in_port); - mac->port = flow->in_port; + mac->port.i = flow->in_port; mac_learning_changed(sw->ml, mac); } } @@ -347,7 +347,7 @@ lswitch_choose_destination(struct lswitch *sw, const struct flow *flow) mac = mac_learning_lookup(sw->ml, flow->dl_dst, 0, NULL); if (mac) { - out_port = mac->port; + out_port = mac->port.i; if (out_port == flow->in_port) { /* Don't send a packet back out its input port. */ return OFPP_NONE; |
