Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: EVPN MH add correct value into dfAlgorithm json output #13318

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

chiragshah6
Copy link
Member

FRR "show bgp l2 evpn es json" output shows 'dfAlgorithm' same as 'dfPreference' value instead of algorithm.

Modified the code to set the correct DF algorithm value into 'dfAlgorithm' field.

torm-11# show bgp l2 evpn es
ES Flags: B - bypass, L local, R remote, I inconsistent VTEP Flags: E ESR/Type-4, A active nexthop
ESI                            Flags RD                    #VNIs
VTEPs
03:44:38:39:ff:ff:01:00:00:01  LR    27.0.0.15:15          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:01:00:00:02  LR    27.0.0.15:16          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:01:00:00:03  LR    27.0.0.15:17          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:02:00:00:01  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
03:44:38:39:ff:ff:02:00:00:02  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
03:44:38:39:ff:ff:02:00:00:03  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
torm-11#

Before Fix:-

torm-11# show bgp l2 evpn es 03:44:38:39:ff:ff:01:00:00:01 json
{
  "esi":"03:44:38:39:ff:ff:01:00:00:01",
  "rd":"27.0.0.15:15",
  "type":[
    "local",
    "remote"
  ],
  "vteps":[
    {
      "vtep_ip":"27.0.0.16",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":32767 =====> dfAlgorithm is same as dfPreference
    },
    {
      "vtep_ip":"27.0.0.17",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":32767 =====> dfAlgorithm is same as dfPreference
    }
  ],
  "flags":[
    "up",
    "advertiseEVI"
  ],
  "originator_ip":"27.0.0.15",
  "remoteVniCount":10,
  "vrfCount":3,
  "macipPathCount":33,
  "macipGlobalPathCount":264,
  "inconsistentVniVtepCount":0,
  "localEsDfPreference":50000,
  "fragments":[
    {
      "rd":"27.0.0.15:15",
      "eviCount":10
    }
  ]
}
torm-11#

After Fix:-

torm-11# show bgp l2vpn evpn es 03:44:38:39:ff:ff:01:00:00:01 json
{
  "esi":"03:44:38:39:ff:ff:01:00:00:01",
  "rd":"27.0.0.15:4",
  "type":[
    "local",
    "remote"
  ],
  "vteps":[
    {
      "vtep_ip":"27.0.0.16",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":"preference" ---- dfAlgorithm shows properly
    },
    {
      "vtep_ip":"27.0.0.17",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":"preference" --- dfAlgorithm shows properly
    }
  ],
  "vniCount":10,
  "flags":[
    "up",
    "advertiseEVI"
  ],
  "originator_ip":"27.0.0.15",
  "remoteVniCount":10,
  "vrfCount":3,
  "macipPathCount":33,
  "macipGlobalPathCount":264,
  "inconsistentVniVtepCount":0,
  "localEsDfPreference":50000,
  "fragments":[
    {
      "rd":"27.0.0.15:4",
      "eviCount":10
    }
  ]
}
torm-11#

Signed-off-by: Sindhu Parvathi Gopinathan's sgopinathan@nvidia.com

FRR "show bgp l2 evpn es <esi-id> json" output shows 'dfAlgorithm'
same as 'dfPreference' value instead of algorithm.

Modified the code to set the correct DF algorithm value into
'dfAlgorithm' field.

torm-11# show bgp l2 evpn es
ES Flags: B - bypass, L local, R remote, I inconsistent
VTEP Flags: E ESR/Type-4, A active nexthop
ESI                            Flags RD                    #VNIs
VTEPs
03:44:38:39:ff:ff:01:00:00:01  LR    27.0.0.15:15          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:01:00:00:02  LR    27.0.0.15:16          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:01:00:00:03  LR    27.0.0.15:17          10
27.0.0.16(EA),27.0.0.17(EA)
03:44:38:39:ff:ff:02:00:00:01  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
03:44:38:39:ff:ff:02:00:00:02  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
03:44:38:39:ff:ff:02:00:00:03  R     -                     10
27.0.0.18(A),27.0.0.19(A),27.0.0.20(A)
torm-11#

