diff mbox series

[ovs-dev] Start mcast id allocations from OVN_MIN_IP_MULTICAST.

Message ID 20240404214339.594051-1-ihrachys@redhat.com
State Accepted
Delegated to: Dumitru Ceara
Headers show
Series [ovs-dev] Start mcast id allocations from OVN_MIN_IP_MULTICAST. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Ihar Hrachyshka April 4, 2024, 9:43 p.m. UTC
Strictly speaking, this is not *essential* to start from MIN and not
MIN+1 (once the hint reaches max, it will wrap back to MIN anyway), but
this is inconsistent with how we handle datapath and port keys (we start
with hint = 0 there).

Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
---
 northd/northd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ales Musil April 11, 2024, 8:32 a.m. UTC | #1
On Thu, Apr 4, 2024 at 11:44 PM Ihar Hrachyshka <ihrachys@redhat.com> wrote:

> Strictly speaking, this is not *essential* to start from MIN and not
> MIN+1 (once the hint reaches max, it will wrap back to MIN anyway), but
> this is inconsistent with how we handle datapath and port keys (we start
> with hint = 0 there).
>
> Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
> ---
>  northd/northd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/northd/northd.c b/northd/northd.c
> index c568f6360..4baff408d 100644
> --- a/northd/northd.c
> +++ b/northd/northd.c
> @@ -641,7 +641,8 @@ init_mcast_info_for_datapath(struct ovn_datapath *od)
>      }
>
>      hmap_init(&od->mcast_info.group_tnlids);
> -    od->mcast_info.group_tnlid_hint = OVN_MIN_IP_MULTICAST;
> +    /* allocations start from hint + 1 */
> +    od->mcast_info.group_tnlid_hint = OVN_MIN_IP_MULTICAST - 1;
>      ovs_list_init(&od->mcast_info.groups);
>
>      if (od->nbs) {
> --
> 2.41.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil <amusil@redhat.com>
Dumitru Ceara April 12, 2024, 2:33 p.m. UTC | #2
On 4/11/24 10:32, Ales Musil wrote:
> On Thu, Apr 4, 2024 at 11:44 PM Ihar Hrachyshka <ihrachys@redhat.com> wrote:
> 
>> Strictly speaking, this is not *essential* to start from MIN and not
>> MIN+1 (once the hint reaches max, it will wrap back to MIN anyway), but
>> this is inconsistent with how we handle datapath and port keys (we start
>> with hint = 0 there).
>>
>> Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
>> ---
>>  northd/northd.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/northd/northd.c b/northd/northd.c
>> index c568f6360..4baff408d 100644
>> --- a/northd/northd.c
>> +++ b/northd/northd.c
>> @@ -641,7 +641,8 @@ init_mcast_info_for_datapath(struct ovn_datapath *od)
>>      }
>>
>>      hmap_init(&od->mcast_info.group_tnlids);
>> -    od->mcast_info.group_tnlid_hint = OVN_MIN_IP_MULTICAST;
>> +    /* allocations start from hint + 1 */
>> +    od->mcast_info.group_tnlid_hint = OVN_MIN_IP_MULTICAST - 1;
>>      ovs_list_init(&od->mcast_info.groups);
>>
>>      if (od->nbs) {
>> --
>> 2.41.0
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
>>
> Looks good to me, thanks.
> 
> Acked-by: Ales Musil <amusil@redhat.com>
> 

Thanks, Ihar, Ales!

Applied to main.  Do you think it's worth backporting this?

Regards,
Dumitru
Ihar Hrachyshka April 12, 2024, 2:40 p.m. UTC | #3
On Fri, Apr 12, 2024 at 10:33 AM Dumitru Ceara <dceara@redhat.com> wrote:

> On 4/11/24 10:32, Ales Musil wrote:
> > On Thu, Apr 4, 2024 at 11:44 PM Ihar Hrachyshka <ihrachys@redhat.com>
> wrote:
> >
> >> Strictly speaking, this is not *essential* to start from MIN and not
> >> MIN+1 (once the hint reaches max, it will wrap back to MIN anyway), but
> >> this is inconsistent with how we handle datapath and port keys (we start
> >> with hint = 0 there).
> >>
> >> Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
> >> ---
> >>  northd/northd.c | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/northd/northd.c b/northd/northd.c
> >> index c568f6360..4baff408d 100644
> >> --- a/northd/northd.c
> >> +++ b/northd/northd.c
> >> @@ -641,7 +641,8 @@ init_mcast_info_for_datapath(struct ovn_datapath
> *od)
> >>      }
> >>
> >>      hmap_init(&od->mcast_info.group_tnlids);
> >> -    od->mcast_info.group_tnlid_hint = OVN_MIN_IP_MULTICAST;
> >> +    /* allocations start from hint + 1 */
> >> +    od->mcast_info.group_tnlid_hint = OVN_MIN_IP_MULTICAST - 1;
> >>      ovs_list_init(&od->mcast_info.groups);
> >>
> >>      if (od->nbs) {
> >> --
> >> 2.41.0
> >>
> >> _______________________________________________
> >> dev mailing list
> >> dev@openvswitch.org
> >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >>
> >>
> > Looks good to me, thanks.
> >
> > Acked-by: Ales Musil <amusil@redhat.com>
> >
>
> Thanks, Ihar, Ales!
>
> Applied to main.  Do you think it's worth backporting this?
>
>
Nah. Nothing is broken here, except dev aesthetics and order.

Ihar
diff mbox series

Patch

diff --git a/northd/northd.c b/northd/northd.c
index c568f6360..4baff408d 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -641,7 +641,8 @@  init_mcast_info_for_datapath(struct ovn_datapath *od)
     }
 
     hmap_init(&od->mcast_info.group_tnlids);
-    od->mcast_info.group_tnlid_hint = OVN_MIN_IP_MULTICAST;
+    /* allocations start from hint + 1 */
+    od->mcast_info.group_tnlid_hint = OVN_MIN_IP_MULTICAST - 1;
     ovs_list_init(&od->mcast_info.groups);
 
     if (od->nbs) {