RE: [Intel-wired-lan] [PATCH net-next v2 8/9] i40e: Remove circular header dependencies and fix headers
From: Pucha, HimasekharX Reddy
Date: Thu Oct 05 2023 - 12:21:36 EST
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf Of Ivan Vecera
> Sent: Wednesday, September 27, 2023 2:02 PM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: edumazet@xxxxxxxxxx; intel-wired-lan@xxxxxxxxxxxxxxxx; Brandeburg, Jesse <jesse.brandeburg@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; Nguyen, Anthony L <anthony.l.nguyen@xxxxxxxxx>; Kitszel, Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; davem@xxxxxxxxxxxxx
> Subject: [Intel-wired-lan] [PATCH net-next v2 8/9] i40e: Remove circular header dependencies and fix headers
>
> Similarly as for ice driver [1] there are also circular header
> dependencies in i40e driver:
> i40e.h -> i40e_virtchnl_pf.h -> i40e.h
>
> Another issue is that i40e header files does not contain their own
> depenencies on other header files (both private and standard) so their
> inclusion in .c file require to add these deps in certain order to
> that .c file to make it compilable.
>
> Fix both issues by removal the mentioned circular dependency, by filling
> i40e headers with their dependencies so they can be placed anywhere in
> a source code. Additionally remove bunch of includes from i40e.h super
> header file that are not necessary and include i40e.h only in .c files
> that really require it.
>
> [1] 649c87c6ff52 ("ice: remove circular header dependencies on ice.h")
>
> Signed-off-by: Ivan Vecera <ivecera@xxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/i40e/i40e.h | 43 ++++---------------
> drivers/net/ethernet/intel/i40e/i40e_adminq.c | 4 +-
> .../net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 +
> drivers/net/ethernet/intel/i40e/i40e_client.c | 1 -
> drivers/net/ethernet/intel/i40e/i40e_common.c | 11 +++--
> drivers/net/ethernet/intel/i40e/i40e_dcb.c | 4 +-
> drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 2 +-
> drivers/net/ethernet/intel/i40e/i40e_ddp.c | 2 +-
> .../net/ethernet/intel/i40e/i40e_debugfs.c | 3 +-
> drivers/net/ethernet/intel/i40e/i40e_diag.h | 5 ++-
> .../net/ethernet/intel/i40e/i40e_ethtool.c | 3 +-
> drivers/net/ethernet/intel/i40e/i40e_hmc.c | 3 +-
> drivers/net/ethernet/intel/i40e/i40e_hmc.h | 4 ++
> .../net/ethernet/intel/i40e/i40e_lan_hmc.c | 8 ++--
> .../net/ethernet/intel/i40e/i40e_lan_hmc.h | 2 +
> drivers/net/ethernet/intel/i40e/i40e_main.c | 15 ++++---
> drivers/net/ethernet/intel/i40e/i40e_nvm.c | 2 +
> .../net/ethernet/intel/i40e/i40e_prototype.h | 5 +--
> drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +-
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 7 ++-
> drivers/net/ethernet/intel/i40e/i40e_txrx.h | 1 +
> .../ethernet/intel/i40e/i40e_txrx_common.h | 2 +
> drivers/net/ethernet/intel/i40e/i40e_type.h | 7 +--
> .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +
> .../ethernet/intel/i40e/i40e_virtchnl_pf.h | 4 +-
> drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 --
> drivers/net/ethernet/intel/i40e/i40e_xsk.h | 4 ++
> 27 files changed, 72 insertions(+), 81 deletions(-)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@xxxxxxxxx> (A Contingent worker at Intel)