Before Fix:-
```
torm-11# show bgp l2 evpn es 03:44:38:39:ff:ff:01:00:00:01 json
{
  "esi":"03:44:38:39:ff:ff:01:00:00:01",
  "rd":"27.0.0.15:15",
  "type":[
    "local",
    "remote"
  ],
  "vteps":[
    {
      "vtep_ip":"27.0.0.16",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":32767 =====> dfAlgorithm is same as dfPreference
    },
    {
      "vtep_ip":"27.0.0.17",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":32767 =====> dfAlgorithm is same as dfPreference
    }
  ],
  "flags":[
    "up",
    "advertiseEVI"
  ],
  "originator_ip":"27.0.0.15",
  "remoteVniCount":10,
  "vrfCount":3,
  "macipPathCount":33,
  "macipGlobalPathCount":264,
  "inconsistentVniVtepCount":0,
  "localEsDfPreference":50000,
  "fragments":[
    {
      "rd":"27.0.0.15:15",
      "eviCount":10
    }
  ]
}
torm-11#
```

After Fix:-

```
torm-11# show bgp l2vpn evpn es 03:44:38:39:ff:ff:01:00:00:01 json
{
  "esi":"03:44:38:39:ff:ff:01:00:00:01",
  "rd":"27.0.0.15:4",
  "type":[
    "local",
    "remote"
  ],
  "vteps":[
    {
      "vtep_ip":"27.0.0.16",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":"preference" ---- dfAlgorithm shows properly
    },
    {
      "vtep_ip":"27.0.0.17",
      "flags":[
        "esr",
        "active"
      ],
      "dfPreference":32767,
      "dfAlgorithm":"preference" --- dfAlgorithm shows properly
    }
  ],
  "vniCount":10,
  "flags":[
    "up",
    "advertiseEVI"
  ],
  "originator_ip":"27.0.0.15",
  "remoteVniCount":10,
  "vrfCount":3,
  "macipPathCount":33,
  "macipGlobalPathCount":264,
  "inconsistentVniVtepCount":0,
  "localEsDfPreference":50000,
  "fragments":[
    {
      "rd":"27.0.0.15:4",
      "eviCount":10
    }
  ]
}
torm-11#
```

Ticket:#3411912

Issue:3411912

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
@frrbot frrbot bot added the bgp label Apr 16, 2023
@chiragshah6 chiragshah6 changed the title bgpd:add correct value into dfAlgorithm json output bgpd: EVPN MH add correct value into dfAlgorithm json output Apr 16, 2023
@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Apr 16, 2023

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10912/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Topotests Ubuntu 18.04 i386 part 9: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9U18I386-10912/test

Topology Tests failed for Topotests Ubuntu 18.04 i386 part 9
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-10912/artifact/TOPO9U18I386/TopotestLogs/log_topotests.txt
Topotests Ubuntu 18.04 i386 part 9: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10912/artifact/TOPO9U18I386/TopotestDetails/

Successful on other platforms/tests
  • Topotests Ubuntu 18.04 amd64 part 9
  • Topotests debian 10 amd64 part 2
  • Addresssanitizer topotests part 8
  • Static analyzer (clang)
  • Topotests Ubuntu 18.04 amd64 part 1
  • Addresssanitizer topotests part 6
  • Topotests Ubuntu 18.04 i386 part 5
  • Ubuntu 20.04 deb pkg check
  • Topotests Ubuntu 18.04 i386 part 0
  • Ubuntu 18.04 deb pkg check
  • Topotests debian 10 amd64 part 1
  • Topotests Ubuntu 18.04 amd64 part 8
  • Topotests debian 10 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 0
  • Topotests Ubuntu 18.04 arm8 part 6
  • Addresssanitizer topotests part 0
  • Topotests debian 10 amd64 part 6
  • Topotests Ubuntu 18.04 arm8 part 1
  • Topotests debian 10 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 6
  • Debian 9 deb pkg check
  • Topotests Ubuntu 18.04 arm8 part 3
  • Addresssanitizer topotests part 4
  • Addresssanitizer topotests part 1
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests debian 10 amd64 part 5
  • Topotests debian 10 amd64 part 4
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 arm8 part 7
  • Topotests Ubuntu 18.04 arm8 part 8
  • Topotests Ubuntu 18.04 i386 part 7
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 i386 part 2
  • Ubuntu 16.04 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 5
  • Topotests Ubuntu 18.04 amd64 part 2
  • Addresssanitizer topotests part 5
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests Ubuntu 18.04 i386 part 6
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests Ubuntu 18.04 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests debian 10 amd64 part 8
  • Debian 10 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 7
  • Addresssanitizer topotests part 2
  • Topotests Ubuntu 18.04 arm8 part 9
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 arm8 part 2
  • Topotests debian 10 amd64 part 9
  • Addresssanitizer topotests part 3
  • Addresssanitizer topotests part 9
  • Topotests Ubuntu 18.04 amd64 part 4
  • CentOS 7 rpm pkg check

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10912/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@ton31337 ton31337 merged commit bcb1314 into FRRouting:master Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants