[ovs-dev] [DPDK Upcalls 03/11] flow: Parse MPLS should return the actual number of labels.

Ben Pfaff blp at nicira.com
Tue Aug 5 19:48:44 UTC 2014


On Fri, Aug 01, 2014 at 06:39:14PM -0700, Ethan Jackson wrote:
> This problem is uncovered by a future patch.
> 
> Signed-off-by: Ethan Jackson <ethan at nicira.com>

I think that the actual bug here is that the code uses MAX instead of
MIN. The goal is to push as many MPLS labels as are present, but not
more than 'struct flow' has space for.

> @@ -210,7 +210,7 @@ parse_mpls(void **datap, size_t *sizep)
>              break;
>          }
>      }
> -    return MAX(count, FLOW_MAX_MPLS_LABELS);
> +    return count;
>  }
>  
>  static inline ovs_be16
> -- 
> 1.8.1.2
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list