lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZrxwqMyIyfX1XcPn@mev-dev.igk.intel.com>
Date: Wed, 14 Aug 2024 10:54:00 +0200
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Tony Nguyen <anthony.l.nguyen@...el.com>, davem@...emloft.net,
	kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
	netdev@...r.kernel.org, jiri@...dia.com, shayd@...dia.com,
	wojciech.drewek@...el.com, horms@...nel.org,
	sridhar.samudrala@...el.com, mateusz.polchlopek@...el.com,
	kalesh-anakkur.purayil@...adcom.com, michal.kubiak@...el.com,
	pio.raczynski@...il.com, przemyslaw.kitszel@...el.com,
	jacob.e.keller@...el.com, maciej.fijalkowski@...el.com,
	Rafal Romanowski <rafal.romanowski@...el.com>
Subject: Re: [PATCH net-next v4 03/15] ice: add basic devlink subfunctions
 support

On Wed, Aug 14, 2024 at 10:42:19AM +0200, Jiri Pirko wrote:
> Tue, Aug 13, 2024 at 11:49:52PM CEST, anthony.l.nguyen@...el.com wrote:
> >From: Piotr Raczynski <piotr.raczynski@...el.com>
> >
> >Implement devlink port handlers responsible for ethernet type devlink
> >subfunctions. Create subfunction devlink port and setup all resources
> >needed for a subfunction netdev to operate. Configure new VSI for each
> >new subfunction, initialize and configure interrupts and Tx/Rx resources.
> >Set correct MAC filters and create new netdev.
> >
> >For now, subfunction is limited to only one Tx/Rx queue pair.
> >
> >Only allocate new subfunction VSI with devlink port new command.
> >Allocate and free subfunction MSIX interrupt vectors using new API
> >calls with pci_msix_alloc_irq_at and pci_msix_free_irq.
> >
> >Support both automatic and manual subfunction numbers. If no subfunction
> >number is provided, use xa_alloc to pick a number automatically. This
> >will find the first free index and use that as the number. This reduces
> >burden on users in the simple case where a specific number is not
> >required. It may also be slightly faster to check that a number exists
> >since xarray lookup should be faster than a linear scan of the dyn_ports
> >xarray.
> >
> >Reviewed-by: Simon Horman <horms@...nel.org>
> 
> I don't think it is okay to carry the reviewed-by tag when you do
> changes to the patch. You should drop those.
> 
> 

I changed only warn messages, but ok, I will drop it.

> >Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
> >Co-developed-by: Jacob Keller <jacob.e.keller@...el.com>
> >Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> >Signed-off-by: Piotr Raczynski <piotr.raczynski@...el.com>
> >Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> >Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>
> >Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> >---
> > .../net/ethernet/intel/ice/devlink/devlink.c  |   3 +
> > .../ethernet/intel/ice/devlink/devlink_port.c | 290 +++++++++++++++++-
> > .../ethernet/intel/ice/devlink/devlink_port.h |  34 ++
> > drivers/net/ethernet/intel/ice/ice.h          |   4 +
> > drivers/net/ethernet/intel/ice/ice_lib.c      |   5 +-
> > drivers/net/ethernet/intel/ice/ice_lib.h      |   2 +
> > drivers/net/ethernet/intel/ice/ice_main.c     |   7 +
> > 7 files changed, 342 insertions(+), 3 deletions(-)
> >
> >diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink.c b/drivers/net/ethernet/intel/ice/devlink/devlink.c
> >index 810a901d7afd..b7eb1b56f2c6 100644
> >--- a/drivers/net/ethernet/intel/ice/devlink/devlink.c
> >+++ b/drivers/net/ethernet/intel/ice/devlink/devlink.c
> >@@ -6,6 +6,7 @@
> > #include "ice.h"
> > #include "ice_lib.h"
> > #include "devlink.h"
> >+#include "devlink_port.h"
> > #include "ice_eswitch.h"
> > #include "ice_fw_update.h"
> > #include "ice_dcb_lib.h"
> >@@ -1277,6 +1278,8 @@ static const struct devlink_ops ice_devlink_ops = {
> > 
> > 	.rate_leaf_parent_set = ice_devlink_set_parent,
> > 	.rate_node_parent_set = ice_devlink_set_parent,
> >+
> >+	.port_new = ice_devlink_port_new,
> > };
> > 
> > static int
> >diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
> >index 00fed5a61d62..aae518399508 100644
> >--- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
> >+++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
> >@@ -5,6 +5,9 @@
> > 
> > #include "ice.h"
> > #include "devlink.h"
> >+#include "devlink_port.h"
> >+#include "ice_lib.h"
> >+#include "ice_fltr.h"
> > 
> > static int ice_active_port_option = -1;
> > 
> >@@ -455,7 +458,7 @@ int ice_devlink_create_vf_port(struct ice_vf *vf)
> > 		return -EINVAL;
> > 
> > 	attrs.flavour = DEVLINK_PORT_FLAVOUR_PCI_VF;
> >-	attrs.pci_vf.pf = pf->hw.bus.func;
> >+	attrs.pci_vf.pf = pf->hw.pf_id;
> 
> You should do this in a separate patch, most probably -net targetted as
> it fixes a bug.
>

It is already on ML:
https://lore.kernel.org/netdev/20240813071610.52295-1-michal.swiatkowski@linux.intel.com/

> 
> 
> > 	attrs.pci_vf.vf = vf->vf_id;
> > 
> > 	ice_devlink_set_switch_id(pf, &attrs.switch_id);
> 
> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