Message ID | 20240228155957.408036-1-larysa.zaremba@intel.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-85315-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3440713dyb; Wed, 28 Feb 2024 08:04:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU7XwM6SUQB2Dyqa42Pv+n8SRM634bvWd8iGmxdOBazgBx7axG6GiiZoYe7AeogjJcHcN6z8b4FtaRgHud0djdOjiwANQ== X-Google-Smtp-Source: AGHT+IEgPoSPhG5NxT3evQl3J5ogi5oGEkhchIre/d2e07E1Mzv7o7vl2pInuVoFxFGEz3yNBGLQ X-Received: by 2002:a6b:c846:0:b0:7c7:9f49:285e with SMTP id y67-20020a6bc846000000b007c79f49285emr15165329iof.19.1709136281337; Wed, 28 Feb 2024 08:04:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709136281; cv=pass; d=google.com; s=arc-20160816; b=dE9VsKqog5GBqgUfN7/qL/thBRnAy5PxFjkzAB95SiQwn4duZoPlYPTZYp3kePu9S3 HKA7hjiH/LKHBuD47j1cxHFQovtGsuXAYDTb61wofdCnR3QKJUbmveTdgSfKtCHj9lij gG5mJ6QvK41YvegD+U2NljqaXtDvB/FJkjSqkJblNpz2Sk7k2Ce511Hbt+2vOIlUrwcv UIT8Gm/AzoLLBDxiy9LEQh5jxLMp9PziAJSp/WJi25RAdPUj2eRkLLnhV2zO6oFz8TWu eZ+WD0D4/UwRMexkEMZ7LPmRNW35C00umcCqJdsAPz78QdT3TJtgC2MbPYwxyP0SnR75 3SYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=hfuxi8bVlgWbcMzLEZSPvEMkWRh0UiZWU1oOY//I/Ls=; fh=XF5dR1hZ6bmHhiCesO+5NPfXhTaDjas2E0STvyrxXLQ=; b=Tf9yKFbcDHbg134GvyOnGjGqayn0KwWYc34s1QQwPpIjbsMCl+Gvb/88c1I/1sKx56 xl8zqPGcKRGvhvclSwC8+mz0PbyPMVcbh9MekDFEGOsXkydeosXcxV6irCUgkc+hRQhg ErK2dBY0knopdEgo8Vl4w7QE2ymRnWL5Mex2hNCr8yBTgt3I1QO8pbWj6gRqKIZkJLWS Pvulmz4SiuNAZzQaJ3kacudW5q1RLgh8qhgavo4xv1k0dZto/E6e24Uvy4F24oEMxJvQ VaQ5h/rZF70pGjCbJzYJwyVE1bs67GVB6Q1rR/faPk93Mzijb5S7XNbDxJb1LrJAZwGj zFsQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aMiwYxcu; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85315-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85315-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d14-20020a6bcd0e000000b007c7cbf7d555si1991249iog.130.2024.02.28.08.04.41 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 08:04:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85315-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aMiwYxcu; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85315-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85315-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D92DC283AC4 for <ouuuleilei@gmail.com>; Wed, 28 Feb 2024 16:04:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 123EA15D5D8; Wed, 28 Feb 2024 16:04:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aMiwYxcu" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 0509E1487DC; Wed, 28 Feb 2024 16:04:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709136253; cv=none; b=bVohblCorm+qbD/ZEptBLRnw1TIefYHXa/LQ74GqGLSmyWSYJgcqEjWG/ccOfzsWmqr2jj+CRJo9SgdkCM+Kmloe60TPaPWBzt4P+xE5c1BxY2/AQolvrPf2NrZU6SKR89WmHardN29BszOS8kst3QHCZwYXVUqVNF7OCN2pFyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709136253; c=relaxed/simple; bh=HmhSwJzywo2VHhaxf4zsr70ZyAx8N40+pr9JK+rKZj4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cxLSibARAwx7myUHZcSMuK/zXthJT2We6QEVhYu3Yf4qyHwpNGXVraQalgiCD4FSp+ARr2vTsAWfY/NsAjA5NMbMBSIgPIsPN4w6HKktJasZ4MvVjF/uUfDjOJD+gZ6V4A3FbHR9JsjpXRHiNjFO4vze9w8CFsd1KO2xwu0Q6qI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=aMiwYxcu; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709136251; x=1740672251; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HmhSwJzywo2VHhaxf4zsr70ZyAx8N40+pr9JK+rKZj4=; b=aMiwYxcu+xQE8H4QLP+fBfqD/4IbwIJy/EOw1vVh1LXj41vi5g/KbpsF gNNNOz/tpmkCjNwtOpznghfpST+GCiKbSqWeb0974+Nbeyn9VpKXOL/xd WtiQNrH4io04856fbmp8GdotOXmHteglB9b1RibLy59iBuBnut4Cx5t+n CKequBHc0DViJEtICgkC/1i8g0PKJi5NukDGgMvETDvwo1R9DbWPQHrcK zBIlqEeRn5efAegeVkhF6viI7wuznzWeL7jI4LaU+Kxu+I/fxEOiicWrN fNaNWq8e/ZJpK62P2JKupJ4JzOjWR03zBfjif1xyVSeR44QSXO5MSbCuf w==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="3706562" X-IronPort-AV: E=Sophos;i="6.06,190,1705392000"; d="scan'208";a="3706562" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 08:04:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,190,1705392000"; d="scan'208";a="7527674" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by orviesa009.jf.intel.com with ESMTP; 28 Feb 2024 08:04:07 -0800 Received: from lincoln.igk.intel.com (lincoln.igk.intel.com [10.102.21.235]) by irvmail002.ir.intel.com (Postfix) with ESMTP id A506936820; Wed, 28 Feb 2024 16:04:00 +0000 (GMT) From: Larysa Zaremba <larysa.zaremba@intel.com> To: intel-wired-lan@lists.osuosl.org Cc: Larysa Zaremba <larysa.zaremba@intel.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Mateusz Pacuszka <mateuszx.pacuszka@intel.com>, Tony Nguyen <anthony.l.nguyen@intel.com>, Lukasz Plachno <lukasz.plachno@intel.com>, Jakub Buchocki <jakubx.buchocki@intel.com>, Pawel Kaminski <pawel.kaminski@intel.com>, Przemek Kitszel <przemyslaw.kitszel@intel.com>, Michal Swiatkowski <michal.swiatkowski@linux.intel.com>, Mateusz Polchlopek <mateusz.polchlopek@intel.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Pawel Chmielewski <pawel.chmielewski@intel.com>, Jesse Brandeburg <jesse.brandeburg@intel.com> Subject: [PATCH iwl-net 0/5] ice: LLDP support for VFs Date: Wed, 28 Feb 2024 16:59:44 +0100 Message-ID: <20240228155957.408036-1-larysa.zaremba@intel.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792159285204219224 X-GMAIL-MSGID: 1792159285204219224 |
Series |
ice: LLDP support for VFs
|
|
Message
Larysa Zaremba
Feb. 28, 2024, 3:59 p.m. UTC
Allow to: * receive LLDP packets on a VF * transmit LLDP from a VF Only a single VF per port can transmit LLDP packets, all trusted VFs can transmit LLDP packets. For both functionalities to work, private flag fw-lldp-agent must be off. I am aware that implemented way of configuration (through sysfs) can be potentially controversial and would like some feedback from outside. Larysa Zaremba (1): ice: Do not add LLDP-specific filter Mateusz Pacuszka (3): ice: Fix check for existing switch rule ice: Implement VF LLDP RX support on VF ice: Implement VF LLDP TX support for VF Mateusz Polchlopek (1): ice: Add function to get VF from device struct drivers/net/ethernet/intel/ice/ice.h | 2 + .../net/ethernet/intel/ice/ice_adminq_cmd.h | 1 - drivers/net/ethernet/intel/ice/ice_common.c | 26 -- drivers/net/ethernet/intel/ice/ice_common.h | 2 - drivers/net/ethernet/intel/ice/ice_ethtool.c | 6 +- drivers/net/ethernet/intel/ice/ice_lib.c | 83 +++++- drivers/net/ethernet/intel/ice/ice_lib.h | 4 + drivers/net/ethernet/intel/ice/ice_main.c | 58 ++++ drivers/net/ethernet/intel/ice/ice_sriov.c | 4 + drivers/net/ethernet/intel/ice/ice_switch.c | 4 +- drivers/net/ethernet/intel/ice/ice_vf_lib.c | 252 ++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_vf_lib.h | 26 ++ drivers/net/ethernet/intel/ice/ice_virtchnl.c | 11 + 13 files changed, 439 insertions(+), 40 deletions(-)
Comments
On Wed, 28 Feb 2024 16:59:44 +0100 Larysa Zaremba wrote: > Allow to: > * receive LLDP packets on a VF > * transmit LLDP from a VF > > Only a single VF per port can transmit LLDP packets, > all trusted VFs can transmit LLDP packets. > > For both functionalities to work, private flag > fw-lldp-agent must be off. > > I am aware that implemented way of configuration (through sysfs) can be > potentially controversial and would like some feedback from outside. Why is the device not in switchdev mode? You can put your lldp-agent priv flag on repr netdevs.
Wed, Feb 28, 2024 at 05:47:45PM CET, kuba@kernel.org wrote: >On Wed, 28 Feb 2024 16:59:44 +0100 Larysa Zaremba wrote: >> Allow to: >> * receive LLDP packets on a VF >> * transmit LLDP from a VF >> >> Only a single VF per port can transmit LLDP packets, >> all trusted VFs can transmit LLDP packets. >> >> For both functionalities to work, private flag >> fw-lldp-agent must be off. >> >> I am aware that implemented way of configuration (through sysfs) can be >> potentially controversial and would like some feedback from outside. > >Why is the device not in switchdev mode? You can put your lldp-agent >priv flag on repr netdevs. > But isn't it a matter of eswitch configuration? I mean, the user should be free to configure filtering/forwarding of any packet, including LLDP ones.
On Thu, 29 Feb 2024 10:20:05 +0100 Jiri Pirko wrote: > But isn't it a matter of eswitch configuration? I mean, the user should > be free to configure filtering/forwarding of any packet, including LLDP > ones. This is an LLDP agent which runs as part of the NIC FW, AFAIU, not about forwarding or filtering. They already have the priv flag, so best to reuse that. If not possible we can explore options, but as Larysa mentioned herself in the cover letter sysfs is probably low on the preference list :(
On Thu, Feb 29, 2024 at 07:28:13AM -0800, Jakub Kicinski wrote: > On Thu, 29 Feb 2024 10:20:05 +0100 Jiri Pirko wrote: > > But isn't it a matter of eswitch configuration? I mean, the user should > > be free to configure filtering/forwarding of any packet, including LLDP > > ones. > > This is an LLDP agent which runs as part of the NIC FW, AFAIU, not about > forwarding or filtering. > > They already have the priv flag, so best to reuse that. If not possible > we can explore options, but as Larysa mentioned herself in the cover > letter sysfs is probably low on the preference list :( > FW agent is disabled NIC-wide, so only PF should be able to set such flag. The lazy part of me likes the private flag direction, because just replacing sysfs entries with corresponding private flags would make patch look better while not changing the implementation much. I guess, treating it like a normal eswitch configuration would be ideal, but it would not be purely generic, as there is an added level of complexity because of FW Agent interactions.
On Thu, 29 Feb 2024 20:33:04 +0100 Larysa Zaremba wrote: > > This is an LLDP agent which runs as part of the NIC FW, AFAIU, not about > > forwarding or filtering. > > > > They already have the priv flag, so best to reuse that. If not possible > > we can explore options, but as Larysa mentioned herself in the cover > > letter sysfs is probably low on the preference list :( > > FW agent is disabled NIC-wide, so only PF should be able to set such flag. Sorry, then I misread. If it's about which VF gets the LLDP traffic from the _wire_, then I'm with Jiri. It's a basic forwarding problem, isn't it? Match on EtherType and forward? > The lazy part of me likes the private flag direction, because just > replacing sysfs entries with corresponding private flags would make > patch look better while not changing the implementation much. > > I guess, treating it like a normal eswitch configuration would be > ideal, but it would not be purely generic, as there is an added level > of complexity because of FW Agent interactions.