[ovs-dev] [PATCH v2 1/3] userspace datapath: Add OVS_HASH_L4_SYMMETRIC dp_hash algorithm

Ben Pfaff blp at ovn.org
Tue Apr 17 19:56:55 UTC 2018

On Mon, Apr 16, 2018 at 04:26:26PM +0200, Jan Scheurich wrote:
> This commit implements a new dp_hash algorithm OVS_HASH_L4_SYMMETRIC in
> the netdev datapath. It will be used as default hash algorithm for the
> dp_hash-based select groups in a subsequent commit to maintain
> compatibility with the symmetry property of the current default hash
> selection method.
> Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
> Signed-off-by: Nitin Katiyar <nitin.katiyar at ericsson.com>
> Co-authored-by: Nitin Katiyar <nitin.katiyar at ericsson.com>

"sparse" says:
    ../lib/flow.c:2128:13: error: restricted ovs_be32 degrades to integer
    ../lib/flow.c:2128:35: error: restricted ovs_be16 degrades to integer

I think that it is saying that htons should be htonl here:

    if (flow->packet_type != htons(PT_ETH)) {
        /* Cannot hash non-Ethernet flows */
        return 0;

GCC says:

    ../lib/flow.c: In function 'flow_hash_symmetric_l2.part.20':
    ../lib/flow.c:2138:25: error: 'fields.<Ue630>.vlan_tci' is used uninitialized in this function [-Werror=uninitialized]
             fields.vlan_tci ^= flow->vlans[i].tci & htons(VLAN_VID_MASK);

I think that it is right.



More information about the dev mailing list