[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/common/defines.go b/internal/pkg/common/defines.go
index c7ebf26..9ccb781 100755
--- a/internal/pkg/common/defines.go
+++ b/internal/pkg/common/defines.go
@@ -51,8 +51,8 @@
// Message - message type and data(OMCI)
type Message struct {
- Type MessageType
Data interface{}
+ Type MessageType
}
// TestMessageType - message data for various events
@@ -214,9 +214,9 @@
// SEntrySwImageIndication - TODO: add comment
type SEntrySwImageIndication struct {
- Valid bool
- EntityID uint16
Version string
+ EntityID uint16
+ Valid bool
IsCommitted uint8
}
@@ -231,7 +231,7 @@
///////////////////////////////////////////////////////////
-type activityDescr struct {
+type ActivityDescr struct {
DatabaseClass func(context.Context) error
//advertiseEvents bool
AuditInterval time.Duration
@@ -239,14 +239,14 @@
}
// OmciDeviceFsms - FSM event mapping to database class and time to wait between audits
-type OmciDeviceFsms map[string]activityDescr
+type OmciDeviceFsms map[string]ActivityDescr
// AdapterFsm - Adapter FSM details including channel, event and device
type AdapterFsm struct {
- fsmName string
- deviceID string
CommChan chan Message
PFsm *fsm.FSM
+ fsmName string
+ deviceID string
}
// CErrWaitAborted - AdapterFsm related error string
@@ -271,17 +271,17 @@
// OnuUniPort structure holds information about the ONU attached Uni Ports
type OnuUniPort struct {
- Enabled bool
+ PPort *voltha.Port
Name string
- PortNo uint32
- PortType UniPortType
OfpPortNo string
- UniID uint8
- MacBpNo uint8
- EntityID uint16
+ PortNo uint32
AdminState vc.AdminState_Types
OperState vc.OperStatus_Types
- PPort *voltha.Port
+ EntityID uint16
+ Enabled bool
+ PortType UniPortType
+ UniID uint8
+ MacBpNo uint8
}
// OnuUniPortMap - TODO: add comment
@@ -309,21 +309,21 @@
// UniVlanRuleParams - TODO: add comment
type UniVlanRuleParams struct {
- TpID uint8 `json:"tp_id"`
MatchVid uint32 `json:"match_vid"` //use uint32 types for allowing immediate bitshifting
MatchPcp uint32 `json:"match_pcp"`
TagsToRemove uint32 `json:"tags_to_remove"`
SetVid uint32 `json:"set_vid"`
SetPcp uint32 `json:"set_pcp"`
InnerCvlan uint16 `json:"inner_cvlan"`
+ TpID uint8 `json:"tp_id"`
}
// UniVlanFlowParams - TODO: add comment
type UniVlanFlowParams struct {
- CookieSlice []uint64 `json:"cookie_slice"`
- VlanRuleParams UniVlanRuleParams `json:"vlan_rule_params"`
Meter *ofp.OfpMeterConfig `json:"flow_meter"`
RespChan *chan error `json:"-"`
+ CookieSlice []uint64 `json:"cookie_slice"`
+ VlanRuleParams UniVlanRuleParams `json:"vlan_rule_params"`
}
///////////////////////////////////////////////////////////
diff --git a/internal/pkg/common/omci_cc.go b/internal/pkg/common/omci_cc.go
index 8763443..ab12ef7 100755
--- a/internal/pkg/common/omci_cc.go
+++ b/internal/pkg/common/omci_cc.go
@@ -84,20 +84,20 @@
// CallbackPair to be used for ReceiveCallback init
type CallbackPair struct {
- CbKey uint16
CbEntry CallbackPairEntry
+ CbKey uint16
}
// OmciTransferStructure - TODO: add comment
type OmciTransferStructure struct {
+ chSuccess chan bool
+ OnuSwWindow *ia.OmciMessages
+ cbPair CallbackPair
txFrame []byte
timeout int
retries int
highPrio bool
withFramePrint bool
- cbPair CallbackPair
- chSuccess chan bool
- OnuSwWindow *ia.OmciMessages
}
type txRxCounters struct {
@@ -109,40 +109,42 @@
// OmciCC structure holds information needed for OMCI communication (to/from OLT Adapter)
type OmciCC struct {
- enabled bool
pBaseDeviceHandler IdeviceHandler
pOnuDeviceEntry IonuDeviceEntry
pOnuAlarmManager IonuAlarmManager
- deviceID string
coreClient *vgrpc.Client
- supportExtMsg bool
- rxOmciFrameError tOmciReceiveError
+ lowPrioTxQueue *list.List
+ highPrioTxQueue *list.List
+ rxSchedulerMap map[uint16]CallbackPairEntry
+ monitoredRequests map[uint16]OmciTransferStructure
+ deviceID string
confFailMEs []me.ClassID
mutexConfFailMEs sync.RWMutex
mutexCounters sync.RWMutex
+ mutexMonReq sync.RWMutex
countersBase txRxCounters
countersExt txRxCounters
- txRetries uint32
- txTimeouts uint32
// OMCI params
- mutexTid sync.Mutex
+ mutexTid sync.Mutex
+ mutexHpTid sync.Mutex
+
+ mutexSendQueuedRequests sync.Mutex
+ mutexLowPrioTxQueue sync.Mutex
+ mutexHighPrioTxQueue sync.Mutex
+ mutexRxSchedMap sync.Mutex
+ txRetries uint32
+ txTimeouts uint32
+
tid uint16
- mutexHpTid sync.Mutex
hpTid uint16
UploadSequNo uint16
UploadNoOfCmds uint16
- mutexSendQueuedRequests sync.Mutex
- mutexLowPrioTxQueue sync.Mutex
- lowPrioTxQueue *list.List
- mutexHighPrioTxQueue sync.Mutex
- highPrioTxQueue *list.List
- mutexRxSchedMap sync.Mutex
- rxSchedulerMap map[uint16]CallbackPairEntry
- mutexMonReq sync.RWMutex
- monitoredRequests map[uint16]OmciTransferStructure
+ enabled bool
+ supportExtMsg bool
+ rxOmciFrameError tOmciReceiveError
}
var responsesWithMibDataSync = []omci.MessageType{
@@ -432,7 +434,9 @@
}
//disadvantage of decoupling: error verification made difficult, but anyway the question is
// how to react on erroneous frame reception, maybe can simply be ignored
- go rxCallbackEntry.CbFunction(ctx, omciMsg, &packet, rxCallbackEntry.CbRespChannel)
+ go func() {
+ _ = rxCallbackEntry.CbFunction(ctx, omciMsg, &packet, rxCallbackEntry.CbRespChannel)
+ }()
isSuccessfulResponse, err := oo.isSuccessfulResponseWithMibDataSync(ctx, omciMsg, &packet)
if err != nil {
// qualified error logging already done in function above
@@ -593,14 +597,14 @@
printFrame := receiveCallbackPair.CbEntry.FramePrint //printFrame true means debug print of frame is requested
//just use a simple list for starting - might need some more effort, especially for multi source write access
omciTxRequest := OmciTransferStructure{
- txFrame,
- timeout,
- retry,
- highPrio,
- printFrame,
- receiveCallbackPair,
- nil,
- nil,
+ chSuccess: make(chan bool),
+ OnuSwWindow: nil,
+ cbPair: receiveCallbackPair,
+ txFrame: txFrame,
+ timeout: timeout,
+ retries: retry,
+ highPrio: highPrio,
+ withFramePrint: printFrame,
}
oo.mutexMonReq.Lock()
defer oo.mutexMonReq.Unlock()
@@ -5229,12 +5233,14 @@
oo.countersExt.rxAkFrames++
}
+//nolint:unparam
func (oo *OmciCC) increaseBaseTxNoArFramesBy(ctx context.Context, value uint32) {
oo.mutexCounters.Lock()
defer oo.mutexCounters.Unlock()
oo.countersBase.txNoArFrames += value
}
+//nolint:unparam
func (oo *OmciCC) increaseExtTxNoArFramesBy(ctx context.Context, value uint32) {
oo.mutexCounters.Lock()
defer oo.mutexCounters.Unlock()
diff --git a/internal/pkg/common/onu_uni_port.go b/internal/pkg/common/onu_uni_port.go
index b5ff606..8ef92fa 100755
--- a/internal/pkg/common/onu_uni_port.go
+++ b/internal/pkg/common/onu_uni_port.go
@@ -39,6 +39,7 @@
aPortType UniPortType) *OnuUniPort {
logger.Infow(ctx, "init-onuUniPort", log.Fields{"uniID": aUniID,
"portNo": aPortNo, "InstNo": aInstNo, "type": aPortType})
+ //nolint:govet
var OnuUniPort OnuUniPort
OnuUniPort.Enabled = false
OnuUniPort.Name = "uni-" + strconv.FormatUint(uint64(aPortNo), 10)
diff --git a/internal/pkg/common/utils.go b/internal/pkg/common/utils.go
index 5560ab6..f96a58a 100755
--- a/internal/pkg/common/utils.go
+++ b/internal/pkg/common/utils.go
@@ -93,7 +93,7 @@
// TrimStringFromMeOctet trim string out of Me octet
func TrimStringFromMeOctet(input interface{}) string {
ifBytes, _ := me.InterfaceToOctets(input)
- return fmt.Sprintf("%s", bytes.Trim(ifBytes, "\x00"))
+ return string(bytes.Trim(ifBytes, "\x00"))
}
////////////////////////////////////////////////////////////////////////