[VOL-5567] Upgrade protos and remove deprecated dependencies

Change-Id: If577615a4cb39289c43029831f1a3b5aeebf3553
Signed-off-by: bseeniva <balaji.seenivasan@radisys.com>
diff --git a/internal/pkg/avcfg/onu_uni_tp.go b/internal/pkg/avcfg/onu_uni_tp.go
index ec60074..a6b7385 100755
--- a/internal/pkg/avcfg/onu_uni_tp.go
+++ b/internal/pkg/avcfg/onu_uni_tp.go
@@ -178,7 +178,7 @@
 //
 //	use waitForTimeoutOrCompletion(ctx, chTpConfigProcessingStep, processingStep) for internal synchronization
 func (onuTP *OnuUniTechProf) ConfigureUniTp(ctx context.Context,
-	aUniID uint8, aPathString string, tpInst tech_profile.TechProfileInstance, wg *sync.WaitGroup) {
+	aUniID uint8, aPathString string, tpInst *tech_profile.TechProfileInstance, wg *sync.WaitGroup) {
 	defer wg.Done() //always decrement the waitGroup on return
 	logger.Info(ctx, "configure the Uni according to TpPath", log.Fields{
 		"device-id": onuTP.deviceID, "uni-id": aUniID, "path": aPathString})
@@ -336,7 +336,7 @@
 /* internal methods *********************/
 // nolint: gocyclo
 func (onuTP *OnuUniTechProf) readAniSideConfigFromTechProfile(
-	ctx context.Context, aUniID uint8, aTpID uint8, aPathString string, tpInst tech_profile.TechProfileInstance, aProcessingStep uint8) {
+	ctx context.Context, aUniID uint8, aTpID uint8, aPathString string, tpInst *tech_profile.TechProfileInstance, aProcessingStep uint8) {
 	var err error
 	//store profile type and identifier for later usage within the OMCI identifier and possibly ME setup
 	//pathstring is defined to be in the form of <ProfType>/<profID>/<Interface/../Identifier>
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index adaa761..e6502e9 100755
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -25,10 +25,8 @@
 	"sync"
 	"time"
 
-	"github.com/golang/protobuf/ptypes/empty"
 	"github.com/opencord/voltha-openonu-adapter-go/internal/pkg/config"
 
-	"github.com/gogo/protobuf/proto"
 	"github.com/looplab/fsm"
 	me "github.com/opencord/omci-lib-go/v2/generated"
 	"github.com/opencord/voltha-lib-go/v7/pkg/db"
@@ -55,6 +53,8 @@
 	"github.com/opencord/voltha-protos/v5/go/voltha"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
+	"google.golang.org/protobuf/proto"
+	"google.golang.org/protobuf/types/known/emptypb"
 )
 
 const (
@@ -430,7 +430,7 @@
 			logger.Debugw(ctx, "onu-uni-tp-path-modified", log.Fields{"device-id": dh.DeviceID,
 				"uniID": uniID, "tp-path": techProfMsg.TpInstancePath, "tpID": tpID})
 
-			err = dh.CheckAvailableOnuCapabilities(ctx, pDevEntry, *tpInst.TpInstance)
+			err = dh.CheckAvailableOnuCapabilities(ctx, pDevEntry, tpInst.TpInstance)
 			if err != nil {
 				logger.Errorw(ctx, "error-checking-available-onu-capabilities-stopping-device",
 					log.Fields{"device-id": dh.DeviceID, "err": err, "tp-path": techProfMsg.TpInstancePath})
@@ -455,7 +455,7 @@
 			var wg sync.WaitGroup
 			wg.Add(1) // for the 1 go routine to finish
 			// attention: deadline completion check and wg.Done is to be done in both routines
-			go dh.pOnuTP.ConfigureUniTp(log.WithSpanFromContext(dctx, ctx), uniID, techProfMsg.TpInstancePath, *tpInst.TpInstance, &wg)
+			go dh.pOnuTP.ConfigureUniTp(log.WithSpanFromContext(dctx, ctx), uniID, techProfMsg.TpInstancePath, tpInst.TpInstance, &wg)
 			dh.waitForCompletion(ctx, cancel, &wg, "TechProfDwld") //wait for background process to finish
 			if tpErr := dh.pOnuTP.GetTpProcessingErrorIndication(uniID, tpID); tpErr != nil {
 				logger.Errorw(ctx, "error-processing-tp", log.Fields{"device-id": dh.DeviceID, "err": tpErr, "tp-path": techProfMsg.TpInstancePath})
@@ -977,11 +977,9 @@
 		pDevEntry.MutexPersOnuConfig.RUnlock()
 		persMutexLock = false
 		techProfsFound = true // set to true if we found TP once for any UNI port
-		var iaTechTpInst ia.TechProfileDownloadMessage
-		var ok bool
 		for tpID := range uniData.PersTpPathMap {
 			pDevEntry.MutexReconciledTpInstances.RLock()
-			if iaTechTpInst, ok = pDevEntry.ReconciledTpInstances[uniID][tpID]; !ok {
+			if _, ok := pDevEntry.ReconciledTpInstances[uniID][tpID]; !ok {
 				logger.Errorw(ctx, "reconciling - no reconciled tp instance available",
 					log.Fields{"tp-id": tpID, "tpPath": uniData.PersTpPathMap[tpID], "uni-id": uniData.PersUniID,
 						"device-id": dh.DeviceID})
@@ -989,12 +987,14 @@
 				pDevEntry.MutexReconciledTpInstances.RUnlock()
 				break outerLoop
 			}
+			// Access the TpInstance directly without copying the whole message
+			techTpInst := pDevEntry.ReconciledTpInstances[uniID][tpID].TechTpInstance
 			pDevEntry.MutexReconciledTpInstances.RUnlock()
 			continueWithFlowConfig = true // valid TP found - try flow configuration later
-			var tpInst tech_profile.TechProfileInstance
-			switch techTpInst := iaTechTpInst.TechTpInstance.(type) {
+			var tpInst *tech_profile.TechProfileInstance
+			switch tpInstCase := techTpInst.(type) {
 			case *ia.TechProfileDownloadMessage_TpInstance: // supports only GPON, XGPON, XGS-PON
-				tpInst = *techTpInst.TpInstance
+				tpInst = tpInstCase.TpInstance
 				logger.Debugw(ctx, "reconciling - received-tp-instance-successfully-after-reconcile", log.Fields{
 					"tp-id": tpID, "tpPath": uniData.PersTpPathMap[tpID], "uni-id": uniData.PersUniID, "device-id": dh.DeviceID})
 			default: // do not support epon or other tech
@@ -1528,10 +1528,10 @@
 					break outerLoop
 				}
 				if iaTechTpInst != nil {
-					var tpInst tech_profile.TechProfileInstance
+					var tpInst *tech_profile.TechProfileInstance
 					switch techTpInst := iaTechTpInst.TechTpInstance.(type) {
 					case *ia.TechProfileDownloadMessage_TpInstance: // supports only GPON, XGPON, XGS-PON
-						tpInst = *techTpInst.TpInstance
+						tpInst = techTpInst.TpInstance
 						logger.Debugw(ctx, "received-tp-instance-successfully-after-reboot", log.Fields{
 							"tp-id": tpID, "tpPath": uniData.PersTpPathMap[tpID], "uni-id": uniData.PersUniID, "device-id": dh.DeviceID})
 					default: // do not support epon or other tech
@@ -4708,7 +4708,7 @@
 				logger.Errorw(ctx, "No valid OnuDevice", log.Fields{"device-id": dh.DeviceID})
 			} else {
 				onuDevEntry.MutexReconciledTpInstances.Lock()
-				onuDevEntry.ReconciledTpInstances = make(map[uint8]map[uint8]ia.TechProfileDownloadMessage)
+				onuDevEntry.ReconciledTpInstances = make(map[uint8]map[uint8]*ia.TechProfileDownloadMessage)
 				onuDevEntry.MutexReconciledTpInstances.Unlock()
 			}
 			dh.chReconcilingStopped <- struct{}{}
@@ -4954,7 +4954,7 @@
 	subCtx, cancel := context.WithTimeout(log.WithSpanFromContext(context.Background(), ctx), dh.config.MaxTimeoutInterAdapterComm)
 	defer cancel()
 	logger.Debugw(subCtx, "get-tech-profile-instance",
-		log.Fields{"device-id": dh.device.Id, "request": request, "parent-endpoint": dh.device.ProxyAddress.AdapterEndpoint})
+		log.Fields{"device-id": dh.device.Id, "tp-path": request.TpInstancePath, "uni-id": request.UniId, "parent-endpoint": dh.device.ProxyAddress.AdapterEndpoint})
 	return pgClient.GetTechProfileInstance(subCtx, &request)
 }
 
@@ -5079,7 +5079,7 @@
 	return err
 }
 
-func (dh *deviceHandler) CheckAvailableOnuCapabilities(ctx context.Context, pDevEntry *mib.OnuDeviceEntry, tpInst tech_profile.TechProfileInstance) error {
+func (dh *deviceHandler) CheckAvailableOnuCapabilities(ctx context.Context, pDevEntry *mib.OnuDeviceEntry, tpInst *tech_profile.TechProfileInstance) error {
 	// Check if there are additional TCONT instances necessary/available
 	pDevEntry.MutexPersOnuConfig.Lock()
 	if _, ok := pDevEntry.SOnuPersistentData.PersTcontMap[uint16(tpInst.UsScheduler.AllocId)]; !ok {
@@ -5325,7 +5325,7 @@
 	return dh.deviceDeleteCommChan
 }
 
-func (dh *deviceHandler) processOnuIndication(ctx context.Context, onuInd *ia.OnuIndicationMessage) (*empty.Empty, error) {
+func (dh *deviceHandler) processOnuIndication(ctx context.Context, onuInd *ia.OnuIndicationMessage) (*emptypb.Empty, error) {
 
 	onuIndication := onuInd.OnuIndication
 	onuOperstate := onuIndication.GetOperState()
@@ -5371,7 +5371,7 @@
 		return nil, err
 	}
 
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // PrepareForGarbageCollection - remove references to prepare for garbage collection
diff --git a/internal/pkg/core/openonu.go b/internal/pkg/core/openonu.go
index 9d43be4..f1d97c6 100755
--- a/internal/pkg/core/openonu.go
+++ b/internal/pkg/core/openonu.go
@@ -41,7 +41,6 @@
 	"google.golang.org/grpc/metadata"
 	"google.golang.org/grpc/status"
 
-	"github.com/golang/protobuf/ptypes/empty"
 	"github.com/opencord/voltha-lib-go/v7/pkg/db/kvstore"
 	"github.com/opencord/voltha-lib-go/v7/pkg/events/eventif"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
@@ -50,6 +49,7 @@
 	ia "github.com/opencord/voltha-protos/v5/go/inter_adapter"
 	"github.com/opencord/voltha-protos/v5/go/omci"
 	"github.com/opencord/voltha-protos/v5/go/voltha"
+	"google.golang.org/protobuf/types/known/emptypb"
 
 	cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
 	"github.com/opencord/voltha-openonu-adapter-go/internal/pkg/config"
@@ -66,6 +66,7 @@
 
 // OpenONUAC structure holds the ONU core information
 type OpenONUAC struct {
+	adapter_service.UnimplementedAdapterServiceServer
 	eventProxy                  eventif.EventProxy
 	kvClient                    kvstore.Client
 	deviceHandlers              map[string]*deviceHandler
@@ -244,7 +245,7 @@
 }
 
 // AdoptDevice creates a new device handler if not present already and then adopts the device
-func (oo *OpenONUAC) AdoptDevice(ctx context.Context, device *voltha.Device) (*empty.Empty, error) {
+func (oo *OpenONUAC) AdoptDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
 	if device == nil {
 		logger.Warn(ctx, "voltha-device-is-nil")
 		return nil, errors.New("nil-device")
@@ -264,11 +265,11 @@
 
 		go handler.adoptOrReconcileDevice(fsmCtx, device)
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // ReconcileDevice is called once when the adapter needs to re-create device - usually on core restart
-func (oo *OpenONUAC) ReconcileDevice(ctx context.Context, device *voltha.Device) (*empty.Empty, error) {
+func (oo *OpenONUAC) ReconcileDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
 	if device == nil {
 		logger.Warn(ctx, "reconcile-device-voltha-device-is-nil")
 		return nil, errors.New("nil-device")
@@ -298,17 +299,17 @@
 		// reconcilement will be continued after onu-device entry is added
 	} else {
 		logger.Warnf(ctx, "device-already-reconciled-or-active", log.Fields{"device-id": device.Id, "parent-id": device.ParentId})
-		return &empty.Empty{}, status.Errorf(codes.AlreadyExists, "handler exists: %s", device.Id)
+		return &emptypb.Empty{}, status.Errorf(codes.AlreadyExists, "handler exists: %s", device.Id)
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // DisableDevice disables the given device
-func (oo *OpenONUAC) DisableDevice(ctx context.Context, device *voltha.Device) (*empty.Empty, error) {
+func (oo *OpenONUAC) DisableDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
 	logger.Infow(ctx, "disable-device", log.Fields{"device-id": device.Id})
 	if handler, err := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
 		go handler.disableDevice(log.WithSpanFromContext(context.Background(), ctx), device)
-		return &empty.Empty{}, nil
+		return &emptypb.Empty{}, nil
 	} else {
 		logger.Warnw(ctx, "no handler found for device-disable", log.Fields{"device-id": device.Id})
 		return nil, err
@@ -316,11 +317,11 @@
 }
 
 // ReEnableDevice enables the onu device after disable
-func (oo *OpenONUAC) ReEnableDevice(ctx context.Context, device *voltha.Device) (*empty.Empty, error) {
+func (oo *OpenONUAC) ReEnableDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
 	logger.Infow(ctx, "reenable-device", log.Fields{"device-id": device.Id})
 	if handler, err := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
 		go handler.reEnableDevice(log.WithSpanFromContext(context.Background(), ctx), device)
-		return &empty.Empty{}, nil
+		return &emptypb.Empty{}, nil
 	} else {
 		logger.Warnw(ctx, "no handler found for device-reenable", log.Fields{"device-id": device.Id})
 		return nil, err
@@ -328,14 +329,14 @@
 }
 
 // RebootDevice reboots the given device
-func (oo *OpenONUAC) RebootDevice(ctx context.Context, device *voltha.Device) (*empty.Empty, error) {
+func (oo *OpenONUAC) RebootDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
 	logger.Infow(ctx, "reboot-device", log.Fields{"device-id": device.Id})
 	if handler, err := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
 		err := handler.rebootDevice(log.WithSpanFromContext(context.Background(), ctx), true, device) //reboot request with device checking
 		if err != nil {
 			return nil, err
 		}
-		return &empty.Empty{}, nil
+		return &emptypb.Empty{}, nil
 	} else {
 		logger.Warnw(ctx, "no handler found for device-reboot", log.Fields{"device-id": device.Id})
 		return nil, err
@@ -343,7 +344,7 @@
 }
 
 // DeleteDevice deletes the given device
-func (oo *OpenONUAC) DeleteDevice(ctx context.Context, device *voltha.Device) (*empty.Empty, error) {
+func (oo *OpenONUAC) DeleteDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
 	nctx := log.WithSpanFromContext(context.Background(), ctx)
 	logger.Infow(ctx, "delete-device", log.Fields{"device-id": device.Id, "SerialNumber": device.SerialNumber, "ctx": ctx, "nctx": nctx})
 
@@ -404,7 +405,7 @@
 		oo.deleteDeviceHandlerToMap(handler)
 		handler.PrepareForGarbageCollection(ctx, handler.DeviceID)
 
-		return &empty.Empty{}, nil
+		return &emptypb.Empty{}, nil
 	} else {
 		errMsg := fmt.Sprintf("Device  Handler not found -%s with error %s", device.Id, err)
 		logger.Error(ctx, errMsg)
@@ -413,7 +414,7 @@
 }
 
 // UpdateFlowsIncrementally updates (add/remove) the flows on a given device
-func (oo *OpenONUAC) UpdateFlowsIncrementally(ctx context.Context, incrFlows *ca.IncrementalFlows) (*empty.Empty, error) {
+func (oo *OpenONUAC) UpdateFlowsIncrementally(ctx context.Context, incrFlows *ca.IncrementalFlows) (*emptypb.Empty, error) {
 	logger.Infow(ctx, "update-flows-incrementally", log.Fields{"device-id": incrFlows.Device.Id})
 
 	//flow config is relayed to handler even if the device might be in some 'inactive' state
@@ -436,7 +437,7 @@
 		if flowUpdateErr := handler.FlowUpdateIncremental(ctx, incrFlows.Flows, incrFlows.Groups, incrFlows.FlowMetadata); flowUpdateErr != nil {
 			return nil, flowUpdateErr
 		}
-		return &empty.Empty{}, nil
+		return &emptypb.Empty{}, nil
 	} else {
 		logger.Warnw(ctx, "no handler found for incremental flow update", log.Fields{"device-id": incrFlows.Device.Id})
 		return nil, err
@@ -444,13 +445,13 @@
 }
 
 // UpdatePmConfig returns PmConfigs nil or error
-func (oo *OpenONUAC) UpdatePmConfig(ctx context.Context, configs *ca.PmConfigsInfo) (*empty.Empty, error) {
+func (oo *OpenONUAC) UpdatePmConfig(ctx context.Context, configs *ca.PmConfigsInfo) (*emptypb.Empty, error) {
 	logger.Infow(ctx, "update-pm-config", log.Fields{"device-id": configs.DeviceId})
 	if handler, err := oo.getDeviceHandler(ctx, configs.DeviceId, false); handler != nil {
 		if pmConfigErr := handler.updatePmConfig(log.WithSpanFromContext(context.Background(), ctx), configs.PmConfigs); pmConfigErr != nil {
 			return nil, pmConfigErr
 		}
-		return &empty.Empty{}, nil
+		return &emptypb.Empty{}, nil
 	} else {
 		logger.Warnw(ctx, "no handler found for update-pm-config", log.Fields{"device-id": configs.DeviceId})
 		return nil, err
@@ -518,9 +519,9 @@
 			return handler.GetUniPortStatus(ctx, reqType.UniInfo), nil
 		case *extension.GetValueRequest_OnuOpticalInfo:
 			CommChan := make(chan cmn.Message)
-			respChan := make(chan extension.SingleGetValueResponse)
+			respChan := make(chan *extension.SingleGetValueResponse)
 			// Initiate the self test request
-			if selfTestErr := handler.pSelfTestHdlr.SelfTestRequestStart(ctx, *request, CommChan, respChan); selfTestErr != nil {
+			if selfTestErr := handler.pSelfTestHdlr.SelfTestRequestStart(ctx, request, CommChan, respChan); selfTestErr != nil {
 				return &extension.SingleGetValueResponse{
 					Response: &extension.GetValueResponse{
 						Status:    extension.GetValueResponse_ERROR,
@@ -530,7 +531,7 @@
 			}
 			// The timeout handling is already implemented in omci_self_test_handler module
 			resp := <-respChan
-			return &resp, nil
+			return resp, nil
 		case *extension.GetValueRequest_OnuInfo:
 			return handler.getOnuOMCICounters(ctx, reqType.OnuInfo), nil
 		case *extension.GetValueRequest_OnuOmciStats:
@@ -958,7 +959,7 @@
  */
 
 // OnuIndication is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) OnuIndication(ctx context.Context, onuInd *ia.OnuIndicationMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) OnuIndication(ctx context.Context, onuInd *ia.OnuIndicationMessage) (*emptypb.Empty, error) {
 	logger.Debugw(ctx, "onu-indication", log.Fields{"onu-indication": onuInd})
 
 	if onuInd == nil || onuInd.OnuIndication == nil {
@@ -984,21 +985,21 @@
 }
 
 // OmciIndication is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) OmciIndication(ctx context.Context, msg *ia.OmciMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) OmciIndication(ctx context.Context, msg *ia.OmciMessage) (*emptypb.Empty, error) {
 	logger.Debugw(ctx, "omci-response", log.Fields{"parent-device-id": msg.ParentDeviceId, "child-device-id": msg.ChildDeviceId})
 
 	if handler, err := oo.getDeviceHandler(ctx, msg.ChildDeviceId, false); handler != nil {
 		if omciIndErr := handler.handleOMCIIndication(log.WithSpanFromContext(context.Background(), ctx), msg); omciIndErr != nil {
 			return nil, omciIndErr
 		}
-		return &empty.Empty{}, nil
+		return &emptypb.Empty{}, nil
 	} else {
 		return nil, err
 	}
 }
 
 // DownloadTechProfile is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) DownloadTechProfile(ctx context.Context, tProfile *ia.TechProfileDownloadMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) DownloadTechProfile(ctx context.Context, tProfile *ia.TechProfileDownloadMessage) (*emptypb.Empty, error) {
 	logger.Info(ctx, "download-tech-profile", log.Fields{"device-id": tProfile.DeviceId, "uni-id": tProfile.UniId})
 
 	if handler, err := oo.getDeviceHandler(ctx, tProfile.DeviceId, false); handler != nil {
@@ -1013,14 +1014,14 @@
 		if tpDownloadErr := handler.handleTechProfileDownloadRequest(log.WithSpanFromContext(context.Background(), ctx), tProfile); tpDownloadErr != nil {
 			return nil, tpDownloadErr
 		}
-		return &empty.Empty{}, nil
+		return &emptypb.Empty{}, nil
 	} else {
 		return nil, err
 	}
 }
 
 // DeleteGemPort is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) DeleteGemPort(ctx context.Context, gPort *ia.DeleteGemPortMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) DeleteGemPort(ctx context.Context, gPort *ia.DeleteGemPortMessage) (*emptypb.Empty, error) {
 	logger.Debugw(ctx, "delete-gem-port", log.Fields{"device-id": gPort.DeviceId, "uni-id": gPort.UniId})
 	if handler, _ := oo.getDeviceHandler(ctx, gPort.DeviceId, false); handler != nil {
 		if handler.GetDeletionInProgress() {
@@ -1034,11 +1035,11 @@
 		logger.Debugw(ctx, "deviceHandler not found", log.Fields{"device-id": gPort.DeviceId})
 		// delete requests for objects of an already deleted ONU should be acknowledged positively - continue
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // DeleteTCont is part of the ONU Inter-adapter service API.
-func (oo *OpenONUAC) DeleteTCont(ctx context.Context, tConf *ia.DeleteTcontMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) DeleteTCont(ctx context.Context, tConf *ia.DeleteTcontMessage) (*emptypb.Empty, error) {
 	logger.Debugw(ctx, "delete-tcont", log.Fields{"device-id": tConf.DeviceId, "tconf": tConf})
 	if handler, _ := oo.getDeviceHandler(ctx, tConf.DeviceId, false); handler != nil {
 		if handler.GetDeletionInProgress() {
@@ -1052,7 +1053,7 @@
 		logger.Debugw(ctx, "deviceHandler not found", log.Fields{"device-id": tConf.DeviceId})
 		// delete requests for objects of an already deleted ONU should be acknowledged positively - continue
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 /*
@@ -1296,7 +1297,7 @@
 }
 
 // SetExtValue is unimplemented
-func (oo *OpenONUAC) SetExtValue(context.Context, *ca.SetExtValueMessage) (*empty.Empty, error) {
+func (oo *OpenONUAC) SetExtValue(context.Context, *ca.SetExtValueMessage) (*emptypb.Empty, error) {
 	return nil, errors.New("unImplemented")
 }
 
@@ -1332,12 +1333,12 @@
 }
 
 // SuppressEvent unimplemented
-func (oo *OpenONUAC) SuppressEvent(ctx context.Context, filter *voltha.EventFilter) (*empty.Empty, error) {
+func (oo *OpenONUAC) SuppressEvent(ctx context.Context, filter *voltha.EventFilter) (*emptypb.Empty, error) {
 	return nil, errors.New("unImplemented")
 }
 
 // UnSuppressEvent  unimplemented
-func (oo *OpenONUAC) UnSuppressEvent(ctx context.Context, filter *voltha.EventFilter) (*empty.Empty, error) {
+func (oo *OpenONUAC) UnSuppressEvent(ctx context.Context, filter *voltha.EventFilter) (*emptypb.Empty, error) {
 	return nil, errors.New("unImplemented")
 }
 
@@ -1357,27 +1358,27 @@
 }
 
 // UpdateFlowsBulk is unimplemented
-func (oo *OpenONUAC) UpdateFlowsBulk(ctx context.Context, flows *ca.BulkFlows) (*empty.Empty, error) {
+func (oo *OpenONUAC) UpdateFlowsBulk(ctx context.Context, flows *ca.BulkFlows) (*emptypb.Empty, error) {
 	return nil, errors.New("unImplemented")
 }
 
 // SelfTestDevice unimplented
-func (oo *OpenONUAC) SelfTestDevice(ctx context.Context, device *voltha.Device) (*empty.Empty, error) {
+func (oo *OpenONUAC) SelfTestDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
 	return nil, errors.New("unImplemented")
 }
 
 // SendPacketOut sends packet out to the device
-func (oo *OpenONUAC) SendPacketOut(ctx context.Context, packet *ca.PacketOut) (*empty.Empty, error) {
+func (oo *OpenONUAC) SendPacketOut(ctx context.Context, packet *ca.PacketOut) (*emptypb.Empty, error) {
 	return nil, errors.New("unImplemented")
 }
 
 // EnablePort to Enable PON/NNI interface - seems not to be used/required according to python code
-func (oo *OpenONUAC) EnablePort(ctx context.Context, port *voltha.Port) (*empty.Empty, error) {
+func (oo *OpenONUAC) EnablePort(ctx context.Context, port *voltha.Port) (*emptypb.Empty, error) {
 	return nil, errors.New("unImplemented")
 }
 
 // DisablePort to Disable pon/nni interface  - seems not to be used/required according to python code
-func (oo *OpenONUAC) DisablePort(ctx context.Context, port *voltha.Port) (*empty.Empty, error) {
+func (oo *OpenONUAC) DisablePort(ctx context.Context, port *voltha.Port) (*emptypb.Empty, error) {
 	return nil, errors.New("unImplemented")
 }
 
@@ -1387,7 +1388,31 @@
 }
 
 // ChildDeviceLost - unimplemented
-func (oo *OpenONUAC) ChildDeviceLost(ctx context.Context, childDevice *voltha.Device) (*empty.Empty, error) {
+func (oo *OpenONUAC) ChildDeviceLost(ctx context.Context, childDevice *voltha.Device) (*emptypb.Empty, error) {
+	return nil, errors.New("unImplemented")
+}
+
+// DisableOnuDevice - disable ONU device
+func (oo *OpenONUAC) DisableOnuDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
+	logger.Infow(ctx, "disable-onu-device", log.Fields{"device-id": device.Id})
+	return oo.DisableDevice(ctx, device)
+}
+
+// EnableOnuDevice - enable ONU device
+func (oo *OpenONUAC) EnableOnuDevice(ctx context.Context, device *voltha.Device) (*emptypb.Empty, error) {
+	logger.Infow(ctx, "enable-onu-device", log.Fields{"device-id": device.Id})
+	return oo.ReEnableDevice(ctx, device)
+}
+
+// DisableOnuSerialNumber - disable ONU by serial number
+func (oo *OpenONUAC) DisableOnuSerialNumber(ctx context.Context, serialNumber *voltha.OnuSerialNumberOnOLTPon) (*emptypb.Empty, error) {
+	logger.Infow(ctx, "disable-onu-serial-number", log.Fields{"serial-number": serialNumber.SerialNumber})
+	return nil, errors.New("unImplemented")
+}
+
+// EnableOnuSerialNumber - enable ONU by serial number
+func (oo *OpenONUAC) EnableOnuSerialNumber(ctx context.Context, serialNumber *voltha.OnuSerialNumberOnOLTPon) (*emptypb.Empty, error) {
+	logger.Infow(ctx, "enable-onu-serial-number", log.Fields{"serial-number": serialNumber.SerialNumber})
 	return nil, errors.New("unImplemented")
 }
 
diff --git a/internal/pkg/core/openonuInterAdapter.go b/internal/pkg/core/openonuInterAdapter.go
index d57f5f0..68e562d 100644
--- a/internal/pkg/core/openonuInterAdapter.go
+++ b/internal/pkg/core/openonuInterAdapter.go
@@ -22,16 +22,17 @@
 	"fmt"
 	"time"
 
-	"github.com/golang/protobuf/ptypes/empty"
 	"github.com/opencord/voltha-lib-go/v7/pkg/log"
 	"github.com/opencord/voltha-protos/v5/go/common"
 	"github.com/opencord/voltha-protos/v5/go/health"
 	ia "github.com/opencord/voltha-protos/v5/go/inter_adapter"
 	"github.com/opencord/voltha-protos/v5/go/onu_inter_adapter_service"
+	"google.golang.org/protobuf/types/known/emptypb"
 )
 
 // OpenONUACInterAdapter structure holds a reference to ONU adapter
 type OpenONUACInterAdapter struct {
+	onu_inter_adapter_service.UnimplementedOnuInterAdapterServiceServer
 	onuAdapter  *OpenONUAC
 	exitChannel chan struct{}
 }
@@ -48,27 +49,27 @@
 }
 
 // OnuIndication redirects the request the the core ONU adapter handler
-func (oo *OpenONUACInterAdapter) OnuIndication(ctx context.Context, onuInd *ia.OnuIndicationMessage) (*empty.Empty, error) {
+func (oo *OpenONUACInterAdapter) OnuIndication(ctx context.Context, onuInd *ia.OnuIndicationMessage) (*emptypb.Empty, error) {
 	return oo.onuAdapter.OnuIndication(ctx, onuInd)
 }
 
 // OmciIndication redirects the request the the core ONU adapter handler
-func (oo *OpenONUACInterAdapter) OmciIndication(ctx context.Context, msg *ia.OmciMessage) (*empty.Empty, error) {
+func (oo *OpenONUACInterAdapter) OmciIndication(ctx context.Context, msg *ia.OmciMessage) (*emptypb.Empty, error) {
 	return oo.onuAdapter.OmciIndication(ctx, msg)
 }
 
 // DownloadTechProfile redirects the request the the core ONU adapter handler
-func (oo *OpenONUACInterAdapter) DownloadTechProfile(ctx context.Context, tProfile *ia.TechProfileDownloadMessage) (*empty.Empty, error) {
+func (oo *OpenONUACInterAdapter) DownloadTechProfile(ctx context.Context, tProfile *ia.TechProfileDownloadMessage) (*emptypb.Empty, error) {
 	return oo.onuAdapter.DownloadTechProfile(ctx, tProfile)
 }
 
 // DeleteGemPort redirects the request the the core ONU adapter handler
-func (oo *OpenONUACInterAdapter) DeleteGemPort(ctx context.Context, gPort *ia.DeleteGemPortMessage) (*empty.Empty, error) {
+func (oo *OpenONUACInterAdapter) DeleteGemPort(ctx context.Context, gPort *ia.DeleteGemPortMessage) (*emptypb.Empty, error) {
 	return oo.onuAdapter.DeleteGemPort(ctx, gPort)
 }
 
 // DeleteTCont redirects the request the the core ONU adapter handler
-func (oo *OpenONUACInterAdapter) DeleteTCont(ctx context.Context, tConf *ia.DeleteTcontMessage) (*empty.Empty, error) {
+func (oo *OpenONUACInterAdapter) DeleteTCont(ctx context.Context, tConf *ia.DeleteTcontMessage) (*emptypb.Empty, error) {
 	return oo.onuAdapter.DeleteTCont(ctx, tConf)
 }
 
diff --git a/internal/pkg/mib/mib_sync.go b/internal/pkg/mib/mib_sync.go
index 26c0cbe..4580b72 100755
--- a/internal/pkg/mib/mib_sync.go
+++ b/internal/pkg/mib/mib_sync.go
@@ -1549,7 +1549,7 @@
 	oo.MutexReconciledTpInstances.Lock()
 	for indexUni, uniData := range oo.SOnuPersistentData.PersUniConfig {
 		uniID := uniData.PersUniID
-		oo.ReconciledTpInstances[uniID] = make(map[uint8]inter_adapter.TechProfileDownloadMessage)
+		oo.ReconciledTpInstances[uniID] = make(map[uint8]*inter_adapter.TechProfileDownloadMessage)
 		for tpID, tpPath := range uniData.PersTpPathMap {
 			if tpPath != "" {
 				logger.Infow(ctx, "Starting retrieval for TechProfileInstance", log.Fields{
@@ -1610,7 +1610,7 @@
 				if err == nil && iaTechTpInst != nil {
 					logger.Debugw(ctx, "reconciling - store Tp instance", log.Fields{"uniID": uniID, "tpID": tpID,
 						"*iaTechTpInst": iaTechTpInst, "device-id": oo.deviceID})
-					oo.ReconciledTpInstances[uniID][tpID] = *iaTechTpInst
+					oo.ReconciledTpInstances[uniID][tpID] = iaTechTpInst
 				} else {
 					// During the absence of the ONU adapter there seem to have been TP specific configurations!
 					// The no longer available TP and the associated flows must be deleted from the ONU KV store
diff --git a/internal/pkg/mib/onu_device_entry.go b/internal/pkg/mib/onu_device_entry.go
index 65d223f..9d67f83 100755
--- a/internal/pkg/mib/onu_device_entry.go
+++ b/internal/pkg/mib/onu_device_entry.go
@@ -182,7 +182,7 @@
 	PDevOmciCC                 *cmn.OmciCC
 	pOnuDB                     *devdb.OnuDeviceDB
 	mibTemplateKVStore         *db.Backend
-	ReconciledTpInstances      map[uint8]map[uint8]inter_adapter.TechProfileDownloadMessage
+	ReconciledTpInstances      map[uint8]map[uint8]*inter_adapter.TechProfileDownloadMessage
 	chReconcilingFlowsFinished chan bool //channel to indicate that reconciling of flows has been finished
 	onuKVStore                 *db.Backend
 	POnuImageStatus            *swupg.OnuImageStatus
@@ -239,7 +239,7 @@
 	onuDeviceEntry.devState = cmn.DeviceStatusInit
 	onuDeviceEntry.SOnuPersistentData.PersUniConfig = make([]uniPersConfig, 0)
 	onuDeviceEntry.SOnuPersistentData.PersTcontMap = make(map[uint16]uint16)
-	onuDeviceEntry.ReconciledTpInstances = make(map[uint8]map[uint8]inter_adapter.TechProfileDownloadMessage)
+	onuDeviceEntry.ReconciledTpInstances = make(map[uint8]map[uint8]*inter_adapter.TechProfileDownloadMessage)
 	onuDeviceEntry.chReconcilingFlowsFinished = make(chan bool)
 	onuDeviceEntry.reconcilingFlows = false
 	onuDeviceEntry.omciRebootMessageReceivedChannel = make(chan cmn.Message, 2)
diff --git a/internal/pkg/omcitst/omci_self_test_handler.go b/internal/pkg/omcitst/omci_self_test_handler.go
index 9fe8841..c919812 100755
--- a/internal/pkg/omcitst/omci_self_test_handler.go
+++ b/internal/pkg/omcitst/omci_self_test_handler.go
@@ -54,9 +54,9 @@
 // We initiate an fsmCb per Self Test Request
 type fsmCb struct {
 	fsm          *cmn.AdapterFsm
-	respChan     chan extension.SingleGetValueResponse
+	respChan     chan *extension.SingleGetValueResponse
 	stopOmciChan chan bool
-	reqMsg       extension.SingleGetValueRequest
+	reqMsg       *extension.SingleGetValueRequest
 }
 
 // SelfTestControlBlock - TODO: add comment
@@ -92,8 +92,8 @@
 	return &selfTestCb
 }
 
-func (selfTestCb *SelfTestControlBlock) initiateNewSelfTestFsm(ctx context.Context, reqMsg extension.SingleGetValueRequest,
-	CommChan chan cmn.Message, classID generated.ClassID, respChan chan extension.SingleGetValueResponse) error {
+func (selfTestCb *SelfTestControlBlock) initiateNewSelfTestFsm(ctx context.Context, reqMsg *extension.SingleGetValueRequest,
+	CommChan chan cmn.Message, classID generated.ClassID, respChan chan *extension.SingleGetValueResponse) error {
 	aFsm := cmn.NewAdapterFsm("selfTestFsm", selfTestCb.deviceID, CommChan)
 
 	if aFsm == nil {
@@ -168,7 +168,7 @@
 
 ///// Utility functions
 
-func (selfTestCb *SelfTestControlBlock) getMeClassID(ctx context.Context, reqMsg extension.SingleGetValueRequest) (generated.ClassID, error) {
+func (selfTestCb *SelfTestControlBlock) getMeClassID(ctx context.Context, reqMsg *extension.SingleGetValueRequest) (generated.ClassID, error) {
 	switch reqMsg.GetRequest().GetRequest().(type) {
 	case *extension.GetValueRequest_OnuOpticalInfo:
 		return generated.AniGClassID, nil
@@ -189,8 +189,8 @@
 }
 
 //nolint:unparam
-func (selfTestCb *SelfTestControlBlock) submitFailureGetValueResponse(ctx context.Context, respChan chan extension.SingleGetValueResponse,
-	errorCode extension.GetValueResponse_ErrorReason, statusCode extension.GetValueResponse_Status, reqMsg extension.SingleGetValueRequest) {
+func (selfTestCb *SelfTestControlBlock) submitFailureGetValueResponse(ctx context.Context, respChan chan *extension.SingleGetValueResponse,
+	errorCode extension.GetValueResponse_ErrorReason, statusCode extension.GetValueResponse_Status, reqMsg *extension.SingleGetValueRequest) {
 	meClassID, err := selfTestCb.getMeClassID(ctx, reqMsg)
 	if err != nil {
 		return
@@ -204,7 +204,7 @@
 	logger.Infow(ctx, "OMCI test response failure - pushing failure response", log.Fields{"device-id": selfTestCb.deviceID})
 	// Clear the fsmCb from the map
 	delete(selfTestCb.selfTestFsmMap, meClassID)
-	respChan <- singleValResp
+	respChan <- &singleValResp
 	logger.Infow(ctx, "OMCI test response failure - pushing failure response complete", log.Fields{"device-id": selfTestCb.deviceID})
 }
 
@@ -315,7 +315,7 @@
 			"temperature":        singleValResp.Response.GetOnuOpticalInfo().Temperature})
 	selfTestCb.triggerFsmEvent(cb.fsm, selfTestEventTestResultSuccess)
 	logger.Debugw(ctx, "OMCI test result success - pushing results", log.Fields{"device-id": selfTestCb.deviceID, "classID": classID})
-	cb.respChan <- singleValResp
+	cb.respChan <- &singleValResp
 	selfTestCb.selfTestRequestComplete(ctx, cb.reqMsg)
 	logger.Infow(ctx, "OMCI test result success - pushing results complete", log.Fields{"device-id": selfTestCb.deviceID, "classID": classID})
 }
@@ -357,7 +357,7 @@
 }
 
 // selfTestRequestComplete removes the fsmCb from the local cache if found
-func (selfTestCb *SelfTestControlBlock) selfTestRequestComplete(ctx context.Context, reqMsg extension.SingleGetValueRequest) {
+func (selfTestCb *SelfTestControlBlock) selfTestRequestComplete(ctx context.Context, reqMsg *extension.SingleGetValueRequest) {
 	meClassID, err := selfTestCb.getMeClassID(ctx, reqMsg)
 	if err != nil {
 		return
@@ -405,8 +405,8 @@
 
 // SelfTestRequestStart initiate Test Request handling procedure. The results are asynchronously conveyed on the respChan.
 // If the return from selfTestRequest is NOT nil, the caller shall not wait for async response.
-func (selfTestCb *SelfTestControlBlock) SelfTestRequestStart(ctx context.Context, reqMsg extension.SingleGetValueRequest,
-	CommChan chan cmn.Message, respChan chan extension.SingleGetValueResponse) error {
+func (selfTestCb *SelfTestControlBlock) SelfTestRequestStart(ctx context.Context, reqMsg *extension.SingleGetValueRequest,
+	CommChan chan cmn.Message, respChan chan *extension.SingleGetValueResponse) error {
 	meClassID, err := selfTestCb.getMeClassID(ctx, reqMsg)
 	if err != nil {
 		return err
diff --git a/internal/pkg/pmmgr/onu_metrics_manager.go b/internal/pkg/pmmgr/onu_metrics_manager.go
index f8f9178..7e7a85e 100755
--- a/internal/pkg/pmmgr/onu_metrics_manager.go
+++ b/internal/pkg/pmmgr/onu_metrics_manager.go
@@ -2071,7 +2071,7 @@
 
 	logger.Debugw(ctx, "collecting data for EthernetFramePerformanceMonitoringHistoryData successful",
 		log.Fields{"device-id": mm.deviceID, "entityID": entityID, "upstream": upstream, "metricInfo": metricInfo})
-	return &metricInfo
+	return metricInfo
 }
 
 func (mm *OnuMetricsManager) collectEthernetUniHistoryData(ctx context.Context, entityID uint16) *voltha.MetricInformation {
@@ -2101,7 +2101,7 @@
 
 	logger.Debugw(ctx, "collecting data for EthernetPerformanceMonitoringHistoryData successful",
 		log.Fields{"device-id": mm.deviceID, "entityID": entityID, "metricInfo": metricInfo})
-	return &metricInfo
+	return metricInfo
 }
 
 func (mm *OnuMetricsManager) collectFecHistoryData(ctx context.Context, entityID uint16, isCurrent bool) *voltha.MetricInformation {
@@ -2131,7 +2131,7 @@
 
 	logger.Debugw(ctx, "collecting data for FecPerformanceMonitoringHistoryData successful",
 		log.Fields{"device-id": mm.deviceID, "entityID": entityID, "metricInfo": metricInfo})
-	return &metricInfo
+	return metricInfo
 }
 
 func (mm *OnuMetricsManager) collectGemHistoryData(ctx context.Context, entityID uint16, isCurrent bool) *voltha.MetricInformation {
@@ -2161,7 +2161,7 @@
 
 	logger.Debugw(ctx, "collecting data for GemPortNetworkCtpPerformanceMonitoringHistoryData successful",
 		log.Fields{"device-id": mm.deviceID, "entityID": entityID, "metricInfo": metricInfo})
-	return &metricInfo
+	return metricInfo
 }
 
 // nolint: gocyclo
@@ -2784,7 +2784,7 @@
 	return nil
 }
 
-func (mm *OnuMetricsManager) populateOnuMetricInfo(title string, data map[string]float32) voltha.MetricInformation {
+func (mm *OnuMetricsManager) populateOnuMetricInfo(title string, data map[string]float32) *voltha.MetricInformation {
 	metricsContext := make(map[string]string)
 	metricsContext["onuID"] = fmt.Sprintf("%d", mm.pDeviceHandler.GetDevice().ProxyAddress.OnuId)
 	metricsContext["intfID"] = fmt.Sprintf("%d", mm.pDeviceHandler.GetDevice().ProxyAddress.ChannelId)
@@ -2802,7 +2802,7 @@
 
 	// create slice of metrics given that there could be more than one VEIP instance
 	metricInfo := voltha.MetricInformation{Metadata: &mmd, Metrics: data}
-	return metricInfo
+	return &metricInfo
 }
 
 func (mm *OnuMetricsManager) updateAndValidateIntervalEndTime(ctx context.Context, entityID uint16, meAttributes me.AttributeValueMap, intervalEndTime *int) bool {
@@ -3650,8 +3650,8 @@
 		}
 	}
 	// Collect metrics for upstream for all the PM Mes per uni port and aggregate
-	var pmUpstream extension.OmciEthernetFrameExtendedPm
-	var pmDownstream extension.OmciEthernetFrameExtendedPm
+	pmUpstream := &extension.OmciEthernetFrameExtendedPm{}
+	pmDownstream := &extension.OmciEthernetFrameExtendedPm{}
 	counterFormat := extension.GetOmciEthernetFrameExtendedPmResponse_SIXTY_FOUR_BIT
 	if mm.supportedEthernetFrameExtendedPMClass == me.EthernetFrameExtendedPmClassID {
 		counterFormat = extension.GetOmciEthernetFrameExtendedPmResponse_THIRTY_TWO_BIT
@@ -3697,8 +3697,8 @@
 			Status: extension.GetValueResponse_OK,
 			Response: &extension.GetValueResponse_OnuCounters{
 				OnuCounters: &extension.GetOmciEthernetFrameExtendedPmResponse{
-					Upstream:                          &pmUpstream,
-					Downstream:                        &pmDownstream,
+					Upstream:                          pmUpstream,
+					Downstream:                        pmDownstream,
 					OmciEthernetFrameExtendedPmFormat: counterFormat,
 				},
 			},
@@ -4065,7 +4065,7 @@
 }
 
 func (mm *OnuMetricsManager) aggregateEthernetFrameExtendedPM(pmDataIn map[string]uint64,
-	pmData extension.OmciEthernetFrameExtendedPm, aggregate bool) extension.OmciEthernetFrameExtendedPm {
+	pmData *extension.OmciEthernetFrameExtendedPm, aggregate bool) *extension.OmciEthernetFrameExtendedPm {
 	errorCounterValue := UnsupportedCounterValue64bit
 	if mm.supportedEthernetFrameExtendedPMClass == me.EthernetFrameExtendedPmClassID {
 		errorCounterValue = UnsupportedCounterValue32bit
@@ -4158,7 +4158,7 @@
 		pmDataOut.Frames_512To_1023Octets = pmDataIn["512_to_1023_octets"]
 		pmDataOut.Frames_1024To_1518Octets = pmDataIn["1024_to_1518_octets"]
 	}
-	return pmDataOut
+	return &pmDataOut
 }
 
 //nolint:unparam
@@ -4272,18 +4272,18 @@
 				metrics := metricInfo.GetMetrics()
 				gemHistoryData.TransmittedGEMFrames = mm.safeGetMetricValue(ctx, metrics, "transmitted_gem_frames", mm.deviceID)
 				gemHistoryData.ReceivedGEMFrames = mm.safeGetMetricValue(ctx, metrics, "received_gem_frames", mm.deviceID)
-				gemHistoryData.ReceivedPayloadBytes = mm.safeGetMetricValue(ctx, metrics, "received_payload_bytes", mm.deviceID)
-				gemHistoryData.TransmittedPayloadBytes = mm.safeGetMetricValue(ctx, metrics, "transmitted_payload_bytes", mm.deviceID)
+				gemHistoryData.ReceivedPayloadBytes_64 = uint64(mm.safeGetMetricValue(ctx, metrics, "received_payload_bytes", mm.deviceID))
+				gemHistoryData.TransmittedPayloadBytes_64 = uint64(mm.safeGetMetricValue(ctx, metrics, "transmitted_payload_bytes", mm.deviceID))
 				gemHistoryData.EncryptionKeyErrors = mm.safeGetMetricValue(ctx, metrics, "encryption_key_errors", mm.deviceID)
 				allocIdGemData.GemPortInfo = append(allocIdGemData.GemPortInfo, &gemHistoryData)
-				logger.Debugw(ctx, " allocIdGemData value ", log.Fields{"AllocIDGemData": allocIdGemData})
+				logger.Debugw(ctx, " allocIdGemData value ", log.Fields{"AllocIDGemData": &allocIdGemData})
 
 			}
 		}
 		resp.Response.GetOnuAllocGemStatsResponse().OnuAllocGemHistoryData = append(resp.Response.GetOnuAllocGemStatsResponse().OnuAllocGemHistoryData, &allocIdGemData)
 	}
 
-	logger.Debugw(ctx, "Request to fetch GEM Performance Counters  ", log.Fields{"device-id": mm.deviceID, "response": resp})
+	logger.Debugw(ctx, "Request to fetch GEM Performance Counters  ", log.Fields{"device-id": mm.deviceID, "response": &resp})
 	return &resp
 
 }
@@ -4321,15 +4321,15 @@
 			// Populate the response with the collected FEC metrics directly
 			fecResponse := resp.Response.GetFecHistory()
 			metrics := metricInfo.GetMetrics()
-			fecResponse.CorrectedBytes = mm.safeGetMetricValue(ctx, metrics, "corrected_bytes", mm.deviceID)
-			fecResponse.CorrectedCodeWords = mm.safeGetMetricValue(ctx, metrics, "corrected_code_words", mm.deviceID)
-			fecResponse.UncorrectableCodeWords = mm.safeGetMetricValue(ctx, metrics, "uncorrectable_code_words", mm.deviceID)
-			fecResponse.TotalCodeWords = mm.safeGetMetricValue(ctx, metrics, "total_code_words", mm.deviceID)
+			fecResponse.FecCorrectedBytes_64 = uint64(mm.safeGetMetricValue(ctx, metrics, "corrected_bytes", mm.deviceID))
+			fecResponse.FecCorrectedCodeWords_64 = uint64(mm.safeGetMetricValue(ctx, metrics, "corrected_code_words", mm.deviceID))
+			fecResponse.UncorrectableCodeWords_64 = uint64(mm.safeGetMetricValue(ctx, metrics, "uncorrectable_code_words", mm.deviceID))
+			fecResponse.TotalCodeWords_64 = uint64(mm.safeGetMetricValue(ctx, metrics, "total_code_words", mm.deviceID))
 			fecResponse.FecSeconds = mm.safeGetMetricValue(ctx, metrics, "fec_seconds", mm.deviceID)
 
 			logger.Debugw(ctx, "FEC response populated successfully",
-				log.Fields{"device-id": mm.deviceID, "correctedBytes": fecResponse.CorrectedBytes,
-					"correctedCodeWords": fecResponse.CorrectedCodeWords, "fecSeconds": fecResponse.FecSeconds})
+				log.Fields{"device-id": mm.deviceID, "correctedBytes": fecResponse.FecCorrectedBytes_64,
+					"correctedCodeWords": fecResponse.FecCorrectedCodeWords_64, "fecSeconds": fecResponse.FecSeconds})
 		} else {
 			logger.Warnw(ctx, "Failed to collect FEC metrics", log.Fields{"device-id": mm.deviceID, "EntityID": firstInstanceKey})
 		}
diff --git a/internal/pkg/swupg/onu_image_status.go b/internal/pkg/swupg/onu_image_status.go
index 1b5d6a6..90f8081 100755
--- a/internal/pkg/swupg/onu_image_status.go
+++ b/internal/pkg/swupg/onu_image_status.go
@@ -102,7 +102,7 @@
 		}
 		images.Items = append(images.Items, &image)
 	}
-	logger.Debugw(ctx, "images of the ONU", log.Fields{"images": images})
+	logger.Debugw(ctx, "images of the ONU", log.Fields{"images": &images})
 	oo.updateOnuSwImagePersistentData(ctx)
 	return &images, nil
 }