From c85ef676cffca25806146f859bb93c7719a24f03 Mon Sep 17 00:00:00 2001 From: Daniel Grau Date: Thu, 4 Apr 2024 20:57:07 +0000 Subject: [PATCH] fix --- dataplane/server.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/dataplane/server.go b/dataplane/server.go index bdc6f6e2..4c0aea79 100644 --- a/dataplane/server.go +++ b/dataplane/server.go @@ -105,6 +105,29 @@ func (d *Dataplane) Start(ctx context.Context, c gpb.GNMIClient, target string) return err } + // Allow all traffic to L3 processing. + hash := saipb.NewHashClient(conn) + hashResp, err := hash.CreateHash(context.Background(), &saipb.CreateHashRequest{ + Switch: swResp.Oid, + NativeHashFieldList: []saipb.NativeHashField{ + saipb.NativeHashField_NATIVE_HASH_FIELD_SRC_IP, + saipb.NativeHashField_NATIVE_HASH_FIELD_DST_IP, + saipb.NativeHashField_NATIVE_HASH_FIELD_L4_SRC_PORT, + saipb.NativeHashField_NATIVE_HASH_FIELD_L4_DST_PORT, + }, + }) + if err != nil { + return err + } + _, err = sw.SetSwitchAttribute(ctx, &saipb.SetSwitchAttributeRequest{ + Oid: swResp.Oid, + EcmpHashIpv4: proto.Uint64(hashResp.Oid), + EcmpHashIpv6: proto.Uint64(hashResp.Oid), + }) + if err != nil { + return err + } + // Allow all traffic to L3 processing. mmc := saipb.NewMyMacClient(conn) _, err = mmc.CreateMyMac(context.Background(), &saipb.CreateMyMacRequest{