Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D27CC433FE for ; Wed, 2 Nov 2022 11:52:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 12E714013B; Wed, 2 Nov 2022 11:52:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 12E714013B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1667389954; bh=9Q2onQ3+aGtTQ475Am6TLfKdR+FNSfISZjgOCfbBs00=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=jM4YcurEQI0FX5eU6UofTU9J6cAYHEgD9qwDc+JZHMTy02bzYJMOu8x2Gbekp82QS adIrzk5o1v6qRf23mZHWfMbB8Y1yorjsCKIT8mBl1cMe/1CQj7iUO7BJQtmQxEzfPn M5fx5MtDdrapYBxgcOQoAEHRyWdCxjDbUEojBN8G5M7BJu7Gh0toHf0FKtwCt4LNs8 36PqsllD8CRyeMb0GfFUW8n15t454S4B4wmIgUGzH6C1OWcYe0daCrcmRRBUeDSZSG qj3263CqJr2cVRAdxinyDlli4g4a6gNSaWyIHWDpSt2d5IDgFDSaZVwdkIVq7FbBpm yXiaZClYbXEmQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lb1oPry4wYk3; Wed, 2 Nov 2022 11:52:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id F173C408BF; Wed, 2 Nov 2022 11:52:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org F173C408BF Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B914B1BF831 for ; Wed, 2 Nov 2022 11:52:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A0B148175B for ; Wed, 2 Nov 2022 11:52:31 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A0B148175B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9lHVuJqXfoK0 for ; Wed, 2 Nov 2022 11:52:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CC3E581340 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by smtp1.osuosl.org (Postfix) with ESMTPS id CC3E581340 for ; Wed, 2 Nov 2022 11:52:30 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="373609985" X-IronPort-AV: E=Sophos;i="5.95,232,1661842800"; d="scan'208";a="373609985" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 04:52:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10518"; a="703240406" X-IronPort-AV: E=Sophos;i="5.95,232,1661842800"; d="scan'208";a="703240406" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga004.fm.intel.com with ESMTP; 02 Nov 2022 04:52:28 -0700 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 2A2BqRgd002771; Wed, 2 Nov 2022 11:52:27 GMT From: Alexander Lobakin To: "Staikov, Andrii" Date: Wed, 2 Nov 2022 12:50:08 +0100 Message-Id: <20221102115008.3067605-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: <20221025072705.1270255-1-andrii.staikov@intel.com> <20221026164445.56155-1-alexandr.lobakin@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667389950; x=1698925950; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pIy7yL0c6C0YkQntOv8trMu+Lr1Gb/Y46V98oHau+xk=; b=Xt/zTsrOhHwDHY5dxV2lvKA7dTYZ6ufvV+Qj2CArIzDvmRxZROdVpbls 19IAPjaV/lXs29yRf7H39i5S4Oa2Jwj5oPQD6pld981yScW2/WvZNFooI 4szzHlxFBUr3Ob/BnEkDR3GN5W9sVYkOItL+9o6Iml4TvioD5dAtIMlZS KoXsinFPWxniw1TAyqa/GrCvkEnqLt/0HYskZHNSfjGG97rY1LpmkuVtT N2BNqqkHVfO9ZwCkT+9FZFNYFGg1LUvETqYV+CMakLXSUQlwFqchv6av6 3A0+FIOYLpLMGdvVnR2riMKhsAjNz5cUOh4FQBXRggsHxZS5biLJdEvRQ A==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Xt/zTsrO Subject: Re: [Intel-wired-lan] [PATCH net v1] i40e: Fix crash when rebuild failed in i40e_xdp_setup X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "intel-wired-lan@lists.osuosl.org" , "Dziedziuch, SylwesterX" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" > From: "Staikov, Andrii" > Date: Mon, 31 Oct 2022 08:30:59 +0000 > > >From: Andrii Staikov > >Date: Tue, 25 Oct 2022 09:27:05 +0200 > > > >> From: Sylwester Dziedziuch [...] > >> Fixes: 0c8493d90b6b ("i40e: add XDP support for pass and drop > >> actions") > >> Title: i40e: Fix crash when rebuild failed in i40e_xdp_setup > >> Change-type: DefectResolution Those two tags shouldn't be here BTW, only Fixes and SoBs. > >> Signed-off-by: Sylwester Dziedziuch > >> Signed-off-by: Andrii Staikov > >> --- > >> drivers/net/ethernet/intel/i40e/i40e_main.c | 155 > >> ++++++++++++++------ > >> 1 file changed, 112 insertions(+), 43 deletions(-) > > > >[...] > > > >- old_prog = xchg(&vsi->xdp_prog, prog); > >+ if (if_running && !test_and_set_bit(__I40E_VSI_DOWN, vsi->state)) > >+ i40e_down(vsi); > > > >Please don't. Unconditional down-up was removed from i40e, we've made XDP hotswap in ice in our recent patch queue and now you're trying to effectively revert all that ._. > >You don't need any interface actions when there is a prog and you want to install a new one as well, just RCU the pointers and that's it. > > > > Can you please elaborate on this. I am not an author of this commit so it's hard for me to grasp what you are talking about. > Are you suggestion just leaving old_prog = xchg(&vsi->xdp_prog, prog); instread of the part that was added? if (!!prog == !!old_prog), you shouldn't do any resets/reallocatiions/etc, please leave it just how it was before (when they were being done conditionally on (need_reset)). Otherwise, you'll kill prog hotswapping by trying to fix this splat, which would be a major regression. > > >[...] > > > >> -- > >> 2.25.1 > > > >Thanks, > >Olek > > > > Regards, > Staikov Andrii Thanks, Olek _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan