[VOL-5374] go version upgrade to 1.23.1 and few other package versions upgrade
Signed-off-by: akashreddyk <akash.kankanala@radisys.com>
Change-Id: I50531e8febdc00b335ebbe5a4b1099fc3bf6d5b4
diff --git a/internal/pkg/avcfg/omci_ani_config.go b/internal/pkg/avcfg/omci_ani_config.go
index b58d772..e438a71 100755
--- a/internal/pkg/avcfg/omci_ani_config.go
+++ b/internal/pkg/avcfg/omci_ani_config.go
@@ -112,51 +112,51 @@
const CAniFsmIdleState = aniStConfigDone
type ponAniGemPortAttribs struct {
+ qosPolicy string
+ pbitString string
+ staticACL string
+ dynamicACL string
gemPortID uint16
upQueueID uint16
downQueueID uint16
- direction uint8
- qosPolicy string
- weight uint8
- pbitString string
- isMulticast bool
multicastGemID uint16
- staticACL string
- dynamicACL string
+ direction uint8
+ weight uint8
+ isMulticast bool
}
// UniPonAniConfigFsm defines the structure for the state machine to config the PON ANI ports of ONU UNI ports via OMCI
type UniPonAniConfigFsm struct {
- deviceID string
pDeviceHandler cmn.IdeviceHandler
pOnuDeviceEntry cmn.IonuDeviceEntry
pOmciCC *cmn.OmciCC
pOnuUniPort *cmn.OnuUniPort
pUniTechProf *OnuUniTechProf
pOnuDB *devdb.OnuDeviceDB
- techProfileID uint8
- techProfileType string
- uniTpKey uniTP
- requestEvent cmn.OnuDeviceEvent
- mutexIsAwaitingResponse sync.RWMutex
- isCanceled bool
- isAwaitingResponse bool
omciMIdsResponseReceived chan bool //separate channel needed for checking multiInstance OMCI message responses
PAdaptFsm *cmn.AdapterFsm
chSuccess chan<- uint8
- procStep uint8
+ pLastTxMeInstance *me.ManagedEntity
+ waitFlowDeleteChannel chan bool
+ deviceID string
+ techProfileType string
+ gemPortAttribsSlice []ponAniGemPortAttribs
+ requestEvent cmn.OnuDeviceEvent
+ mutexIsAwaitingResponse sync.RWMutex
mutexChanSet sync.RWMutex
- chanSet bool
+ mutexPLastTxMeInstance sync.RWMutex
mapperSP0ID uint16
macBPCD0ID uint16
tcont0ID uint16
alloc0ID uint16
- gemPortAttribsSlice []ponAniGemPortAttribs
- mutexPLastTxMeInstance sync.RWMutex
- pLastTxMeInstance *me.ManagedEntity
+ uniTpKey uniTP
+ techProfileID uint8
+ isCanceled bool
+ isAwaitingResponse bool
+ procStep uint8
+ chanSet bool
requestEventOffset uint8 //used to indicate ConfigDone or Removed using successor (enum)
isWaitingForFlowDelete bool
- waitFlowDeleteChannel chan bool
tcontSetBefore bool
}
@@ -488,6 +488,7 @@
}
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterConfigStartingState(ctx context.Context, e *fsm.Event) {
logger.Info(ctx, "UniPonAniConfigFsm start", log.Fields{
"device-id": oFsm.deviceID, "uni-id": oFsm.pOnuUniPort.UniID})
@@ -522,6 +523,7 @@
}
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterCreatingDot1PMapper(ctx context.Context, e *fsm.Event) {
logger.Debugw(ctx, "UniPonAniConfigFsm Tx Create::Dot1PMapper", log.Fields{
"EntitytId": strconv.FormatInt(int64(oFsm.mapperSP0ID), 16),
@@ -552,6 +554,7 @@
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterCreatingMBPCD(ctx context.Context, e *fsm.Event) {
logger.Info(ctx, "Creating Tx MAC Bridge Port Config Data", log.Fields{
"EntitytId": strconv.FormatInt(int64(oFsm.macBPCD0ID), 16),
@@ -592,6 +595,7 @@
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterSettingTconts(ctx context.Context, e *fsm.Event) {
logger.Info(ctx, "Tx Setting Tcont ", log.Fields{
"EntitytId": strconv.FormatInt(int64(oFsm.tcont0ID), 16),
@@ -638,12 +642,14 @@
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterCreatingGemNCTPs(ctx context.Context, e *fsm.Event) {
logger.Info(ctx, "UniPonAniConfigFsm - start creating GemNWCtp loop", log.Fields{
"device-id": oFsm.deviceID, "uni-id": oFsm.pOnuUniPort.UniID})
go oFsm.performCreatingGemNCTPs(ctx)
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterCreatingGemIWs(ctx context.Context, e *fsm.Event) {
logger.Info(ctx, "UniPonAniConfigFsm - start creating GemIwTP loop", log.Fields{
"device-id": oFsm.deviceID, "uni-id": oFsm.pOnuUniPort.UniID})
@@ -807,6 +813,7 @@
//the FSM is left active in this state as long as no specific reset or remove is requested from outside
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterRemovingGemIW(ctx context.Context, e *fsm.Event) {
// no need to protect access to oFsm.waitFlowDeleteChannel, only used in synchronized state entries
// or CancelProcessing() that uses separate isWaitingForFlowDelete to write to the channel
@@ -876,6 +883,7 @@
oFsm.pOnuDB.DeleteMe(me.GemInterworkingTerminationPointClassID, loGemPortID)
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterWaitingFlowRem(ctx context.Context, e *fsm.Event) {
oFsm.mutexIsAwaitingResponse.Lock()
oFsm.isWaitingForFlowDelete = true
@@ -946,6 +954,7 @@
}
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterRemovingGemNCTP(ctx context.Context, e *fsm.Event) {
oFsm.pUniTechProf.mutexTPState.RLock()
loGemPortID := (*(oFsm.pUniTechProf.mapRemoveGemEntry[oFsm.uniTpKey])).gemPortID
@@ -981,6 +990,8 @@
OnuMetricsManager.RemoveGemPortForPerfMonitoring(ctx, loGemPortID)
}
}
+
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterRemovingTD(ctx context.Context, e *fsm.Event) {
oFsm.pUniTechProf.mutexTPState.RLock()
loGemPortID := (*(oFsm.pUniTechProf.mapRemoveGemEntry[oFsm.uniTpKey])).gemPortID
@@ -1012,6 +1023,7 @@
oFsm.mutexPLastTxMeInstance.Unlock()
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterResettingTcont(ctx context.Context, e *fsm.Event) {
logger.Info(ctx, "UniPonAniConfigFsm - start resetting the TCont", log.Fields{
"device-id": oFsm.deviceID, "uni-id": oFsm.pOnuUniPort.UniID})
@@ -1047,6 +1059,7 @@
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterRemoving1pMapper(ctx context.Context, e *fsm.Event) {
logger.Info(ctx, "UniPonAniConfigFsm - start deleting the .1pMapper", log.Fields{
"device-id": oFsm.deviceID, "uni-id": oFsm.pOnuUniPort.UniID})
@@ -1105,6 +1118,7 @@
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterRemovingAniBPCD(ctx context.Context, e *fsm.Event) {
logger.Info(ctx, "UniPonAniConfigFsm - start deleting the ANI MBCD", log.Fields{
"device-id": oFsm.deviceID, "uni-id": oFsm.pOnuUniPort.UniID})
@@ -1198,6 +1212,7 @@
}
}
+//nolint:unparam
func (oFsm *UniPonAniConfigFsm) enterDisabledState(ctx context.Context, e *fsm.Event) {
logger.Debugw(ctx, "UniPonAniConfigFsm enters disabled state", log.Fields{
"device-id": oFsm.deviceID, "uni-id": oFsm.pOnuUniPort.UniID})
diff --git a/internal/pkg/avcfg/omci_vlan_config.go b/internal/pkg/avcfg/omci_vlan_config.go
index 9eb4c10..5b0772d 100755
--- a/internal/pkg/avcfg/omci_vlan_config.go
+++ b/internal/pkg/avcfg/omci_vlan_config.go
@@ -136,50 +136,52 @@
const CVlanFsmConfiguredState = VlanStConfigDone // state that indicates that at least some valid user related VLAN configuration should exist
type uniRemoveVlanFlowParams struct {
- isSuspendedOnAdd bool
removeChannel chan bool
+ respChan *chan error
cookie uint64 //just the last cookie valid for removal
vlanRuleParams cmn.UniVlanRuleParams
- respChan *chan error
+ isSuspendedOnAdd bool
}
// UniVlanConfigFsm defines the structure for the state machine for configuration of the VLAN related setting via OMCI
//
// builds upon 'VLAN rules' that are derived from multiple flows
+//
+//nolint:govet
type UniVlanConfigFsm struct {
- pDeviceHandler cmn.IdeviceHandler
- pOnuDeviceEntry cmn.IonuDeviceEntry
- deviceID string
- pOmciCC *cmn.OmciCC
- pOnuUniPort *cmn.OnuUniPort
- pUniTechProf *OnuUniTechProf
- pOnuDB *devdb.OnuDeviceDB
- requestEvent cmn.OnuDeviceEvent
- omciMIdsResponseReceived chan bool //seperate channel needed for checking multiInstance OMCI message responses
- PAdaptFsm *cmn.AdapterFsm
+ actualUniFlowParam cmn.UniVlanFlowParams
+ pDeviceHandler cmn.IdeviceHandler
+ pOnuDeviceEntry cmn.IonuDeviceEntry
+ pOmciCC *cmn.OmciCC
+ pOnuUniPort *cmn.OnuUniPort
+ pUniTechProf *OnuUniTechProf
+ pOnuDB *devdb.OnuDeviceDB
+ omciMIdsResponseReceived chan bool //seperate channel needed for checking multiInstance OMCI message responses
+ PAdaptFsm *cmn.AdapterFsm
+ chCookieDeleted chan bool //channel to indicate that a specific cookie (related to the active rule) was deleted
+ pLastTxMeInstance *me.ManagedEntity
+ flowDeleteChannel chan<- bool
+ deviceID string
+ uniVlanFlowParamsSlice []cmn.UniVlanFlowParams
+ uniRemoveFlowsSlice []uniRemoveVlanFlowParams
+ requestEvent cmn.OnuDeviceEvent
+ //cookie value that indicates that a rule to add is delayed by waiting for deletion of some other existing rule with the same cookie
+ delayNewRuleCookie uint64
+ mutexIsAwaitingResponse sync.RWMutex
+ mutexFlowParams sync.RWMutex
+ mutexPLastTxMeInstance sync.RWMutex
+ vlanFilterList [cVtfdTableSize]uint16
+ evtocdID uint16
acceptIncrementalEvtoOption bool
isCanceled bool
isAwaitingResponse bool
- mutexIsAwaitingResponse sync.RWMutex
- mutexFlowParams sync.RWMutex
- chCookieDeleted chan bool //channel to indicate that a specific cookie (related to the active rule) was deleted
- actualUniFlowParam cmn.UniVlanFlowParams
- uniVlanFlowParamsSlice []cmn.UniVlanFlowParams
- uniRemoveFlowsSlice []uniRemoveVlanFlowParams
NumUniFlows uint8 // expected number of flows should be less than 12
ConfiguredUniFlow uint8
numRemoveFlows uint8
numVlanFilterEntries uint8
- vlanFilterList [cVtfdTableSize]uint16
- evtocdID uint16
- mutexPLastTxMeInstance sync.RWMutex
- pLastTxMeInstance *me.ManagedEntity
requestEventOffset uint8
TpIDWaitingFor uint8
signalOnFlowDelete bool
- flowDeleteChannel chan<- bool
- //cookie value that indicates that a rule to add is delayed by waiting for deletion of some other existing rule with the same cookie
- delayNewRuleCookie uint64
// Used to indicate if the FSM is for a reconciling flow and if it's the last flow to be reconciled
// thus notification needs to be sent on chan.
lastFlowToReconcile bool
@@ -463,7 +465,7 @@
}
pRemoveParams := &oFsm.uniRemoveFlowsSlice[flow] //wants to modify the uniRemoveFlowsSlice element directly!
oFsm.mutexFlowParams.RUnlock()
- if err := oFsm.suspendAddRule(ctx, pRemoveParams); err != nil {
+ if err = oFsm.suspendAddRule(ctx, pRemoveParams); err != nil {
logger.Errorw(ctx, "UniVlanConfigFsm suspension on add aborted - abort complete add-request", log.Fields{
"device-id": oFsm.deviceID, "cookie": removeUniFlowParams.cookie})
err = fmt.Errorf("abort UniVlanConfigFsm suspension on add %s", oFsm.deviceID)
@@ -1254,6 +1256,7 @@
}
}
+//nolint:unparam
func (oFsm *UniVlanConfigFsm) enterConfigEvtocd(ctx context.Context, e *fsm.Event) {
logger.Debugw(ctx, "UniVlanConfigFsm - start config EVTOCD loop", log.Fields{
"device-id": oFsm.deviceID})
@@ -1829,6 +1832,7 @@
oFsm.pushReponseOnFlowResponseChannel(ctx, flowRespChan, nil)
}
+//nolint:unparam
func (oFsm *UniVlanConfigFsm) enterResetting(ctx context.Context, e *fsm.Event) {
logger.Debugw(ctx, "UniVlanConfigFsm resetting", log.Fields{"device-id": oFsm.deviceID})
@@ -1930,6 +1934,7 @@
log.Fields{"device-id": oFsm.deviceID})
}
+//nolint:unparam
func (oFsm *UniVlanConfigFsm) enterDisabled(ctx context.Context, e *fsm.Event) {
logger.Debugw(ctx, "UniVlanConfigFsm enters disabled state", log.Fields{"device-id": oFsm.deviceID})
@@ -2641,7 +2646,7 @@
// this defines VID translation scenario: dobletagged-doubletagged (if not transparent)
logger.Debugw(ctx, "UniVlanConfigFsm Tx Set::EVTOCD clear double tagged rule", log.Fields{
"device-id": oFsm.deviceID, "match-vlan": aRuleParams.MatchVid, "innerCvlan": aRuleParams.InnerCvlan})
- sliceEvtocdRule := make([]uint8, 16)
+ sliceEvtocdRule = make([]uint8, 16)
// fill vlan tagging operation table bit fields using network=bigEndian order and using slice offset 0 as highest 'word'
binary.BigEndian.PutUint32(sliceEvtocdRule[cFilterOuterOffset:],
cPrioIgnoreTag<<cFilterPrioOffset| // Not an outer-tag rule
diff --git a/internal/pkg/avcfg/onu_uni_tp.go b/internal/pkg/avcfg/onu_uni_tp.go
index 4f51b1a..d3492a5 100755
--- a/internal/pkg/avcfg/onu_uni_tp.go
+++ b/internal/pkg/avcfg/onu_uni_tp.go
@@ -67,29 +67,29 @@
schedPolicy uint8
}
type gemPortParamStruct struct {
- //ponOmciCC bool
- gemPortID uint16
- direction uint8
- gemPortEncState uint8
- prioQueueIndex uint8
- pbitString string
- discardPolicy string
+ pbitString string
+ discardPolicy string
//could also be a queue specific parameter, not used that way here
//maxQueueSize uint16
queueSchedPolicy string
- queueWeight uint8
- removeGemID uint16
- isMulticast bool
+ staticACL string
+ dynamicACL string
+ //ponOmciCC bool
+ gemPortID uint16
+ removeGemID uint16
//TODO check if this has any value/difference from gemPortId
multicastGemPortID uint16
- staticACL string
- dynamicACL string
+ direction uint8
+ gemPortEncState uint8
+ prioQueueIndex uint8
+ queueWeight uint8
+ isMulticast bool
}
// refers to one tcont and its properties and all assigned GemPorts and their properties
type tcontGemList struct {
- tcontParams tcontParamStruct
mapGemPortParams map[uint16]*gemPortParamStruct
+ tcontParams tcontParamStruct
}
// refers a unique combination of uniID and tpID for a given ONU.
@@ -100,19 +100,19 @@
// OnuUniTechProf structure holds information about the TechProfiles attached to Uni Ports of the ONU
type OnuUniTechProf struct {
- deviceID string
baseDeviceHandler cmn.IdeviceHandler
onuDevice cmn.IonuDeviceEntry
- tpProcMutex sync.RWMutex
chTpConfigProcessingStep chan uint8
mapUniTpIndication map[uniTP]*tTechProfileIndication //use pointer values to ease assignments to the map
mapPonAniConfig map[uniTP]*tcontGemList //per UNI: use pointer values to ease assignments to the map
PAniConfigFsm map[uniTP]*UniPonAniConfigFsm
procResult map[uniTP]error //error indication of processing
- mutexTPState sync.RWMutex
tpProfileExists map[uniTP]bool
tpProfileResetting map[uniTP]bool
mapRemoveGemEntry map[uniTP]*gemPortParamStruct //per UNI: pointer to GemEntry to be removed
+ deviceID string
+ tpProcMutex sync.RWMutex
+ mutexTPState sync.RWMutex
}
func (onuTP *OnuUniTechProf) multicastConfiguredForOtherUniTps(ctx context.Context, uniTpKey uniTP) bool {
@@ -384,7 +384,7 @@
//default start with 1Tcont profile, later perhaps extend to MultiTcontMultiGem
localMapGemPortParams := make(map[uint16]*gemPortParamStruct)
- onuTP.mapPonAniConfig[uniTPKey] = &tcontGemList{tcontParamStruct{}, localMapGemPortParams}
+ onuTP.mapPonAniConfig[uniTPKey] = &tcontGemList{tcontParams: tcontParamStruct{}, mapGemPortParams: localMapGemPortParams}
//note: the code is currently restricted to one TCcont per Onu (index [0])
//get the relevant values from the profile and store to mapPonAniConfig
@@ -1030,6 +1030,8 @@
}
// setProfileResetting sets/resets the indication, that a reset of the TechProfileConfig/Removal is ongoing
+//
+//nolint:unparam
func (onuTP *OnuUniTechProf) setProfileResetting(ctx context.Context, aUniID uint8, aTpID uint8, aState bool) {
uniTpKey := uniTP{uniID: aUniID, tpID: aTpID}
onuTP.mutexTPState.Lock()