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: <0c8a76f6-92fb-4c50-9ef5-b66c241f41c1@intel.com>
Date: Tue, 23 Jul 2024 16:15:33 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Sergey Temerkhanov <sergey.temerkhanov@...el.com>,
	<intel-wired-lan@...ts.osuosl.org>
CC: <netdev@...r.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 3/5] ice: Initial support
 for E825C hardware in ice_adapter



On 7/18/2024 3:52 AM, Sergey Temerkhanov wrote:
> Address E825C devices by PCI ID since dual IP core configurations
> need 1 ice_adapter for both devices.
> 
> Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@...el.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_adapter.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_adapter.c b/drivers/net/ethernet/intel/ice/ice_adapter.c
> index ad84d8ad49a6..903d0bc9e3e5 100644
> --- a/drivers/net/ethernet/intel/ice/ice_adapter.c
> +++ b/drivers/net/ethernet/intel/ice/ice_adapter.c
> @@ -9,12 +9,14 @@
>  #include <linux/spinlock.h>
>  #include <linux/xarray.h>
>  #include "ice_adapter.h"
> +#include "ice.h"
>  
>  static DEFINE_XARRAY(ice_adapters);
>  static DEFINE_MUTEX(ice_adapters_mutex);
>  
>  /* PCI bus number is 8 bits. Slot is 5 bits. Domain can have the rest. */
>  #define INDEX_FIELD_DOMAIN GENMASK(BITS_PER_LONG - 1, 13)
> +#define INDEX_FIELD_DEV    GENMASK(31, 16)
>  #define INDEX_FIELD_BUS    GENMASK(12, 5)
>  #define INDEX_FIELD_SLOT   GENMASK(4, 0)
>  
> @@ -24,9 +26,17 @@ static unsigned long ice_adapter_index(const struct pci_dev *pdev)
>  
>  	WARN_ON(domain > FIELD_MAX(INDEX_FIELD_DOMAIN));
>  
> -	return FIELD_PREP(INDEX_FIELD_DOMAIN, domain) |
> -	       FIELD_PREP(INDEX_FIELD_BUS,    pdev->bus->number) |
> -	       FIELD_PREP(INDEX_FIELD_SLOT,   PCI_SLOT(pdev->devfn));
> +	switch (pdev->device) {
> +	case ICE_DEV_ID_E825C_BACKPLANE:
> +	case ICE_DEV_ID_E825C_QSFP:
> +	case ICE_DEV_ID_E825C_SFP:
> +	case ICE_DEV_ID_E825C_SGMII:
> +		return FIELD_PREP(INDEX_FIELD_DEV, pdev->device);
> +	default:
> +		return FIELD_PREP(INDEX_FIELD_DOMAIN, domain) |
> +		       FIELD_PREP(INDEX_FIELD_BUS,    pdev->bus->number) |
> +		       FIELD_PREP(INDEX_FIELD_SLOT,   PCI_SLOT(pdev->devfn));
> +	}
>  }


If we extend the ice_adapter to non-PTP uses (like the RSS or other
ideas that were pointed out a while ago). How till those be affected by
this change?

I think it makes sense still, though we may need some specialized
handling if some of those configs don't cross the IP core boundary
(unlike PTP which does).

Thanks,
Jake

>  
>  static struct ice_adapter *ice_adapter_new(void)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