Skip to content

Commit

Permalink
FIXME: use 4 TX queues if none reported by NetLink
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoward committed Jan 27, 2025
1 parent 8f5fec6 commit d613f1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/MRP/Platform/LinuxPlatform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,10 @@ extension LinuxBridge: MSRPAwareBridge {
srClassPriorityMap: SRClassPriorityMap,
queues: [SRclassID: UInt]
) throws -> RTNLMQPrioQDisc {
let numTXQueues = UInt(port._rtnl.numTXQueues)
var numTXQueues = UInt(port._rtnl.numTXQueues)
if numTXQueues == 0 {
numTXQueues = 4 // FIXME: we need to get this information more accurately
}
let legacyQueueCount = UInt16(numTXQueues) - UInt16(srClassPriorityMap.count)
let legacyQueueOffset: UInt16 = if queues[.A] == numTXQueues {
// normal situation gives higher number queues to higher numbered traffic
Expand Down

0 comments on commit d613f1a

Please sign in to comment.