From mboxrd@z Thu Jan 1 00:00:00 1970 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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 DAEAAC36002 for ; Wed, 9 Apr 2025 19:23:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7E5BF81779; Wed, 9 Apr 2025 19:23:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id wVnvB5fTP5lC; Wed, 9 Apr 2025 19:23:27 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org F0291811A7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1744226607; bh=Thi7zDIqcmX2haI5U5e4xl9mNP55VPbrQvjyJydniiA=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ak4ZdZJiBmPznT/xJzPWKm1TRx1NmclJ/+CjlFE8ddP8ziNgTXzdxCe+mF6056/Ra kWF3YT+Tdd5OtXQEKGXVn3RyPszzINJukFhBV9h5rl7jFx5uRiAZbKcMXO7x3p7pcc ovjVx/x7c2+aF+tFym2y8MVX+6wRt99L2cVPJ1zPfgAO2En+xL8gBpndA+2sdlrXQ4 H4eV9EL5LDUGzlr2m67XJLqxP1WgA/tkKuz1qgYo7/YdQ5MVWti5V1NpbwGv2vS8Cw kpNFSlJ+yIMmwuNfHTMdtLivkbqI8ntVjdA6QZ5/bxx3+xJT2RAyK+ut1KF+SXP4vL 3wFd/KbVXPtQA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id F0291811A7; Wed, 9 Apr 2025 19:23:26 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id B23F9201 for ; Wed, 9 Apr 2025 19:23:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A3844811A7 for ; Wed, 9 Apr 2025 19:23:25 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id aactFs_JQLCE for ; Wed, 9 Apr 2025 19:23:25 +0000 (UTC) X-Greylist: delayed 539 seconds by postgrey-1.37 at util1.osuosl.org; Wed, 09 Apr 2025 19:23:24 UTC DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org ED11181779 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org ED11181779 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=horms@kernel.org; receiver= Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) by smtp1.osuosl.org (Postfix) with ESMTPS id ED11181779 for ; Wed, 9 Apr 2025 19:23:24 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 0591D61127; Wed, 9 Apr 2025 19:14:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A3BEC4CEE2; Wed, 9 Apr 2025 19:14:22 +0000 (UTC) Date: Wed, 9 Apr 2025 20:14:20 +0100 From: Simon Horman To: Michal Kubiak Cc: intel-wired-lan@lists.osuosl.org, maciej.fijalkowski@intel.com, netdev@vger.kernel.org, przemyslaw.kitszel@intel.com, Michal Swiatkowski Message-ID: <20250409191420.GR395307@horms.kernel.org> References: <20250321151357.28540-1-michal.kubiak@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250321151357.28540-1-michal.kubiak@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744226063; bh=mkegaqk9Qgo7XWvZ8uMZPxdjYbkUplu8dX1c47OLdFU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eqsJAkDcbHZUev17YYh5zyDaybb0eJ9DEaogTyAQyMBieBlb3IgCynp5uY7pMelbQ EPodJmkLaB0FMW/sx0bJv4gWpTUHRCrGT2MUkoYZWNWpp5aLHiWY4sULH1YHRM78sI T0BD3Kq92WHo+Z6rF+HiZWapka4RDTyr2UzRb+9eCxSWbYDeD4OKoxTG7z0/WWXpJ1 Upb4BjF+6JQDynYZ72WNtcnfzV3CKQl9TckbaqAUX8PTTLS7oDpMi83I7znmhf50vK ecYytzpM/OCQ10nfK/7cUzxMB6qEpdCsL9jUHuaG3mpOSnBICVaZv47Dr/DQEdQCpV XmqwKze6JIy0g== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=eqsJAkDc Subject: Re: [Intel-wired-lan] [PATCH iwl-next] ice: add a separate Rx handler for flow director commands X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Fri, Mar 21, 2025 at 04:13:57PM +0100, Michal Kubiak wrote: > The "ice" driver implementation uses the control VSI to handle > the flow director configuration for PFs and VFs. > > Unfortunately, although a separate VSI type was created to handle flow > director queues, the Rx queue handler was shared between the flow > director and a standard NAPI Rx handler. > > Such a design approach was not very flexible. First, it mixed hotpath > and slowpath code, blocking their further optimization. It also created > a huge overkill for the flow director command processing, which is > descriptor-based only, so there is no need to allocate Rx data buffers. > > For the above reasons, implement a separate Rx handler for the control > VSI. Also, remove from the NAPI handler the code dedicated to > configuring the flow director rules on VFs. > Do not allocate Rx data buffers to the flow director queues because > their processing is descriptor-based only. > Finally, allow Rx data queues to be allocated only for VSIs that have > netdev assigned to them. > > This handler splitting approach is the first step in converting the > driver to use the Page Pool (which can only be used for data queues). > > Test hints: > 1. Create a VF for any PF managed by the ice driver. > 2. In a loop, add and delete flow director rules for the VF, e.g.: > > for i in {1..128}; do > q=$(( i % 16 )) > ethtool -N ens802f0v0 flow-type tcp4 dst-port "$i" action "$q" > done > > for i in {0..127}; do > ethtool -N ens802f0v0 delete "$i" > done > > Suggested-by: Maciej Fijalkowski > Suggested-by: Michal Swiatkowski > Acked-by: Maciej Fijalkowski > Signed-off-by: Michal Kubiak Reviewed-by: Simon Horman From mboxrd@z Thu Jan 1 00:00:00 1970 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 F411127781A for ; Wed, 9 Apr 2025 19:14:23 +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=1744226064; cv=none; b=Z+f/JpkkJ4Iabn2QtGBDgDwVwUSCTXg6HBZM4f5nDoDUOsV3cB+hF/MW9DNTzDVR3TuIkUvrD7RcgatE79zgAwzgcvyfdKse+HJD35jiD5N1a9CsE1PpPfM8+40+x12xa9mvKC5GDsqz2PHTMRFqluQcO3/CGo21Z9lirtZNy7k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744226064; c=relaxed/simple; bh=mkegaqk9Qgo7XWvZ8uMZPxdjYbkUplu8dX1c47OLdFU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S1KVo4aIJ1GpzQTCx2CGJtSS3B9952hqbEK53aDLwYe49mtbErZQg1UuZcsKNspyRrBfci7lTFHq/wMatsemWgI6V7cA5/0a2v6FWIxHfJEze+vSTezDE3JKFzVhoITaV54Kcu8+7uAwtiKafn7J6lh1XZLrGIlHJJk4c2btdHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eqsJAkDc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eqsJAkDc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A3BEC4CEE2; Wed, 9 Apr 2025 19:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744226063; bh=mkegaqk9Qgo7XWvZ8uMZPxdjYbkUplu8dX1c47OLdFU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eqsJAkDcbHZUev17YYh5zyDaybb0eJ9DEaogTyAQyMBieBlb3IgCynp5uY7pMelbQ EPodJmkLaB0FMW/sx0bJv4gWpTUHRCrGT2MUkoYZWNWpp5aLHiWY4sULH1YHRM78sI T0BD3Kq92WHo+Z6rF+HiZWapka4RDTyr2UzRb+9eCxSWbYDeD4OKoxTG7z0/WWXpJ1 Upb4BjF+6JQDynYZ72WNtcnfzV3CKQl9TckbaqAUX8PTTLS7oDpMi83I7znmhf50vK ecYytzpM/OCQ10nfK/7cUzxMB6qEpdCsL9jUHuaG3mpOSnBICVaZv47Dr/DQEdQCpV XmqwKze6JIy0g== Date: Wed, 9 Apr 2025 20:14:20 +0100 From: Simon Horman To: Michal Kubiak Cc: intel-wired-lan@lists.osuosl.org, maciej.fijalkowski@intel.com, netdev@vger.kernel.org, przemyslaw.kitszel@intel.com, Michal Swiatkowski Subject: Re: [PATCH iwl-next] ice: add a separate Rx handler for flow director commands Message-ID: <20250409191420.GR395307@horms.kernel.org> References: <20250321151357.28540-1-michal.kubiak@intel.com> Precedence: bulk X-Mailing-List: netdev@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: <20250321151357.28540-1-michal.kubiak@intel.com> On Fri, Mar 21, 2025 at 04:13:57PM +0100, Michal Kubiak wrote: > The "ice" driver implementation uses the control VSI to handle > the flow director configuration for PFs and VFs. > > Unfortunately, although a separate VSI type was created to handle flow > director queues, the Rx queue handler was shared between the flow > director and a standard NAPI Rx handler. > > Such a design approach was not very flexible. First, it mixed hotpath > and slowpath code, blocking their further optimization. It also created > a huge overkill for the flow director command processing, which is > descriptor-based only, so there is no need to allocate Rx data buffers. > > For the above reasons, implement a separate Rx handler for the control > VSI. Also, remove from the NAPI handler the code dedicated to > configuring the flow director rules on VFs. > Do not allocate Rx data buffers to the flow director queues because > their processing is descriptor-based only. > Finally, allow Rx data queues to be allocated only for VSIs that have > netdev assigned to them. > > This handler splitting approach is the first step in converting the > driver to use the Page Pool (which can only be used for data queues). > > Test hints: > 1. Create a VF for any PF managed by the ice driver. > 2. In a loop, add and delete flow director rules for the VF, e.g.: > > for i in {1..128}; do > q=$(( i % 16 )) > ethtool -N ens802f0v0 flow-type tcp4 dst-port "$i" action "$q" > done > > for i in {0..127}; do > ethtool -N ens802f0v0 delete "$i" > done > > Suggested-by: Maciej Fijalkowski > Suggested-by: Michal Swiatkowski > Acked-by: Maciej Fijalkowski > Signed-off-by: Michal Kubiak Reviewed-by: Simon Horman