diff mbox series

[ovs-dev,ovn,v1] northd: Remove misleading warning log message

Message ID 20191202032201.26698-1-russell@ovn.org
State Accepted
Headers show
Series [ovs-dev,ovn,v1] northd: Remove misleading warning log message | expand

Commit Message

Russell Bryant Dec. 2, 2019, 3:22 a.m. UTC
While debugging an ovn-kubernetes cluster, I spotted several
"Duplicate MAC set" warning messages in the ovn-northd log.  It looks
like this message was emitted from this code path by mistake, where
it correctly avoided assigning a duplicate MAC address.  This patch
turns off the warning for that case.

Signed-off-by: Russell Bryant <russell@ovn.org>
---
 northd/ovn-northd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Numan Siddique Dec. 2, 2019, 8:45 a.m. UTC | #1
On Mon, Dec 2, 2019 at 8:54 AM Russell Bryant <russell@ovn.org> wrote:
>
> While debugging an ovn-kubernetes cluster, I spotted several
> "Duplicate MAC set" warning messages in the ovn-northd log.  It looks
> like this message was emitted from this code path by mistake, where
> it correctly avoided assigning a duplicate MAC address.  This patch
> turns off the warning for that case.
>
> Signed-off-by: Russell Bryant <russell@ovn.org>

Acked-by: Numan Siddique <numans@ovn.org>

Numan

> ---
>  northd/ovn-northd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index a943e1037..9f558c628 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -1395,7 +1395,7 @@ ipam_get_unused_mac(ovs_be32 ip)
>          mac_addr_suffix = ((base_addr + i) % (MAC_ADDR_SPACE - 1)) + 1;
>          mac64 =  eth_addr_to_uint64(mac_prefix) | mac_addr_suffix;
>          eth_addr_from_uint64(mac64, &mac);
> -        if (!ipam_is_duplicate_mac(&mac, mac64, true)) {
> +        if (!ipam_is_duplicate_mac(&mac, mac64, false)) {
>              break;
>          }
>      }
> --
> 2.23.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Russell Bryant Dec. 2, 2019, 7:02 p.m. UTC | #2
On Mon, Dec 2, 2019 at 3:45 AM Numan Siddique <numans@ovn.org> wrote:
>
> On Mon, Dec 2, 2019 at 8:54 AM Russell Bryant <russell@ovn.org> wrote:
> >
> > While debugging an ovn-kubernetes cluster, I spotted several
> > "Duplicate MAC set" warning messages in the ovn-northd log.  It looks
> > like this message was emitted from this code path by mistake, where
> > it correctly avoided assigning a duplicate MAC address.  This patch
> > turns off the warning for that case.
> >
> > Signed-off-by: Russell Bryant <russell@ovn.org>
>
> Acked-by: Numan Siddique <numans@ovn.org>

Thanks.  I applied this to master.


>
> Numan
>
> > ---
> >  northd/ovn-northd.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> > index a943e1037..9f558c628 100644
> > --- a/northd/ovn-northd.c
> > +++ b/northd/ovn-northd.c
> > @@ -1395,7 +1395,7 @@ ipam_get_unused_mac(ovs_be32 ip)
> >          mac_addr_suffix = ((base_addr + i) % (MAC_ADDR_SPACE - 1)) + 1;
> >          mac64 =  eth_addr_to_uint64(mac_prefix) | mac_addr_suffix;
> >          eth_addr_from_uint64(mac64, &mac);
> > -        if (!ipam_is_duplicate_mac(&mac, mac64, true)) {
> > +        if (!ipam_is_duplicate_mac(&mac, mac64, false)) {
> >              break;
> >          }
> >      }
> > --
> > 2.23.0
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
diff mbox series

Patch

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index a943e1037..9f558c628 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -1395,7 +1395,7 @@  ipam_get_unused_mac(ovs_be32 ip)
         mac_addr_suffix = ((base_addr + i) % (MAC_ADDR_SPACE - 1)) + 1;
         mac64 =  eth_addr_to_uint64(mac_prefix) | mac_addr_suffix;
         eth_addr_from_uint64(mac64, &mac);
-        if (!ipam_is_duplicate_mac(&mac, mac64, true)) {
+        if (!ipam_is_duplicate_mac(&mac, mac64, false)) {
             break;
         }
     }