From 9e70a2f19abb981dd215852a3402f17850400e2e Mon Sep 17 00:00:00 2001 From: Ram Singamala Date: Wed, 8 Jul 2026 16:26:12 -0700 Subject: [PATCH] Reduce VerifySingleWRRAndNC runtime by flooding only competing queues. Remove redundant pre-send and pass the per-iteration WRR+SP queue pair to verifySPHelper instead of all queues, avoiding duplicate packet injection. --- .../AgentOlympicQosSchedulerTests.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fboss/agent/test/agent_hw_tests/AgentOlympicQosSchedulerTests.cpp b/fboss/agent/test/agent_hw_tests/AgentOlympicQosSchedulerTests.cpp index 72e903799b1a8..60b47d381ae72 100644 --- a/fboss/agent/test/agent_hw_tests/AgentOlympicQosSchedulerTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentOlympicQosSchedulerTests.cpp @@ -156,14 +156,13 @@ void AgentOlympicQosSchedulerTest::verifySingleWRRAndSP( auto verify = [=, this]() { for (auto queue : queueIds) { if (queue != trafficQueueId) { - XLOG(DBG2) << "send traffic to WRR queue " << queue << " and SP queue " - << trafficQueueId; - sendUdpPktsForAllQueues( - {queue, trafficQueueId}, utility::kOlympicQueueToDscp()); + XLOG(DBG2) << "verify SP starvation for WRR queue " << queue + << " and SP queue " << trafficQueueId; EXPECT_TRUE(verifySPHelper( - trafficQueueId, queueIds, utility::kOlympicQueueToDscp())); - // toggle route to stop traffic, and then send traffic to each WRR - // queue and SP queue + trafficQueueId, + {queue, trafficQueueId}, + utility::kOlympicQueueToDscp())); + // toggle route to stop traffic before testing the next WRR queue XLOG(DBG2) << "unprogram routes"; unprogramRoutes(ecmpHelper6); // wait for no traffic going out of port