]> git.proxmox.com Git - mirror_ovs.git/blobdiff - datapath/vport.c
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / datapath / vport.c
index f929282dcec1850942c8d0cef42dda1045b71626..bd62c5612398022542b087bded992e3f5cc8b161 100644 (file)
@@ -507,8 +507,9 @@ u32 ovs_vport_find_upcall_portid(const struct vport *vport, struct sk_buff *skb)
 
        ids = rcu_dereference(vport->upcall_portids);
 
-       if (ids->n_ids == 1 && ids->ids[0] == 0)
-               return 0;
+       /* If there is only one portid, select it in the fast-path. */
+       if (ids->n_ids == 1)
+               return ids->ids[0];
 
        hash = skb_get_hash(skb);
        ids_index = hash - ids->n_ids * reciprocal_divide(hash, ids->rn_ids);