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

From: Larysa Zaremba

Date: Tue Apr 28 2026 - 10:33:04 EST


On Tue, Apr 28, 2026 at 11:00:22AM +0200, Loktionov, Aleksandr wrote:
>
>
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf
> > Of Larysa Zaremba
> > Sent: Tuesday, April 28, 2026 10:27 AM
> > To: intel-wired-lan@xxxxxxxxxxxxxxxx; Nguyen, Anthony L
> > <anthony.l.nguyen@xxxxxxxxx>
> > Cc: Lobakin, Aleksander <aleksander.lobakin@xxxxxxxxx>; Samudrala,
> > Sridhar <sridhar.samudrala@xxxxxxxxx>; Michal Swiatkowski
> > <michal.swiatkowski@xxxxxxxxxxxxxxx>; Zaremba, Larysa
> > <larysa.zaremba@xxxxxxxxx>; Fijalkowski, Maciej
> > <maciej.fijalkowski@xxxxxxxxx>; Tantilov, Emil S
> > <emil.s.tantilov@xxxxxxxxx>; Chittim, Madhu <madhu.chittim@xxxxxxxxx>;
> > Hay, Joshua A <joshua.a.hay@xxxxxxxxx>; Keller, Jacob E
> > <jacob.e.keller@xxxxxxxxx>; Shanmugam, Jayaprakash
> > <jayaprakash.shanmugam@xxxxxxxxx>; Jiri Pirko <jiri@xxxxxxxxxxx>;
> > David S. Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet
> > <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni
> > <pabeni@xxxxxxxxxx>; Simon Horman <horms@xxxxxxxxxx>; Jonathan Corbet
> > <corbet@xxxxxxx>; Richard Cochran <richardcochran@xxxxxxxxx>; Kitszel,
> > Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; Andrew Lunn
> > <andrew+netdev@xxxxxxx>; netdev@xxxxxxxxxxxxxxx; linux-
> > doc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Salin, Samuel
> > <samuel.salin@xxxxxxxxx>
> > 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@xxxxxxxxx>
> >
> > 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@xxxxxxxxx>
> > Reviewed-by: Sridhar Samudrala <sridhar.samudrala@xxxxxxxxx>
> > Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@xxxxxxxxx>
> > Co-developed-by: Larysa Zaremba <larysa.zaremba@xxxxxxxxx>
> > Signed-off-by: Larysa Zaremba <larysa.zaremba@xxxxxxxxx>
> > Tested-by: Samuel Salin <Samuel.salin@xxxxxxxxx>
> > Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
> > ---
> > 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
>