Message ID | 20230426151940.639711-1-victor@mojatatu.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 526f28bd0fbdc699cda31426928802650c1528e5 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v3] net/sched: act_mirred: Add carrier check | expand |
Hello: This patch was applied to netdev/net.git (main) by David S. Miller <davem@davemloft.net>: On Wed, 26 Apr 2023 15:19:40 +0000 you wrote: > There are cases where the device is adminstratively UP, but operationally > down. For example, we have a physical device (Nvidia ConnectX-6 Dx, 25Gbps) > who's cable was pulled out, here is its ip link output: > > 5: ens2f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 > link/ether b8:ce:f6:4b:68:35 brd ff:ff:ff:ff:ff:ff > altname enp179s0f1np1 > > [...] Here is the summary with links: - [net,v3] net/sched: act_mirred: Add carrier check https://git.kernel.org/netdev/net/c/526f28bd0fbd You are awesome, thank you!
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index ec43764e92e7..0a711c184c29 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -264,7 +264,7 @@ TC_INDIRECT_SCOPE int tcf_mirred_act(struct sk_buff *skb, goto out; } - if (unlikely(!(dev->flags & IFF_UP))) { + if (unlikely(!(dev->flags & IFF_UP)) || !netif_carrier_ok(dev)) { net_notice_ratelimited("tc mirred to Houston: device %s is down\n", dev->name); goto out;