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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 10F35C021B2 for ; Thu, 20 Feb 2025 15:04:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D4B8B4129A; Thu, 20 Feb 2025 15:04:37 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id qpEe0X1v3vPa; Thu, 20 Feb 2025 15:04:37 +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 smtp4.osuosl.org 3793740B78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1740063877; bh=JNFOsg4fz6eogYfDd3xWVylP4nu1Il0i2Mdj+u140Lw=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=D4fIRJsB8lB7kfLTfIgpzMv0dncfJzjVpP8hpYzfZh2W9yhV7sXyOnMC6IZY4zeta GnFP7TTnazk6qn1yzsBNSTs9c8uDqENd1b1k3STRTVAxLSzQqMGkJtQgY2zSPywyu/ e/SGuHZ1ZExZC5Icz3jP3JI0rmhJNACzikpqh9bftepHQQW/Hqo0tdNzc8yVtSakBj tgPykT61Hy0gMrV+SWgXM49n5Y+OG5ffGxBcvN1vjNpgpB4SbTl/aKBTQnT/MQzX3W 9L0sPmIeUL/KYFG57GRT8+FEQOCwQp1jZBOSuAnjc4HJZzKhmdWHIzzPJTFqo0Cpq5 G78YjsEAmxYYQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 3793740B78; Thu, 20 Feb 2025 15:04:37 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id 46323CF for ; Thu, 20 Feb 2025 15:04:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2B6058148E for ; Thu, 20 Feb 2025 15:04:34 +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 IjNcF04nOvxN for ; Thu, 20 Feb 2025 15:04:33 +0000 (UTC) X-Greylist: delayed 530 seconds by postgrey-1.37 at util1.osuosl.org; Thu, 20 Feb 2025 15:04:32 UTC DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org C470180F84 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C470180F84 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=horms@kernel.org; receiver= Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by smtp1.osuosl.org (Postfix) with ESMTPS id C470180F84 for ; Thu, 20 Feb 2025 15:04:32 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 735FA614BB; Thu, 20 Feb 2025 14:59:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 502E7C4CED1; Thu, 20 Feb 2025 14:59:10 +0000 (UTC) Date: Thu, 20 Feb 2025 14:59:08 +0000 From: Simon Horman To: Larysa Zaremba Cc: Tony Nguyen , intel-wired-lan@lists.osuosl.org, Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Swiatkowski , Mateusz Pacuszka Message-ID: <20250220145908.GD1615191@kernel.org> References: <20250214085215.2846063-1-larysa.zaremba@intel.com> <20250214085215.2846063-7-larysa.zaremba@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250214085215.2846063-7-larysa.zaremba@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740063552; bh=MMP4FPdql5WvdX7WzGJ+wFCey1YYR03dzrTF6bOjS4o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tVsIe6gLh44Er3lzRLeU7F8t7GIvXkwR8HbpyvlSBMeF6ASi3Vl5zUWAVzgnNh0LR j8MsM5fXaa71DGyotHPKEeKQbISsPzMIZrIdiHxj9gznqVetKT84qQ0M6ZJiXMSRTp xR4JAl5FQdFwyjGENu1XYev2TriOH4zFyhcsINnEoKjayIp6/6xJF14ZuOdl0TYFdW levFZirHbooVXRqFI9jG+S0UKT+1PGbV7XDXTtZ6ERjFsvFNIxmxkM+PZagdXo9ZhY hRNHXJUdCl2S43sFrfcrQIqnpi7EBUZf1llOh4gUzu1q4q/BFNXPE70rbzivAAM0Zd WARI+64HtNNyA== 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) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=tVsIe6gL Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 6/6] ice: enable LLDP TX for VFs through tc 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, Feb 14, 2025 at 09:50:40AM +0100, Larysa Zaremba wrote: > Only a single VSI can be in charge of sending LLDP frames, sometimes it is > beneficial to assign this function to a VF, that is possible to do with tc > capabilities in the switchdev mode. It requires first blocking the PF from > sending the LLDP frames with a following command: > > tc filter add dev egress protocol lldp flower skip_sw action drop > > Then it becomes possible to configure a forward rule from a VF port > representor to uplink instead. > > tc filter add dev ingress protocol lldp flower skip_sw > action mirred egress redirect dev > > How LLDP exclusivity was done previously is LLDP traffic was blocked for a > whole port by a single rule and PF was bypassing that. Now at least in the > switchdev mode, every separate VSI has to have its own drop rule. Another > complication is the fact that tc does not respect when the driver refuses > to delete a rule, so returning an error results in a HW rule still present > with no way to reference it through tc. This is addressed by allowing the > PF rule to be deleted at any time, but making the VF forward rule "dormant" > in such case, this means it is deleted from HW but stays in tc and driver's > bookkeeping to be restored when drop rule is added back to the PF. > > Implement tc configuration handling which enables the user to transmit LLDP > packets from VF instead of PF. > > Reviewed-by: Michal Swiatkowski > Signed-off-by: Larysa Zaremba 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 3F358DF58; Thu, 20 Feb 2025 14:59:12 +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=1740063553; cv=none; b=oNfKvCFLO3COk/oYHL2O9Xdg++dFaHtybFBx1C454/AddohLkKaxdrkrBIYkQQZqX+HoB5PTSgHBlF8F4rqZRiJqezhajG06cKnF6qmZC4PnGIGqvDg6w2lqLu4yZ8e/r7eiW1LaDNuZd9v+upLmotU+XTq1P8DH9wlZtdkxe90= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740063553; c=relaxed/simple; bh=MMP4FPdql5WvdX7WzGJ+wFCey1YYR03dzrTF6bOjS4o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ldmckyYvY35+VeXkcjvvCcrsYXqjBoMssOQjeln4iM0hF2pkyMw/UGCfaSPPgQkABDQPBtuNFgmm7EodjM9xFrYUfaKZ812/eOK2f5xYv+DYEz0MX6fT6jPGwwKbQstSkMllIvSqri2GT+JhcZ+VTDpvwWJdverVhbPm5cvixYE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tVsIe6gL; 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="tVsIe6gL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 502E7C4CED1; Thu, 20 Feb 2025 14:59:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740063552; bh=MMP4FPdql5WvdX7WzGJ+wFCey1YYR03dzrTF6bOjS4o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tVsIe6gLh44Er3lzRLeU7F8t7GIvXkwR8HbpyvlSBMeF6ASi3Vl5zUWAVzgnNh0LR j8MsM5fXaa71DGyotHPKEeKQbISsPzMIZrIdiHxj9gznqVetKT84qQ0M6ZJiXMSRTp xR4JAl5FQdFwyjGENu1XYev2TriOH4zFyhcsINnEoKjayIp6/6xJF14ZuOdl0TYFdW levFZirHbooVXRqFI9jG+S0UKT+1PGbV7XDXTtZ6ERjFsvFNIxmxkM+PZagdXo9ZhY hRNHXJUdCl2S43sFrfcrQIqnpi7EBUZf1llOh4gUzu1q4q/BFNXPE70rbzivAAM0Zd WARI+64HtNNyA== Date: Thu, 20 Feb 2025 14:59:08 +0000 From: Simon Horman To: Larysa Zaremba Cc: Tony Nguyen , intel-wired-lan@lists.osuosl.org, Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Swiatkowski , Mateusz Pacuszka Subject: Re: [PATCH iwl-next v4 6/6] ice: enable LLDP TX for VFs through tc Message-ID: <20250220145908.GD1615191@kernel.org> References: <20250214085215.2846063-1-larysa.zaremba@intel.com> <20250214085215.2846063-7-larysa.zaremba@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: <20250214085215.2846063-7-larysa.zaremba@intel.com> On Fri, Feb 14, 2025 at 09:50:40AM +0100, Larysa Zaremba wrote: > Only a single VSI can be in charge of sending LLDP frames, sometimes it is > beneficial to assign this function to a VF, that is possible to do with tc > capabilities in the switchdev mode. It requires first blocking the PF from > sending the LLDP frames with a following command: > > tc filter add dev egress protocol lldp flower skip_sw action drop > > Then it becomes possible to configure a forward rule from a VF port > representor to uplink instead. > > tc filter add dev ingress protocol lldp flower skip_sw > action mirred egress redirect dev > > How LLDP exclusivity was done previously is LLDP traffic was blocked for a > whole port by a single rule and PF was bypassing that. Now at least in the > switchdev mode, every separate VSI has to have its own drop rule. Another > complication is the fact that tc does not respect when the driver refuses > to delete a rule, so returning an error results in a HW rule still present > with no way to reference it through tc. This is addressed by allowing the > PF rule to be deleted at any time, but making the VF forward rule "dormant" > in such case, this means it is deleted from HW but stays in tc and driver's > bookkeeping to be restored when drop rule is added back to the PF. > > Implement tc configuration handling which enables the user to transmit LLDP > packets from VF instead of PF. > > Reviewed-by: Michal Swiatkowski > Signed-off-by: Larysa Zaremba Reviewed-by: Simon Horman