@@ -350,7 +350,8 @@ class AgentTrafficPfcTest : public AgentHwTest {
350350 }
351351
352352 std::vector<PortID> portIdsForTest (bool scaleTest = false ) {
353- auto allPorts = masterLogicalInterfacePortIds ();
353+ auto allPorts = FLAGS_hyper_port ? masterLogicalHyperPortIds ()
354+ : masterLogicalInterfacePortIds ();
354355 int numPorts = scaleTest ? allPorts.size () : 2 ;
355356 return std::vector<PortID>(allPorts.begin (), allPorts.begin () + numPorts);
356357 }
@@ -517,8 +518,8 @@ class AgentTrafficPfcTest : public AgentHwTest {
517518 auto srcMac = utility::MacAddressGenerator ().get (intfMac.u64HBO () + 1 );
518519 // pri = 7 => dscp 56
519520 int dscp = priority * 8 ;
520- int numPacketsPerFlow = getAgentEnsemble ()-> getMinPktsForLineRate (
521- masterLogicalInterfacePortIds ()[0 ]);
521+ int numPacketsPerFlow =
522+ getAgentEnsemble ()-> getMinPktsForLineRate ( portIdsForTest ()[0 ]);
522523 if (FLAGS_num_packets_to_trigger_pfc > 0 ) {
523524 numPacketsPerFlow = FLAGS_num_packets_to_trigger_pfc;
524525 }
@@ -1152,8 +1153,8 @@ class AgentTrafficPfcWatchdogTest : public AgentTrafficPfcTest {
11521153// Tx disabled. Then we send packets to that IP on a different port (portId),
11531154// which will eventually cause queues to build up and PFC to trigger.
11541155TEST_F (AgentTrafficPfcWatchdogTest, PfcWatchdogDetection) {
1155- PortID portId = masterLogicalInterfacePortIds ()[0 ];
1156- PortID txOffPortId = masterLogicalInterfacePortIds ()[1 ];
1156+ PortID portId = portIdsForTest ()[0 ];
1157+ PortID txOffPortId = portIdsForTest ()[1 ];
11571158 XLOG (DBG3) << " Injection port: " << portDesc (portId);
11581159 XLOG (DBG3) << " Tx off port: " << portDesc (txOffPortId);
11591160 auto ip = getDestinationIps ()[0 ];
@@ -1184,8 +1185,8 @@ TEST_F(AgentTrafficPfcWatchdogTest, PfcWatchdogDetection) {
11841185// Since the watchdog counters are sw based, upon warm boot
11851186// we don't expect these counters to be incremented either
11861187TEST_F (AgentTrafficPfcWatchdogTest, PfcWatchdogReset) {
1187- PortID portId = masterLogicalInterfacePortIds ()[0 ];
1188- PortID txOffPortId = masterLogicalInterfacePortIds ()[1 ];
1188+ PortID portId = portIdsForTest ()[0 ];
1189+ PortID txOffPortId = portIdsForTest ()[1 ];
11891190 XLOG (DBG3) << " Injection port: " << portDesc (portId);
11901191 XLOG (DBG3) << " Tx off port: " << portDesc (txOffPortId);
11911192 auto ip = getDestinationIps ()[0 ];
0 commit comments