From: Ben Pfaff Date: Sat, 27 Dec 2008 05:26:46 +0000 (-0800) Subject: vswitchd: Actually tag flows that go out bonded devices. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0766fe1d7a320b47cca976abe3d218295739b9d1;p=openvswitch vswitchd: Actually tag flows that go out bonded devices. The change that introduced rebalancing for bonded devices set up the infrastructure for revalidating flows that go out bonded devices, but neglected to actually tag those flows. This fixes the problem. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 2e67bec6..6946a8d8 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1026,7 +1026,7 @@ add_vlan_action(struct ofpbuf *buf, uint16_t old_vlan, uint16_t new_vlan) static size_t compose_dsts(const struct bridge *br, const struct flow *flow, uint16_t vlan, const struct port *in_port, const struct port *out_port, - struct ft_dst dsts[]) + struct ft_dst dsts[], tag_type *tags) { if (out_port == FLOOD_PORT) { /* Flood. */ @@ -1041,7 +1041,7 @@ compose_dsts(const struct bridge *br, const struct flow *flow, uint16_t vlan, if (port != in_port && (!port->vlan || vlan == port->vlan)) { /* Put destinations for original VLAN at the front, so that we * don't have to add actions to set the VLAN tag for those. */ - set_dst(dst, flow, in_port, port); + *tags |= set_dst(dst, flow, in_port, port); if (dst->vlan == ntohs(flow->dl_vlan)) { swap_dst(dst, vlan_dsts++); } @@ -1054,7 +1054,7 @@ compose_dsts(const struct bridge *br, const struct flow *flow, uint16_t vlan, return dst - dsts; } else if (out_port) { /* Unicast. */ - set_dst(dsts, flow, in_port, out_port); + *tags |= set_dst(dsts, flow, in_port, out_port); return 1; } else { /* Drop. */ @@ -1092,7 +1092,7 @@ send_packets(struct bridge *br, const struct flow *flow, size_t actions_len; /* Estimated length of actions, in bytes. */ size_t n_dsts; - n_dsts = compose_dsts(br, flow, vlan, in_port, out_port, dsts); + n_dsts = compose_dsts(br, flow, vlan, in_port, out_port, dsts, &tags); actions_len = (sizeof(struct ofp_action_header) + 2) * n_dsts; if (setup_flow) {