[ovs-dev] [optimize 02/26] ofproto-dpif: Drop unneeded _SAFE from iteration in handle_flow_miss().
Ethan Jackson
ethan at nicira.com
Tue Apr 17 01:00:42 UTC 2012
Looks good.
Ethan
On Mon, Apr 16, 2012 at 17:18, Ben Pfaff <blp at nicira.com> wrote:
> The loop never frees the packet that it operates on, so _SAFE is not
> needed.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> ofproto/ofproto-dpif.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index f2b9339..265d6e9 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -2554,8 +2554,8 @@ handle_flow_miss(struct ofproto_dpif *ofproto, struct flow_miss *miss,
> struct flow_miss_op *ops, size_t *n_ops)
> {
> const struct flow *flow = &miss->flow;
> - struct ofpbuf *packet, *next_packet;
> struct subfacet *subfacet;
> + struct ofpbuf *packet;
> struct facet *facet;
>
> facet = facet_lookup_valid(ofproto, flow);
> @@ -2591,7 +2591,7 @@ handle_flow_miss(struct ofproto_dpif *ofproto, struct flow_miss *miss,
> miss->key_fitness, miss->key, miss->key_len,
> miss->initial_tci);
>
> - LIST_FOR_EACH_SAFE (packet, next_packet, list_node, &miss->packets) {
> + LIST_FOR_EACH (packet, list_node, &miss->packets) {
> struct dpif_flow_stats stats;
> struct flow_miss_op *op;
> struct dpif_execute *execute;
> --
> 1.7.9
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list