[Intel-wired-lan] [PATCH iwl-next v7 07/14] idpf: refactor idpf to use libie_pci APIs

Larysa Zaremba larysa.zaremba at intel.com
Tue Apr 28 14:14:50 UTC 2026


On Tue, Apr 28, 2026 at 10:47:29AM +0200, Loktionov, Aleksandr wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf
> > Of Larysa Zaremba
> > Sent: Tuesday, April 28, 2026 10:27 AM
> > To: intel-wired-lan at lists.osuosl.org; Nguyen, Anthony L
> > <anthony.l.nguyen at intel.com>
> > Cc: Lobakin, Aleksander <aleksander.lobakin at intel.com>; Samudrala,
> > Sridhar <sridhar.samudrala at intel.com>; Michal Swiatkowski
> > <michal.swiatkowski at linux.intel.com>; Zaremba, Larysa
> > <larysa.zaremba at intel.com>; Fijalkowski, Maciej
> > <maciej.fijalkowski at intel.com>; Tantilov, Emil S
> > <emil.s.tantilov at intel.com>; Chittim, Madhu <madhu.chittim at intel.com>;
> > Hay, Joshua A <joshua.a.hay at intel.com>; Keller, Jacob E
> > <jacob.e.keller at intel.com>; Shanmugam, Jayaprakash
> > <jayaprakash.shanmugam at intel.com>; Jiri Pirko <jiri at resnulli.us>;
> > David S. Miller <davem at davemloft.net>; Eric Dumazet
> > <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo Abeni
> > <pabeni at redhat.com>; Simon Horman <horms at kernel.org>; Jonathan Corbet
> > <corbet at lwn.net>; Richard Cochran <richardcochran at gmail.com>; Kitszel,
> > Przemyslaw <przemyslaw.kitszel at intel.com>; Andrew Lunn
> > <andrew+netdev at lunn.ch>; netdev at vger.kernel.org; linux-
> > doc at vger.kernel.org; linux-kernel at vger.kernel.org; Salin, Samuel
> > <samuel.salin at intel.com>
> > Subject: [Intel-wired-lan] [PATCH iwl-next v7 07/14] idpf: refactor
> > idpf to use libie_pci APIs
> > 
> > From: Pavan Kumar Linga <pavan.kumar.linga at intel.com>
> > 
> > Use libie_pci init and MMIO APIs where possible, struct idpf_hw cannot
> > be deleted for now as it also houses control queues that will be
> > refactored later. Use libie_cp header for libie_ctlq_ctx that contains
> > mmio info from the start in order to not increase the diff later.
> > 
> > Reviewed-by: Madhu Chittim <madhu.chittim at intel.com>
> > Reviewed-by: Sridhar Samudrala <sridhar.samudrala at intel.com>
> > Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga at intel.com>
> > Co-developed-by: Larysa Zaremba <larysa.zaremba at intel.com>
> > Signed-off-by: Larysa Zaremba <larysa.zaremba at intel.com>
> > Tested-by: Samuel Salin <Samuel.salin at intel.com>
> > Signed-off-by: Tony Nguyen <anthony.l.nguyen at intel.com>
> > ---
> >  drivers/net/ethernet/intel/idpf/Kconfig       |   1 +
> >  drivers/net/ethernet/intel/idpf/idpf.h        |  70 +-------
> >  .../net/ethernet/intel/idpf/idpf_controlq.c   |  26 ++-
> >  .../net/ethernet/intel/idpf/idpf_controlq.h   |   2 -
> >  drivers/net/ethernet/intel/idpf/idpf_dev.c    |  61 ++++---
> >  drivers/net/ethernet/intel/idpf/idpf_idc.c    |  38 ++--
> >  drivers/net/ethernet/intel/idpf/idpf_lib.c    |   7 +-
> >  drivers/net/ethernet/intel/idpf/idpf_main.c   | 114 ++++++------
> >  drivers/net/ethernet/intel/idpf/idpf_vf_dev.c |  57 +++---
> >  .../net/ethernet/intel/idpf/idpf_virtchnl.c   | 169 +++++++++--------
> > -
> >  .../ethernet/intel/idpf/idpf_virtchnl_ptp.c   |  58 +++---
> >  11 files changed, 288 insertions(+), 315 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/intel/idpf/Kconfig
> > b/drivers/net/ethernet/intel/idpf/Kconfig
> > index adab2154125b..586df3a4afe9 100644
> > --- a/drivers/net/ethernet/intel/idpf/Kconfig
> > +++ b/drivers/net/ethernet/intel/idpf/Kconfig
> > @@ -6,6 +6,7 @@ config IDPF
> >  	depends on PCI_MSI
> >  	depends on PTP_1588_CLOCK_OPTIONAL
> >  	select DIMLIB
> > +	select LIBIE_CP
> >  	select LIBETH_XDP
> >  	help
> >  	  This driver supports Intel(R) Infrastructure Data Path
> > Function diff --git a/drivers/net/ethernet/intel/idpf/idpf.h
> > b/drivers/net/ethernet/intel/idpf/idpf.h
> > index 0d08f51be7e3..efdb58990a8b 100644
> > --- a/drivers/net/ethernet/intel/idpf/idpf.h
> > +++ b/drivers/net/ethernet/intel/idpf/idpf.h
> > @@ -23,6 +23,7 @@ struct idpf_rss_data;
> > 
> >  #include <linux/intel/iidc_rdma.h>
> >  #include <linux/intel/iidc_rdma_idpf.h>
> > +#include <linux/intel/libie/controlq.h>
> >  #include <linux/intel/virtchnl2.h>
> > 
> >  #include "idpf_txrx.h"
> > @@ -625,6 +626,7 @@ struct idpf_vc_xn_manager;
> >   * @flags: See enum idpf_flags
> >   * @reset_reg: See struct idpf_reset_reg
> >   * @hw: Device access data
> 
> ...
> 
> >  	for (i = 0; i < num_vecs; i++) {
> >  		struct idpf_q_vector *q_vector = &rsrc->q_vectors[i];
> >  		u16 vec_id = rsrc->q_vector_idxs[i] - IDPF_MBX_Q_VEC;
> >  		struct idpf_intr_reg *intr = &q_vector->intr_reg;
> > +		struct idpf_vec_regs *reg = &reg_vals[vec_id];
> >  		u32 spacing;
> > 
> > -		intr->dyn_ctl = idpf_get_reg_addr(adapter,
> > -
> > reg_vals[vec_id].dyn_ctl_reg);
> > +		intr->dyn_ctl =	libie_pci_get_mmio_addr(mmio,
> > +							reg->dyn_ctl_reg);
> Stray TAB after =

Seems so.

> 
> >  		intr->dyn_ctl_intena_m = PF_GLINT_DYN_CTL_INTENA_M;
> >  		intr->dyn_ctl_intena_msk_m =
> > PF_GLINT_DYN_CTL_INTENA_MSK_M;
> >  		intr->dyn_ctl_itridx_s = PF_GLINT_DYN_CTL_ITR_INDX_S; @@
> 
> ...
> 
> > 
> >  	return 0;
> >  }
> > --
> > 2.47.0
> 


More information about the Intel-wired-lan mailing list