From 04e5a45444e676d33fc467a7c31ca31828d8d367 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 5 May 2009 10:45:16 -0700 Subject: [PATCH] vswitch: Eliminate dead code. The bridge had a flow_idle_time member that was set to a constant value and never modified. This commit removes it. (secchan is now responsible for configuring the flow idle time, so it is not desirable to revive this member.) --- vswitchd/bridge.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index f2692817..bba96492 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -155,7 +155,6 @@ struct bridge { struct list node; /* Node in global list of bridges. */ char *name; /* User-specified arbitrary name. */ struct mac_learning *ml; /* MAC learning table, or null not to learn. */ - int flow_idle_time; /* Idle time for flows we set up. */ bool sent_config_request; /* Successfully sent config request? */ uint8_t default_ea[ETH_ADDR_LEN]; /* Default MAC. */ @@ -788,7 +787,6 @@ bridge_create(const char *name) br->name = xstrdup(name); br->ml = mac_learning_create(); - br->flow_idle_time = 5; br->sent_config_request = false; eth_addr_random(br->default_ea); @@ -1726,19 +1724,14 @@ done: compose_actions(br, flow, vlan, in_port, out_port, tags, actions); /* - * We send out only a single packet, instead of setting up a flow, if: - * - * - Flows are disabled entirely; or - * - * - The packet is an ARP directed to broadcast that arrived on a bonded - * interface. In such a situation ARP requests and replies must be - * handled differently, but OpenFlow unfortunately can't distinguish - * them. + * We send out only a single packet, instead of setting up a flow, if the + * packet is an ARP directed to broadcast that arrived on a bonded + * interface. In such a situation ARP requests and replies must be handled + * differently, but OpenFlow unfortunately can't distinguish them. */ - return (br->flow_idle_time >= 0 - && (in_port->n_ifaces < 2 - || flow->dl_type != htons(ETH_TYPE_ARP) - || !eth_addr_is_broadcast(flow->dl_dst))); + return (in_port->n_ifaces < 2 + || flow->dl_type != htons(ETH_TYPE_ARP) + || !eth_addr_is_broadcast(flow->dl_dst)); } /* Careful: 'opp' is in host byte order and opp->port_no is an OFP port -- 2.30.2