From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Lagerwall Subject: Re: [PATCH] net: Fix xps_needed inc/dec mismatch Date: Fri, 7 Dec 2018 15:15:49 +0000 Message-ID: References: <20181207101621.24316-1-ross.lagerwall@citrix.com> <20181207110114.GA3378@bistromath.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , "David S. Miller" , Amritha Nambiar To: Sabrina Dubroca Return-path: Received: from smtp03.citrix.com ([162.221.156.55]:15537 "EHLO SMTP03.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726090AbeLGPPx (ORCPT ); Fri, 7 Dec 2018 10:15:53 -0500 In-Reply-To: <20181207110114.GA3378@bistromath.localdomain> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/7/18 11:01 AM, Sabrina Dubroca wrote: > Hi Ross, > > 2018-12-07, 10:16:21 +0000, Ross Lagerwall wrote: >> xps_needed is incremented only when a new dev map is allocated (in >> __netif_set_xps_queue). Therefore it should be decremented only when we >> actually have a dev map to destroy. Without this, it may be decremented >> too many times which causes netif_reset_xps_queues to return early and >> not actually clean up the old dev maps. This results in a crash in >> __netif_set_xps_queue when it is called later. >> >> The crash occurred when having multiple ixgbe devices in a host. lldpad >> would reconfigure them to be FCoE-capable causing reset_xps_queues / >> set_xps_queue to be called several times. The xps_needed count would get >> out of sync and eventually the above-mentioned crash would occur. >> >> Signed-off-by: Ross Lagerwall > > I posted another patchset recently (commits f28c020fb488 and > 867d0ad476db in the "net" tree) for issues in XPS, including broken > xps_needed accounting, so your patch won't apply to David's "net" > tree. Could you try it with your use case, and if you still see > issues, fix them on top? You can grab the latest net tree here: > > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git > Your two commits fix the issue I was seeing. Thanks! -- Ross Lagerwall