Commit 1a8fed52 authored by Breno Leitao's avatar Breno Leitao Committed by Jakub Kicinski
Browse files

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 3762ec05 ("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: default avatarBreno Leitao <leitao@debian.org>
Fixes: 3762ec05 ("netdevsim: add NAPI support")
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20251014-netdevsim_fix-v2-1-53b40590dae1@debian.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent cf51d617
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment