[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:16:22 UTC 2026


On Tue, Apr 28, 2026 at 11:00:22AM +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
> 
> ...
> 
> > >dev_ops.static_reg_info;
> > +		bool is_static = false;
> > +
> > +		for (uint j = 0; j < IDPF_MMIO_REG_NUM_STATIC; j++)
> I think you need to use here unsigned int, didn't checkpach.pl complain about it?

No, it did not, and this is consistent with the similar regions loop in 
drivers/net/ethernet/intel/idpf/idpf_idc.c.

> 
> 
> > +			if (mr->offset == static_regs[j].start)
> > +				is_static = true;
> 
> ...
> 
> > 
> >  	return 0;
> >  }
> > --
> > 2.47.0
> 


More information about the Intel-wired-lan mailing list