@@ -195,16 +195,6 @@ var errNonExistentContainerStatus = errors.New("nonExistantContainerstatus")
195195// all NCs and update the CNS state accordingly. This function returns the the total number of NCs on this VM that have been programmed to
196196// some version, NOT the number of NCs that are up-to-date.
197197func (service * HTTPRestService ) syncHostNCVersion (ctx context.Context , channelMode string ) (int , error ) {
198- // will remove it later
199- // hasVNETBlockNC1 := service.isPrefixonNicSwiftV2()
200- // logger.Printf("winDebug: syncHostNCVersion hasVNETBlockNC1 %v", hasVNETBlockNC1)
201- // if runtime.GOOS == "windows" {
202- // logger.Printf("winDebug: before setPrefixOnNICRegistry in syncHostNCVersion")
203- // err := service.setPrefixOnNICRegistry(true, "aa:bb:cc:dd:ee:ff")
204- // if err != nil {
205- // logger.Debugf("failed to add PrefixOnNic keys to Windows registry: %w", err)
206- // }
207- // }
208198 outdatedNCs := map [string ]struct {}{}
209199 programmedNCs := map [string ]struct {}{}
210200 for idx := range service .state .ContainerStatus {
@@ -739,13 +729,12 @@ func (service *HTTPRestService) getIMDSNCs(ctx context.Context) (map[string]stri
739729 return ncs , nil
740730}
741731
742- // isPrefixonNicSwiftV2 checks if any NC in the container status should use SwiftV2 PrefixOnNic
743- // Uses the SwiftV2PrefixOnNic field which captures the condition: isSwiftV2 && nc.Type == VNETBlock
732+ // Check whether NC is SwiftV2 NIC associated NC and prefix on nic is enabled
744733func (service * HTTPRestService ) isPrefixonNicSwiftV2 () bool {
745734 for _ , containerStatus := range service .state .ContainerStatus {
746735 req := containerStatus .CreateNetworkContainerRequest
747736
748- // Check if this NC is SwiftV2 PrefixOnNic setting
737+ //
749738 if req .SwiftV2PrefixOnNic {
750739 return true
751740 }
0 commit comments