@@ -30,6 +30,9 @@ import (
3030
3131const (
3232 SpanningTreePortTypeAnnotation = "nx.cisco.networking.metal.ironcore.dev/spanning-tree-port-type"
33+ // BufferBoostAnnotation is the annotation key used to enable or disable buffer boost on interfaces.
34+ // Accepted values are 'enable' and 'disable', any other value will result in the device returning an error.
35+ BufferBoostAnnotation = "nx.cisco.networking.metal.ironcore.dev/buffer-boost"
3336)
3437
3538var (
@@ -673,6 +676,17 @@ func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInte
673676 }
674677 }
675678
679+ // TODO: remove annotation with provider-specific implementation
680+ ann , ok := req .Interface .GetAnnotations ()[BufferBoostAnnotation ]
681+ if ok {
682+ switch strings .ToLower (ann ) {
683+ case "enable" , "disable" :
684+ p .PhysExtdItems .BufferBoost = strings .ToLower (ann )
685+ default :
686+ return fmt .Errorf ("invalid value for annotation %q: %q. Must be %q or %q" , BufferBoostAnnotation , ann , "enable" , "disable" )
687+ }
688+ }
689+
676690 if err := p .Validate (); err != nil {
677691 return err
678692 }
@@ -775,6 +789,17 @@ func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInte
775789 }
776790 }
777791
792+ // TODO: remove annotation with provider-specific implementation
793+ ann , ok := req .Interface .GetAnnotations ()[BufferBoostAnnotation ]
794+ if ok {
795+ switch strings .ToLower (ann ) {
796+ case "enable" , "disable" :
797+ pc .AggrExtdItems .BufferBoost = strings .ToLower (ann )
798+ default :
799+ return fmt .Errorf ("invalid value for annotation %q: %q. Must be %q or %q" , BufferBoostAnnotation , ann , "enable" , "disable" )
800+ }
801+ }
802+
778803 conf = append (conf , pc )
779804
780805 if req .MultiChassisID != nil {
0 commit comments