Thread (8 messages) flat view 8 messages, 2 authors, 2018-10-24

Re: Kernel oops with mlx5 and dual XDP redirect programs

From: Toke Høiland-Jørgensen <toke@toke.dk>
Date: 2018-10-04 18:56:34

Saeed Mahameed [off-list ref] writes:
On Wed, 2018-10-03 at 11:30 +0200, Toke Høiland-Jørgensen wrote:
quoted
Hi Saeed

I can reliably oops the kernel with the mlx5 driver, by installing
XDP_REDIRECT programs on two devices so they redirect to each other,
and then remove them while there is traffic on the interface.

Steps to reproduce:

# cd ~/build/linux/samples/bpf
# ./xdp_redirect_map $(</sys/class/net/ens1f1/ifindex)
$(</sys/class/net/ens1f0/ifindex)
# ./xdp_redirect_map $(</sys/class/net/ens1f0/ifindex)
$(</sys/class/net/ens1f1/ifindex)

Now, run some traffic (e.g., using pktgen) across the interfaces, and
while the traffic is running, interrupt one of the xdp_redirect_map
commands (thus unloading the eBPF program). This results in a kernel
oops with the backtrace below. I get no crash if there's only a
single
XDP program.
Hi Toke,

What looks like happening is that while the traffic is being redirected
to the other device, the driver is trying to unload the program and
restarting the rings from below call trace we can see:
Yeah, thought it was something like that, since it only happens on the
bidirectional redirect...
I think that the mlx5 driver doesn't know how to tell the other device
to stop transmitting to it while it is resetting.. Maybe tariq or
Jesper know more about this ?
I will look at this tomorrow after noon and will try to repro...
Great, thanks! :)

-Toke
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help