[Intel-wired-lan] [tnguy-net-queue:dev-queue] BUILD SUCCESS 87ca16163fa39a6678d563f2d01662f1a9fa11a4

2025-03-15 Thread kernel test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
branch HEAD: 87ca16163fa39a6678d563f2d01662f1a9fa11a4  ice: fix reservation of 
resources for RDMA when disabled

elapsed time: 1446m

configs tested: 81
configs skipped: 1

The following configs have been built successfully.
More configs may be tested in the coming days.

tested configs:
alphaallyesconfiggcc-14.2.0
arc  allmodconfiggcc-13.2.0
arc  allyesconfiggcc-13.2.0
arc   randconfig-001-20250314gcc-13.2.0
arc   randconfig-002-20250314gcc-13.2.0
arm  allmodconfiggcc-14.2.0
arm  allyesconfiggcc-14.2.0
arm   randconfig-001-20250314clang-21
arm   randconfig-002-20250314gcc-14.2.0
arm   randconfig-003-20250314gcc-14.2.0
arm   randconfig-004-20250314gcc-14.2.0
arm64allmodconfigclang-18
arm64 randconfig-001-20250314gcc-14.2.0
arm64 randconfig-002-20250314clang-21
arm64 randconfig-003-20250314clang-15
arm64 randconfig-004-20250314clang-21
csky  randconfig-001-20250314gcc-14.2.0
csky  randconfig-002-20250314gcc-14.2.0
hexagon  allmodconfigclang-21
hexagon  allyesconfigclang-18
hexagon   randconfig-001-20250314clang-21
hexagon   randconfig-002-20250314clang-21
i386 allmodconfiggcc-12
i386  allnoconfiggcc-12
i386 allyesconfiggcc-12
i386buildonly-randconfig-001-20250314clang-19
i386buildonly-randconfig-002-20250314clang-19
i386buildonly-randconfig-003-20250314gcc-12
i386buildonly-randconfig-004-20250314gcc-12
i386buildonly-randconfig-005-20250314gcc-12
i386buildonly-randconfig-006-20250314gcc-12
i386defconfigclang-19
loongarch randconfig-001-20250314gcc-14.2.0
loongarch randconfig-002-20250314gcc-14.2.0
m68k  allnoconfiggcc-14.2.0
microblazeallnoconfiggcc-14.2.0
mips  allnoconfiggcc-14.2.0
nios2 allnoconfiggcc-14.2.0
nios2 randconfig-001-20250314gcc-14.2.0
nios2 randconfig-002-20250314gcc-14.2.0
pariscrandconfig-001-20250314gcc-14.2.0
pariscrandconfig-002-20250314gcc-14.2.0
powerpc   randconfig-001-20250314clang-21
powerpc   randconfig-002-20250314gcc-14.2.0
powerpc   randconfig-003-20250314gcc-14.2.0
powerpc64 randconfig-001-20250314gcc-14.2.0
powerpc64 randconfig-002-20250314clang-17
powerpc64 randconfig-003-20250314clang-21
riscv randconfig-001-20250314clang-19
riscv randconfig-002-20250314gcc-14.2.0
s390 allmodconfigclang-19
s390 allyesconfiggcc-14.2.0
s390  randconfig-001-20250314gcc-14.2.0
s390  randconfig-002-20250314gcc-14.2.0
sh   allmodconfiggcc-14.2.0
shallnoconfiggcc-14.2.0
sh   allyesconfiggcc-14.2.0
shrandconfig-001-20250314gcc-14.2.0
shrandconfig-002-20250314gcc-14.2.0
sparcallmodconfiggcc-14.2.0
sparc allnoconfiggcc-14.2.0
sparc randconfig-001-20250314gcc-14.2.0
sparc randconfig-002-20250314gcc-14.2.0
sparc64   randconfig-001-20250314gcc-14.2.0
sparc64   randconfig-002-20250314gcc-14.2.0
um   allmodconfigclang-21
um   allyesconfiggcc-12
umrandconfig-001-20250314gcc-12
umrandconfig-002-20250314gcc-12
x86_64allnoconfigclang-19
x86_64   allyesconfigclang-19
x86_64  buildonly-randconfig-001-20250314clang-19
x86_64  buildonly-randconfig-002-20250314clang-19
x86_64  buildonly-randconfig-003-20250314gcc-12
x86_64  buildonly-randconfig-004-20250314clang-19
x86_64  buildonly-randconfig-005-20250314gcc-12
x86_64  buildonly-randconfig-006-20250314gcc-12
x86_64  defconfiggcc-11
xtensaallno

[Intel-wired-lan] [tnguy-next-queue:dev-queue 87/88] drivers/net/ethernet/intel/igc/igc_ethtool.c:1791:undefined reference to `ethtool_mmsv_get_mm'

2025-03-15 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git 
dev-queue
head:   7dca3a8a1f3c70a4ba8115e4ee5827e424629eaf
commit: 8f97e7c17be21b5b4feefd2f2e71d71761777ab8 [87/88] igc: add support to 
get MAC Merge data via ethtool
config: arm64-randconfig-001-20250314 
(https://download.01.org/0day-ci/archive/20250314/202503141646.6yybvfae-...@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250314/202503141646.6yybvfae-...@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 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202503141646.6yybvfae-...@intel.com/

All errors (new ones prefixed by >>):

   aarch64-linux-ld: Unexpected GOT/PLT entries detected!
   aarch64-linux-ld: Unexpected run-time procedure linkages detected!
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function 
`igc_fpe_handle_mpacket':
   drivers/net/ethernet/intel/igc/igc_tsn.h:50:(.text+0x9690): undefined 
reference to `ethtool_mmsv_event_handle'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function 
`igc_clean_tx_irq':
   drivers/net/ethernet/intel/igc/igc_main.c:3157:(.text+0xec44): undefined 
