On 15 Mar 2025, at 0:49, Ilya Maximets wrote:
> When a new bucket is inserted to an existing group, OVS creates a new
> group with just that one bucket and then copies old buckets into it.
> The problem is that dp_hash mappings remain initialized for that one
> bucket and no traffic can be sent to any of the old buckets.
> If a bucket is removed, then OVS creates an empty new group and then
> copies old buckets into it, except for the removed one. Mappings are
> also not updated in this case and the group behaves as if it had no
> buckets at all.
>
> We need to re-hash all the buckets after the copy of the old buckets.
> ofproto-provider API already has a callback for this case, but it just
> wasn't implemented for ofproto-dpif. It wasn't necessary in the past,
> but it became necessary when the hash map construction was moved to
> the ofproto-dpif layer.
>
> No locking in this function is required, because the new group must
> not be visible during modification. It becomes visible only after the
> GROUP_MOD processing is finished.
>
> Fixes: 2e3fd24c7c44 ("ofproto-dpif: Improve dp_hash selection method for
> select groups")
> Reported-at: https://github.com/openvswitch/ovs-issues/issues/357
> Signed-off-by: Ilya Maximets <i.maxim...@ovn.org>
The changes look good to me.
Acked-by: Eelco Chaudron <echau...@redhat.com>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev