On 2/16/23 20:20, Mark Michelson wrote:
> Thanks Ales,
>
> Acked-by: Mark Michelson <[email protected]>
>
Thanks, Mark and Ales!
I applied this to the main branch with a minor change. Please see
below.
Regards,
Dumitru
diff --git a/lib/lb.c b/lib/lb.c
index a5cd0eced9..e941434c4e 100644
--- a/lib/lb.c
+++ b/lib/lb.c
@@ -519,24 +519,6 @@ ovn_lb_get_health_check(const struct nbrec_load_balancer
*nbrec_lb,
return NULL;
}
-static inline uint32_t
-hash_add_in6_addr(uint32_t hash, const struct in6_addr *addr)
-{
- for (uint8_t i = 0; i < 4; i++) {
-#ifdef s6_addr32
- hash = hash_add(hash, addr->s6_addr32[i]);
-#else
- uint8_t index = i * 4;
- uint32_t part = (uint32_t) addr->s6_addr[index]
- | (uint32_t) addr->s6_addr[index + 1] << 8
- | (uint32_t) addr->s6_addr[index + 2] << 16
- | (uint32_t) addr->s6_addr[index + 3] << 24;
- hash = hash_add(hash, part);
-#endif
- }
- return hash;
-}
-
struct ovn_northd_lb *
ovn_northd_lb_create(const struct nbrec_load_balancer *nbrec_lb,
size_t n_datapaths)
diff --git a/lib/ovn-util.h b/lib/ovn-util.h
index 6ce40c7f6e..cda1fde487 100644
--- a/lib/ovn-util.h
+++ b/lib/ovn-util.h
@@ -313,6 +313,23 @@ void ddlog_warn(const char *msg);
void ddlog_err(const char *msg);
#endif
+static inline uint32_t
+hash_add_in6_addr(uint32_t hash, const struct in6_addr *addr)
+{
+ for (uint8_t i = 0; i < 4; i++) {
+#ifdef s6_addr32
+ hash = hash_add(hash, addr->s6_addr32[i]);
+#else
+ uint8_t index = i * 4;
+ uint32_t part = (uint32_t) addr->s6_addr[index]
+ | (uint32_t) addr->s6_addr[index + 1] << 8
+ | (uint32_t) addr->s6_addr[index + 2] << 16
+ | (uint32_t) addr->s6_addr[index + 3] << 24;
+ hash = hash_add(hash, part);
+#endif
+ }
+ return hash;
+}
/* Must be a bit-field ordered from most-preferred (higher number) to
* least-preferred (lower number). */
---
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev