Merge pull request #10491 from ignoramous:patch-3

PiperOrigin-RevId: 640742264
This commit is contained in:
gVisor bot
2024-06-05 20:12:37 -07:00
+2 -2
View File
@@ -137,7 +137,7 @@ func (m *processorManager) connectionHash(cid *connectionID) uint32 {
// queuePacket queues a packet to be delivered to the appropriate processor.
func (m *processorManager) queuePacket(pkt *stack.PacketBuffer, hasEthHeader bool) {
var pIdx int
var pIdx uint32
cid, nonConnectionPkt := tcpipConnectionID(pkt)
if !hasEthHeader {
if nonConnectionPkt {
@@ -152,7 +152,7 @@ func (m *processorManager) queuePacket(pkt *stack.PacketBuffer, hasEthHeader boo
// first processor.
pIdx = 0
} else {
pIdx = int(m.connectionHash(&cid)) % len(m.processors)
pIdx = m.connectionHash(&cid) % uint32(len(m.processors))
}
p := &m.processors[pIdx]
p.mu.Lock()