Quoting [email protected]:

On the patch itself, can't we just make skb_get_hash() be able to
decode ARP? It seems like that is cleaner and more generic.

My first thought was to make a change in skb_get_hash(). However, the comment in __skb_get_hash() state that the hash is generated from the 4-tuple (address and ports). ARPs have no ports so a return value of 0 looked correct.

/*
  * __skb_get_hash: calculate a flow hash based on src/dst addresses
  * and src/dst port numbers.  Sets hash in skb to non-zero hash value
  * on success, zero indicates no valid hash.  Also, sets l4_hash in skb
  * if hash is a canonical 4-tuple hash over transport ports.
  */

What do you think?



Hi Jesse

I did not get a response so I was unsure how to proceed.

I am willing to pursue enhancing skb_get_hash() if you think that is the best approach. However what would you think of something like this?

hash = skb_get_hash(skb);
if ( ! hash )
       return ids->ids[vport->port_no%ids->n_ids];

return ids->ids[hash - ids->n_ids * reciprocal_divide(hash, ids->rn_ids)];

This would solve my problem on kernels without the enhanced skb_get_hash() and no further change to ovs would be required once shb_get_hash() is updated.

PS:  Should I move this discussion to ovs-dev ?

_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to