On 2/9/26 10:58 AM, MJ Ponsonby wrote:
> In OVS commit 3900653 changes FLOW_N_REGS from 16 to 32, this means that
> you hit the version incompatibility error when compiling with newer OVS.
> This expands this check to cover the value of 32 that it now expects
> allowing newer OVS and OVN to be compatible.
> 
> This commit expects OVS to be at version 3.7.0.
> 
> Signed-off-by: MJ Ponsonby <[email protected]>
> ---

Hi MJ,

Thanks for the patch!

>  controller/pinctrl.c | 26 +++++++++-----------------
>  1 file changed, 9 insertions(+), 17 deletions(-)
> 
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index 7baf6b488..a4e83f744 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -6368,23 +6368,15 @@ static void
>  reload_metadata(struct ofpbuf *ofpacts, const struct match *md)
>  {
>      enum mf_field_id md_fields[] = {
> -#if FLOW_N_REGS == 16
> -        MFF_REG0,
> -        MFF_REG1,
> -        MFF_REG2,
> -        MFF_REG3,
> -        MFF_REG4,
> -        MFF_REG5,
> -        MFF_REG6,
> -        MFF_REG7,
> -        MFF_REG8,
> -        MFF_REG9,
> -        MFF_REG10,
> -        MFF_REG11,
> -        MFF_REG12,
> -        MFF_REG13,
> -        MFF_REG14,
> -        MFF_REG15,
> +#if FLOW_N_REGS == 32
> +        MFF_REG0, MFF_REG1, MFF_REG2, MFF_REG3, \
> +        MFF_REG4, MFF_REG5, MFF_REG6, MFF_REG7, \
> +        MFF_REG8, MFF_REG9, MFF_REG10, MFF_REG11, \
> +        MFF_REG12, MFF_REG13, MFF_REG14, MFF_REG15, \
> +        MFF_REG16, MFF_REG17, MFF_REG18, MFF_REG19, \
> +        MFF_REG20, MFF_REG21, MFF_REG22, MFF_REG23, \
> +        MFF_REG24, MFF_REG25, MFF_REG26, MFF_REG27, \
> +        MFF_REG28, MFF_REG29, MFF_REG30, MFF_REG31, \

I'm not sure this is the right way to go though.

First of all we should bump the submodule version, otherwise all our CI
will break.

This is a compile time check but there's no guarantee that the version
of OVS that's used at runtime actually supports 32 registers.

E.g., if:
- OVS used at compilation time is 3.7
- OVS used at runtime is 3.6

with your patch OVN will generate code that tries to clear the new
registers but the OVS used at runtime doesn't support those.

We should instead use the capabilities exposed by OVS to determine the
actual number of runtime registers and only use them in OVN if the
underlying OVS supports them.

Regards,
Dumitru

>  #else
>  #error
>  #endif

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to