Skip to content

Commit

Permalink
Add deviation for Decap NH with NextHopNetworkInstance (#3406)
Browse files Browse the repository at this point in the history
  • Loading branch information
self-maurya authored Aug 30, 2024
1 parent b884734 commit 971d8de
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,13 @@ func pushDecapScaleEntries(t *testing.T, args *testArgs, decapEntries []string)
}

func installDecapEntry(t *testing.T, args *testArgs, nhIndex, nhgIndex uint64, prefix string) {
decapNH := fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(args.dut)).
WithIndex(nhIndex).WithDecapsulateHeader(fluent.IPinIP)
if !deviations.DecapNHWithNextHopNIUnsupported(args.dut) {
decapNH.WithNextHopNetworkInstance(deviations.DefaultNetworkInstance(args.dut))
}
args.client.Modify().AddEntry(t,
fluent.NextHopEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(args.dut)).
WithIndex(nhIndex).WithDecapsulateHeader(fluent.IPinIP).
WithNextHopNetworkInstance(deviations.DefaultNetworkInstance(args.dut)),
decapNH,
fluent.NextHopGroupEntry().WithNetworkInstance(deviations.DefaultNetworkInstance(args.dut)).
WithID(nhgIndex).AddNextHop(nhIndex, 1),
fluent.IPv4Entry().WithNetworkInstance(niDecapTeVrf).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ platform_exceptions: {
interface_enabled: true
default_network_instance: "default"
omit_l2_mtu: true
decap_nh_with_nexthop_ni_unsupported: true
}
}
5 changes: 5 additions & 0 deletions internal/deviations/deviations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1124,3 +1124,8 @@ func DefaultImportExportPolicyUnsupported(dut *ondatra.DUTDevice) bool {
func Ipv6RouterAdvertisementIntervalUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetIpv6RouterAdvertisementIntervalUnsupported()
}

// DecapNHWithNextHopNIUnsupported returns true if Decap NH with NextHopNetworkInstance is unsupported
func DecapNHWithNextHopNIUnsupported(dut *ondatra.DUTDevice) bool {
return lookupDUTDeviations(dut).GetDecapNhWithNexthopNiUnsupported()
}
2 changes: 2 additions & 0 deletions proto/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,8 @@ message Metadata {
bool default_import_export_policy_unsupported = 213;
// ipv6_router_advertisement_interval_unsupported is set to true for devices that do not support ipv6 router advertisement interval configuration.
bool ipv6_router_advertisement_interval_unsupported = 214;
// Decap NH with NextHopNetworkInstance is unsupported
bool decap_nh_with_nexthop_ni_unsupported = 215;

// Reserved field numbers and identifiers.
reserved 84, 9, 28, 20, 90, 97, 55, 89, 19, 36, 35, 40, 173;
Expand Down
18 changes: 16 additions & 2 deletions proto/metadata_go_proto/metadata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 971d8de

Please sign in to comment.