On 7/14/25 1:29 PM, Roi Dayan via dev wrote:
> From: Eli Britstein <el...@nvidia.com>
> 
> Upon modifying a group, the following steps occur:
> 1. ofproto_group_mod_start()->modify_group_start():
>    Find an old group object, create a new one.
> 2. ofproto_bump_tables_version()
> 3. ofproto_group_mod_finish():
>    Modify the new group object with buckets etc.
> 
> At step #3, the new group object is already in use by revalidators,
> that may read incorrect data while being modified.
> 
> Instead, move the group modification of the new object to step #1.
> 
> Fixes: 0a8f6beb54ab ("ofproto-dpif: Fix dp_hash mapping after select group 
> modification.")
> Signed-off-by: Eli Britstein <el...@nvidia.com>
> Acked-by: Gaetan Rivet <gaet...@nvidia.com>
> Acked-by: Roi Dayan <r...@nvidia.com>
> ---
> 
> Notes:
>     v2
>     - Move change to modify_group_start().
>     - Remove redundant assertion.
> 
>  ofproto/ofproto.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> index ef615e59c354..a0248c5ba46b 100644
> --- a/ofproto/ofproto.c
> +++ b/ofproto/ofproto.c
> @@ -7820,6 +7820,13 @@ modify_group_start(struct ofproto *ofproto, struct 
> ofproto_group_mod *ogm)
>          ofproto->n_groups[old_group->type]--;
>          ofproto->n_groups[new_group->type]++;
>      }
> +
> +    if (ofproto->ofproto_class->group_modify) {
> +        /* Modify a group. */

Thanks!  I removed this one comment as it doesn't seem to be useful.
With that, applied and backported down to 3.2.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to