Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp230997lqo; Thu, 16 May 2024 05:00:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZwzJJ+XcHvD+wkDMxUjNQPy+YJW1/pbOU9wpHVpipAM90/KB4x4RF7WcOulBLjqdHHGgmbk5+nAsjoh0X0T1BJRMg/8YTHM+YvbVk6A== X-Google-Smtp-Source: AGHT+IGHWxavhxZe1mQjC7epr6CgHqXew39X4DRJyBrozt851DdQCO0mvPX/xOim5my8H3IlW8C6 X-Received: by 2002:a17:906:53ca:b0:a59:f7f5:ed43 with SMTP id a640c23a62f3a-a5a2d6657bemr1251004566b.54.1715860801258; Thu, 16 May 2024 05:00:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715860801; cv=pass; d=google.com; s=arc-20160816; b=J49sLOCnM41cLahtx6II2UaSoMBQrgsXtufa9QmUmSVaHLr/BTKwSDeb+rI5InRKGL F1KwyRiHqwWiZVSsA7KdmPjPzv093h0/iw4ZnWcSBVr2C9cbsRT42fCz3eD5JDT2z4z2 dMZpLOZBlhR72HClEcf5/aA8DCz46Xozg9FX+3EoGJRhvwl2ZkRRgAmofV7n/TnMxa6Y bEcK+V/O1l4wKpP6Qp4Q6TcZu0hjKaFTy4W5/mB1y6ieTVoHIT9nNsdUc8NwWiZ00Y/C 0hUCifHO49xBpcE1gNvNJN68mBp2LejZabAgS/itxyZx+b7mZNns+nh/bBrCyq0wH9sQ ckQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lxraPJ0kQBmog9yFLBLs+AqSY5SM613d7GmJ1DY4YTY=; fh=F+KPl+emI2kj5d6AZgGlOrQ2+B3WIESDRfRoKXpfa7Y=; b=jAojL/HSCKgjBz7vx98w72GDkD4Sz/r8MJGyOrI+HEV0hQ6FhPHVyLFidLRrynvkN3 INdpZdP0hldjnZYM0Vk3V0xubHmqbi2xn/kfqQiOflPMaiHTLi75HuSn+ctv/6CORSD9 aJwyVMVY+NhW2x6N09A3/VU6YsHFqnJ6pKqgY2da4AbLS7eygAW+6X+rdkOMvMhYV6dK nkWsrDJW4eV8mmBpJafAgeL+D1X1JLpdGk2pCugvs5SzhPL/aLO+v7T7dCbivPjbzjS8 hke2TDOotFGAO4+ygAtkqx/758Xyi52XIe1XGJfAVihALDIPfwrv5QXWZ2DxsdzSZeKp rZRA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rtpd81Dv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180965-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180965-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2d134si866891366b.1045.2024.05.16.05.00.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 05:00:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180965-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rtpd81Dv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180965-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180965-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 03A461F227B6 for ; Thu, 16 May 2024 12:00:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88EAF145B24; Thu, 16 May 2024 11:59:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rtpd81Dv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6F3026AD0; Thu, 16 May 2024 11:59:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715860788; cv=none; b=hfuTQm02Lqcwy7tkLNbdThkDJnr8VEa6RqHiA4W98PA1x6jN3EZGsOyc5RjjeYnx/sDylhSthlrd11yA/seOwFORAjzIowkTRpNrCJ29GjAWfegTnh+5bLH1F0SUDWzjIat6/f5oU66JY+uqL558sHlR/yDNSLDzF/OcEKIias0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715860788; c=relaxed/simple; bh=jsj/eofNjP8sdAjFMeOlBKjV9ZvXIiu5BqPSaWoUy+E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LwSin3UFPo0bNy7iGys1+iER1JFVI34ZNua7/lGU2l62McRql9moCJueeobukgjsN50GQ62p6OTcmlrSEQGPSMgO2xb3v2Pw8irHMzvwJzDLNutDpzhGUKAQhWCGA3WqVi+mOJbuJhR0VyCFwx3Ytuartb5n9lnBlPx8w04ZUYs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rtpd81Dv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E48F8C113CC; Thu, 16 May 2024 11:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715860788; bh=jsj/eofNjP8sdAjFMeOlBKjV9ZvXIiu5BqPSaWoUy+E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rtpd81Dvtk3pD15dyALA+g2al7nPqswFU22XDpkzZ3WGVh/vJgKYO4g6EjY9tt6r0 5lXBu1sZVqF8RNiIX671IQH0GIDMsu1j+Txw8riCjWuly1WjfgoPAmtfFD+JrNekYW tN1mj5ak5CBe9RUmBjP0AZRrWsOXS09E7d+GTDeA7KbmO1AqeDHoS527s8rTC+mZKy K2udUbMesf7Vs+/dKbzCNf+q17xzRhNH0T9VTFvP4rg/q9n6D8wQ65Nu/mMT6XtugO hpUwwiqvkGTCzkzaEE/TE5cFgJ5LqMewNWWkj+3a9Yj6flq+6ODHn9Z1gj7fv13xKQ nsHotV+a1eSaQ== Date: Thu, 16 May 2024 12:59:42 +0100 From: Simon Horman To: Larysa Zaremba Cc: intel-wired-lan@lists.osuosl.org, Jacob Keller , maciej.fijalkowski@intel.com, Magnus Karlsson , Przemek Kitszel , igor.bagnucki@intel.com, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH iwl-net 3/3] ice: map XDP queues to vectors in ice_vsi_map_rings_to_vectors() Message-ID: <20240516115942.GA443134@kernel.org> References: <20240515160246.5181-1-larysa.zaremba@intel.com> <20240515160246.5181-4-larysa.zaremba@intel.com> <20240516082713.GC179178@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 16, 2024 at 01:43:18PM +0200, Larysa Zaremba wrote: > On Thu, May 16, 2024 at 09:27:13AM +0100, Simon Horman wrote: > > On Wed, May 15, 2024 at 06:02:16PM +0200, Larysa Zaremba wrote: > > > ice_pf_dcb_recfg() re-maps queues to vectors with > > > ice_vsi_map_rings_to_vectors(), which does not restore the previous > > > state for XDP queues. This leads to no AF_XDP traffic after rebuild. > > > > > > Map XDP queues to vectors in ice_vsi_map_rings_to_vectors(). > > > Also, move the code around, so XDP queues are mapped independently only > > > through .ndo_bpf(). > > > > Hi Larysa, > > > > I take it the last sentence refers to the placement of ice_map_xdp_rings() > > in ice_prepare_xdp_rings() after rather than before the > > (cfg_type == ICE_XDP_CFG_PART) condition. > > > > If so, I see that it is a small change. But I do wonder if it is separate > > from fixing the issue described in the first paragraph. And thus would > > be better as a separate patch. > > This is not neccessary for the fix to work, but I think this is intergral to > making the change properly. I mean, before the change in the rebuild path we map > XDP rings to vectors only once and after the change we do this only once, just > previously it was in ice_prepare_xdp_rings() and now it is in > ice_vsi_map_rings_to_vectors(). > > > > > Also, (I'm raising a separate issue :) breaking out logic into > > ice_xdp_ring_from_qid() seems very nice. But I wonder if this ought to be > > part of a cleanup-patch for 'iwl' rather than a fixes patch for 'iwl-next'. > > > > I have separated this into a separate function, because 2 lines exceeded 80 > characters, which is not in line with our current style for drivers. > And I do not think that this small function creates any more additional > potentian applying problems for this patch. And the change is small enough to > see that the logic stays the same. > > > OTOH, I do see that breaking out ice_map_xdp_rings() makes sense in the > > context of this fix as the same logic is to be called in two places. > > > > Splitting patches aside, the resulting code looks good to me. > > > > ... Hi Larysa, Thanks for your explanation, this all seems reasonable to me. Reviewed-by: Simon Horman