From: Ben Pfaff Date: Wed, 26 Sep 2012 17:02:40 +0000 (-0700) Subject: dpif-netdev: Remove unneeded 'key' parameter from dp_netdev_flow_used(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1fe014d7a280c2044f1476b48ccb403f2bd38b1;p=openvswitch dpif-netdev: Remove unneeded 'key' parameter from dp_netdev_flow_used(). The 'key' passed to dp_netdev_flow_used() is the same as the 'key' member in the struct dp_netdev_flow also passed to the function. Signed-off-by: Ben Pfaff Acked-by: Ethan Jackson --- diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 144b6b63..dc4479e5 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -996,13 +996,12 @@ dpif_netdev_recv_purge(struct dpif *dpif) } static void -dp_netdev_flow_used(struct dp_netdev_flow *flow, struct flow *key, - const struct ofpbuf *packet) +dp_netdev_flow_used(struct dp_netdev_flow *flow, const struct ofpbuf *packet) { flow->used = time_msec(); flow->packet_count++; flow->byte_count += packet->size; - flow->tcp_flags |= packet_get_tcp_flags(packet, key); + flow->tcp_flags |= packet_get_tcp_flags(packet, &flow->key); } static void @@ -1018,7 +1017,7 @@ dp_netdev_port_input(struct dp_netdev *dp, struct dp_netdev_port *port, flow_extract(packet, 0, 0, odp_port_to_ofp_port(port->port_no), &key); flow = dp_netdev_lookup_flow(dp, &key); if (flow) { - dp_netdev_flow_used(flow, &key, packet); + dp_netdev_flow_used(flow, packet); dp_netdev_execute_actions(dp, packet, &key, flow->actions, flow->actions_len); dp->n_hit++;