reference to `ethtool_mmsv_event_handle'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function 
`igc_watchdog_task':
   drivers/net/ethernet/intel/igc/igc_main.c:5878:(.text+0x103a4): undefined 
reference to `ethtool_mmsv_link_state_handle'
   aarch64-linux-ld: 
drivers/net/ethernet/intel/igc/igc_main.c:5917:(.text+0x1058c): undefined 
reference to `ethtool_mmsv_link_state_handle'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function 
`igc_down':
   drivers/net/ethernet/intel/igc/igc_main.c:5352:(.text+0x114e8): undefined 
reference to `ethtool_mmsv_stop'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_ethtool.o: in function 
`igc_ethtool_set_mm':
   drivers/net/ethernet/intel/igc/igc_ethtool.c:1817:(.text+0x800): undefined 
reference to `ethtool_mmsv_set_mm'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_ethtool.o: in function 
`igc_ethtool_get_mm':
>> drivers/net/ethernet/intel/igc/igc_ethtool.c:1791:(.text+0x8bc): undefined 
>> reference to `ethtool_mmsv_get_mm'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_tsn.o: in function 
`igc_fpe_init':
   drivers/net/ethernet/intel/igc/igc_tsn.c:138:(.text+0x1238): undefined 
reference to `ethtool_mmsv_init'


vim +1791 drivers/net/ethernet/intel/igc/igc_ethtool.c

  1784  
  1785  static int igc_ethtool_get_mm(struct net_device *netdev,
  1786struct ethtool_mm_state *cmd)
  1787  {
  1788  struct igc_adapter *adapter = netdev_priv(netdev);
  1789  struct igc_fpe_t *fpe = &adapter->fpe;
  1790  
> 1791  ethtool_mmsv_get_mm(&fpe->mmsv, cmd);
  1792  cmd->tx_min_frag_size = fpe->tx_min_frag_size;
  1793  cmd->rx_min_frag_size = IGC_RX_MIN_FRAG_SIZE;
  1794  
  1795  return 0;
  1796  }
  1797  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


Re: [Intel-wired-lan] [PATCH iwl-net v2] idpf: check error for register_netdev() on init

2025-03-15 Thread Salin, Samuel



