Compare commits

...

2 Commits

Author SHA1 Message Date
Franck Bui 1ffadeaae3 udev: assume that the recv buffer size of the netlink socket is already configured when the socket is passed in
This makes ReceiveBuffer= option in systemd-udevd-kernel.socket unit useful.
2020-01-28 22:35:08 +01:00
Yu Watanabe a05a6e8bba test-network: fix test_qdisc2()
quantum and initial_quantum may suffixed with 'b'.
2020-01-28 22:33:31 +01:00
2 changed files with 9 additions and 2 deletions

View File

@ -1577,7 +1577,11 @@ static int manager_new(Manager **ret, int fd_ctrl, int fd_uevent, const char *cg
if (r < 0)
return log_error_errno(r, "Failed to initialize device monitor: %m");
(void) sd_device_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024);
/* Bump receiver buffer, but only if we are not called via socket activation, as in that
* case systemd sets the receive buffer size for us, and the value in the .socket unit
* should take full effect. */
if (fd_uevent < 0)
(void) sd_device_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024);
r = device_monitor_enable_receiving(manager->monitor);
if (r < 0)

View File

@ -2211,7 +2211,10 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
output = check_output('tc qdisc show dev dummy98')
print(output)
self.assertRegex(output, 'qdisc fq')
self.assertRegex(output, 'limit 1000p flow_limit 200p buckets 512 orphan_mask 511 quantum 1500 initial_quantum 13000 maxrate 1Mbit')
self.assertRegex(output, 'limit 1000p flow_limit 200p buckets 512 orphan_mask 511')
self.assertRegex(output, 'quantum 1500')
self.assertRegex(output, 'initial_quantum 13000')
self.assertRegex(output, 'maxrate 1Mbit')
self.assertRegex(output, 'qdisc codel')
self.assertRegex(output, 'limit 2000p target 10.0ms ce_threshold 100.0ms interval 50.0ms ecn')