[PATCH v2 0/3] net: ifup: greatly reduce ifup -a time for multiple network interface
Ahmad Fatoum
a.fatoum at pengutronix.de
Sun Jan 29 23:20:54 PST 2023
So far, ifup -a tries to up all non-disabled interfaces in sequence.
This can take a quite a while, because interfaces with the link down,
will be polled for 10s, before giving up on doing DHCP on them.
This series accelerates this in the common case by doing link up
check in parallel, getting down from (number_of_ports_wihout_link * 10s)
to 10s and then adds an optimization for the common case of automounts
with $global.net.server not set.
Times after eth_open_all has brought up CPU Ethernet and 4 DSA ports:
barebox$ time ifup -a -s # old behavior
time: 31081ms
barebox$ time ifup -a
time: 10002ms
barebox$ time ifup -a1
time: 1072ms
Ahmad Fatoum (3):
net: ifup: have ifup -a poll for link up in parallel
net: ifup: have ifup -a1 stop at first DHCP-set global.net.server
defaultenv-2: automount: use ifup -a1 for NFS/TFTP automounts
Documentation/user/automount.rst | 2 +-
defaultenv/defaultenv-2-base/boot/net | 2 +-
defaultenv/defaultenv-2-base/init/automount | 4 +-
include/net.h | 5 +
net/eth.c | 28 +++--
net/ifup.c | 124 ++++++++++++++++----
net/net.c | 7 +-
7 files changed, 138 insertions(+), 34 deletions(-)
--
2.30.2
More information about the barebox
mailing list