> -Original Message-
> From: Intel-wired-lan  On Behalf Of
> Simon Horman
> Sent: Monday, February 17, 2025 8:17 AM
> To: Tantilov, Emil S 
> Cc: intel-wired-...@lists.osuosl.org; net...@vger.kernel.org;
> de...@google.com; will...@google.com; Nguyen, Anthony L
> ; da...@davemloft.net;
> eduma...@google.com; k...@kernel.org; pab...@redhat.com; Chittim,
> Madhu ; Kitszel, Przemyslaw
> 
> Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] idpf: check error for
> register_netdev() on init
> 
> On Fri, Feb 14, 2025 at 09:18:16AM -0800, Emil Tantilov wrote:
> > Current init logic ignores the error code from register_netdev(),
> > which will cause WARN_ON() on attempt to unregister it, if there was
> > one, and there is no info for the user that the creation of the netdev 
> > failed.
> >
> > WARNING: CPU: 89 PID: 6902 at net/core/dev.c:11512
> > unregister_netdevice_many_notify+0x211/0x1a10
> > ...
> > [ 3707.563641]  unregister_netdev+0x1c/0x30 [ 3707.563656]
> > idpf_vport_dealloc+0x5cf/0xce0 [idpf] [ 3707.563684]
> > idpf_deinit_task+0xef/0x160 [idpf] [ 3707.563712]
> > idpf_vc_core_deinit+0x84/0x320 [idpf] [ 3707.563739]
> > idpf_remove+0xbf/0x780 [idpf] [ 3707.563769]
> > pci_device_remove+0xab/0x1e0 [ 3707.563786]
> > device_release_driver_internal+0x371/0x530
> > [ 3707.563803]  driver_detach+0xbf/0x180 [ 3707.563816]
> > bus_remove_driver+0x11b/0x2a0 [ 3707.563829]
> > pci_unregister_driver+0x2a/0x250
> >
> > Introduce an error check and log the vport number and error code.
> > On removal make sure to check VPORT_REG_NETDEV flag prior to calling
> > unregister and free on the netdev.
> >
> > Add local variables for idx, vport_config and netdev for readability.
> >
> > Fixes: 0fe45467a104 ("idpf: add create vport and netdev
> > configuration")
> > Suggested-by: Tony Nguyen 
> > Signed-off-by: Emil Tantilov 
> > ---
> > Changelog:
> > v2:
> > - Refactored a bit to avoid >80 char lines.
> > - Changed the netdev and flag check to allow for early continue in the
> >   max_vports loop, which also helps to reduce the identation.
> >
> > v1:
> > https://lore.kernel.org/intel-wired-lan/20250211023851.21090-1-emil.s.
> > tanti...@intel.com/
> 
> Thanks for the update.
> 
> Reviewed-by: Simon Horman 

Tested-by: Samuel Salin 


[Intel-wired-lan] [PATCH iwl-next 05/10] ice: add ICE_READ/WRITE_CGU_REG_OR_DIE helpers

2025-03-15 Thread Karol Kolacinski
Add ICE_READ_CGU_REG_OR_DIE() and ICE_WRITE_CGU_REG_OR_DIE() helpers to
avoid multiple error checks after calling read/write functions.

Suggested-by: Przemek Kitszel 
Reviewed-by: Michal Kubiak 
Reviewed-by: Milena Olech 
Signed-off-by: Karol Kolacinski 
---
 drivers/net/ethernet/intel/ice/ice_common.h |  15 ++
 drivers/net/ethernet/intel/ice/ice_tspll.c  | 167 
 2 files changed, 49 insertions(+), 133 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_common.h 
b/drivers/net/ethernet/intel/ice/ice_common.h
index fee5b373af8c..f7952ff3e798 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.h
+++ b/drivers/net/ethernet/intel/ice/ice_common.h
@@ -478,5 +478,20 @@ int ice_get_pca9575_handle(struct ice_hw *hw, u16 
*pca9575_handle);
 int ice_read_pca9575_reg(struct ice_hw *hw, u8 offset, u8 *data);
 bool ice_fw_supports_report_dflt_cfg(struct ice_hw *hw);
 int ice_read_cgu_reg(struct ice_hw *hw, u32 addr, u32 *val);
+#define ICE_READ_CGU_REG_OR_DIE(hw, addr, val) \
+   do {   \
+   int __err = ice_read_cgu_reg((hw), (addr), (val)); \
+  \
+   if (__err) \
+   return __err;  \
+   } while (0)
 int ice_write_cgu_reg(struct ice_hw *hw, u32 addr, u32 val);
+#define ICE_WRITE_CGU_REG_OR_DIE(hw, addr, val) \
+   do {\
+   int __err = ice_write_cgu_reg((hw), (addr), (val)); \
+   \
+   if (__err)  \
+   return __err;   \
+   } while (0)
+
 #endif /* _ICE_COMMON_H_ */
diff --git a/drivers/net/ethernet/intel/ice/ice_tspll.c 
b/drivers/net/ethernet/intel/ice/ice_tspll.c
index 4c929fca510e..7a785b19ae28 100644
--- a/drivers/net/ethernet/intel/ice/ice_tspll.c
+++ b/drivers/net/ethernet/intel/ice/ice_tspll.c
@@ -129,7 +129,6 @@ static int ice_tspll_cfg_e82x(struct ice_hw *hw, enum 
ice_tspll_freq clk_freq,
union ice_cgu_r22 dw22;
union ice_cgu_r24 dw24;
union ice_cgu_r9 dw9;
-   int err;
 
if (clk_freq >= NUM_ICE_TSPLL_FREQ) {
dev_warn(ice_hw_to_dev(hw), "Invalid TIME_REF frequency %u\n",
@@ -149,17 +148,9 @@ static int ice_tspll_cfg_e82x(struct ice_hw *hw, enum 
ice_tspll_freq clk_freq,
return -EINVAL;
}
 
-   err = ice_read_cgu_reg(hw, ICE_CGU_R9, &dw9.val);
-   if (err)
-   return err;
-
-   err = ice_read_cgu_reg(hw, ICE_CGU_R24, &dw24.val);
-   if (err)
-   return err;
-
-   err = ice_read_cgu_reg(hw, TSPLL_RO_BWM_LF, &bwm_lf.val);
-   if (err)
-   return err;
+   ICE_READ_CGU_REG_OR_DIE(hw, ICE_CGU_R9, &dw9.val);
+   ICE_READ_CGU_REG_OR_DIE(hw, ICE_CGU_R24, &dw24.val);
+   ICE_READ_CGU_REG_OR_DIE(hw, TSPLL_RO_BWM_LF, &bwm_lf.val);
 
ice_tspll_log_cfg(hw, dw24.ts_pll_enable, dw24.time_ref_sel,
  dw9.time_ref_freq_sel, bwm_lf.plllock_true_lock_cri,
@@ -168,69 +159,40 @@ static int ice_tspll_cfg_e82x(struct ice_hw *hw, enum 
ice_tspll_freq clk_freq,
/* Disable the PLL before changing the clock source or frequency */
if (dw24.ts_pll_enable) {
dw24.ts_pll_enable = 0;
-
-   err = ice_write_cgu_reg(hw, ICE_CGU_R24, dw24.val);
-   if (err)
-   return err;
+   ICE_WRITE_CGU_REG_OR_DIE(hw, ICE_CGU_R24, dw24.val);
}
 
/* Set the frequency */
dw9.time_ref_freq_sel = clk_freq;
-   err = ice_write_cgu_reg(hw, ICE_CGU_R9, dw9.val);
-   if (err)
-   return err;
+   ICE_WRITE_CGU_REG_OR_DIE(hw, ICE_CGU_R9, dw9.val);
 
/* Configure the TSPLL feedback divisor */
-   err = ice_read_cgu_reg(hw, ICE_CGU_R19, &dw19.val);
-   if (err)
-   return err;
-
+   ICE_READ_CGU_REG_OR_DIE(hw, ICE_CGU_R19, &dw19.val);
dw19.fbdiv_intgr = e82x_tspll_params[clk_freq].feedback_div;
dw19.ndivratio = 1;
-
-   err = ice_write_cgu_reg(hw, ICE_CGU_R19, dw19.val);
-   if (err)
-   return err;
+   ICE_WRITE_CGU_REG_OR_DIE(hw, ICE_CGU_R19, dw19.val);
 
/* Configure the TSPLL post divisor */
-   err = ice_read_cgu_reg(hw, ICE_CGU_R22, &dw22.val);
-   if (err)
-   return err;
-
+   ICE_READ_CGU_REG_OR_DIE(hw, ICE_CGU_R22, &dw22.val);
dw22.time1588clk_div = e82x_tspll_params[clk_freq].post_pll_div;
dw22.time1588clk_sel_div2 = 0;
-
-   err = ice_write_cgu_reg(hw, ICE_CGU_R22, dw22.val);
-   if (err)
-   return err;
+   ICE_WRITE_CGU_REG_OR_DIE(hw, ICE_CGU_R22, dw22.val);
 
 

Re: [Intel-wired-lan] [PATCH net-next 07/16] idpf: link NAPIs to queues

2025-03-15 Thread Eric Dumazet
On Wed, Mar 5, 2025 at 5:22 PM Alexander Lobakin
 wrote:
>
> Add the missing linking of NAPIs to netdev queues when enabling
> interrupt vectors in order to support NAPI configuration and
> interfaces requiring get_rx_queue()->napi to be set (like XSk
> busy polling).
>
> Signed-off-by: Alexander Lobakin 
> ---
>  drivers/net/ethernet/intel/idpf/idpf_txrx.c | 30 +
>  1 file changed, 30 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c 
> b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> index 2f221c0abad8..a3f6e8cff7a0 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> @@ -3560,8 +3560,11 @@ void idpf_vport_intr_rel(struct idpf_vport *vport)
>  static void idpf_vport_intr_rel_irq(struct idpf_vport *vport)
>  {
> struct idpf_adapter *adapter = vport->adapter;
> +   bool unlock;
> int vector;
>
> +   unlock = rtnl_trylock();

This is probably not what you want here ?

If another thread is holding RTNL, then rtnl_ttrylock() will not add
any protection.


[Intel-wired-lan] [tnguy-next-queue:dev-queue 84/88] drivers/net/ethernet/intel/igc/igc_tsn.h:48:undefined reference to `ethtool_mmsv_event_handle'

2025-03-15 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git 
dev-queue
head:   7dca3a8a1f3c70a4ba8115e4ee5827e424629eaf
commit: cb3499eabcea3f82c2ded3922431309d440b8ff3 [84/88] igc: add support for 
frame preemption verification
config: arm64-randconfig-001-20250314 
(https://download.01.org/0day-ci/archive/20250314/202503141235.jhgptzmw-...@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250314/202503141235.jhgptzmw-...@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 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202503141235.jhgptzmw-...@intel.com/

All errors (new ones prefixed by >>):

   aarch64-linux-ld: Unexpected GOT/PLT entries detected!
   aarch64-linux-ld: Unexpected run-time procedure linkages detected!
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function 
`igc_fpe_handle_mpacket':
>> drivers/net/ethernet/intel/igc/igc_tsn.h:48:(.text+0x9670): undefined 
>> reference to `ethtool_mmsv_event_handle'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function 
`igc_clean_tx_irq':
>> drivers/net/ethernet/intel/igc/igc_main.c:3157:(.text+0xec24): undefined 
>> reference to `ethtool_mmsv_event_handle'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function 
`igc_watchdog_task':
>> drivers/net/ethernet/intel/igc/igc_main.c:5878:(.text+0x10384): undefined 
>> reference to `ethtool_mmsv_link_state_handle'
>> aarch64-linux-ld: 
>> drivers/net/ethernet/intel/igc/igc_main.c:5917:(.text+0x1056c): undefined 
>> reference to `ethtool_mmsv_link_state_handle'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_main.o: in function 
`igc_down':
>> drivers/net/ethernet/intel/igc/igc_main.c:5352:(.text+0x114c8): undefined 
>> reference to `ethtool_mmsv_stop'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_ethtool.o: in function 
`igc_ethtool_set_mm':
>> drivers/net/ethernet/intel/igc/igc_ethtool.c:1799:(.text+0x470): undefined 
>> reference to `ethtool_mmsv_set_mm'
   aarch64-linux-ld: drivers/net/ethernet/intel/igc/igc_tsn.o: in function 
`igc_fpe_init':
>> drivers/net/ethernet/intel/igc/igc_tsn.c:131:(.text+0x11e0): undefined 
>> reference to `ethtool_mmsv_init'


vim +48 drivers/net/ethernet/intel/igc/igc_tsn.h

27  
28  static inline bool igc_fpe_handle_mpacket(struct igc_adapter *adapter,
29union igc_adv_rx_desc 
*rx_desc,
30unsigned int size, void 
*pktbuf)
31  {
32  u32 status_error = le32_to_cpu(rx_desc->wb.upper.status_error);
33  int smd;
34  
35  smd = FIELD_GET(IGC_RXDADV_STAT_SMD_TYPE_MASK, status_error);
36  if (smd != IGC_RXD_STAT_SMD_TYPE_V && smd != 
IGC_RXD_STAT_SMD_TYPE_R)
37  return false;
38  
39  if (size == SMD_FRAME_SIZE && mem_is_zero(pktbuf, 
SMD_FRAME_SIZE)) {
40  struct ethtool_mmsv *mmsv = &adapter->fpe.mmsv;
41  enum ethtool_mmsv_event event;
42  
43  if (smd == IGC_RXD_STAT_SMD_TYPE_V)
44  event = ETHTOOL_MMSV_LP_SENT_VERIFY_MPACKET;
45  else
46  event = ETHTOOL_MMSV_LP_SENT_RESPONSE_MPACKET;
47  
  > 48  ethtool_mmsv_event_handle(mmsv, event);
49  }
50  
51  return true;
52  }
53  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


Re: [Intel-wired-lan] [iwl-next v4 1/1] iidc/ice/irdma: Update IDC to support multiple consumers

2025-03-15 Thread Samudrala, Sridhar




On 3/14/2025 11:12 AM, Leon Romanovsky wrote:

On Thu, Mar 13, 2025 at 04:38:39PM -0700, Samudrala, Sridhar wrote:



On 3/2/2025 12:26 AM, Leon Romanovsky wrote:

On Wed, Feb 26, 2025 at 11:01:52PM +, Ertman, David M wrote:




-Original Message-
From: Leon Romanovsky 
Sent: Wednesday, February 26, 2025 10:50 AM
To: Ertman, David M 
Cc: Nikolova, Tatyana E ; j...@nvidia.com;
intel-wired-...@lists.osuosl.org; linux-r...@vger.kernel.org;
net...@vger.kernel.org
Subject: Re: [iwl-next v4 1/1] iidc/ice/irdma: Update IDC to support multiple
consumers

On Wed, Feb 26, 2025 at 05:36:44PM +, Ertman, David M wrote:

-Original Message-
From: Leon Romanovsky 
Sent: Monday, February 24, 2025 11:56 PM
To: Nikolova, Tatyana E 
Cc: j...@nvidia.com; intel-wired-...@lists.osuosl.org; linux-
r...@vger.kernel.org; net...@vger.kernel.org; Ertman, David M

Subject: Re: [iwl-next v4 1/1] iidc/ice/irdma: Update IDC to support

multiple

consumers

On Mon, Feb 24, 2025 at 11:04:28PM -0600, Tatyana Nikolova wrote:

From: Dave Ertman 

To support RDMA for E2000 product, the idpf driver will use the IDC
interface with the irdma auxiliary driver, thus becoming a second
consumer of it. This requires the IDC be updated to support multiple
consumers. The use of exported symbols no longer makes sense

because it

will require all core drivers (ice/idpf) that can interface with irdma
auxiliary driver to be loaded even if hardware is not present for those
drivers.


In auxiliary bus world, the code drivers (ice/idpf) need to created
auxiliary devices only if specific device present. That auxiliary device
will trigger the load of specific module (irdma in our case).

EXPORT_SYMBOL won't trigger load of irdma driver, but the opposite is
true, load of irdma will trigger load of ice/idpf drivers (depends on
their exported symbol).



To address this, implement an ops struct that will be universal set of
naked function pointers that will be populated by each core driver for
the irdma auxiliary driver to call.


No, we worked very hard to make proper HW discovery and driver

autoload,

let's not return back. For now, it is no-go.


Hi Leon,

I am a little confused about what the problem here is.  The main issue I pull
from your response is: Removing exported symbols will stop ice/idpf from
autoloading when irdma loads.  Is this correct or did I miss your point?


It is one of the main points.



But, if there is an ice or idpf supported device present in the system, the
appropriate driver will have already been loaded anyway (and gone

through its

probe flow to create auxiliary devices).  If it is not loaded, then the system

owner

has either unloaded it manually or blacklisted it.  This would not cause an

issue

anyway, since irdma and ice/idpf can load in any order.


There are two assumptions above, which both not true.
1. Users never issue "modprobe irdma" command alone and always will call
to whole chain "modprobe ice ..." before.
2. You open-code module subsystem properly with reference counters,
ownership and locks to protect from function pointers to be set/clear
dynamically.


Ah, I see your reasoning now.  Our goal was to make the two modules independent,
with no prescribed load order mandated, and utilize the auxiliary bus and 
device subsystem
to handle load order and unload of one or the other module.  The auxiliary 
device only has
the lifespan of the core PCI driver, so if the core driver unloads, then the 
auxiliary device gets
destroyed, and the associated link based off it will be gone.  We wanted to be 
able to unload
and reload either of the modules (core or irdma) and have the interaction be 
able to restart with a
new probe.  All our inter-driver function calls are protected by device lock on 
the auxiliary
device for the duration of the call.


Yes, you are trying to return to pre-aux era.



The main motivation to go with callbacks to the parent driver instead of
using exported symbols is to allow loading only the parent driver required
for a particular deployment. irdma is a common rdma auxilary driver that
supports multiple parent pci drivers(ice, idpf, i40e, iavf). If we use
exported symbols, all these modules will get loaded even on a system with
only idpf device.


It is not how kernel works. IRDMA doesn't call to all exported symbols
of all these modules. It will call to only one exported symbol and that
module will be loaded.


If we are using plain exported symbols from all the parent pci drivers 
and make direct calls from irdma, i would expect that all the drivers 
need to load based on module dependencies.


Are you referring to the usage of request_module() based dynamic loading 
of the modules?






The documentation for auxiliary bus
https://docs.kernel.org/driver-api/auxiliary_bus.html
shows an example on how shared data/callbacks can be used to establish
connection with the parent.


I'm aware of this documentation, it is incorrect. You can find the
explanation why t

[Intel-wired-lan] [tnguy-next-queue:dev-queue] BUILD SUCCESS 9ad216aee37dcca320522fe288491289b2005793

2025-03-15 Thread kernel test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue
branch HEAD: 9ad216aee37dcca320522fe288491289b2005793  i40e: fix MMIO write 
access to an invalid page in i40e_clear_hw

elapsed time: 1447m

configs tested: 86
configs skipped: 2

The following configs have been built successfully.
More configs may be tested in the coming days.

tested configs:
alphaallyesconfiggcc-14.2.0
arc  allmodconfiggcc-13.2.0
arc  allyesconfiggcc-13.2.0
arc   randconfig-001-20250315gcc-13.2.0
arc   randconfig-002-20250315gcc-13.2.0
arm  allmodconfiggcc-14.2.0
arm  allyesconfiggcc-14.2.0
arm   randconfig-001-20250315gcc-14.2.0
arm   randconfig-002-20250315clang-21
arm   randconfig-003-20250315clang-21
arm   randconfig-004-20250315gcc-14.2.0
arm64allmodconfigclang-18
arm64 randconfig-001-20250315gcc-14.2.0
arm64 randconfig-002-20250315gcc-14.2.0
arm64 randconfig-003-20250315clang-16
arm64 randconfig-004-20250315gcc-14.2.0
csky  randconfig-001-20250315gcc-14.2.0
csky  randconfig-002-20250315gcc-14.2.0
hexagon  allyesconfigclang-18
hexagon   randconfig-001-20250315clang-21
hexagon   randconfig-002-20250315clang-17
i386 allmodconfiggcc-12
i386  allnoconfiggcc-12
i386 allyesconfiggcc-12
i386buildonly-randconfig-001-20250315gcc-12
i386buildonly-randconfig-002-20250315clang-19
i386buildonly-randconfig-003-20250315clang-19
i386buildonly-randconfig-004-20250315clang-19
i386buildonly-randconfig-005-20250315gcc-11
i386buildonly-randconfig-006-20250315gcc-12
i386defconfigclang-19
loongarch randconfig-001-20250315gcc-14.2.0
loongarch randconfig-002-20250315gcc-14.2.0
m68k  allnoconfiggcc-14.2.0
microblazeallnoconfiggcc-14.2.0
mips  allnoconfiggcc-14.2.0
nios2 allnoconfiggcc-14.2.0
nios2 randconfig-001-20250315gcc-14.2.0
nios2 randconfig-002-20250315gcc-14.2.0
openrisc  allnoconfiggcc-14.2.0
pariscallnoconfiggcc-14.2.0
pariscrandconfig-001-20250315gcc-14.2.0
pariscrandconfig-002-20250315gcc-14.2.0
powerpc   allnoconfiggcc-14.2.0
powerpc   randconfig-001-20250315clang-21
powerpc   randconfig-002-20250315gcc-14.2.0
powerpc   randconfig-003-20250315clang-18
powerpc64 randconfig-001-20250315gcc-14.2.0
powerpc64 randconfig-002-20250315clang-18
powerpc64 randconfig-003-20250315gcc-14.2.0
riscv allnoconfiggcc-14.2.0
riscv randconfig-001-20250315gcc-14.2.0
riscv randconfig-002-20250315gcc-14.2.0
s390 allmodconfigclang-19
s390  allnoconfigclang-15
s390 allyesconfiggcc-14.2.0
s390  randconfig-001-20250315clang-19
s390  randconfig-002-20250315gcc-14.2.0
sh   allmodconfiggcc-14.2.0
shallnoconfiggcc-14.2.0
sh   allyesconfiggcc-14.2.0
shrandconfig-001-20250315gcc-14.2.0
shrandconfig-002-20250315gcc-14.2.0
sparcallmodconfiggcc-14.2.0
sparc allnoconfiggcc-14.2.0
sparc randconfig-001-20250315gcc-14.2.0
sparc randconfig-002-20250315gcc-14.2.0
sparc64   randconfig-001-20250315gcc-14.2.0
sparc64   randconfig-002-20250315gcc-14.2.0
um   allmodconfigclang-21
umallnoconfigclang-18
um   allyesconfiggcc-12
umrandconfig-001-20250315gcc-12
umrandconfig-002-20250315clang-18
x86_64allnoconfigclang-19
x86_64   allyesconfigclang-19
x86_64  buildonly-randconfig-001-20250315gcc-12
x86_64  buildonly-randconfig-002-20250315clang-19
x86_64

[Intel-wired-lan] [iwl-next v1 7/8] iavf: use libie_aq_str

2025-03-15 Thread Michal Swiatkowski
There is no need to store the err string in hw->err_str. Simplify it and
use common helper. hw->err_str is still used for other purpouse.

It should be marked that previously for unknown error the numeric value
was passed as a string. Now the "LIBIE_AQ_RC_UNKNOWN" is used for such
cases.

Add libie_aminq module in iavf Kconfig.

Reviewed-by: Przemek Kitszel 
Reviewed-by: Larysa Zaremba 
Signed-off-by: Michal Swiatkowski 
---
 drivers/net/ethernet/intel/Kconfig|  1 +
 .../net/ethernet/intel/iavf/iavf_prototype.h  |  1 -
 drivers/net/ethernet/intel/iavf/iavf_common.c | 52 ---
 drivers/net/ethernet/intel/iavf/iavf_main.c   |  5 +-
 .../net/ethernet/intel/iavf/iavf_virtchnl.c   |  2 +-
 5 files changed, 5 insertions(+), 56 deletions(-)

diff --git a/drivers/net/ethernet/intel/Kconfig 
b/drivers/net/ethernet/intel/Kconfig
index a8fa67fe9336..bf9408a2606a 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -260,6 +260,7 @@ config I40E_DCB
 config IAVF
tristate
select LIBIE
+   select LIBIE_ADMINQ
select NET_SHAPER
 
 config I40EVF
diff --git a/drivers/net/ethernet/intel/iavf/iavf_prototype.h 
b/drivers/net/ethernet/intel/iavf/iavf_prototype.h
index 34b5ed87a9aa..7f9f9dbf959a 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_prototype.h
+++ b/drivers/net/ethernet/intel/iavf/iavf_prototype.h
@@ -34,7 +34,6 @@ void iavf_debug_aq(struct iavf_hw *hw, enum iavf_debug_mask 
mask,
 
 bool iavf_check_asq_alive(struct iavf_hw *hw);
 enum iavf_status iavf_aq_queue_shutdown(struct iavf_hw *hw, bool unloading);
-const char *iavf_aq_str(struct iavf_hw *hw, enum libie_aq_err aq_err);
 const char *iavf_stat_str(struct iavf_hw *hw, enum iavf_status stat_err);
 
 enum iavf_status iavf_aq_set_rss_lut(struct iavf_hw *hw, u16 seid,
diff --git a/drivers/net/ethernet/intel/iavf/iavf_common.c 
b/drivers/net/ethernet/intel/iavf/iavf_common.c
index cc71e48b5689..614a886bca99 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_common.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_common.c
@@ -7,58 +7,6 @@
 #include "iavf_adminq.h"
 #include "iavf_prototype.h"
 
-/**
- * iavf_aq_str - convert AQ err code to a string
- * @hw: pointer to the HW structure
- * @aq_err: the AQ error code to convert
- **/
-const char *iavf_aq_str(struct iavf_hw *hw, enum libie_aq_err aq_err)
-{
-   switch (aq_err) {
-   case LIBIE_AQ_RC_OK:
-   return "OK";
-   case LIBIE_AQ_RC_EPERM:
-   return "LIBIE_AQ_RC_EPERM";
-   case LIBIE_AQ_RC_ENOENT:
-   return "LIBIE_AQ_RC_ENOENT";
-   case LIBIE_AQ_RC_ESRCH:
-   return "LIBIE_AQ_RC_ESRCH";
-   case LIBIE_AQ_RC_EIO:
-   return "LIBIE_AQ_RC_EIO";
-   case LIBIE_AQ_RC_EAGAIN:
-   return "LIBIE_AQ_RC_EAGAIN";
-   case LIBIE_AQ_RC_ENOMEM:
-   return "LIBIE_AQ_RC_ENOMEM";
-   case LIBIE_AQ_RC_EACCES:
-   return "LIBIE_AQ_RC_EACCES";
-   case LIBIE_AQ_RC_EBUSY:
-   return "LIBIE_AQ_RC_EBUSY";
-   case LIBIE_AQ_RC_EEXIST:
-   return "LIBIE_AQ_RC_EEXIST";
-   case LIBIE_AQ_RC_EINVAL:
-   return "LIBIE_AQ_RC_EINVAL";
-   case LIBIE_AQ_RC_ENOSPC:
-   return "LIBIE_AQ_RC_ENOSPC";
-   case LIBIE_AQ_RC_ENOSYS:
-   return "LIBIE_AQ_RC_ENOSYS";
-   case LIBIE_AQ_RC_EMODE:
-   return "LIBIE_AQ_RC_EMODE";
-   case LIBIE_AQ_RC_ENOSEC:
-   return "LIBIE_AQ_RC_ENOSEC";
-   case LIBIE_AQ_RC_EBADSIG:
-   return "LIBIE_AQ_RC_EBADSIG";
-   case LIBIE_AQ_RC_ESVN:
-   return "LIBIE_AQ_RC_ESVN";
-   case LIBIE_AQ_RC_EBADMAN:
-   return "LIBIE_AQ_RC_EBADMAN";
-   case LIBIE_AQ_RC_EBADBUF:
-   return "LIBIE_AQ_RC_EBADBUF";
-   }
-
-   snprintf(hw->err_str, sizeof(hw->err_str), "%d", aq_err);
-   return hw->err_str;
-}
-
 /**
  * iavf_stat_str - convert status err code to a string
  * @hw: pointer to the HW structure
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c 
b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 6d7ba4d67a19..9d825ba4e656 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -50,6 +50,7 @@ MODULE_ALIAS("i40evf");
 MODULE_DESCRIPTION("Intel(R) Ethernet Adaptive Virtual Function Network 
Driver");
 MODULE_IMPORT_NS("LIBETH");
 MODULE_IMPORT_NS("LIBIE");
+MODULE_IMPORT_NS("LIBIE_ADMINQ");
 MODULE_LICENSE("GPL v2");
 
 static const struct net_device_ops iavf_netdev_ops;
@@ -1734,7 +1735,7 @@ static int iavf_config_rss_aq(struct iavf_adapter 
*adapter)
if (status) {
dev_err(&adapter->pdev->dev, "Cannot set RSS key, err %s aq_err 
%s\n",
iavf_stat_str(hw, status),
-   iavf_aq_str(hw, hw->aq.asq_last_status));
+   libie_aq_str(hw->aq.asq_last_status));
return iav

[Intel-wired-lan] [tnguy-net-queue:dev-queue] BUILD SUCCESS 297bc0d2c7b690753b42cc863516b3a8211d6c37

2025-03-15 Thread kernel test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
branch HEAD: 297bc0d2c7b690753b42cc863516b3a8211d6c37  ice: fix reservation of 
resources for RDMA when disabled

elapsed time: 1444m

configs tested: 89
configs skipped: 1

The following configs have been built successfully.
More configs may be tested in the coming days.

tested configs:
alphaallyesconfiggcc-14.2.0
arc  allmodconfiggcc-13.2.0
arc  allyesconfiggcc-13.2.0
arc   randconfig-001-20250315gcc-13.2.0
arc   randconfig-002-20250315gcc-13.2.0
arm  allmodconfiggcc-14.2.0
arm  allyesconfiggcc-14.2.0
arm   randconfig-001-20250315gcc-14.2.0
arm   randconfig-002-20250315clang-21
arm   randconfig-003-20250315clang-21
arm   randconfig-004-20250315gcc-14.2.0
arm64allmodconfigclang-18
arm64 randconfig-001-20250315gcc-14.2.0
arm64 randconfig-002-20250315gcc-14.2.0
arm64 randconfig-003-20250315clang-16
arm64 randconfig-004-20250315gcc-14.2.0
csky  randconfig-001-20250315gcc-14.2.0
csky  randconfig-002-20250315gcc-14.2.0
hexagon  allmodconfigclang-21
hexagon  allyesconfigclang-18
hexagon   randconfig-001-20250315clang-21
hexagon   randconfig-002-20250315clang-17
i386 allmodconfiggcc-12
i386  allnoconfiggcc-12
i386 allyesconfiggcc-12
i386buildonly-randconfig-001-20250315gcc-12
i386buildonly-randconfig-002-20250315clang-19
i386buildonly-randconfig-003-20250315clang-19
i386buildonly-randconfig-004-20250315clang-19
i386buildonly-randconfig-005-20250315gcc-11
i386buildonly-randconfig-006-20250315gcc-12
i386defconfigclang-19
loongarch randconfig-001-20250315gcc-14.2.0
loongarch randconfig-002-20250315gcc-14.2.0
m68k allmodconfiggcc-14.2.0
m68k  allnoconfiggcc-14.2.0
m68k allyesconfiggcc-14.2.0
microblazeallnoconfiggcc-14.2.0
mips  allnoconfiggcc-14.2.0
nios2 allnoconfiggcc-14.2.0
nios2 randconfig-001-20250315gcc-14.2.0
nios2 randconfig-002-20250315gcc-14.2.0
openrisc  allnoconfiggcc-14.2.0
pariscallnoconfiggcc-14.2.0
pariscrandconfig-001-20250315gcc-14.2.0
pariscrandconfig-002-20250315gcc-14.2.0
powerpc   allnoconfiggcc-14.2.0
powerpc   randconfig-001-20250315clang-21
powerpc   randconfig-002-20250315gcc-14.2.0
powerpc   randconfig-003-20250315clang-18
powerpc64 randconfig-001-20250315gcc-14.2.0
powerpc64 randconfig-002-20250315clang-18
powerpc64 randconfig-003-20250315gcc-14.2.0
riscv allnoconfiggcc-14.2.0
riscv randconfig-001-20250315gcc-14.2.0
riscv randconfig-002-20250315gcc-14.2.0
s390 allmodconfigclang-19
s390  allnoconfigclang-15
s390 allyesconfiggcc-14.2.0
s390  randconfig-001-20250315clang-19
s390  randconfig-002-20250315gcc-14.2.0
sh   allmodconfiggcc-14.2.0
shallnoconfiggcc-14.2.0
sh   allyesconfiggcc-14.2.0
shrandconfig-001-20250315gcc-14.2.0
shrandconfig-002-20250315gcc-14.2.0
sparcallmodconfiggcc-14.2.0
sparc allnoconfiggcc-14.2.0
sparc randconfig-001-20250315gcc-14.2.0
sparc randconfig-002-20250315gcc-14.2.0
sparc64   randconfig-001-20250315gcc-14.2.0
sparc64   randconfig-002-20250315gcc-14.2.0
um   allmodconfigclang-21
umallnoconfigclang-18
um   allyesconfiggcc-12
umrandconfig-001-20250315gcc-12
umrandconfig-002-20250315clang-18
x86_64allnoconfigclang-19
x86_64

[Intel-wired-lan] [tnguy-next-queue:200GbE] BUILD SUCCESS 206f43f4e0f3c5c6f22a0f949bcd07f5f7e19db0

2025-03-15 Thread kernel test robot
tree/branch: 
https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git 200GbE
branch HEAD: 206f43f4e0f3c5c6f22a0f949bcd07f5f7e19db0  idpf: change the method 
for mailbox workqueue allocation

elapsed time: 1446m

configs tested: 107
configs skipped: 3

The following configs have been built successfully.
More configs may be tested in the coming days.

tested configs:
alpha allnoconfiggcc-14.2.0
alphaallyesconfiggcc-14.2.0
arc  allmodconfiggcc-13.2.0
arc   allnoconfiggcc-13.2.0
arc  allyesconfiggcc-13.2.0
arc   randconfig-001-20250315gcc-13.2.0
arc   randconfig-002-20250315gcc-13.2.0
arm  allmodconfiggcc-14.2.0
arm   allnoconfigclang-17
arm  allyesconfiggcc-14.2.0
arm   aspeed_g4_defconfigclang-21
arm  footbridge_defconfigclang-17
arm   imx_v4_v5_defconfigclang-16
arm   randconfig-001-20250315gcc-14.2.0
arm   randconfig-002-20250315clang-21
arm   randconfig-003-20250315clang-21
arm   randconfig-004-20250315gcc-14.2.0
arm64allmodconfigclang-18
arm64 allnoconfiggcc-14.2.0
arm64 randconfig-001-20250315gcc-14.2.0
arm64 randconfig-002-20250315gcc-14.2.0
arm64 randconfig-003-20250315clang-16
arm64 randconfig-004-20250315gcc-14.2.0
csky  allnoconfiggcc-14.2.0
csky  randconfig-001-20250315gcc-14.2.0
csky  randconfig-002-20250315gcc-14.2.0
hexagon  allmodconfigclang-21
hexagon   allnoconfigclang-21
hexagon  allyesconfigclang-18
hexagon   randconfig-001-20250315clang-21
hexagon   randconfig-002-20250315clang-17
i386 allmodconfiggcc-12
i386  allnoconfiggcc-12
i386 allyesconfiggcc-12
i386buildonly-randconfig-001-20250315gcc-12
i386buildonly-randconfig-002-20250315clang-19
i386buildonly-randconfig-003-20250315clang-19
i386buildonly-randconfig-004-20250315clang-19
i386buildonly-randconfig-005-20250315gcc-11
i386buildonly-randconfig-006-20250315gcc-12
i386defconfigclang-19
loongarch allnoconfiggcc-14.2.0
loongarch randconfig-001-20250315gcc-14.2.0
loongarch randconfig-002-20250315gcc-14.2.0
m68k  allnoconfiggcc-14.2.0
m68kmvme16x_defconfiggcc-14.2.0
microblaze   alldefconfiggcc-14.2.0
microblazeallnoconfiggcc-14.2.0
mips  allnoconfiggcc-14.2.0
mipsgpr_defconfigclang-21
nios2 allnoconfiggcc-14.2.0
nios2 randconfig-001-20250315gcc-14.2.0
nios2 randconfig-002-20250315gcc-14.2.0
openrisc  allnoconfiggcc-14.2.0
openriscdefconfiggcc-14.2.0
pariscallnoconfiggcc-14.2.0
parisc  defconfiggcc-14.2.0
pariscrandconfig-001-20250315gcc-14.2.0
pariscrandconfig-002-20250315gcc-14.2.0
powerpc   allnoconfiggcc-14.2.0
powerpc   currituck_defconfigclang-17
powerpc   randconfig-001-20250315clang-21
powerpc   randconfig-002-20250315gcc-14.2.0
powerpc   randconfig-003-20250315clang-18
powerpc tqm8555_defconfiggcc-14.2.0
powerpc64 randconfig-001-20250315gcc-14.2.0
powerpc64 randconfig-002-20250315clang-18
powerpc64 randconfig-003-20250315gcc-14.2.0
riscv allnoconfiggcc-14.2.0
riscv randconfig-001-20250315gcc-14.2.0
riscv randconfig-002-20250315gcc-14.2.0
s390 allmodconfigclang-19
s390 allyesconfiggcc-14.2.0
s390  randconfig-001-20250315clang-19
s390  randconfig-002-20250315gcc-14.2.0
s390   zfcpdump_defconfigclang-19
sh   allmodconfiggcc-14.2.0
shallnoconfiggcc-14.2.0
sh