* [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
@ 2025-04-07 11:20 Przemek Kitszel
2025-04-07 11:42 ` Michal Kubiak
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Przemek Kitszel @ 2025-04-07 11:20 UTC (permalink / raw)
To: intel-wired-lan, Tony Nguyen
Cc: netdev, Przemek Kitszel, Jacob Keller, Jakub Kicinski, Jiri Pirko,
Aleksandr Loktionov, Karol Kolacinski, Grzegorz Nitka,
Michal Schmidt, Sergey Temerkhanov
Use Device Serial Number instead of PCI bus/device/function for
index of struct ice_adapter.
Functions on the same physical device should point to the very same
ice_adapter instance.
This is not only simplification, but also fixes things up when PF
is passed to VM (and thus has a random BDF).
Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Suggested-by: Jiri Pirko <jiri@resnulli.us>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
CC: Karol Kolacinski <karol.kolacinski@intel.com>
CC: Grzegorz Nitka <grzegorz.nitka@intel.com>
CC: Michal Schmidt <mschmidt@redhat.com>
CC: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
v2:
- target to -net (Jiri)
- mix both halves of u64 DSN on 32bit systems (Jiri)
- (no changes in terms of fallbacks for pre-prod HW)
- warn when there is DSN collision after reducing to 32bit
v1:
https://lore.kernel.org/netdev/20250306211159.3697-2-przemyslaw.kitszel@intel.com
---
drivers/net/ethernet/intel/ice/ice_adapter.h | 6 ++-
drivers/net/ethernet/intel/ice/ice_adapter.c | 43 ++++++++------------
2 files changed, 20 insertions(+), 29 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_adapter.h b/drivers/net/ethernet/intel/ice/ice_adapter.h
index e233225848b3..ac15c0d2bc1a 100644
--- a/drivers/net/ethernet/intel/ice/ice_adapter.h
+++ b/drivers/net/ethernet/intel/ice/ice_adapter.h
@@ -32,17 +32,19 @@ struct ice_port_list {
* @refcount: Reference count. struct ice_pf objects hold the references.
* @ctrl_pf: Control PF of the adapter
* @ports: Ports list
+ * @device_serial_number: DSN cached for collision detection on 32bit systems
*/
struct ice_adapter {
refcount_t refcount;
/* For access to the GLTSYN_TIME register */
spinlock_t ptp_gltsyn_time_lock;
struct ice_pf *ctrl_pf;
struct ice_port_list ports;
+ u64 device_serial_number;
};
-struct ice_adapter *ice_adapter_get(const struct pci_dev *pdev);
-void ice_adapter_put(const struct pci_dev *pdev);
+struct ice_adapter *ice_adapter_get(struct pci_dev *pdev);
+void ice_adapter_put(struct pci_dev *pdev);
#endif /* _ICE_ADAPTER_H */
diff --git a/drivers/net/ethernet/intel/ice/ice_adapter.c b/drivers/net/ethernet/intel/ice/ice_adapter.c
index 01a08cfd0090..3df3fa6d5129 100644
--- a/drivers/net/ethernet/intel/ice/ice_adapter.c
+++ b/drivers/net/ethernet/intel/ice/ice_adapter.c
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright Red Hat
-#include <linux/bitfield.h>
#include <linux/cleanup.h>
#include <linux/mutex.h>
#include <linux/pci.h>
@@ -14,29 +13,13 @@
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)
-
-static unsigned long ice_adapter_index(const struct pci_dev *pdev)
+static unsigned long ice_adapter_index(u64 dsn)
{
- unsigned int domain = pci_domain_nr(pdev->bus);
-
- WARN_ON(domain > FIELD_MAX(INDEX_FIELD_DOMAIN));
-
- 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 BITS_PER_LONG == 64
+ return dsn;
+#else
+ return (u32)dsn ^ u32(dsn >> 32);
+#endif
}
static struct ice_adapter *ice_adapter_new(void)
@@ -77,25 +60,29 @@ static void ice_adapter_free(struct ice_adapter *adapter)
* Return: Pointer to ice_adapter on success.
* ERR_PTR() on error. -ENOMEM is the only possible error.
*/
-struct ice_adapter *ice_adapter_get(const struct pci_dev *pdev)
+struct ice_adapter *ice_adapter_get(struct pci_dev *pdev)
{
- unsigned long index = ice_adapter_index(pdev);
+ u64 dsn = pci_get_dsn(pdev);
struct ice_adapter *adapter;
+ unsigned long index;
int err;
+ index = ice_adapter_index(dsn);
scoped_guard(mutex, &ice_adapters_mutex) {
err = xa_insert(&ice_adapters, index, NULL, GFP_KERNEL);
if (err == -EBUSY) {
adapter = xa_load(&ice_adapters, index);
refcount_inc(&adapter->refcount);
+ WARN_ON_ONCE(adapter->device_serial_number != dsn);
return adapter;
}
if (err)
return ERR_PTR(err);
adapter = ice_adapter_new();
if (!adapter)
return ERR_PTR(-ENOMEM);
+ adapter->device_serial_number = dsn;
xa_store(&ice_adapters, index, adapter, GFP_KERNEL);
}
return adapter;
@@ -110,11 +97,13 @@ struct ice_adapter *ice_adapter_get(const struct pci_dev *pdev)
*
* Context: Process, may sleep.
*/
-void ice_adapter_put(const struct pci_dev *pdev)
+void ice_adapter_put(struct pci_dev *pdev)
{
- unsigned long index = ice_adapter_index(pdev);
+ u64 dsn = pci_get_dsn(pdev);
struct ice_adapter *adapter;
+ unsigned long index;
+ index = ice_adapter_index(dsn);
scoped_guard(mutex, &ice_adapters_mutex) {
adapter = xa_load(&ice_adapters, index);
if (WARN_ON(!adapter))
--
2.39.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
2025-04-07 11:20 [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index Przemek Kitszel
@ 2025-04-07 11:42 ` Michal Kubiak
2025-04-07 13:30 ` Przemek Kitszel
2025-04-07 12:03 ` Jiri Pirko
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Michal Kubiak @ 2025-04-07 11:42 UTC (permalink / raw)
To: Przemek Kitszel
Cc: intel-wired-lan, Tony Nguyen, netdev, Jacob Keller,
Jakub Kicinski, Jiri Pirko, Aleksandr Loktionov, Karol Kolacinski,
Grzegorz Nitka, Michal Schmidt, Sergey Temerkhanov
On Mon, Apr 07, 2025 at 01:20:05PM +0200, Przemek Kitszel wrote:
> Use Device Serial Number instead of PCI bus/device/function for
> index of struct ice_adapter.
> Functions on the same physical device should point to the very same
> ice_adapter instance.
>
> This is not only simplification, but also fixes things up when PF
> is passed to VM (and thus has a random BDF).
>
> Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Suggested-by: Jiri Pirko <jiri@resnulli.us>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> ---
> CC: Karol Kolacinski <karol.kolacinski@intel.com>
> CC: Grzegorz Nitka <grzegorz.nitka@intel.com>
> CC: Michal Schmidt <mschmidt@redhat.com>
> CC: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
>
> v2:
> - target to -net (Jiri)
Missing "Fixes" tag? (After retargetting to -net).
Thanks,
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
2025-04-07 11:20 [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index Przemek Kitszel
2025-04-07 11:42 ` Michal Kubiak
@ 2025-04-07 12:03 ` Jiri Pirko
2025-04-07 13:26 ` Przemek Kitszel
2025-04-07 20:39 ` kernel test robot
2025-04-08 1:18 ` kernel test robot
3 siblings, 1 reply; 8+ messages in thread
From: Jiri Pirko @ 2025-04-07 12:03 UTC (permalink / raw)
To: Przemek Kitszel
Cc: intel-wired-lan, Tony Nguyen, netdev, Jacob Keller,
Jakub Kicinski, Aleksandr Loktionov, Karol Kolacinski,
Grzegorz Nitka, Michal Schmidt, Sergey Temerkhanov
Mon, Apr 07, 2025 at 01:20:05PM +0200, przemyslaw.kitszel@intel.com wrote:
>Use Device Serial Number instead of PCI bus/device/function for
>index of struct ice_adapter.
>Functions on the same physical device should point to the very same
>ice_adapter instance.
>
>This is not only simplification, but also fixes things up when PF
>is passed to VM (and thus has a random BDF).
>
>Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
>Suggested-by: Jakub Kicinski <kuba@kernel.org>
>Suggested-by: Jiri Pirko <jiri@resnulli.us>
>Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
>Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>---
>CC: Karol Kolacinski <karol.kolacinski@intel.com>
>CC: Grzegorz Nitka <grzegorz.nitka@intel.com>
>CC: Michal Schmidt <mschmidt@redhat.com>
>CC: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
>
>v2:
> - target to -net (Jiri)
> - mix both halves of u64 DSN on 32bit systems (Jiri)
> - (no changes in terms of fallbacks for pre-prod HW)
> - warn when there is DSN collision after reducing to 32bit
>
>v1:
>https://lore.kernel.org/netdev/20250306211159.3697-2-przemyslaw.kitszel@intel.com
>---
> drivers/net/ethernet/intel/ice/ice_adapter.h | 6 ++-
> drivers/net/ethernet/intel/ice/ice_adapter.c | 43 ++++++++------------
> 2 files changed, 20 insertions(+), 29 deletions(-)
>
>diff --git a/drivers/net/ethernet/intel/ice/ice_adapter.h b/drivers/net/ethernet/intel/ice/ice_adapter.h
>index e233225848b3..ac15c0d2bc1a 100644
>--- a/drivers/net/ethernet/intel/ice/ice_adapter.h
>+++ b/drivers/net/ethernet/intel/ice/ice_adapter.h
>@@ -32,17 +32,19 @@ struct ice_port_list {
> * @refcount: Reference count. struct ice_pf objects hold the references.
> * @ctrl_pf: Control PF of the adapter
> * @ports: Ports list
>+ * @device_serial_number: DSN cached for collision detection on 32bit systems
> */
> struct ice_adapter {
> refcount_t refcount;
> /* For access to the GLTSYN_TIME register */
> spinlock_t ptp_gltsyn_time_lock;
>
> struct ice_pf *ctrl_pf;
> struct ice_port_list ports;
>+ u64 device_serial_number;
> };
>
>-struct ice_adapter *ice_adapter_get(const struct pci_dev *pdev);
>-void ice_adapter_put(const struct pci_dev *pdev);
>+struct ice_adapter *ice_adapter_get(struct pci_dev *pdev);
>+void ice_adapter_put(struct pci_dev *pdev);
>
> #endif /* _ICE_ADAPTER_H */
>diff --git a/drivers/net/ethernet/intel/ice/ice_adapter.c b/drivers/net/ethernet/intel/ice/ice_adapter.c
>index 01a08cfd0090..3df3fa6d5129 100644
>--- a/drivers/net/ethernet/intel/ice/ice_adapter.c
>+++ b/drivers/net/ethernet/intel/ice/ice_adapter.c
>@@ -1,7 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0-only
> // SPDX-FileCopyrightText: Copyright Red Hat
>
>-#include <linux/bitfield.h>
> #include <linux/cleanup.h>
> #include <linux/mutex.h>
> #include <linux/pci.h>
>@@ -14,29 +13,13 @@
> 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)
>-
>-static unsigned long ice_adapter_index(const struct pci_dev *pdev)
>+static unsigned long ice_adapter_index(u64 dsn)
> {
>- unsigned int domain = pci_domain_nr(pdev->bus);
>-
>- WARN_ON(domain > FIELD_MAX(INDEX_FIELD_DOMAIN));
>-
>- 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 BITS_PER_LONG == 64
>+ return dsn;
>+#else
>+ return (u32)dsn ^ u32(dsn >> 32);
>+#endif
> }
>
> static struct ice_adapter *ice_adapter_new(void)
>@@ -77,25 +60,29 @@ static void ice_adapter_free(struct ice_adapter *adapter)
> * Return: Pointer to ice_adapter on success.
> * ERR_PTR() on error. -ENOMEM is the only possible error.
> */
>-struct ice_adapter *ice_adapter_get(const struct pci_dev *pdev)
>+struct ice_adapter *ice_adapter_get(struct pci_dev *pdev)
> {
>- unsigned long index = ice_adapter_index(pdev);
>+ u64 dsn = pci_get_dsn(pdev);
> struct ice_adapter *adapter;
>+ unsigned long index;
> int err;
>
>+ index = ice_adapter_index(dsn);
> scoped_guard(mutex, &ice_adapters_mutex) {
> err = xa_insert(&ice_adapters, index, NULL, GFP_KERNEL);
> if (err == -EBUSY) {
> adapter = xa_load(&ice_adapters, index);
> refcount_inc(&adapter->refcount);
>+ WARN_ON_ONCE(adapter->device_serial_number != dsn);
Warn and done? How unlikely is this? I mean, can this happen in real
world? If yes, that's a bug.
> return adapter;
> }
> if (err)
> return ERR_PTR(err);
>
> adapter = ice_adapter_new();
> if (!adapter)
> return ERR_PTR(-ENOMEM);
>+ adapter->device_serial_number = dsn;
> xa_store(&ice_adapters, index, adapter, GFP_KERNEL);
> }
> return adapter;
>@@ -110,11 +97,13 @@ struct ice_adapter *ice_adapter_get(const struct pci_dev *pdev)
> *
> * Context: Process, may sleep.
> */
>-void ice_adapter_put(const struct pci_dev *pdev)
>+void ice_adapter_put(struct pci_dev *pdev)
> {
>- unsigned long index = ice_adapter_index(pdev);
>+ u64 dsn = pci_get_dsn(pdev);
> struct ice_adapter *adapter;
>+ unsigned long index;
>
>+ index = ice_adapter_index(dsn);
> scoped_guard(mutex, &ice_adapters_mutex) {
> adapter = xa_load(&ice_adapters, index);
> if (WARN_ON(!adapter))
>--
>2.39.3
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
2025-04-07 12:03 ` Jiri Pirko
@ 2025-04-07 13:26 ` Przemek Kitszel
0 siblings, 0 replies; 8+ messages in thread
From: Przemek Kitszel @ 2025-04-07 13:26 UTC (permalink / raw)
To: Jiri Pirko
Cc: intel-wired-lan, Tony Nguyen, netdev, Jacob Keller,
Jakub Kicinski, Aleksandr Loktionov, Karol Kolacinski,
Grzegorz Nitka, Michal Schmidt, Sergey Temerkhanov
>> struct ice_adapter {
>> refcount_t refcount;
>> /* For access to the GLTSYN_TIME register */
>> spinlock_t ptp_gltsyn_time_lock;
>>
>> struct ice_pf *ctrl_pf;
>> struct ice_port_list ports;
>> + u64 device_serial_number;
>> };
>>
>> + index = ice_adapter_index(dsn);
>> scoped_guard(mutex, &ice_adapters_mutex) {
>> err = xa_insert(&ice_adapters, index, NULL, GFP_KERNEL);
>> if (err == -EBUSY) {
>> adapter = xa_load(&ice_adapters, index);
>> refcount_inc(&adapter->refcount);
>> + WARN_ON_ONCE(adapter->device_serial_number != dsn);
>
> Warn and done? How unlikely is this? I mean, can this happen in real
> world? If yes, that's a bug.
Very unlikely, one would have to have weird NVM *and* also running
32bit mode, I don't like complicating the normal flow to be able to
run fine on misconfigured setups. One redundant field in the struct
and an unlikely() branch on the init path already is almost too much
for my liking, but human will get to know immediately.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
2025-04-07 11:42 ` Michal Kubiak
@ 2025-04-07 13:30 ` Przemek Kitszel
2025-04-07 17:15 ` Tony Nguyen
0 siblings, 1 reply; 8+ messages in thread
From: Przemek Kitszel @ 2025-04-07 13:30 UTC (permalink / raw)
To: Michal Kubiak
Cc: intel-wired-lan, Tony Nguyen, netdev, Jacob Keller,
Jakub Kicinski, Jiri Pirko, Aleksandr Loktionov, Karol Kolacinski,
Grzegorz Nitka, Michal Schmidt, Sergey Temerkhanov
On 4/7/25 13:42, Michal Kubiak wrote:
> On Mon, Apr 07, 2025 at 01:20:05PM +0200, Przemek Kitszel wrote:
>> Use Device Serial Number instead of PCI bus/device/function for
>> index of struct ice_adapter.
>> Functions on the same physical device should point to the very same
>> ice_adapter instance.
>>
>> This is not only simplification, but also fixes things up when PF
>> is passed to VM (and thus has a random BDF).
>>
>> Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
>> Suggested-by: Jakub Kicinski <kuba@kernel.org>
>> Suggested-by: Jiri Pirko <jiri@resnulli.us>
>> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
>> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>> ---
>> CC: Karol Kolacinski <karol.kolacinski@intel.com>
>> CC: Grzegorz Nitka <grzegorz.nitka@intel.com>
>> CC: Michal Schmidt <mschmidt@redhat.com>
>> CC: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
>>
>> v2:
>> - target to -net (Jiri)
>
> Missing "Fixes" tag? (After retargetting to -net).
>
> Thanks,
> Michal
oh, thanks, I wonder if our pw will pick the tag, if not, I will resend
Fixes: 0e2bddf9e5f9 ("ice: add ice_adapter for shared data across PFs on
the same NIC")
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
2025-04-07 13:30 ` Przemek Kitszel
@ 2025-04-07 17:15 ` Tony Nguyen
0 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2025-04-07 17:15 UTC (permalink / raw)
To: Przemek Kitszel, Michal Kubiak
Cc: intel-wired-lan, netdev, Jacob Keller, Jakub Kicinski, Jiri Pirko,
Aleksandr Loktionov, Karol Kolacinski, Grzegorz Nitka,
Michal Schmidt, Sergey Temerkhanov
On 4/7/2025 6:30 AM, Przemek Kitszel wrote:
> On 4/7/25 13:42, Michal Kubiak wrote:
>> On Mon, Apr 07, 2025 at 01:20:05PM +0200, Przemek Kitszel wrote:
>>> Use Device Serial Number instead of PCI bus/device/function for
>>> index of struct ice_adapter.
>>> Functions on the same physical device should point to the very same
>>> ice_adapter instance.
>>>
>>> This is not only simplification, but also fixes things up when PF
>>> is passed to VM (and thus has a random BDF).
>>>
>>> Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
>>> Suggested-by: Jakub Kicinski <kuba@kernel.org>
>>> Suggested-by: Jiri Pirko <jiri@resnulli.us>
>>> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
>>> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>>> ---
>>> CC: Karol Kolacinski <karol.kolacinski@intel.com>
>>> CC: Grzegorz Nitka <grzegorz.nitka@intel.com>
>>> CC: Michal Schmidt <mschmidt@redhat.com>
>>> CC: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
>>>
>>> v2:
>>> - target to -net (Jiri)
>>
>> Missing "Fixes" tag? (After retargetting to -net).
>>
>> Thanks,
>> Michal
>
> oh, thanks, I wonder if our pw will pick the tag, if not, I will resend
>
> Fixes: 0e2bddf9e5f9 ("ice: add ice_adapter for shared data across PFs on
> the same NIC")
I don't believe it does, but I can add it in. No need to resend.
Thanks,
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
2025-04-07 11:20 [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index Przemek Kitszel
2025-04-07 11:42 ` Michal Kubiak
2025-04-07 12:03 ` Jiri Pirko
@ 2025-04-07 20:39 ` kernel test robot
2025-04-08 1:18 ` kernel test robot
3 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2025-04-07 20:39 UTC (permalink / raw)
To: Przemek Kitszel, intel-wired-lan, Tony Nguyen
Cc: oe-kbuild-all, netdev, Przemek Kitszel, Jacob Keller,
Jakub Kicinski, Jiri Pirko, Aleksandr Loktionov, Karol Kolacinski,
Grzegorz Nitka, Michal Schmidt, Sergey Temerkhanov
Hi Przemek,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tnguy-net-queue/dev-queue]
url: https://github.com/intel-lab-lkp/linux/commits/Przemek-Kitszel/ice-use-DSN-instead-of-PCI-BDF-for-ice_adapter-index/20250407-192849
base: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
patch link: https://lore.kernel.org/r/20250407112005.85468-1-przemyslaw.kitszel%40intel.com
patch subject: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20250408/202504080314.X7qJw69Y-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250408/202504080314.X7qJw69Y-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504080314.X7qJw69Y-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/intel/ice/ice_adapter.c: In function 'ice_adapter_index':
drivers/net/ethernet/intel/ice/ice_adapter.c:21:27: error: expected expression before 'u32'
21 | return (u32)dsn ^ u32(dsn >> 32);
| ^~~
>> drivers/net/ethernet/intel/ice/ice_adapter.c:23:1: warning: control reaches end of non-void function [-Wreturn-type]
23 | }
| ^
vim +23 drivers/net/ethernet/intel/ice/ice_adapter.c
0e2bddf9e5f926 Michal Schmidt 2024-03-26 15
2d939bcd51ee97 Przemek Kitszel 2025-04-07 16 static unsigned long ice_adapter_index(u64 dsn)
0e2bddf9e5f926 Michal Schmidt 2024-03-26 17 {
2d939bcd51ee97 Przemek Kitszel 2025-04-07 18 #if BITS_PER_LONG == 64
2d939bcd51ee97 Przemek Kitszel 2025-04-07 19 return dsn;
2d939bcd51ee97 Przemek Kitszel 2025-04-07 20 #else
2d939bcd51ee97 Przemek Kitszel 2025-04-07 21 return (u32)dsn ^ u32(dsn >> 32);
2d939bcd51ee97 Przemek Kitszel 2025-04-07 22 #endif
fdb7f54700b1c8 Sergey Temerkhanov 2024-08-21 @23 }
0e2bddf9e5f926 Michal Schmidt 2024-03-26 24
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
2025-04-07 11:20 [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index Przemek Kitszel
` (2 preceding siblings ...)
2025-04-07 20:39 ` kernel test robot
@ 2025-04-08 1:18 ` kernel test robot
3 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2025-04-08 1:18 UTC (permalink / raw)
To: Przemek Kitszel, intel-wired-lan, Tony Nguyen
Cc: oe-kbuild-all, netdev, Przemek Kitszel, Jacob Keller,
Jakub Kicinski, Jiri Pirko, Aleksandr Loktionov, Karol Kolacinski,
Grzegorz Nitka, Michal Schmidt, Sergey Temerkhanov
Hi Przemek,
kernel test robot noticed the following build errors:
[auto build test ERROR on tnguy-net-queue/dev-queue]
url: https://github.com/intel-lab-lkp/linux/commits/Przemek-Kitszel/ice-use-DSN-instead-of-PCI-BDF-for-ice_adapter-index/20250407-192849
base: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
patch link: https://lore.kernel.org/r/20250407112005.85468-1-przemyslaw.kitszel%40intel.com
patch subject: [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20250408/202504080803.VFV0rtz6-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250408/202504080803.VFV0rtz6-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504080803.VFV0rtz6-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/net/ethernet/intel/ice/ice_adapter.c: In function 'ice_adapter_index':
>> drivers/net/ethernet/intel/ice/ice_adapter.c:21:27: error: expected expression before 'u32'
21 | return (u32)dsn ^ u32(dsn >> 32);
| ^~~
drivers/net/ethernet/intel/ice/ice_adapter.c:23:1: warning: control reaches end of non-void function [-Wreturn-type]
23 | }
| ^
vim +/u32 +21 drivers/net/ethernet/intel/ice/ice_adapter.c
15
16 static unsigned long ice_adapter_index(u64 dsn)
17 {
18 #if BITS_PER_LONG == 64
19 return dsn;
20 #else
> 21 return (u32)dsn ^ u32(dsn >> 32);
22 #endif
23 }
24
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-04-08 1:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 11:20 [PATCH iwl-net v2] ice: use DSN instead of PCI BDF for ice_adapter index Przemek Kitszel
2025-04-07 11:42 ` Michal Kubiak
2025-04-07 13:30 ` Przemek Kitszel
2025-04-07 17:15 ` Tony Nguyen
2025-04-07 12:03 ` Jiri Pirko
2025-04-07 13:26 ` Przemek Kitszel
2025-04-07 20:39 ` kernel test robot
2025-04-08 1:18 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox