diff mbox series

[ovs-dev] bond: modify bond_link_status_update log

Message ID 202208171945567167023@chinatelecom.cn
State Superseded
Headers show
Series [ovs-dev] bond: modify bond_link_status_update log | expand

Checks

Context Check Description
ovsrobot/apply-robot fail apply and check: fail
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/intel-ovs-compilation fail test: fail

Commit Message

yangchang Aug. 17, 2022, 11:45 a.m. UTC
bond link status change comes from carrier and lacp may_enable ,when
carrir does not change and lacp change, prompt of LACP will be more accurate.

Signed-off-by: yangchang <yangchang@chinatelecom.cn>
---
 ofproto/bond.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--
2.27.0.windows.1



yangchang@chinatelecom.cn

Comments

Ilya Maximets Aug. 17, 2022, 12:15 p.m. UTC | #1
On 8/17/22 13:45, yangchang wrote:
> bond link status change comes from carrier and lacp may_enable ,when
> carrir does not change and lacp change, prompt of LACP will be more accurate.
> 
> Signed-off-by: yangchang <yangchang@chinatelecom.cn>
> ---
>  ofproto/bond.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/ofproto/bond.c b/ofproto/bond.c
> index 845f69e21..b5b139e63 100644
> --- a/ofproto/bond.c
> +++ b/ofproto/bond.c
> @@ -1883,8 +1883,14 @@ bond_link_status_update(struct bond_member *member)
>      up = netdev_get_carrier(member->netdev) && member->may_enable;
>      if ((up == member->enabled) != (member->delay_expires == LLONG_MAX)) {
>          static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
> -        VLOG_INFO_RL(&rl, "member %s: link state %s",
> -                     member->name, up ? "up" : "down");
> +        if (up == netdev_get_carrier(slave->netdev)) {
> +            VLOG_INFO_RL(&rl, "interface %s: link state %s",
> +                         slave->name, up ? "up" : "down");
> +        } else {
> +            VLOG_INFO_RL(&rl, "interface %s: lacp may_enable %s",
> +                         slave->name, up ? "true" : "false");
> +        }
> +
>          if (up == member->enabled) {
>              member->delay_expires = LLONG_MAX;
>              VLOG_INFO_RL(&rl, "member %s: will not be %s",
> --
> 2.27.0.windows.1

yangchang@chinatelecom.cn

Hi, yangchang.  Thanks for the patch!  Though it looks similar to what
Mike did in his broader logging update here:

  https://patchwork.ozlabs.org/project/openvswitch/patch/20220622142852.872240-1-mkp@redhat.com/

It would be great if you can help with testing/reviewing that change.

Best regards, Ilya Maximets.
yangchang Aug. 18, 2022, 2:25 a.m. UTC | #2
Thanks for your review, It is indeed similar to the patch, I will testing and reviewing the change.



yangchang@chinatelecom.cn
 
From: Ilya Maximets
Date: 2022-08-17 20:15
To: yangchang; dev
CC: i.maximets; Michael Pattrick
Subject: Re: [ovs-dev] [PATCH] bond: modify bond_link_status_update log
>On 8/17/22 13:45, yangchang wrote:
>> bond link status change comes from carrier and lacp may_enable ,when
>> carrir does not change and lacp change, prompt of LACP will be more accurate.
>> 
>> Signed-off-by: yangchang <yangchang@chinatelecom.cn>
>>---
>>  ofproto/bond.c | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/ofproto/bond.c b/ofproto/bond.c
>> index 845f69e21..b5b139e63 100644
>> --- a/ofproto/bond.c
>> +++ b/ofproto/bond.c
>> @@ -1883,8 +1883,14 @@ bond_link_status_update(struct bond_member *member)
>>      up = netdev_get_carrier(member->netdev) && member->may_enable;
>>      if ((up == member->enabled) != (member->delay_expires == LLONG_MAX)) {
>>          static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
>> -        VLOG_INFO_RL(&rl, "member %s: link state %s",
>> -                     member->name, up ? "up" : "down");
>> +        if (up == netdev_get_carrier(slave->netdev)) {
>> +            VLOG_INFO_RL(&rl, "interface %s: link state %s",
>> +                         slave->name, up ? "up" : "down");
>> +        } else {
>> +            VLOG_INFO_RL(&rl, "interface %s: lacp may_enable %s",
>> +                         slave->name, up ? "true" : "false");
>> +        }
>> +
>>          if (up == member->enabled) {
>>              member->delay_expires = LLONG_MAX;
>>              VLOG_INFO_RL(&rl, "member %s: will not be %s",
>> --
>> 2.27.0.windows.1
>
>yangchang@chinatelecom.cn
> 
>Hi, yangchang.  Thanks for the patch!  Though it looks similar to what
>Mike did in his broader logging update here:
>
>https://patchwork.ozlabs.org/project/openvswitch/patch/20220622142852.872240-1-mkp@redhat.com/
> 
>It would be great if you can help with testing/reviewing that change.
> 
>Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/ofproto/bond.c b/ofproto/bond.c
index 845f69e21..b5b139e63 100644
--- a/ofproto/bond.c
+++ b/ofproto/bond.c
@@ -1883,8 +1883,14 @@  bond_link_status_update(struct bond_member *member)
     up = netdev_get_carrier(member->netdev) && member->may_enable;
     if ((up == member->enabled) != (member->delay_expires == LLONG_MAX)) {
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);
-        VLOG_INFO_RL(&rl, "member %s: link state %s",
-                     member->name, up ? "up" : "down");
+        if (up == netdev_get_carrier(slave->netdev)) {
+            VLOG_INFO_RL(&rl, "interface %s: link state %s",
+                         slave->name, up ? "up" : "down");
+        } else {
+            VLOG_INFO_RL(&rl, "interface %s: lacp may_enable %s",
+                         slave->name, up ? "true" : "false");
+        }
+
         if (up == member->enabled) {
             member->delay_expires = LLONG_MAX;
             VLOG_INFO_RL(&rl, "member %s: will not be %s",