mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-16 20:56:52 +01:00
tun: Keep relayed data on the reader transmit path
The sticky gate only drains socket submissions, so moving relay data between reader and staged sender CPUs can reorder packets on independent NIC queues. Keep relayed batches on the reader with separate, shared counter reservations while preserving the direct gate and sender affinity. Cover gate switches, oversized relay credit, mixed direct placement and stalled shared-tunnel reservations. Add Forgejo build, test, race, crypto, lint and artifact jobs on incus-docker.
This commit is contained in:
1 parent
5cbbba254e
commit
a784af4026
6 files changed
+307
-26
No files matched your search
@@ -226,12 +226,14 @@ func (q *affinityQueue) Read() ([]tio.Packet, error) {
|
||||
type affinityConn struct {
|
||||
flowCaptureConn
|
||||
masks []unix.CPUSet
|
||||
sizes []int
|
||||
}
|
||||
|
||||
func (c *affinityConn) WriteBatch(p [][]byte, addrs []netip.AddrPort) (int, error) {
|
||||
mask := threadMask()
|
||||
c.mu.Lock()
|
||||
c.masks = append(c.masks, mask)
|
||||
c.sizes = append(c.sizes, len(p))
|
||||
c.mu.Unlock()
|
||||
return c.flowCaptureConn.WriteBatch(p, addrs)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user