From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= Subject: Re: Kernel oops with mlx5 and dual XDP redirect programs Date: Thu, 04 Oct 2018 14:03:34 +0200 Message-ID: <87efd5dill.fsf@toke.dk> References: <877eize5ro.fsf@toke.dk> <4e2cfdc3db244f4b9483a0c3dfc62fae55238bb3.camel@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Eran Ben Elisha , Tariq Toukan , "brouer\@redhat.com" To: Saeed Mahameed , "netdev\@vger.kernel.org" Return-path: Received: from mail.toke.dk ([52.28.52.200]:43955 "EHLO mail.toke.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727264AbeJDS4e (ORCPT ); Thu, 4 Oct 2018 14:56:34 -0400 In-Reply-To: <4e2cfdc3db244f4b9483a0c3dfc62fae55238bb3.camel@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: Saeed Mahameed writes: > On Wed, 2018-10-03 at 11:30 +0200, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >> Hi Saeed >>=20 >> 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. >>=20 >> Steps to reproduce: >>=20 >> # cd ~/build/linux/samples/bpf >> # ./xdp_redirect_map $(> $(> # ./xdp_redirect_map $(> $(>=20 >> 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