@@ -569,14 +569,6 @@ Cru::PacketMonitoringInfo CruBar::monitorPackets()
569569 std::map<int , Cru::WrapperPacketInfo> wrapperPacketInfoMap;
570570
571571 DatapathWrapper datapathWrapper = DatapathWrapper (mPdaBar );
572- std::map<int , Link> linkMap = initializeLinkMap ();
573- for (auto & el : linkMap) {
574- uint32_t accepted = datapathWrapper.getAcceptedPackets (el.second );
575- uint32_t rejected = datapathWrapper.getRejectedPackets (el.second );
576- uint32_t forced = datapathWrapper.getForcedPackets (el.second );
577- linkPacketInfoMap.insert ({ el.first , { accepted, rejected, forced } });
578- }
579-
580572 // Insert the Run Statistics link
581573 Link runStatsLink = {};
582574 runStatsLink.dwrapper = mEndpoint ;
@@ -596,6 +588,18 @@ Cru::PacketMonitoringInfo CruBar::monitorPackets()
596588 forced = datapathWrapper.getForcedPackets (uLLink);
597589 linkPacketInfoMap.insert ({ 15 , { accepted, rejected, forced } });
598590
591+ bool userLogicEnabled = datapathWrapper.getLinkEnabled (uLLink);
592+
593+ // Insert links 0-11
594+ std::map<int , Link> linkMap = initializeLinkMap ();
595+ for (auto & el : linkMap) {
596+ // don't read the link register when UL is enabled
597+ uint32_t accepted = userLogicEnabled ? 0 : datapathWrapper.getAcceptedPackets (el.second );
598+ uint32_t rejected = userLogicEnabled ? 0 : datapathWrapper.getRejectedPackets (el.second );
599+ uint32_t forced = userLogicEnabled ? 0 : datapathWrapper.getForcedPackets (el.second );
600+ linkPacketInfoMap.insert ({ el.first , { accepted, rejected, forced } });
601+ }
602+
599603 int wrapper = mEndpoint ;
600604 uint32_t dropped = datapathWrapper.getDroppedPackets (wrapper);
601605 uint32_t totalPerSecond = datapathWrapper.getTotalPacketsPerSecond (wrapper);
0 commit comments