From b75984b93fc512842f2a22a51743576583d53dac Mon Sep 17 00:00:00 2001 From: bhandarivijay Date: Fri, 6 Mar 2026 13:38:16 +0000 Subject: [PATCH 1/5] chore: Migrate gsutil usage to gcloud storage --- cloudbuild/lemming-test.sh | 2 +- cloudbuild/presubmit.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudbuild/lemming-test.sh b/cloudbuild/lemming-test.sh index f248c9a5d..02d61fb56 100755 --- a/cloudbuild/lemming-test.sh +++ b/cloudbuild/lemming-test.sh @@ -19,7 +19,7 @@ set -xe # shellcheck disable=SC2317 function dumpinfo { if [ -d "/tmp/cluster-log" ]; then - gsutil cp -r -Z /tmp/cluster-log "gs://lemming-test-logs/$BUILD" + gcloud storage cp --recursive --gzip-local-all /tmp/cluster-log "gs://lemming-test-logs/$BUILD" fi } diff --git a/cloudbuild/presubmit.sh b/cloudbuild/presubmit.sh index db714f9d0..afb49f69b 100755 --- a/cloudbuild/presubmit.sh +++ b/cloudbuild/presubmit.sh @@ -18,7 +18,7 @@ set -xe # shellcheck disable=SC2317 function dumpinfo { if [ -d "/tmp/cluster-log" ]; then - gsutil cp -r -Z /tmp/cluster-log "gs://lemming-test-logs/$BUILD" + gcloud storage cp --recursive --gzip-local-all /tmp/cluster-log "gs://lemming-test-logs/$BUILD" fi } From ee731eed8739260ea43598264547420fdade1bfd Mon Sep 17 00:00:00 2001 From: Roy Date: Thu, 19 Mar 2026 01:46:17 +0000 Subject: [PATCH 2/5] Add support for SetNeighborEntryAttribute in Lucius. --- dataplane/saiserver/routing.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dataplane/saiserver/routing.go b/dataplane/saiserver/routing.go index f17591703..5d9e847bf 100644 --- a/dataplane/saiserver/routing.go +++ b/dataplane/saiserver/routing.go @@ -107,6 +107,21 @@ func (n *neighbor) CreateNeighborEntries(ctx context.Context, re *saipb.CreateNe return resp, nil } +// SetNeighborEntryAttribute updates the attribute for the neighbor entry. +// TODO: Update neighbor table to use attrmgr to persist other fields besides mac address. +func (n *neighbor) SetNeighborEntryAttribute(ctx context.Context, req *saipb.SetNeighborEntryAttributeRequest) (*saipb.SetNeighborEntryAttributeResponse, error) { + entry := fwdconfig.TableEntryAddRequest(n.dataplane.ID(), NeighborTable).AppendEntry(fwdconfig.EntryDesc(fwdconfig.ExactEntry( + fwdconfig.PacketFieldBytes(fwdpb.PacketFieldNum_PACKET_FIELD_NUM_OUTPUT_IFACE).WithUint64(req.GetEntry().GetRifId()), + fwdconfig.PacketFieldBytes(fwdpb.PacketFieldNum_PACKET_FIELD_NUM_NEXT_HOP_IP).WithBytes(req.GetEntry().GetIpAddress()), + )), fwdconfig.UpdateAction(fwdpb.UpdateType_UPDATE_TYPE_SET, fwdpb.PacketFieldNum_PACKET_FIELD_NUM_ETHER_MAC_DST).WithValue(req.GetDstMacAddress()), + ).Build() + + if _, err := n.dataplane.TableEntryAdd(ctx, entry); err != nil { + return nil, err + } + return &saipb.SetNeighborEntryAttributeResponse{}, nil +} + type groupMember struct { nextHop uint64 // ID of the next hop weight uint32 From 6b2cef55d02da37f989e392f813172e603e9787d Mon Sep 17 00:00:00 2001 From: Roy Date: Thu, 19 Mar 2026 01:47:00 +0000 Subject: [PATCH 3/5] Clear oidtovid mapping when removing vlan. --- dataplane/saiserver/routing.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dataplane/saiserver/routing.go b/dataplane/saiserver/routing.go index 5d9e847bf..b4bf970dc 100644 --- a/dataplane/saiserver/routing.go +++ b/dataplane/saiserver/routing.go @@ -1284,6 +1284,7 @@ func (vlan *vlan) RemoveVlan(ctx context.Context, r *saipb.RemoveVlanRequest) (* // Update the internal map. vlan.mu.Lock() delete(vlan.vlans, r.GetOid()) + delete(vlan.oidByVId, vId) vlan.mu.Unlock() return &saipb.RemoveVlanResponse{}, nil } From d4038412364cba465d37761fa96c2488a470e379 Mon Sep 17 00:00:00 2001 From: Roy Date: Thu, 19 Mar 2026 00:45:38 +0000 Subject: [PATCH 4/5] Add ACL_IP_TYPE_NON_IP acl type support in Lucius. --- dataplane/saiserver/acl.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dataplane/saiserver/acl.go b/dataplane/saiserver/acl.go index 7c13db674..3db5522e2 100644 --- a/dataplane/saiserver/acl.go +++ b/dataplane/saiserver/acl.go @@ -234,6 +234,12 @@ func (a *acl) createAclEntryFields(req *saipb.CreateAclEntryRequest, id uint64, Bytes: []byte{0x4}, // IPv4 0100 IPv6 0110 Masks: []byte{0x4}, // Mask 0100 } + case saipb.AclIpType_ACL_IP_TYPE_NON_IP: + fieldMask = &fwdpb.PacketFieldMaskedBytes{ + FieldId: &fwdpb.PacketFieldId{Field: &fwdpb.PacketField{FieldNum: fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_VERSION}}, + Bytes: []byte{0x0}, // Non IP packets return 0x0 for IP VERSION + Masks: []byte{0x4}, + } default: return nil, status.Errorf(codes.InvalidArgument, "unsupported ACL_IP_TYPE: %v", t) } From 98141125cd686706378d434a18ec6b0e0118597a Mon Sep 17 00:00:00 2001 From: Roy Date: Thu, 19 Mar 2026 00:49:00 +0000 Subject: [PATCH 5/5] Add tunnel fixes to enable set_p2p_tunnel_encap_nexthop action in Lucius. --- dataplane/saiserver/tunnel.go | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/dataplane/saiserver/tunnel.go b/dataplane/saiserver/tunnel.go index bf1d75153..e6e44608d 100644 --- a/dataplane/saiserver/tunnel.go +++ b/dataplane/saiserver/tunnel.go @@ -50,7 +50,7 @@ func (t *tunnel) CreateTunnel(ctx context.Context, req *saipb.CreateTunnelReques tunType := req.GetType() switch tunType { - case saipb.TunnelType_TUNNEL_TYPE_IPINIP: + case saipb.TunnelType_TUNNEL_TYPE_IPINIP, saipb.TunnelType_TUNNEL_TYPE_IPINIP_GRE: default: return nil, status.Errorf(codes.InvalidArgument, "unsupported tunnel type: %v", tunType) } @@ -90,6 +90,8 @@ func (t *tunnel) CreateTunnel(ctx context.Context, req *saipb.CreateTunnelReques return nil, err } + t.mgr.StoreAttributes(id, req) + return &saipb.CreateTunnelResponse{ Oid: id, }, nil @@ -107,6 +109,30 @@ func (t *tunnel) RemoveTunnel(ctx context.Context, req *saipb.RemoveTunnelReques return &saipb.RemoveTunnelResponse{}, nil } +func (t *tunnel) CreateTunnels(ctx context.Context, req *saipb.CreateTunnelsRequest) (*saipb.CreateTunnelsResponse, error) { + resp := &saipb.CreateTunnelsResponse{} + for _, r := range req.GetReqs() { + res, err := t.CreateTunnel(ctx, r) + if err != nil { + return nil, err + } + resp.Resps = append(resp.Resps, res) + } + return resp, nil +} + +func (t *tunnel) RemoveTunnels(ctx context.Context, req *saipb.RemoveTunnelsRequest) (*saipb.RemoveTunnelsResponse, error) { + resp := &saipb.RemoveTunnelsResponse{} + for _, r := range req.GetReqs() { + res, err := t.RemoveTunnel(ctx, r) + if err != nil { + return nil, err + } + resp.Resps = append(resp.Resps, res) + } + return resp, nil +} + var ( ipV4ExactMask = []byte{0xFF, 0xFF, 0xFF, 0xFF} ipV4AnyMask = make([]byte, 4)