i40e: House-keeping and clean-up
Subsystems (3)
v2 cover i40e: House-keeping and clean-up
The series makes some house-keeping tasks on i40e driver:
Patch 1: Removes unnecessary back pointer from i40e_hw Patch 2: Moves I40E_MASK macro to i40e_register.h where is used Patch 3: Refactors I40E_MDIO_CLAUSE* to use the common macro Patch 4: Add header dependencies to <linux/avf/virtchnl.h> Patch 5: Simplifies memory alloction functions
Patch 6: Moves mem alloc structures to i40e_alloc.h Patch 7: Splits i40e_osdep.h to i40e_debug.h and i40e_io.h Patch 8: Removes circular header deps, fixes and cleans headers Patch 9: Moves DDP specific macros and structs to i40e_ddp.c
Changes:
v2 - Fixed kdoc comment for i40e_hw_to_pf()
- Reordered patches 5 and 7-9 to make them simplier
drivers/net/ethernet/intel/i40e/i40e.h | 76 +++++-------------- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 8 +- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 3 +- .../net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 + drivers/net/ethernet/intel/i40e/i40e_alloc.h | 24 +++--- 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 | 24 +++++- drivers/net/ethernet/intel/i40e/i40e_debug.h | 47 ++++++++++++ .../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 | 16 ++-- drivers/net/ethernet/intel/i40e/i40e_hmc.h | 4 + drivers/net/ethernet/intel/i40e/i40e_io.h | 16 ++++ .../net/ethernet/intel/i40e/i40e_lan_hmc.c | 9 +-- .../net/ethernet/intel/i40e/i40e_lan_hmc.h | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 57 ++++++++------ drivers/net/ethernet/intel/i40e/i40e_nvm.c | 2 + drivers/net/ethernet/intel/i40e/i40e_osdep.h | 59 -------------- .../net/ethernet/intel/i40e/i40e_prototype.h | 9 ++- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +- .../net/ethernet/intel/i40e/i40e_register.h | 5 ++ 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 | 59 +++----------- .../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 + include/linux/avf/virtchnl.h | 4 + 34 files changed, 231 insertions(+), 251 deletions(-) create mode 100644 drivers/net/ethernet/intel/i40e/i40e_debug.h create mode 100644 drivers/net/ethernet/intel/i40e/i40e_io.h delete mode 100644 drivers/net/ethernet/intel/i40e/i40e_osdep.h
Signature · 1 line
2.41.0
PATCH v2 1/9 i40e: Remove back pointer from i40e_hw structure
The .back field placed in i40e_hw is used to get pointer to i40e_pf instance but it is not necessary as the i40e_hw is a part of i40e_pf and containerof macro can be used to obtain the pointer to i40e_pf. Remove .back field from i40e_hw structure, introduce i40e_hw_to_pf() and i40e_hw_to_dev() helpers and use them.
--- drivers/net/ethernet/intel/i40e/i40e.h | 11 ++++++++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 22 ++++++++++++++------ drivers/net/ethernet/intel/i40e/i40e_osdep.h | 8 +++---- drivers/net/ethernet/intel/i40e/i40e_type.h | 1 - 4 files changed, 31 insertions(+), 11 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +11 -0
@@ -1321,4 +1321,15 @@ static inline u32 i40e_is_tc_mqprio_enabled(struct i40e_pf *pf) return pf->flags & I40E_FLAG_TC_MQPRIO; } +/** +* i40e_hw_to_pf - get pf pointer from the hardware structure +* @hw: pointer to the device HW structure +**/ +static inline struct i40e_pf *i40e_hw_to_pf (struct i40e_hw *hw) +{ + return container_of(hw, struct i40e_pf, hw); +} + +struct device *i40e_hw_to_dev (struct i40e_hw *hw); +#endif /* _I40E_H_ */
drivers/net/ethernet/intel/i40e/i40e_main.c +16 -6
@@ -119,6 +119,17 @@ static void netdev_hw_addr_refcnt(struct i40e_mac_filter *f, } } +/** +* i40e_hw_to_dev - get device pointer from the hardware structure +* @hw: pointer to the device HW structure +**/ +struct device *i40e_hw_to_dev (struct i40e_hw *hw) +{ +struct i40e_pf *pf =i40e_hw_to_pf (hw); + +return &pf->pdev->dev; +} +/** * i40e_allocate_dma_mem_d - OS specific memory alloc for shared code * @hw: pointer to the HW structure
@@ -129,7 +140,7 @@ static void netdev_hw_addr_refcnt(struct i40e_mac_filter *f,int i40e_allocate_dma_mem_d (struct i40e_hw *hw,struct i40e_dma_mem *mem,u64 size,u32 alignment) { -struct i40e_pf *pf = (struct i40e_pf *)hw->back; +struct i40e_pf *pf =i40e_hw_to_pf (hw); mem->size =ALIGN (size, alignment); mem->va = dma_alloc_coherent(&pf->pdev->dev, mem->size, &mem->pa,
@@ -147,7 +158,7 @@ int i40e_allocate_dma_mem_d(struct i40e_hw *hw, struct i40e_dma_mem *mem,**/ int i40e_free_dma_mem_d (struct i40e_hw *hw,struct i40e_dma_mem *mem) { -struct i40e_pf *pf = (struct i40e_pf *)hw->back; +struct i40e_pf *pf =i40e_hw_to_pf (hw);dma_free_coherent (&pf->pdev->dev, mem->size, mem->va, mem->pa); mem->va =NULL ;
@@ -15623,10 +15634,10 @@ static int i40e_init_recovery_mode(struct i40e_pf *pf, struct i40e_hw *hw)**/ static inline void i40e_set_subsystem_device_id (struct i40e_hw *hw) { -struct pci_dev *pdev = ((struct i40e_pf *)hw->back)->pdev; +struct i40e_pf *pf =i40e_hw_to_pf (hw); - hw->subsystem_device_id = pdev->subsystem_device ? - pdev->subsystem_device : + hw->subsystem_device_id = pf->pdev->subsystem_device ? + pf->pdev->subsystem_device : (ushort)(rd32 (hw,I40E_PFPCI_SUBSYSID ) &USHRT_MAX ); }
@@ -15696,7 +15707,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)set_bit (__I40E_DOWN, pf->state); hw = &pf->hw; - hw->back = pf; pf->ioremap_len =min_t (int,pci_resource_len (pdev,0 ),I40E_MAX_CSR_SPACE );
drivers/net/ethernet/intel/i40e/i40e_osdep.h +4 -4
@@ -18,10 +18,10 @@* actual OS primitives */ -#define hw_dbg(hw, S, A...) \ -do { \ - dev_dbg(&((struct i40e_pf *)hw->back)->pdev->dev, S, ##A); \ -} while (0) +struct i40e_hw ; +struct device *i40e_hw_to_dev (struct i40e_hw *hw); + +#define hw_dbg(hw, S, A...) dev_dbg(i40e_hw_to_dev(hw), S, ##A)#define wr32 (a, reg, value) writel((value), ((a)->hw_addr + (reg)))#define rd32 (a, reg) readl((a)->hw_addr + (reg))
drivers/net/ethernet/intel/i40e/i40e_type.h +0 -1
@@ -525,7 +525,6 @@ struct i40e_dcbx_config {/* Port hardware description */ struct i40e_hw {u8 __iomem *hw_addr; -void *back;/* subsystem structs */ struct i40e_phy_info phy;
Signature · 1 line
2.41.0
RE: [Intel-wired-lan] [PATCH net-next v2 1/9] i40e: Remove back pointer from i40e_hw structure
Quoted 13 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, September 27, 2023 2:01 PM
To: [email protected]
Cc: [email protected]; [email protected]; Brandeburg, Jesse <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH net-next v2 1/9] i40e: Remove back pointer fromi40e_hwstructureThe .back field placed in
i40e_hwis used to get pointer toi40e_pfinstance but it is not necessary as thei40e_hwis a part ofi40e_pfand containerof macro can be used to obtain the pointer toi40e_pf. Remove .back field fromi40e_hwstructure, introducei40e_hw_to_pf()andi40e_hw_to_dev()helpers and use them.
Quoted 8 lines
Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e.h | 11 ++++++++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 22 ++++++++++++++------ drivers/net/ethernet/intel/i40e/i40e_osdep.h | 8 +++---- drivers/net/ethernet/intel/i40e/i40e_type.h | 1 - 4 files changed, 31 insertions(+), 11 deletions(-)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH v2 2/9 i40e: Move I40E_MASK macro to i40e_register.h
In reply to Ivan VeceraThe macro is practically used only in i40e_register.h header file except few I40E_MDIO_CLAUSE* macros that are defined in i40e_type.h Move I40E_MASK macro to i40e_register.h header, I40E_MDIO_CLAUSE* macros are refactored in subsequent patch.
--- drivers/net/ethernet/intel/i40e/i40e_register.h | 3 +++ drivers/net/ethernet/intel/i40e/i40e_type.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_register.h +3 -0
@@ -4,6 +4,9 @@#ifndef _I40E_REGISTER_H_#define _I40E_REGISTER_H_ +/* I40E_MASK is a macro used on 32 bit registers */ +#define I40E_MASK (mask, shift) ((u32)(mask) << (shift)) +#define I40E_GL_ATQLEN_ATQCRIT_SHIFT 30#define I40E_GL_ATQLEN_ATQCRIT_MASK I40E_MASK(0x1, I40E_GL_ATQLEN_ATQCRIT_SHIFT)#define I40E_PF_ARQBAH 0x00080180/* Reset: EMPR */
drivers/net/ethernet/intel/i40e/i40e_type.h +0 -3
@@ -11,9 +11,6 @@#include "i40e_lan_hmc.h" #include "i40e_devids.h" -/* I40E_MASK is a macro used on 32 bit registers */ -#define I40E_MASK (mask, shift) ((u32)(mask) << (shift)) -#define I40E_MAX_VSI_QP 16#define I40E_MAX_VF_VSI 4#define I40E_MAX_CHAINED_RX_BUFFERS 5
Signature · 1 line
2.41.0
RE: [Intel-wired-lan] [PATCH net-next v2 2/9] i40e: Move I40E_MASK macro to i40e_register.h
Quoted 12 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, September 27, 2023 2:01 PM
To: [email protected]
Cc: [email protected]; [email protected]; Brandeburg, Jesse <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH net-next v2 2/9] i40e: MoveI40E_MASKmacro toi40e_register.hThe macro is practically used only in
i40e_register.hheader file except few I40E_MDIO_CLAUSE* macros that are defined ini40e_type.hMoveI40E_MASKmacro toi40e_register.hheader, I40E_MDIO_CLAUSE* macros are refactored in subsequent patch.
Quoted 6 lines
Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_register.h | 3 +++ drivers/net/ethernet/intel/i40e/i40e_type.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH v2 3/9 i40e: Refactor I40E_MDIO_CLAUSE* macros
In reply to Ivan VeceraThe macros I40E_MDIO_CLAUSE22* and I40E_MDIO_CLAUSE45* are using I40E_MASK together with the same values I40E_GLGEN_MSCA_STCODE_SHIFT and I40E_GLGEN_MSCA_OPCODE_SHIFT to define masks.
Introduce I40E_GLGEN_MSCA_OPCODE_MASK and I40E_GLGEN_MSCA_STCODE_MASK for both shifts in i40e_register.h and use them to refactor the macros mentioned above.
--- .../net/ethernet/intel/i40e/i40e_register.h | 2 ++ drivers/net/ethernet/intel/i40e/i40e_type.h | 23 +++++++------------ 2 files changed, 10 insertions(+), 15 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_register.h +2 -0
@@ -205,7 +205,9 @@#define I40E_GLGEN_MSCA_DEVADD_SHIFT 16#define I40E_GLGEN_MSCA_PHYADD_SHIFT 21#define I40E_GLGEN_MSCA_OPCODE_SHIFT 26 +#define I40E_GLGEN_MSCA_OPCODE_MASK (_i) I40E_MASK(_i, I40E_GLGEN_MSCA_OPCODE_SHIFT)#define I40E_GLGEN_MSCA_STCODE_SHIFT 28 +#define I40E_GLGEN_MSCA_STCODE_MASK I40E_MASK(0x1, I40E_GLGEN_MSCA_STCODE_SHIFT)#define I40E_GLGEN_MSCA_MDICMD_SHIFT 30#define I40E_GLGEN_MSCA_MDICMD_MASK I40E_MASK(0x1, I40E_GLGEN_MSCA_MDICMD_SHIFT)#define I40E_GLGEN_MSCA_MDIINPROGEN_SHIFT 31
drivers/net/ethernet/intel/i40e/i40e_type.h +8 -15
@@ -67,21 +67,14 @@ enum i40e_debug_mask { I40E_DEBUG_ALL = 0xFFFFFFFF }; -#define I40E_MDIO_CLAUSE22_STCODE_MASK I40E_MASK(1, \ - I40E_GLGEN_MSCA_STCODE_SHIFT) -#define I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK I40E_MASK(1, \ - I40E_GLGEN_MSCA_OPCODE_SHIFT) -#define I40E_MDIO_CLAUSE22_OPCODE_READ_MASK I40E_MASK(2, \ - I40E_GLGEN_MSCA_OPCODE_SHIFT) - -#define I40E_MDIO_CLAUSE45_STCODE_MASK I40E_MASK(0, \ - I40E_GLGEN_MSCA_STCODE_SHIFT) -#define I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK I40E_MASK(0, \ - I40E_GLGEN_MSCA_OPCODE_SHIFT) -#define I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK I40E_MASK(1, \ - I40E_GLGEN_MSCA_OPCODE_SHIFT) -#define I40E_MDIO_CLAUSE45_OPCODE_READ_MASK I40E_MASK(3, \ - I40E_GLGEN_MSCA_OPCODE_SHIFT) +#define I40E_MDIO_CLAUSE22_STCODE_MASK I40E_GLGEN_MSCA_STCODE_MASK +#define I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK I40E_GLGEN_MSCA_OPCODE_MASK(1) +#define I40E_MDIO_CLAUSE22_OPCODE_READ_MASK I40E_GLGEN_MSCA_OPCODE_MASK(2) + +#define I40E_MDIO_CLAUSE45_STCODE_MASK I40E_GLGEN_MSCA_STCODE_MASK +#define I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK I40E_GLGEN_MSCA_OPCODE_MASK(0) +#define I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK I40E_GLGEN_MSCA_OPCODE_MASK(1) +#define I40E_MDIO_CLAUSE45_OPCODE_READ_MASK I40E_GLGEN_MSCA_OPCODE_MASK(3)#define I40E_PHY_COM_REG_PAGE 0x1E#define I40E_PHY_LED_LINK_MODE_MASK 0xF0
Signature · 1 line
2.41.0
RE: [Intel-wired-lan] [PATCH net-next v2 3/9] i40e: Refactor I40E_MDIO_CLAUSE* macros
Quoted 14 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, September 27, 2023 2:01 PM
To: [email protected]
Cc: [email protected]; [email protected]; Brandeburg, Jesse <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH net-next v2 3/9] i40e: Refactor I40E_MDIO_CLAUSE* macrosThe macros I40E_MDIO_CLAUSE22* and I40E_MDIO_CLAUSE45* are using
I40E_MASKtogether with the same valuesI40E_GLGEN_MSCA_STCODE_SHIFTandI40E_GLGEN_MSCA_OPCODE_SHIFTto define masks.
IntroduceI40E_GLGEN_MSCA_OPCODE_MASKandI40E_GLGEN_MSCA_STCODE_MASKfor both shifts ini40e_register.hand use them to refactor the macros mentioned above.
Quoted 6 lines
Signed-off-by Ivan Vecera <[email protected]>--- .../net/ethernet/intel/i40e/i40e_register.h | 2 ++ drivers/net/ethernet/intel/i40e/i40e_type.h | 23 +++++++------------ 2 files changed, 10 insertions(+), 15 deletions(-)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH v2 4/9 virtchnl: Add header dependencies
In reply to Ivan VeceraThe <linux/avf/virtchnl.h> uses BIT, struct_size and ETH_ALEN macros but does not include appropriate header files that defines them. Add these dependencies so this header file can be included anywhere.
--- include/linux/avf/virtchnl.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/avf/virtchnl.h +4 -0
@@ -4,6 +4,10 @@#ifndef _VIRTCHNL_H_#define _VIRTCHNL_H_ +#include <linux/bitops.h> +#include <linux/overflow.h> +#include <uapi/linux/if_ether.h> +/* Description: * This header file describes the Virtual Function (VF) - Physical Function * (PF) communication protocol used by the drivers for all devices starting
Signature · 1 line
2.41.0
PATCH v2 5/9 i40e: Simplify memory allocation functions
In reply to Ivan VeceraEnum i40e_memory_type enum is unused in i40e_allocate_dma_mem() thus can be safely removed. Useless macros in i40e_alloc.h can be removed as well.
--- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 4 ---- drivers/net/ethernet/intel/i40e/i40e_alloc.h | 14 ------------- drivers/net/ethernet/intel/i40e/i40e_hmc.c | 12 ++++------- drivers/net/ethernet/intel/i40e/i40e_main.c | 20 +++++++++---------- drivers/net/ethernet/intel/i40e/i40e_osdep.h | 7 ------- 5 files changed, 14 insertions(+), 43 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq.c +0 -4
@@ -51,7 +51,6 @@ static int i40e_alloc_adminq_asq_ring(struct i40e_hw *hw)int ret_code; ret_code =i40e_allocate_dma_mem (hw, &hw->aq.asq.desc_buf, - i40e_mem_atq_ring, (hw->aq.num_asq_entries *sizeof (struct i40e_aq_desc )),I40E_ADMINQ_DESC_ALIGNMENT );
@@ -78,7 +77,6 @@ static int i40e_alloc_adminq_arq_ring(struct i40e_hw *hw)int ret_code; ret_code =i40e_allocate_dma_mem (hw, &hw->aq.arq.desc_buf, - i40e_mem_arq_ring, (hw->aq.num_arq_entries *sizeof (struct i40e_aq_desc )),I40E_ADMINQ_DESC_ALIGNMENT );
@@ -136,7 +134,6 @@ static int i40e_alloc_arq_bufs(struct i40e_hw *hw)for (i =0 ; i < hw->aq.num_arq_entries; i++) { bi = &hw->aq.arq.r.arq_bi[i]; ret_code =i40e_allocate_dma_mem (hw, bi, - i40e_mem_arq_buf, hw->aq.arq_buf_size,I40E_ADMINQ_DESC_ALIGNMENT );if (ret_code)
@@ -198,7 +195,6 @@ static int i40e_alloc_asq_bufs(struct i40e_hw *hw)for (i =0 ; i < hw->aq.num_asq_entries; i++) { bi = &hw->aq.asq.r.asq_bi[i]; ret_code =i40e_allocate_dma_mem (hw, bi, - i40e_mem_asq_buf, hw->aq.asq_buf_size,I40E_ADMINQ_DESC_ALIGNMENT );if (ret_code)
drivers/net/ethernet/intel/i40e/i40e_alloc.h +0 -14
@@ -6,23 +6,9 @@struct i40e_hw ; -/* Memory allocation types */ -enum i40e_memory_type { - i40e_mem_arq_buf =0 ,/* ARQ indirect command buffer */ - i40e_mem_asq_buf =1 , - i40e_mem_atq_buf =2 ,/* ATQ indirect command buffer */ - i40e_mem_arq_ring =3 ,/* ARQ descriptor ring */ - i40e_mem_atq_ring =4 ,/* ATQ descriptor ring */ - i40e_mem_pd =5 ,/* Page Descriptor */ - i40e_mem_bp =6 ,/* Backing Page - 4KB */ - i40e_mem_bp_jumbo =7 ,/* Backing Page - > 4KB */ - i40e_mem_reserved -}; -/* prototype for functions used for dynamic memory allocation */ int i40e_allocate_dma_mem (struct i40e_hw *hw,struct i40e_dma_mem *mem, -enum i40e_memory_type type,u64 size,u32 alignment);int i40e_free_dma_mem (struct i40e_hw *hw,struct i40e_dma_mem *mem);
drivers/net/ethernet/intel/i40e/i40e_hmc.c +4 -8
@@ -22,7 +22,6 @@ int i40e_add_sd_table_entry(struct i40e_hw *hw, enum i40e_sd_entry_type type, u64 direct_mode_sz) { - enum i40e_memory_type mem_type __attribute__((unused));struct i40e_hmc_sd_entry *sd_entry;bool dma_mem_alloc_done = false;struct i40e_dma_mem mem;
@@ -43,16 +42,13 @@ int i40e_add_sd_table_entry(struct i40e_hw *hw, sd_entry = &hmc_info->sd_table.sd_entry[sd_index];if (!sd_entry->valid) { -if (I40E_SD_TYPE_PAGED == type) { - mem_type = i40e_mem_pd; +if (type ==I40E_SD_TYPE_PAGED ) alloc_len =I40E_HMC_PAGED_BP_SIZE ; - }else { - mem_type = i40e_mem_bp_jumbo; +else alloc_len = direct_mode_sz; - }/* allocate a 4K pd page or 2M backing page */ - ret_code =i40e_allocate_dma_mem (hw, &mem, mem_type, alloc_len, + ret_code =i40e_allocate_dma_mem (hw, &mem, alloc_len,I40E_HMC_PD_BP_BUF_ALIGNMENT );if (ret_code) goto exit;
@@ -140,7 +136,7 @@ int i40e_add_pd_table_entry(struct i40e_hw *hw, page = rsrc_pg; }else {/* allocate a 4K backing page */ - ret_code =i40e_allocate_dma_mem (hw, page, i40e_mem_bp, + ret_code =i40e_allocate_dma_mem (hw, page,I40E_HMC_PAGED_BP_SIZE ,I40E_HMC_PD_BP_BUF_ALIGNMENT );if (ret_code)
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -10
@@ -131,14 +131,14 @@ struct device *i40e_hw_to_dev(struct i40e_hw *hw) }/** -* i40e_allocate_dma_mem_d - OS specific memory alloc for shared code +* i40e_allocate_dma_mem - OS specific memory alloc for shared code * @hw: pointer to the HW structure * @mem: ptr to mem struct to fill out * @size: size of memory requested * @alignment: what to align the allocation to **/ -int i40e_allocate_dma_mem_d (struct i40e_hw *hw,struct i40e_dma_mem *mem, -u64 size,u32 alignment) +int i40e_allocate_dma_mem (struct i40e_hw *hw,struct i40e_dma_mem *mem, +u64 size,u32 alignment) {struct i40e_pf *pf =i40e_hw_to_pf (hw);
@@ -152,11 +152,11 @@ int i40e_allocate_dma_mem_d(struct i40e_hw *hw, struct i40e_dma_mem *mem, }/** -* i40e_free_dma_mem_d - OS specific memory free for shared code +* i40e_free_dma_mem - OS specific memory free for shared code * @hw: pointer to the HW structure * @mem: ptr to mem struct to free **/ -int i40e_free_dma_mem_d (struct i40e_hw *hw,struct i40e_dma_mem *mem) +int i40e_free_dma_mem (struct i40e_hw *hw,struct i40e_dma_mem *mem) {struct i40e_pf *pf =i40e_hw_to_pf (hw);
@@ -169,13 +169,13 @@ int i40e_free_dma_mem_d(struct i40e_hw *hw, struct i40e_dma_mem *mem) }/** -* i40e_allocate_virt_mem_d - OS specific memory alloc for shared code +* i40e_allocate_virt_mem - OS specific memory alloc for shared code * @hw: pointer to the HW structure * @mem: ptr to mem struct to fill out * @size: size of memory requested **/ -int i40e_allocate_virt_mem_d (struct i40e_hw *hw,struct i40e_virt_mem *mem, -u32 size) +int i40e_allocate_virt_mem (struct i40e_hw *hw,struct i40e_virt_mem *mem, +u32 size) { mem->size = size; mem->va =kzalloc (size,GFP_KERNEL );
@@ -187,11 +187,11 @@ int i40e_allocate_virt_mem_d(struct i40e_hw *hw, struct i40e_virt_mem *mem, }/** -* i40e_free_virt_mem_d - OS specific memory free for shared code +* i40e_free_virt_mem - OS specific memory free for shared code * @hw: pointer to the HW structure * @mem: ptr to mem struct to free **/ -int i40e_free_virt_mem_d (struct i40e_hw *hw,struct i40e_virt_mem *mem) +int i40e_free_virt_mem (struct i40e_hw *hw,struct i40e_virt_mem *mem) {/* it's ok to kfree a NULL pointer */ kfree (mem->va);
drivers/net/ethernet/intel/i40e/i40e_osdep.h +0 -7
@@ -36,18 +36,11 @@ struct i40e_dma_mem {u32 size; }; -#define i40e_allocate_dma_mem (h, m, unused, s, a) \ - i40e_allocate_dma_mem_d(h, m, s, a) -#define i40e_free_dma_mem (h, m) i40e_free_dma_mem_d(h, m) -struct i40e_virt_mem {void *va;u32 size; }; -#define i40e_allocate_virt_mem (h, m, s) i40e_allocate_virt_mem_d(h, m, s) -#define i40e_free_virt_mem (h, m) i40e_free_virt_mem_d(h, m) -#define i40e_debug (h, m, s, ...) \ do { \ if (((m) & (h)->debug_mask)) \
Signature · 1 line
2.41.0
RE: [Intel-wired-lan] [PATCH net-next v2 5/9] i40e: Simplify memory allocation functions
Quoted 11 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, September 27, 2023 2:02 PM
To: [email protected]
Cc: [email protected]; [email protected]; Brandeburg, Jesse <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH net-next v2 5/9] i40e: Simplify memory allocation functionsEnum
i40e_memory_typeenum is unused ini40e_allocate_dma_mem()thus can be safely removed. Useless macros ini40e_alloc.hcan be removed as well.
Quoted 9 lines
Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 4 ---- drivers/net/ethernet/intel/i40e/i40e_alloc.h | 14 ------------- drivers/net/ethernet/intel/i40e/i40e_hmc.c | 12 ++++------- drivers/net/ethernet/intel/i40e/i40e_main.c | 20 +++++++++---------- drivers/net/ethernet/intel/i40e/i40e_osdep.h | 7 ------- 5 files changed, 14 insertions(+), 43 deletions(-)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH v2 6/9 i40e: Move memory allocation structures to i40e_alloc.h
In reply to Ivan VeceraStructures i40e_dma_mem & i40e_virt_mem are defined i40e_osdep.h while memory allocation functions that use them are declared in i40e_alloc.h Move them there.
--- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 1 + drivers/net/ethernet/intel/i40e/i40e_alloc.h | 14 ++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_osdep.h | 12 ------------ 3 files changed, 15 insertions(+), 12 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq.h +1 -0
@@ -4,6 +4,7 @@#ifndef _I40E_ADMINQ_H_#define _I40E_ADMINQ_H_ +#include "i40e_alloc.h" #include "i40e_osdep.h" #include "i40e_adminq_cmd.h"
drivers/net/ethernet/intel/i40e/i40e_alloc.h +14 -0
@@ -4,8 +4,22 @@#ifndef _I40E_ALLOC_H_#define _I40E_ALLOC_H_ +#include <linux/types.h> +struct i40e_hw ; +/* memory allocation tracking */ +struct i40e_dma_mem { +void *va; +dma_addr_t pa; +u32 size; +}; + +struct i40e_virt_mem { +void *va; +u32 size; +}; +/* prototype for functions used for dynamic memory allocation */ int i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem,
drivers/net/ethernet/intel/i40e/i40e_osdep.h +0 -12
@@ -29,18 +29,6 @@ struct device *i40e_hw_to_dev(struct i40e_hw *hw);#define rd64 (a, reg) readq((a)->hw_addr + (reg))#define i40e_flush (a) readl((a)->hw_addr + I40E_GLGEN_STAT) -/* memory allocation tracking */ -struct i40e_dma_mem { -void *va; -dma_addr_t pa; -u32 size; -}; - -struct i40e_virt_mem { -void *va; -u32 size; -}; -#define i40e_debug (h, m, s, ...) \ do { \ if (((m) & (h)->debug_mask)) \
Signature · 1 line
2.41.0
RE: [Intel-wired-lan] [PATCH net-next v2 6/9] i40e: Move memory allocation structures to i40e_alloc.h
Quoted 11 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, September 27, 2023 2:02 PM
To: [email protected]
Cc: [email protected]; [email protected]; Brandeburg, Jesse <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH net-next v2 6/9] i40e: Move memory allocation structures toi40e_alloc.hStructures
i40e_dma_mem&i40e_virt_memare definedi40e_osdep.hwhile memory allocation functions that use them are declared ini40e_alloc.hMove them there.
Quoted 7 lines
Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 1 + drivers/net/ethernet/intel/i40e/i40e_alloc.h | 14 ++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_osdep.h | 12 ------------ 3 files changed, 15 insertions(+), 12 deletions(-)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH v2 7/9 i40e: Split i40e_osdep.h
In reply to Ivan VeceraHeader i40e_osdep.h contains only IO primitives and couple of debug printing macros. Split this header file to i40e_io.h and i40e_debug.h and move i40e_debug_mask enum to i40e_debug.h
--- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_debug.h | 47 +++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_hmc.c | 1 - drivers/net/ethernet/intel/i40e/i40e_io.h | 16 +++++++ .../net/ethernet/intel/i40e/i40e_lan_hmc.c | 1 - drivers/net/ethernet/intel/i40e/i40e_osdep.h | 40 ---------------- .../net/ethernet/intel/i40e/i40e_prototype.h | 1 + drivers/net/ethernet/intel/i40e/i40e_type.h | 31 ++---------- 8 files changed, 68 insertions(+), 71 deletions(-) create mode 100644 drivers/net/ethernet/intel/i40e/i40e_debug.h create mode 100644 drivers/net/ethernet/intel/i40e/i40e_io.h delete mode 100644 drivers/net/ethernet/intel/i40e/i40e_osdep.h
drivers/net/ethernet/intel/i40e/i40e_adminq.h +1 -1
@@ -4,8 +4,8 @@#ifndef _I40E_ADMINQ_H_#define _I40E_ADMINQ_H_ +#include <linux/mutex.h> #include "i40e_alloc.h" -#include "i40e_osdep.h" #include "i40e_adminq_cmd.h" #define I40E_ADMINQ_DESC (R , i) \
drivers/net/ethernet/intel/i40e/i40e_debug.h new file +47 -0
47 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_hmc.c +0 -1
@@ -2,7 +2,6 @@/* Copyright(c) 2013 - 2018 Intel Corporation. */ #include "i40e.h" -#include "i40e_osdep.h" #include "i40e_register.h" #include "i40e_alloc.h" #include "i40e_hmc.h"
drivers/net/ethernet/intel/i40e/i40e_io.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright(c) 2023 Intel Corporation. */ + +#ifndef _I40E_IO_H_ +#define _I40E_IO_H_ + +/* get readq/writeq support for 32 bit kernels, use the low-first version */ +#include <linux/io-64-nonatomic-lo-hi.h> + +#define wr32 (a, reg, value) writel((value), ((a)->hw_addr + (reg))) +#define rd32 (a, reg) readl((a)->hw_addr + (reg)) + +#define rd64 (a, reg) readq((a)->hw_addr + (reg)) +#define i40e_flush (a) readl((a)->hw_addr + I40E_GLGEN_STAT) + +#endif /* _I40E_IO_H_ */
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c +0 -1
@@ -2,7 +2,6 @@/* Copyright(c) 2013 - 2018 Intel Corporation. */ #include "i40e.h" -#include "i40e_osdep.h" #include "i40e_register.h" #include "i40e_type.h" #include "i40e_hmc.h"
drivers/net/ethernet/intel/i40e/i40e_osdep.h deleted +0 -40
@@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright(c) 2013 - 2018 Intel Corporation. */ - -#ifndef _I40E_OSDEP_H_ -#define _I40E_OSDEP_H_ - -#include <linux/types.h> -#include <linux/if_ether.h> -#include <linux/if_vlan.h> -#include <linux/tcp.h> -#include <linux/pci.h> -#include <linux/highuid.h> - -/* get readq/writeq support for 32 bit kernels, use the low-first version */ -#include <linux/io-64-nonatomic-lo-hi.h> - -/* File to be the magic between shared code and -* actual OS primitives -*/ - -struct i40e_hw ; -struct device *i40e_hw_to_dev (struct i40e_hw *hw); - -#define hw_dbg(hw, S, A...) dev_dbg(i40e_hw_to_dev(hw), S, ##A) - -#define wr32 (a, reg, value) writel((value), ((a)->hw_addr + (reg))) -#define rd32 (a, reg) readl((a)->hw_addr + (reg)) - -#define rd64 (a, reg) readq((a)->hw_addr + (reg)) -#define i40e_flush (a) readl((a)->hw_addr + I40E_GLGEN_STAT) - -#define i40e_debug (h, m, s, ...) \ -do { \ - if (((m) & (h)->debug_mask)) \ - pr_info("i40e %02x:%02x.%x " s, \ - (h)->bus.bus_id, (h)->bus.device, \ - (h)->bus.func, ##__VA_ARGS__); \ -} while (0) - -#endif /* _I40E_OSDEP_H_ */
drivers/net/ethernet/intel/i40e/i40e_prototype.h +1 -0
@@ -6,6 +6,7 @@#include "i40e_type.h" #include "i40e_alloc.h" +#include "i40e_debug.h" #include <linux/avf/virtchnl.h> /* Prototypes for shared code functions that are not in
drivers/net/ethernet/intel/i40e/i40e_type.h +3 -28
@@ -4,7 +4,9 @@#ifndef _I40E_TYPE_H_#define _I40E_TYPE_H_ -#include "i40e_osdep.h" +#include <linux/delay.h> +#include <linux/if_ether.h> +#include "i40e_io.h" #include "i40e_register.h" #include "i40e_adminq.h" #include "i40e_hmc.h"
@@ -40,33 +42,6 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *);#define I40E_QTX_CTL_VM_QUEUE 0x1#define I40E_QTX_CTL_PF_QUEUE 0x2 -/* debug masks - set these bits in hw->debug_mask to control output */ -enum i40e_debug_mask { -I40E_DEBUG_INIT =0x00000001 , -I40E_DEBUG_RELEASE =0x00000002 , - -I40E_DEBUG_LINK =0x00000010 , -I40E_DEBUG_PHY =0x00000020 , -I40E_DEBUG_HMC =0x00000040 , -I40E_DEBUG_NVM =0x00000080 , -I40E_DEBUG_LAN =0x00000100 , -I40E_DEBUG_FLOW =0x00000200 , -I40E_DEBUG_DCB =0x00000400 , -I40E_DEBUG_DIAG =0x00000800 , -I40E_DEBUG_FD =0x00001000 , -I40E_DEBUG_PACKAGE =0x00002000 , -I40E_DEBUG_IWARP =0x00F00000 , -I40E_DEBUG_AQ_MESSAGE =0x01000000 , -I40E_DEBUG_AQ_DESCRIPTOR =0x02000000 , -I40E_DEBUG_AQ_DESC_BUFFER =0x04000000 , -I40E_DEBUG_AQ_COMMAND =0x06000000 , -I40E_DEBUG_AQ =0x0F000000 , - -I40E_DEBUG_USER =0xF0000000 , - -I40E_DEBUG_ALL =0xFFFFFFFF -}; -#define I40E_MDIO_CLAUSE22_STCODE_MASK I40E_GLGEN_MSCA_STCODE_MASK#define I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK I40E_GLGEN_MSCA_OPCODE_MASK(1)#define I40E_MDIO_CLAUSE22_OPCODE_READ_MASK I40E_GLGEN_MSCA_OPCODE_MASK(2)
Signature · 1 line
2.41.0
RE: [Intel-wired-lan] [PATCH net-next v2 7/9] i40e: Split i40e_osdep.h
Quoted 12 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, September 27, 2023 2:02 PM
To: [email protected]
Cc: [email protected]; [email protected]; Brandeburg, Jesse <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH net-next v2 7/9] i40e: Spliti40e_osdep.hHeader
i40e_osdep.hcontains only IO primitives and couple of debug printing macros. Split this header file toi40e_io.handi40e_debug.hand movei40e_debug_maskenum toi40e_debug.hSigned-off-by Ivan Vecera <[email protected]>
Quoted 14 lines
--- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_debug.h | 47 +++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_hmc.c | 1 - drivers/net/ethernet/intel/i40e/i40e_io.h | 16 +++++++ .../net/ethernet/intel/i40e/i40e_lan_hmc.c | 1 - drivers/net/ethernet/intel/i40e/i40e_osdep.h | 40 ---------------- .../net/ethernet/intel/i40e/i40e_prototype.h | 1 + drivers/net/ethernet/intel/i40e/i40e_type.h | 31 ++---------- 8 files changed, 68 insertions(+), 71 deletions(-) create mode 100644 drivers/net/ethernet/intel/i40e/i40e_debug.h create mode 100644 drivers/net/ethernet/intel/i40e/i40e_io.h delete mode 100644 drivers/net/ethernet/intel/i40e/i40e_osdep.h
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH v2 8/9 i40e: Remove circular header dependencies and fix headers
In reply to Ivan VeceraSimilarly 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")
--- 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(-)
drivers/net/ethernet/intel/i40e/i40e.h +8 -35
@@ -4,47 +4,20 @@#ifndef _I40E_H_#define _I40E_H_ -#include <net/tcp.h> -#include <net/udp.h> -#include <linux/types.h> -#include <linux/errno.h> -#include <linux/module.h> -#include <linux/pci.h> -#include <linux/netdevice.h> -#include <linux/ioport.h> -#include <linux/iommu.h> -#include <linux/slab.h> -#include <linux/list.h> -#include <linux/hashtable.h> -#include <linux/string.h> -#include <linux/in.h> -#include <linux/ip.h> -#include <linux/sctp.h> -#include <linux/pkt_sched.h> -#include <linux/ipv6.h> -#include <net/checksum.h> -#include <net/ip6_checksum.h> #include <linux/ethtool.h> -#include <linux/if_vlan.h> -#include <linux/if_macvlan.h> -#include <linux/if_bridge.h> -#include <linux/clocksource.h> -#include <linux/net_tstamp.h> +#include <linux/pci.h> #include <linux/ptp_clock_kernel.h> +#include <linux/types.h> +#include <linux/avf/virtchnl.h> +#include <linux/net/intel/i40e_client.h> #include <net/pkt_cls.h> -#include <net/pkt_sched.h> -#include <net/tc_act/tc_gact.h> -#include <net/tc_act/tc_mirred.h> #include <net/udp_tunnel.h> -#include <net/xdp_sock.h> -#include <linux/bitfield.h> -#include "i40e_type.h" +#include "i40e_dcb.h" +#include "i40e_debug.h" +#include "i40e_io.h" #include "i40e_prototype.h" -#include <linux/net/intel/i40e_client.h> -#include <linux/avf/virtchnl.h> -#include "i40e_virtchnl_pf.h" +#include "i40e_register.h" #include "i40e_txrx.h" -#include "i40e_dcb.h" /* Useful i40e defaults */ #define I40E_MAX_VEB 16
drivers/net/ethernet/intel/i40e/i40e_adminq.c +2 -2
@@ -1,9 +1,9 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include "i40e_type.h" +#include <linux/delay.h> +#include "i40e_alloc.h" #include "i40e_register.h" -#include "i40e_adminq.h" #include "i40e_prototype.h" static void i40e_resume_aq (struct i40e_hw *hw);
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +2 -0
@@ -4,6 +4,8 @@#ifndef _I40E_ADMINQ_CMD_H_#define _I40E_ADMINQ_CMD_H_ +#include <linux/bits.h> +/* This header file defines the i40e Admin Queue commands and is shared between * i40e Firmware and Software. *
drivers/net/ethernet/intel/i40e/i40e_client.c +0 -1
@@ -6,7 +6,6 @@#include <linux/net/intel/i40e_client.h> #include "i40e.h" -#include "i40e_prototype.h" static LIST_HEAD (i40e_devices);static DEFINE_MUTEX (i40e_device_mutex);
drivers/net/ethernet/intel/i40e/i40e_common.c +7 -4
@@ -1,11 +1,14 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2021 Intel Corporation. */ -#include "i40e.h" -#include "i40e_type.h" -#include "i40e_adminq.h" -#include "i40e_prototype.h" #include <linux/avf/virtchnl.h> +#include <linux/delay.h> +#include <linux/etherdevice.h> +#include <linux/pci.h> +#include "i40e_adminq_cmd.h" +#include "i40e_devids.h" +#include "i40e_prototype.h" +#include "i40e_register.h" /** * i40e_set_mac_type - Sets MAC type
drivers/net/ethernet/intel/i40e/i40e_dcb.c +2 -2
@@ -1,9 +1,9 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2021 Intel Corporation. */ -#include "i40e_adminq.h" -#include "i40e_prototype.h" +#include "i40e_alloc.h" #include "i40e_dcb.h" +#include "i40e_prototype.h" /** * i40e_get_dcbx_status
drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c +1 -1
@@ -2,8 +2,8 @@/* Copyright(c) 2013 - 2021 Intel Corporation. */ #ifdef CONFIG_I40E_DCB -#include "i40e.h" #include <net/dcbnl.h> +#include "i40e.h" #define I40E_DCBNL_STATUS_SUCCESS 0#define I40E_DCBNL_STATUS_ERROR 1
drivers/net/ethernet/intel/i40e/i40e_ddp.c +1 -1
@@ -1,9 +1,9 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ +#include <linux/firmware.h> #include "i40e.h" -#include <linux/firmware.h> /** * i40e_ddp_profiles_eq - checks if DDP profiles are the equivalent
drivers/net/ethernet/intel/i40e/i40e_debugfs.c +2 -1
@@ -5,8 +5,9 @@#include <linux/fs.h> #include <linux/debugfs.h> - +#include <linux/if_bridge.h> #include "i40e.h" +#include "i40e_virtchnl_pf.h" static struct dentry *i40e_dbg_root;
drivers/net/ethernet/intel/i40e/i40e_diag.h +4 -1
@@ -4,7 +4,10 @@#ifndef _I40E_DIAG_H_#define _I40E_DIAG_H_ -#include "i40e_type.h" +#include "i40e_adminq_cmd.h" + +/* forward-declare the HW struct for the compiler */ +struct i40e_hw ;enum i40e_lb_mode { I40E_LB_MODE_NONE = 0x0,
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +2 -1
@@ -3,9 +3,10 @@/* ethtool support for i40e */ -#include "i40e.h" +#include "i40e_devids.h" #include "i40e_diag.h" #include "i40e_txrx_common.h" +#include "i40e_virtchnl_pf.h" /* ethtool statistics helpers */
drivers/net/ethernet/intel/i40e/i40e_hmc.c +1 -2
@@ -1,9 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include "i40e.h" -#include "i40e_register.h" #include "i40e_alloc.h" +#include "i40e_debug.h" #include "i40e_hmc.h" #include "i40e_type.h"
drivers/net/ethernet/intel/i40e/i40e_hmc.h +4 -0
@@ -4,6 +4,10 @@#ifndef _I40E_HMC_H_#define _I40E_HMC_H_ +#include "i40e_alloc.h" +#include "i40e_io.h" +#include "i40e_register.h" +#define I40E_HMC_MAX_BP_COUNT 512/* forward-declare the HW struct for the compiler */
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c +3 -5
@@ -1,12 +1,10 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include "i40e.h" -#include "i40e_register.h" -#include "i40e_type.h" -#include "i40e_hmc.h" +#include "i40e_alloc.h" +#include "i40e_debug.h" #include "i40e_lan_hmc.h" -#include "i40e_prototype.h" +#include "i40e_type.h" /* lan specific interface functions */
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h +2 -0
@@ -4,6 +4,8 @@#ifndef _I40E_LAN_HMC_H_#define _I40E_LAN_HMC_H_ +#include "i40e_hmc.h" +/* forward-declare the HW struct for the compiler */ struct i40e_hw ;
drivers/net/ethernet/intel/i40e/i40e_main.c +9 -6
@@ -1,19 +1,22 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2021 Intel Corporation. */ -#include <linux/etherdevice.h> -#include <linux/of_net.h> -#include <linux/pci.h> -#include <linux/bpf.h> #include <generated/utsrelease.h> #include <linux/crash_dump.h> +#include <linux/if_bridge.h> +#include <linux/if_macvlan.h> +#include <linux/module.h> +#include <net/pkt_cls.h> +#include <net/xdp_sock_drv.h> /* Local includes */ #include "i40e.h" +#include "i40e_devids.h" #include "i40e_diag.h" +#include "i40e_lan_hmc.h" +#include "i40e_virtchnl_pf.h" #include "i40e_xsk.h" -#include <net/udp_tunnel.h> -#include <net/xdp_sock_drv.h> +/* All i40e tracepoints are defined by the include below, which * must be included exactly once across the whole kernel with * CREATE_TRACE_POINTS defined
drivers/net/ethernet/intel/i40e/i40e_nvm.c +2 -0
@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ +#include <linux/delay.h> +#include "i40e_alloc.h" #include "i40e_prototype.h" /**
drivers/net/ethernet/intel/i40e/i40e_prototype.h +2 -3
@@ -4,10 +4,9 @@#ifndef _I40E_PROTOTYPE_H_#define _I40E_PROTOTYPE_H_ -#include "i40e_type.h" -#include "i40e_alloc.h" -#include "i40e_debug.h" #include <linux/avf/virtchnl.h> +#include "i40e_debug.h" +#include "i40e_type.h" /* Prototypes for shared code functions that are not in * the standard function pointer structures. These are
drivers/net/ethernet/intel/i40e/i40e_ptp.c +2 -1
@@ -1,9 +1,10 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include "i40e.h" #include <linux/ptp_classify.h> #include <linux/posix-clock.h> +#include "i40e.h" +#include "i40e_devids.h" /* The XL710 timesync is very much like Intel's 82599 design when it comes to * the fundamental clock design. However, the clock operations are much simpler
drivers/net/ethernet/intel/i40e/i40e_txrx.c +3 -4
@@ -1,14 +1,13 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include <linux/prefetch.h> #include <linux/bpf_trace.h> +#include <linux/prefetch.h> +#include <linux/sctp.h> #include <net/mpls.h> #include <net/xdp.h> -#include "i40e.h" -#include "i40e_trace.h" -#include "i40e_prototype.h" #include "i40e_txrx_common.h" +#include "i40e_trace.h" #include "i40e_xsk.h" #define I40E_TXD_CMD (I40E_TX_DESC_CMD_EOP | I40E_TX_DESC_CMD_RS)
drivers/net/ethernet/intel/i40e/i40e_txrx.h +1 -0
@@ -5,6 +5,7 @@#define _I40E_TXRX_H_#include <net/xdp.h> +#include "i40e_type.h" /* Interrupt Throttling and Rate Limiting Goodies */ #define I40E_DEFAULT_IRQ_WORK 256
drivers/net/ethernet/intel/i40e/i40e_txrx_common.h +2 -0
@@ -4,6 +4,8 @@#ifndef I40E_TXRX_COMMON_ #define I40E_TXRX_COMMON_ +#include "i40e.h" +int i40e_xmit_xdp_tx_ring (struct xdp_buff *xdp,struct i40e_ring *xdp_ring);void i40e_clean_programming_status (struct i40e_ring *rx_ring,u64 qword0_raw,u64 qword1);
drivers/net/ethernet/intel/i40e/i40e_type.h +1 -6
@@ -4,14 +4,9 @@#ifndef _I40E_TYPE_H_#define _I40E_TYPE_H_ -#include <linux/delay.h> -#include <linux/if_ether.h> -#include "i40e_io.h" -#include "i40e_register.h" +#include <uapi/linux/if_ether.h> #include "i40e_adminq.h" #include "i40e_hmc.h" -#include "i40e_lan_hmc.h" -#include "i40e_devids.h" #define I40E_MAX_VSI_QP 16#define I40E_MAX_VF_VSI 4
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +2 -0
@@ -2,6 +2,8 @@/* Copyright(c) 2013 - 2018 Intel Corporation. */ #include "i40e.h" +#include "i40e_lan_hmc.h" +#include "i40e_virtchnl_pf.h" /*********************notification routines***********************/
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +3 -1
@@ -4,7 +4,9 @@#ifndef _I40E_VIRTCHNL_PF_H_#define _I40E_VIRTCHNL_PF_H_ -#include "i40e.h" +#include <linux/avf/virtchnl.h> +#include <linux/netdevice.h> +#include "i40e_type.h" #define I40E_MAX_VLANID 4095
drivers/net/ethernet/intel/i40e/i40e_xsk.c +0 -4
@@ -2,11 +2,7 @@/* Copyright(c) 2018 Intel Corporation. */ #include <linux/bpf_trace.h> -#include <linux/stringify.h> #include <net/xdp_sock_drv.h> -#include <net/xdp.h> - -#include "i40e.h" #include "i40e_txrx_common.h" #include "i40e_xsk.h"
drivers/net/ethernet/intel/i40e/i40e_xsk.h +4 -0
@@ -4,6 +4,8 @@#ifndef _I40E_XSK_H_#define _I40E_XSK_H_ +#include <linux/types.h> +/* This value should match the pragma in the loop_unrolled_for * macro. Why 4? It is strictly empirical. It seems to be a good * compromise between the advantage of having simultaneous outstanding
@@ -20,7 +22,9 @@#define loop_unrolled_for for#endif +struct i40e_ring ;struct i40e_vsi ; +struct net_device ;struct xsk_buff_pool ;int i40e_queue_pair_disable (struct i40e_vsi *vsi,int queue_pair);
Signature · 1 line
2.41.0
RE: [Intel-wired-lan] [PATCH net-next v2 8/9] i40e: Remove circular header dependencies and fix headers
Quoted 46 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, September 27, 2023 2:02 PM
To: [email protected]
Cc: [email protected]; [email protected]; Brandeburg, Jesse <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH net-next v2 8/9] i40e: Remove circular header dependencies and fix headersSimilarly as for ice driver [1] there are also circular header dependencies in i40e driver:
i40e.h->i40e_virtchnl_pf.h->i40e.hAnother 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.hsuper header file that are not necessary and includei40e.honly in .c files that really require it.[1]
649c87c6ff52("ice: remove circular header dependencies onice.h")Signed-off-by Ivan Vecera <[email protected]>--- 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 ++-
Quoted 9 lines
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(-)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
PATCH v2 9/9 i40e: Move DDP specific macros and structures to i40e_ddp.c
In reply to Ivan VeceraMove several DDP related macros and structures from i40e.h header to i40e_ddp.c where are privately used. Make static i40e_ddp_load() function that is also used only in i40e_ddp and move declaration of i40e_ddp_flash() used by i40e_ethtool.c to i40e_prototype.h
--- drivers/net/ethernet/intel/i40e/i40e.h | 24 ------------------- drivers/net/ethernet/intel/i40e/i40e_ddp.c | 22 +++++++++++++++-- .../net/ethernet/intel/i40e/i40e_prototype.h | 5 ++++ 3 files changed, 25 insertions(+), 26 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +0 -24
@@ -4,7 +4,6 @@#ifndef _I40E_H_#define _I40E_H_ -#include <linux/ethtool.h> #include <linux/pci.h> #include <linux/ptp_clock_kernel.h> #include <linux/types.h>
@@ -296,29 +295,6 @@ struct i40e_udp_port_config {u8 filter_index; }; -#define I40_DDP_FLASH_REGION 100 -#define I40E_PROFILE_INFO_SIZE 48 -#define I40E_MAX_PROFILE_NUM 16 -#define I40E_PROFILE_LIST_SIZE \ - (I40E_PROFILE_INFO_SIZE * I40E_MAX_PROFILE_NUM + 4) -#define I40E_DDP_PROFILE_PATH "intel/i40e/ddp/" -#define I40E_DDP_PROFILE_NAME_MAX 64 - -int i40e_ddp_load (struct net_device *netdev,const u8 *data,size_t size, -bool is_add); -int i40e_ddp_flash (struct net_device *netdev,struct ethtool_flash *flash); - -struct i40e_ddp_profile_list { -u32 p_count; -struct i40e_profile_info p_info[]; -}; - -struct i40e_ddp_old_profile_list { -struct list_head list; -size_t old_ddp_size; -u8 old_ddp_buf[]; -}; -/* macros related to FLX_PIT */ #define I40E_FLEX_SET_FSIZE (fsize) (((fsize) << \ I40E_PRTQF_FLX_PIT_FSIZE_SHIFT) & \
drivers/net/ethernet/intel/i40e/i40e_ddp.c +20 -2
@@ -4,6 +4,24 @@#include <linux/firmware.h> #include "i40e.h" +#define I40_DDP_FLASH_REGION 100 +#define I40E_PROFILE_INFO_SIZE 48 +#define I40E_MAX_PROFILE_NUM 16 +#define I40E_PROFILE_LIST_SIZE \ + (I40E_PROFILE_INFO_SIZE * I40E_MAX_PROFILE_NUM + 4) +#define I40E_DDP_PROFILE_PATH "intel/i40e/ddp/" +#define I40E_DDP_PROFILE_NAME_MAX 64 + +struct i40e_ddp_profile_list { +u32 p_count; +struct i40e_profile_info p_info[]; +}; + +struct i40e_ddp_old_profile_list { +struct list_head list; +size_t old_ddp_size; +u8 old_ddp_buf[]; +};/** * i40e_ddp_profiles_eq - checks if DDP profiles are the equivalent
@@ -261,8 +279,8 @@ static bool i40e_ddp_is_pkg_hdr_valid(struct net_device *netdev,* Checks correctness and loads DDP profile to the NIC. The function is * also used for rolling back previously loaded profile. **/ -int i40e_ddp_load (struct net_device *netdev,const u8 *data,size_t size, -bool is_add) +static int i40e_ddp_load (struct net_device *netdev,const u8 *data,size_t size, +bool is_add) {u8 profile_info_sec[sizeof (struct i40e_profile_section_header ) +sizeof (struct i40e_profile_info )];
drivers/net/ethernet/intel/i40e/i40e_prototype.h +5 -0
@@ -4,6 +4,7 @@#ifndef _I40E_PROTOTYPE_H_#define _I40E_PROTOTYPE_H_ +#include <linux/ethtool.h> #include <linux/avf/virtchnl.h> #include "i40e_debug.h" #include "i40e_type.h"
@@ -497,4 +498,8 @@ int i40e_add_pinfo_to_list(struct i40e_hw *hw, struct i40e_profile_segment *profile, u8 *profile_info_sec, u32 track_id); + +/* i40e_ddp */ +int i40e_ddp_flash (struct net_device *netdev,struct ethtool_flash *flash); +#endif /* _I40E_PROTOTYPE_H_ */
Signature · 1 line
2.41.0
RE: [Intel-wired-lan] [PATCH net-next v2 9/9] i40e: Move DDP specific macros and structures to i40e_ddp.c
Quoted 12 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ivan Vecera
Sent: Wednesday, September 27, 2023 2:02 PM
To: [email protected]
Cc: [email protected]; [email protected]; Brandeburg, Jesse <[email protected]>; [email protected]; Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [Intel-wired-lan] [PATCH net-next v2 9/9] i40e: Move DDP specific macros and structures toi40e_ddp.cMove several DDP related macros and structures from
i40e.hheader toi40e_ddp.cwhere are privately used. Make statici40e_ddp_load()function that is also used only ini40e_ddpand move declaration ofi40e_ddp_flash()used byi40e_ethtool.ctoi40e_prototype.h
Quoted 7 lines
Signed-off-by Ivan Vecera <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e.h | 24 ------------------- drivers/net/ethernet/intel/i40e/i40e_ddp.c | 22 +++++++++++++++-- .../net/ethernet/intel/i40e/i40e_prototype.h | 5 ++++ 3 files changed, 25 insertions(+), 26 deletions(-)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 51 lines · Ivan Vecera
The series makes some house-keeping tasks on i40e driver:
Patch 1: Removes unnecessary back pointer from
i40e_hwPatch 2: MovesI40E_MASKmacro toi40e_register.hwhere is used Patch 3: Refactors I40E_MDIO_CLAUSE* to use the common macro Patch 4: Add header dependencies to <linux/avf/virtchnl.h> Patch 5: Simplifies memory alloction functions
Patch 6: Moves mem alloc structures toi40e_alloc.hPatch 7: Splitsi40e_osdep.htoi40e_debug.handi40e_io.hPatch 8: Removes circular header deps, fixes and cleans headers Patch 9: Moves DDP specific macros and structs toi40e_ddp.cChanges:
v2 - Fixed kdoc comment fori40e_hw_to_pf()
- Reordered patches 5 and 7-9 to make them simplierdrivers/net/ethernet/intel/i40e/i40e.h | 76 +++++-------------- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 8 +- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 3 +- .../net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 + drivers/net/ethernet/intel/i40e/i40e_alloc.h | 24 +++--- 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 | 24 +++++- drivers/net/ethernet/intel/i40e/i40e_debug.h | 47 ++++++++++++ .../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 | 16 ++-- drivers/net/ethernet/intel/i40e/i40e_hmc.h | 4 + drivers/net/ethernet/intel/i40e/i40e_io.h | 16 ++++ .../net/ethernet/intel/i40e/i40e_lan_hmc.c | 9 +-- .../net/ethernet/intel/i40e/i40e_lan_hmc.h | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 57 ++++++++------ drivers/net/ethernet/intel/i40e/i40e_nvm.c | 2 + drivers/net/ethernet/intel/i40e/i40e_osdep.h | 59 -------------- .../net/ethernet/intel/i40e/i40e_prototype.h | 9 ++- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +- .../net/ethernet/intel/i40e/i40e_register.h | 5 ++ 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 | 59 +++----------- .../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 + include/linux/avf/virtchnl.h | 4 + 34 files changed, 231 insertions(+), 251 deletions(-)
Quoted 4 lines
create mode 100644
drivers/net/ethernet/intel/i40e/i40e_debug.hcreate mode 100644drivers/net/ethernet/intel/i40e/i40e_io.hdelete mode 100644drivers/net/ethernet/intel/i40e/i40e_osdep.h
Thank you!
Quoted 12 lines · Ivan Vecera
The series makes some house-keeping tasks on i40e driver:
Patch 1: Removes unnecessary back pointer from
i40e_hwPatch 2: MovesI40E_MASKmacro toi40e_register.hwhere is used Patch 3: Refactors I40E_MDIO_CLAUSE* to use the common macro Patch 4: Add header dependencies to <linux/avf/virtchnl.h> Patch 5: Simplifies memory alloction functions
Patch 6: Moves mem alloc structures toi40e_alloc.hPatch 7: Splitsi40e_osdep.htoi40e_debug.handi40e_io.hPatch 8: Removes circular header deps, fixes and cleans headers Patch 9: Moves DDP specific macros and structs toi40e_ddp.c
Quoted 3 lines
Changes:
v2 - Fixed kdoc comment fori40e_hw_to_pf()
- Reordered patches 5 and 7-9 to make them simplier
spelling: simpler
Thanks for this cleanup series, the changes all seem sane.
Jakub Kicinski
maintainerQuoted 17 lines · On Thu, 28 Sep 2023 15:12:09 -0700 Jesse Brandeburg wrote:
Quoted 12 lines · Ivan Vecera
The series makes some house-keeping tasks on i40e driver:
Patch 1: Removes unnecessary back pointer from
i40e_hwPatch 2: MovesI40E_MASKmacro toi40e_register.hwhere is used Patch 3: Refactors I40E_MDIO_CLAUSE* to use the common macro Patch 4: Add header dependencies to <linux/avf/virtchnl.h> Patch 5: Simplifies memory alloction functions
Patch 6: Moves mem alloc structures toi40e_alloc.hPatch 7: Splitsi40e_osdep.htoi40e_debug.handi40e_io.hPatch 8: Removes circular header deps, fixes and cleans headers Patch 9: Moves DDP specific macros and structs toi40e_ddp.cQuoted 3 lines
Changes:
v2 - Fixed kdoc comment fori40e_hw_to_pf()
- Reordered patches 5 and 7-9 to make them simplier
Quoted 5 lines
spelling: simpler
Thanks for this cleanup series, the changes all seem sane.
Reviewed-by Jesse Brandeburg <[email protected]>
I'm marking as "awaiting upstream" but feel free to ask for these to be applied directly to net-next if you prefer.
Signature · 1 line
pw-bot: au
A message that is not in the archive (sent off-list or not yet received): BL3PR11MB6435BA551F4D1F52BAD37CC1C6C2A@BL3PR11MB6435.namprd11.prod.outlook.com
Loktionov, Aleksandr
Reviewed-byQuoted 18 lines
-----Original Message-----
From: Nguyen, Anthony L <[email protected]>
Sent: Wednesday, September 27, 2023 11:27 PM
To: Loktionov, Aleksandr <[email protected]>
Cc: Kung, Thomas C <[email protected]>; Pepiak, Leszek <[email protected]>
Subject: FW: [PATCH net-next v2 0/9] i40e: House-keeping and clean-upHi Alex,
Upstream patches from RedHat.
https://lore.kernel.org/intel-wired-lan/f6c4a6d8-0c3f-dbb1-17ca-
[email protected]/T/#m36e9b05728a05056ed678112ecf2e3e6250e17a d
Quoted 75 lines
If there are issues/changes you'd like made, please reply to the patches. Otherwise, I'll apply them tomorrow.
Thanks,
TonyQuoted 69 lines
-----Original Message-----
From: Ivan Vecera <[email protected]>
Sent: Wednesday, September 27, 2023 1:31 AM
To: [email protected]
Cc: poros <[email protected]>; mschmidt <[email protected]>; Brandeburg, Jesse <[email protected]>; Nguyen, Anthony L <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Kitszel, Przemyslaw <[email protected]>
Subject: [PATCH net-next v2 0/9] i40e: House-keeping and clean-upThe series makes some house-keeping tasks on i40e driver:
Patch 1: Removes unnecessary back pointer from
i40e_hwPatch 2: MovesI40E_MASKmacro toi40e_register.hwhere is used Patch 3: Refactors I40E_MDIO_CLAUSE* to use the common macro Patch 4: Add header dependencies to <linux/avf/virtchnl.h> Patch 5: Simplifies memory alloction functions Patch 6: Moves mem alloc structures toi40e_alloc.hPatch 7: Splitsi40e_osdep.htoi40e_debug.handi40e_io.hPatch 8: Removes circular header deps, fixes and cleans headers Patch 9: Moves DDP specific macros and structs toi40e_ddp.cChanges:
v2 - Fixed kdoc comment fori40e_hw_to_pf()
- Reordered patches 5 and 7-9 to make them simplierdrivers/net/ethernet/intel/i40e/i40e.h | 76 +++++-------------- drivers/net/ethernet/intel/i40e/i40e_adminq.c | 8 +- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 3 +- .../net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 + drivers/net/ethernet/intel/i40e/i40e_alloc.h | 24 +++--- 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 | 24 +++++- drivers/net/ethernet/intel/i40e/i40e_debug.h | 47 ++++++++++++ .../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 | 16 ++-- drivers/net/ethernet/intel/i40e/i40e_hmc.h | 4 + drivers/net/ethernet/intel/i40e/i40e_io.h | 16 ++++ .../net/ethernet/intel/i40e/i40e_lan_hmc.c | 9 +-- .../net/ethernet/intel/i40e/i40e_lan_hmc.h | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 57 ++++++++------ drivers/net/ethernet/intel/i40e/i40e_nvm.c | 2 + drivers/net/ethernet/intel/i40e/i40e_osdep.h | 59 -------------- .../net/ethernet/intel/i40e/i40e_prototype.h | 9 ++- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +- .../net/ethernet/intel/i40e/i40e_register.h | 5 ++ 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 | 59 +++----------- .../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 + include/linux/avf/virtchnl.h | 4 + 34 files changed, 231 insertions(+), 251 deletions(-) create mode 100644 drivers/net/ethernet/intel/i40e/i40e_debug.h create mode 100644 drivers/net/ethernet/intel/i40e/i40e_io.h delete mode 100644 drivers/net/ethernet/intel/i40e/i40e_osdep.h--
2.41.0
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan