[ovs-dev] [PATCH] odp-util: Promote skb_mark in flow_key

Simon Horman horms at verge.net.au
Sat Mar 23 03:24:42 UTC 2013


On Fri, Mar 22, 2013 at 08:50:24AM -0700, Ben Pfaff wrote:
> On Fri, Mar 22, 2013 at 10:45:27PM +0900, Simon Horman wrote:
> > Re-order skb_mark in odp_flow_key_from_flow() so that it appears after the
> > in_port rather than before. This is consistent with the order in
> > ovs_flow_to_nlattrs().
> > 
> > Without this change update_stats() detects all flows with a non-zero
> > skb_mark as unexpected flows as the flow key received from the kernel
> > datapath does not match the one present in ovs-vswtichd.
> > 
> > It would appear that there have been no recent uses of matches on skb_mark.
> > 
> > Signed-off-by: Simon Horman <horms at verge.net.au>
> 
> I don't understand why this would happen.  On master, at least, every
> subfacet is associated with and can be looked up by the exact ODP key
> that the kernel passes down for it.  The order of the fields in an ODP
> key that userspace would construct should not matter.

My understanding is that update_stats() uses the key and key_len
provided by the datapath in order to construct a key_hash which
is used to locate a subfacet. And for this reason the key generated
by the datapath and ovs-vswtichd need to match.

Perhaps an alternate approach would be to convert the key from the
datapath into a flow and then back into a key which would be in
whatever order ovs-vswtichd likes.

Or perhaps I am missing something.



More information about the dev mailing list