diff mbox series

[ovs-dev,v2,1/6] conntrack: Correctly annotate conntrack member.

Message ID 20240930205034.65484-1-pvalerio@redhat.com
State Accepted
Commit db26ef7c0cc7cb104a894fafb539c71a5a6eb927
Delegated to: aaron conole
Headers show
Series [ovs-dev,v2,1/6] conntrack: Correctly annotate conntrack member. | 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-_Build_and_Test success github build: passed

Commit Message

Paolo Valerio Sept. 30, 2024, 8:50 p.m. UTC
While at it update no longer valid comment.

Signed-off-by: Paolo Valerio <pvalerio@redhat.com>
---
 lib/conntrack-private.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Aaron Conole Oct. 1, 2024, 12:54 p.m. UTC | #1
Paolo Valerio <pvalerio@redhat.com> writes:

> While at it update no longer valid comment.
>
> Signed-off-by: Paolo Valerio <pvalerio@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

>  lib/conntrack-private.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/conntrack-private.h b/lib/conntrack-private.h
> index 71367f211..6c65caa07 100644
> --- a/lib/conntrack-private.h
> +++ b/lib/conntrack-private.h
> @@ -199,11 +199,12 @@ enum ct_ephemeral_range {
>      FOR_EACH_PORT_IN_RANGE__(curr, min, max, OVS_JOIN(idx, __COUNTER__))
>  
>  struct conntrack {
> -    struct ovs_mutex ct_lock; /* Protects 2 following fields. */
> +    struct ovs_mutex ct_lock; /* Protects the following fields. */
>      struct cmap conns[UINT16_MAX + 1] OVS_GUARDED;
> -    struct rculist exp_lists[N_EXP_LISTS];
> +    struct rculist exp_lists[N_EXP_LISTS] OVS_GUARDED;
>      struct cmap zone_limits OVS_GUARDED;
>      struct cmap timeout_policies OVS_GUARDED;
> +
>      uint32_t hash_basis; /* Salt for hashing a connection key. */
>      pthread_t clean_thread; /* Periodically cleans up connection tracker. */
>      struct latch clean_thread_exit; /* To destroy the 'clean_thread'. */
Aaron Conole Oct. 9, 2024, 8:31 p.m. UTC | #2
Paolo Valerio <pvalerio@redhat.com> writes:

> While at it update no longer valid comment.
>
> Signed-off-by: Paolo Valerio <pvalerio@redhat.com>
> ---

Thanks for the work on this, Paolo.  I've merged the series.

Given there is something of a bugfix for this series, if you think it
should be backported to the other branches please chime in.  There is
some churn in here that should be okay, but I'm hesitant to just do the
backport.
Ilya Maximets Oct. 11, 2024, 6:52 p.m. UTC | #3
On 10/9/24 22:31, Aaron Conole wrote:
> Paolo Valerio <pvalerio@redhat.com> writes:
> 
>> While at it update no longer valid comment.
>>
>> Signed-off-by: Paolo Valerio <pvalerio@redhat.com>
>> ---
> 
> Thanks for the work on this, Paolo.  I've merged the series.
> 
> Given there is something of a bugfix for this series, if you think it
> should be backported to the other branches please chime in.  There is
> some churn in here that should be okay, but I'm hesitant to just do the
> backport.


Hi, Paolo and Aaron.

There is a syntax error in this set that breaks Windows build:
  https://ci.appveyor.com/project/blp/ovs/builds/50766118/job/0r2xcuqvyb76x69b#L3172

  lib/conntrack.c(316): error C2059: syntax error: ':'

Could you, please, take a look?

Best regards, Ilya Maximets.
Aaron Conole Oct. 11, 2024, 7:59 p.m. UTC | #4
Ilya Maximets <i.maximets@ovn.org> writes:

> On 10/9/24 22:31, Aaron Conole wrote:
>> Paolo Valerio <pvalerio@redhat.com> writes:
>> 
>>> While at it update no longer valid comment.
>>>
>>> Signed-off-by: Paolo Valerio <pvalerio@redhat.com>
>>> ---
>> 
>> Thanks for the work on this, Paolo.  I've merged the series.
>> 
>> Given there is something of a bugfix for this series, if you think it
>> should be backported to the other branches please chime in.  There is
>> some churn in here that should be okay, but I'm hesitant to just do the
>> backport.
>
>
> Hi, Paolo and Aaron.
>
> There is a syntax error in this set that breaks Windows build:
>   https://ci.appveyor.com/project/blp/ovs/builds/50766118/job/0r2xcuqvyb76x69b#L3172
>
>   lib/conntrack.c(316): error C2059: syntax error: ':'
>
> Could you, please, take a look?

Hrrm... I guess it would prefer something like below.  For some reason
both my appveyor and cirrus support got disabled in the repo I was using
so I didn't catch it.

---
diff --git a/lib/conntrack.c b/lib/conntrack.c
index 0061a56364..f4b150bee5 100644
--- a/lib/conntrack.c
+++ b/lib/conntrack.c
@@ -313,7 +313,7 @@ zone_limit_get_limit(struct conntrack *ct, struct conntrack_zone_limit *czl)
 
     if (limit == ZONE_LIMIT_CONN_DEFAULT) {
         atomic_read_relaxed(&ct->default_zone_limit, &limit);
-        limit = limit ? : -1;
+        limit = limit ? limit : -1;
     }
 
     return limit;
---
diff mbox series

Patch

diff --git a/lib/conntrack-private.h b/lib/conntrack-private.h
index 71367f211..6c65caa07 100644
--- a/lib/conntrack-private.h
+++ b/lib/conntrack-private.h
@@ -199,11 +199,12 @@  enum ct_ephemeral_range {
     FOR_EACH_PORT_IN_RANGE__(curr, min, max, OVS_JOIN(idx, __COUNTER__))
 
 struct conntrack {
-    struct ovs_mutex ct_lock; /* Protects 2 following fields. */
+    struct ovs_mutex ct_lock; /* Protects the following fields. */
     struct cmap conns[UINT16_MAX + 1] OVS_GUARDED;
-    struct rculist exp_lists[N_EXP_LISTS];
+    struct rculist exp_lists[N_EXP_LISTS] OVS_GUARDED;
     struct cmap zone_limits OVS_GUARDED;
     struct cmap timeout_policies OVS_GUARDED;
+
     uint32_t hash_basis; /* Salt for hashing a connection key. */
     pthread_t clean_thread; /* Periodically cleans up connection tracker. */
     struct latch clean_thread_exit; /* To destroy the 'clean_thread'. */