Thread (20 messages) flat view 20 messages, 5 authors, 2025-09-16

Re: [PATCH net 3/3] net: stmmac: check if interface is running before TC block setup

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-09-16 23:29:16
Also in: lkml

On Tue, 9 Sep 2025 20:47:01 +0200 Sebastian Basierski wrote:
quoted
quoted
Before this patch driver couldn't be unloaded with tc filter applied.

Running those commands is enough to reproduce the issue:
    tc qdisc add dev enp0s29f2 ingress
    tc filter add dev enp0s29f2 ingress protocol all prio 1 u32
    rmmod dwmac_intel

in effect module would not unload.  
Makes sense. Could you also confirm that the offload doesn't in fact
work if set up when device is down? I think block setup is when qdisc
is installed?

ip link set dev $x down
tc qdisc add dev enp0s29f2 ingress
ip link set dev $x up
tc filter add dev enp0s29f2 ingress protocol all prio 1 u32 ...

If it doesn't work we can feel safe we're not breaking anyone's
scripts, however questionable.  
Sorry for late response.
I just checked what you asked for.
   x="enp129s29f0"
   ip link set dev $x down
   tc qdisc add dev $x ingress
   ip link set dev $x up
   tc filter add dev $x ingress protocol ip flower ip_proto 1 action drop
Looks like with and without patch ICMP packets are dropped.
Aren't you testing non-offloaded filter?
Test with skip_sw, if it works it means that some order of commands may
have indeed worked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help