mirror-linux/drivers/net/netdevsim
Breno Leitao 1a8fed52f7 netdevsim: set the carrier when the device goes up
Bringing a linked netdevsim device down and then up causes communication
failure because both interfaces lack carrier. Basically a ifdown/ifup on
the interface make the link broken.

Commit 3762ec05a9 ("netdevsim: add NAPI support") added supported
for NAPI, calling netif_carrier_off() in nsim_stop(). This patch
re-enables the carrier symmetrically on nsim_open(), in case the device
is linked and the peer is up.

Signed-off-by: Breno Leitao <leitao@debian.org>
Fixes: 3762ec05a9 ("netdevsim: add NAPI support")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251014-netdevsim_fix-v2-1-53b40590dae1@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-10-15 17:43:17 -07:00
..
Makefile netdevsim: a basic test PSP implementation 2025-09-30 15:17:21 +02:00
bpf.c netdevsim: 'support' multi-buf XDP 2025-03-12 13:39:59 -07:00
bus.c netdevsim: implement peer queue flow control 2025-07-14 17:36:50 -07:00
dev.c net: replace use of system_unbound_wq with system_dfl_wq 2025-09-22 17:40:30 -07:00
ethtool.c ethtool: add FEC bins histogram report 2025-09-26 16:49:18 -07:00
fib.c netdevsim: Add trailing zero to terminate the string in nsim_nexthop_bucket_activity_write() 2024-10-29 11:43:01 -07:00
health.c devlink: Move graceful period parameter to reporter ops 2025-08-26 17:24:16 -07:00
hwstats.c netdevsim: remove redundant branch 2025-07-17 18:09:27 -07:00
ipsec.c xfrm: Add explicit dev to .xdo_dev_state_{add,delete,free} 2025-04-16 11:01:41 +02:00
macsec.c netdevsim: macsec: pad u64 to correct length in logs 2024-10-23 09:51:06 +02:00
netdev.c netdevsim: set the carrier when the device goes up 2025-10-15 17:43:17 -07:00
netdevsim.h netdevsim: a basic test PSP implementation 2025-09-30 15:17:21 +02:00
psample.c
psp.c netdevsim: a basic test PSP implementation 2025-09-30 15:17:21 +02:00
udp_tunnels.c netdevsim: remove udp_ports_sleep 2025-06-18 18:53:51 -07:00