You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[datapath] Increase netlink receive buffer for neighbor subscription
The devices controller subscribes to neighbor updates on a netlink socket
with the kernel default receive buffer, which overflows with ENOBUFS under
high neighbor churn and restarts every one of the controller's netlink
subscriptions.
Size that buffer explicitly: 4MiB by default, configurable with the new
--neighbor-netlink-buffer-size flag.
Signed-off-by: Jared Ledvina <jared.ledvina@datadoghq.com>
(cherry picked from commit 500b455)
flags.StringSlice(option.Devices, []string{}, "List of devices facing cluster/external network (used for BPF NodePort, BPF masquerading and host firewall); supports '+' as wildcard in device name, e.g. 'eth+'; support '!' to exclude devices, e.g. '!eth+' excludes any device with prefix 'eth'. Note '!' says nothing about which ones to include. A device must match other criteria to be selected; The filters are matched in order and whatever matched first wins.")
67
69
68
70
flags.Bool(option.ForceDeviceDetection, false, "Forces the auto-detection of devices, even if specific devices are explicitly listed")
71
+
72
+
flags.Int(option.NeighborNetlinkBufferSize, defaults.NeighborNetlinkBufferSize, "Size (in bytes) of the netlink socket receive buffer used to subscribe to neighbor updates; a larger buffer reduces the chance of ENOBUFS errors and subscription restarts under high neighbor churn")
69
73
}
70
74
71
75
var (
@@ -92,7 +96,8 @@ type DevicesConfig struct {
92
96
Devices []string
93
97
// ForceDeviceDetection forces the auto-detection of devices,
94
98
// even if user-specific devices are explicitly listed.
95
-
ForceDeviceDetectionbool
99
+
ForceDeviceDetectionbool
100
+
NeighborNetlinkBufferSizeint
96
101
}
97
102
98
103
typedevicesControllerParamsstruct {
@@ -141,7 +146,7 @@ func newDevicesController(lc cell.Lifecycle, p devicesControllerParams) (*device
log.Warn("Failed to force the netlink receive buffer for neighbor updates (SO_RCVBUFFORCE requires CAP_NET_ADMIN); falling back to the kernel default. Neighbor updates may be dropped under high neighbor churn.",
0 commit comments