rename and shrink i40evf
Subsystems (4)
v2 cover rename and shrink i40evf
This series contains changes to i40evf so that it becomes a more generic virtual function driver for current and future silicon.
While doing the rename of i40evf to a more generic name of iavf, we also put the driver on a severe diet due to how much of the code was unneeded or was unused. The outcome is a lean and mean virtual function driver that continues to work on existing 40GbE (i40e) virtual devices and prepped for future supported devices, like the 100GbE (ice) virtual devices.
This solves 2 issues we saw coming or were already present, the first was constant code duplication happening with i40e/i40evf, when much of the duplicate code in the i40evf was not used or was not needed. The second was to remove the future confusion of why future VF devices that were not considered "40GbE" only devices were supported by i40evf.
The thought is that iavf will be the virtual function driver for all future devices, so it should have a "generic" name to properly represent that it is the VF driver for multiple generations of devices.
The last patch in this series is unreleated to the iavf conversion and just has to do with a MODULE_LICENSE correction.
Known Caveats:
Existing user space configurations may have to change, but the module alias in patch 1 helps a bit here.
---
NOTE: This series is compile tested, but needs more testing before
commit. I expect it will go through Jeff's regular intel-wired-lan process.
v2: first non-RFC version, updated Kconfig migration in patch 1
v1: initial RFC
Jesse Brandeburg (14):
intel-ethernet: rename i40evf to iavf
iavf: diet and reformat
iavf: rename functions and structs to new name
iavf: rename i40e_status to iavf_status
iavf: move i40evf files to new name
iavf: remove references to old names
iavf: rename device ID defines
iavf: rename I40E_ADMINQ_DESC
iavf: rename i40e_hw to iavf_hw
iavf: replace i40e_debug with iavf version
iavf: tracing infrastructure rename
iavf: rename most of i40e strings
iavf: finish renaming files to iavf
intel-ethernet: use correct module license
Documentation/networking/00-INDEX | 4 +-
Documentation/networking/{i40evf.txt => iavf.txt} | 16 +-
MAINTAINERS | 2 +-
drivers/net/ethernet/intel/Kconfig | 15 +-
drivers/net/ethernet/intel/Makefile | 2 +-
drivers/net/ethernet/intel/e100.c | 2 +-
drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +-
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
drivers/net/ethernet/intel/i40evf/i40e_devids.h | 34 -
drivers/net/ethernet/intel/i40evf/i40e_hmc.h | 215 --
drivers/net/ethernet/intel/i40evf/i40e_lan_hmc.h | 158 --
drivers/net/ethernet/intel/i40evf/i40e_register.h | 313 ---
.../net/ethernet/intel/{i40evf => iavf}/Makefile | 11 +-
.../ethernet/intel/{i40evf => iavf}/i40e_adminq.c | 309 ++-
.../ethernet/intel/{i40evf => iavf}/i40e_adminq.h | 35 +-
.../intel/{i40evf => iavf}/i40e_adminq_cmd.h | 2281 +-------------------
.../intel/{i40evf/i40evf.h => iavf/iavf.h} | 407 ++--
.../{i40evf/i40e_alloc.h => iavf/iavf_alloc.h} | 47 +-
.../{i40evf/i40evf_client.c => iavf/iavf_client.c} | 200 +-
.../{i40evf/i40evf_client.h => iavf/iavf_client.h} | 30 +-
.../{i40evf/i40e_common.c => iavf/iavf_common.c} | 1105 ++++------
drivers/net/ethernet/intel/iavf/iavf_devids.h | 12 +
.../i40evf_ethtool.c => iavf/iavf_ethtool.c} | 510 +++--
.../{i40evf/i40evf_main.c => iavf/iavf_main.c} | 1688 ++++++++-------
.../{i40evf/i40e_osdep.h => iavf/iavf_osdep.h} | 28 +-
.../i40e_prototype.h => iavf/iavf_prototype.h} | 147 +-
drivers/net/ethernet/intel/iavf/iavf_register.h | 68 +
.../{i40evf/i40e_status.h => iavf/iavf_status.h} | 8 +-
.../{i40evf/i40e_trace.h => iavf/iavf_trace.h} | 86 +-
.../intel/{i40evf/i40e_txrx.c => iavf/iavf_txrx.c} | 804 +++----
.../intel/{i40evf/i40e_txrx.h => iavf/iavf_txrx.h} | 359 ++-
.../intel/{i40evf/i40e_type.h => iavf/iavf_type.h} | 1604 ++++----------
.../i40evf_virtchnl.c => iavf/iavf_virtchnl.c} | 501 +++--
drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
drivers/net/ethernet/intel/igbvf/netdev.c | 2 +-
drivers/net/ethernet/intel/ixgb/ixgb_main.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +-
41 files changed, 3440 insertions(+), 7581 deletions(-)
rename Documentation/networking/{i40evf.txt => iavf.txt} (72%)
delete mode 100644 drivers/net/ethernet/intel/i40evf/i40e_devids.h
delete mode 100644 drivers/net/ethernet/intel/i40evf/i40e_hmc.h
delete mode 100644 drivers/net/ethernet/intel/i40evf/i40e_lan_hmc.h
delete mode 100644 drivers/net/ethernet/intel/i40evf/i40e_register.h
rename drivers/net/ethernet/intel/{i40evf => iavf}/Makefile (38%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_adminq.c (74%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_adminq.h (82%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_adminq_cmd.h (22%)
rename drivers/net/ethernet/intel/{i40evf/i40evf.h => iavf/iavf.h} (37%)
rename drivers/net/ethernet/intel/{i40evf/i40e_alloc.h => iavf/iavf_alloc.h} (16%)
rename drivers/net/ethernet/intel/{i40evf/i40evf_client.c => iavf/iavf_client.c} (66%)
rename drivers/net/ethernet/intel/{i40evf/i40evf_client.h => iavf/iavf_client.h} (87%)
rename drivers/net/ethernet/intel/{i40evf/i40e_common.c => iavf/iavf_common.c} (37%)
create mode 100644 drivers/net/ethernet/intel/iavf/iavf_devids.h
rename drivers/net/ethernet/intel/{i40evf/i40evf_ethtool.c => iavf/iavf_ethtool.c} (59%)
rename drivers/net/ethernet/intel/{i40evf/i40evf_main.c => iavf/iavf_main.c} (63%)
rename drivers/net/ethernet/intel/{i40evf/i40e_osdep.h => iavf/iavf_osdep.h} (56%)
rename drivers/net/ethernet/intel/{i40evf/i40e_prototype.h => iavf/iavf_prototype.h} (10%)
create mode 100644 drivers/net/ethernet/intel/iavf/iavf_register.h
rename drivers/net/ethernet/intel/{i40evf/i40e_status.h => iavf/iavf_status.h} (95%)
rename drivers/net/ethernet/intel/{i40evf/i40e_trace.h => iavf/iavf_trace.h} (66%)
rename drivers/net/ethernet/intel/{i40evf/i40e_txrx.c => iavf/iavf_txrx.c} (72%)
rename drivers/net/ethernet/intel/{i40evf/i40e_txrx.h => iavf/iavf_txrx.h} (52%)
rename drivers/net/ethernet/intel/{i40evf/i40e_type.h => iavf/iavf_type.h} (12%)
rename drivers/net/ethernet/intel/{i40evf/i40evf_virtchnl.c => iavf/iavf_virtchnl.c} (73%)Signature · 1 line
2.14.4
PATCH v2 1/14 intel-ethernet: rename i40evf to iavf
Rename the Intel Ethernet Adaptive Virtual Function driver (i40evf) to a new name (iavf) that is more consistent with the ongoing maintenance of the driver as the universal VF driver for multiple product lines.
This first patch fixes up the directory names and the .ko name, intentionally ignoring the function names inside the driver for now. Basically this is the simplest patch that gets the rename done and will be followed by other patches that rename the internal functions.
This patch also addresses a couple of string/name issues and updates the Copyright year.
Also, made sure to add a MODULE_ALIAS to the old name.
---
v2: add Kconfig migration as suggested by davem
---
Documentation/networking/00-INDEX | 4 ++--
Documentation/networking/{i40evf.txt => iavf.txt} | 16 +++++++++-------
MAINTAINERS | 2 +-
drivers/net/ethernet/intel/Kconfig | 15 +++++++++++----
drivers/net/ethernet/intel/Makefile | 2 +-
drivers/net/ethernet/intel/{i40evf => iavf}/Makefile | 11 +++++------
.../net/ethernet/intel/{i40evf => iavf}/i40e_adminq.c | 0
.../net/ethernet/intel/{i40evf => iavf}/i40e_adminq.h | 0
.../ethernet/intel/{i40evf => iavf}/i40e_adminq_cmd.h | 0
drivers/net/ethernet/intel/{i40evf => iavf}/i40e_alloc.h | 0
.../net/ethernet/intel/{i40evf => iavf}/i40e_common.c | 0
.../net/ethernet/intel/{i40evf => iavf}/i40e_devids.h | 0
drivers/net/ethernet/intel/{i40evf => iavf}/i40e_hmc.h | 0
.../net/ethernet/intel/{i40evf => iavf}/i40e_lan_hmc.h | 0
drivers/net/ethernet/intel/{i40evf => iavf}/i40e_osdep.h | 0
.../net/ethernet/intel/{i40evf => iavf}/i40e_prototype.h | 0
.../net/ethernet/intel/{i40evf => iavf}/i40e_register.h | 0
.../net/ethernet/intel/{i40evf => iavf}/i40e_status.h | 0
drivers/net/ethernet/intel/{i40evf => iavf}/i40e_trace.h | 0
drivers/net/ethernet/intel/{i40evf => iavf}/i40e_txrx.c | 0
drivers/net/ethernet/intel/{i40evf => iavf}/i40e_txrx.h | 0
drivers/net/ethernet/intel/{i40evf => iavf}/i40e_type.h | 0
drivers/net/ethernet/intel/{i40evf => iavf}/i40evf.h | 0
.../net/ethernet/intel/{i40evf => iavf}/i40evf_client.c | 0
.../net/ethernet/intel/{i40evf => iavf}/i40evf_client.h | 0
.../net/ethernet/intel/{i40evf => iavf}/i40evf_ethtool.c | 0
.../net/ethernet/intel/{i40evf => iavf}/i40evf_main.c | 7 ++++---
.../ethernet/intel/{i40evf => iavf}/i40evf_virtchnl.c | 0
28 files changed, 33 insertions(+), 24 deletions(-)
rename Documentation/networking/{i40evf.txt => iavf.txt} (72%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/Makefile (37%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_adminq.c (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_adminq.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_adminq_cmd.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_alloc.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_common.c (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_devids.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_hmc.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_lan_hmc.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_osdep.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_prototype.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_register.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_status.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_trace.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_txrx.c (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_txrx.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40e_type.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40evf.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40evf_client.c (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40evf_client.h (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40evf_ethtool.c (100%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40evf_main.c (99%)
rename drivers/net/ethernet/intel/{i40evf => iavf}/i40evf_virtchnl.c (100%)Documentation/networking/00-INDEX +2 -2
@@ -94,8 +94,8 @@ gianfar.txt - Gianfar Ethernet Driver. i40e.txt - README for the Intel Ethernet Controller XL710 Driver (i40e). -i40evf.txt - - Short note on the Driver for the Intel(R) XL710 X710 Virtual Function +iavf.txt + - README for the Intel Ethernet Adaptive Virtual Function Driver (iavf). ieee802154.txt - Linux IEEE 802.15.4 implementation, API and drivers igb.txt
Documentation/networking/iavf.txt renamed from Documentation/networking/i40evf.txt +9 -7
@@ -2,7 +2,7 @@ Linux* Base Driver for Intel(R) Network Connection ================================================== Intel Ethernet Adaptive Virtual Function Linux driver. -Copyright(c) 2013-2017 Intel Corporation. +Copyright(c) 2013-2018 Intel Corporation. Contents ========
@@ -11,20 +11,21 @@ Contents - Known Issues/Troubleshooting - Support -This file describes the i40evf Linux* Base Driver. +This file describes the iavf Linux* Base Driver. This driver +was formerly called i40evf. -The i40evf driver supports the below mentioned virtual function +The iavf driver supports the below mentioned virtual function devices and can only be activated on kernels running the i40e or newer Physical Function (PF) driver compiled with CONFIG_PCI_IOV. -The i40evf driver requires CONFIG_PCI_MSI to be enabled. +The iavf driver requires CONFIG_PCI_MSI to be enabled. -The guest OS loading the i40evf driver must support MSI-X interrupts. +The guest OS loading the iavf driver must support MSI-X interrupts. Supported Hardware ================== Intel XL710 X710 Virtual Function -Intel Ethernet Adaptive Virtual Function Intel X722 Virtual Function +Intel Ethernet Adaptive Virtual Function Identifying Your Adapter ========================
@@ -32,7 +33,8 @@ Identifying Your Adapter For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: - http://support.intel.com/support/go/network/adapter/idguide.htm + https://www.intel.com/content/www/us/en/support/articles/000005584/network-and-i-o/ethernet-products.html + Known Issues/Troubleshooting ============================
MAINTAINERS +1 -1
@@ -7332,7 +7332,7 @@ F: Documentation/networking/ixgb.txt F: Documentation/networking/ixgbe.txt F: Documentation/networking/ixgbevf.txt F: Documentation/networking/i40e.txt -F: Documentation/networking/i40evf.txt +F: Documentation/networking/iavf.txt F: Documentation/networking/ice.txt F: drivers/net/ethernet/intel/ F: drivers/net/ethernet/intel/*/
drivers/net/ethernet/intel/Kconfig +11 -4
@@ -235,20 +235,27 @@ config I40E_DCB If unsure, say N. +# this is here to allow seamless migration from I40EVF --> IAVF name +# so that CONFIG_IAVF symbol will always mirror the state of CONFIG_I40EVF +config IAVF + tristate config I40EVF tristate "Intel(R) Ethernet Adaptive Virtual Function support" + select IAVF depends on PCI_MSI ---help--- This driver supports virtual functions for Intel XL710, - X710, X722, and all devices advertising support for Intel - Ethernet Adaptive Virtual Function devices. For more + X710, X722, XXV710, and all devices advertising support for + Intel Ethernet Adaptive Virtual Function devices. For more information on how to identify your adapter, go to the Adapter & Driver ID Guide that can be located at: - <http://support.intel.com> + <https://support.intel.com> + + This driver was formerly named i40evf. To compile this driver as a module, choose M here. The module - will be called i40evf. MSI-X interrupt support is required + will be called iavf. MSI-X interrupt support is required for this driver to work correctly. config ICE
drivers/net/ethernet/intel/Makefile +1 -1
@@ -12,6 +12,6 @@ obj-$(CONFIG_IXGBE) += ixgbe/ obj-$(CONFIG_IXGBEVF) += ixgbevf/ obj-$(CONFIG_I40E) += i40e/ obj-$(CONFIG_IXGB) += ixgb/ -obj-$(CONFIG_I40EVF) += i40evf/ +obj-$(CONFIG_IAVF) += iavf/ obj-$(CONFIG_FM10K) += fm10k/ obj-$(CONFIG_ICE) += ice/
drivers/net/ethernet/intel/iavf/Makefile renamed from drivers/net/ethernet/intel/i40evf/Makefile +5 -6
@@ -1,16 +1,15 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright(c) 2013 - 2018 Intel Corporation. - # -## Makefile for the Intel(R) 40GbE VF driver +# Makefile for the Intel(R) Ethernet Adaptive Virtual Function (iavf) +# driver # # ccflags-y += -I$(src) subdir-ccflags-y += -I$(src) -obj-$(CONFIG_I40EVF) += i40evf.o - -i40evf-objs := i40evf_main.o i40evf_ethtool.o i40evf_virtchnl.o \ - i40e_txrx.o i40e_common.o i40e_adminq.o i40evf_client.o +obj-$(CONFIG_IAVF) += iavf.o +iavf-objs := i40evf_main.o i40evf_ethtool.o i40evf_virtchnl.o \ + i40e_txrx.o i40e_common.o i40e_adminq.o i40evf_client.o
drivers/net/ethernet/intel/iavf/i40e_adminq.c renamed from drivers/net/ethernet/intel/i40evf/i40e_adminq.c +0 -0
drivers/net/ethernet/intel/iavf/i40e_adminq.h renamed from drivers/net/ethernet/intel/i40evf/i40e_adminq.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h renamed from drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_alloc.h renamed from drivers/net/ethernet/intel/i40evf/i40e_alloc.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_common.c renamed from drivers/net/ethernet/intel/i40evf/i40e_common.c +0 -0
drivers/net/ethernet/intel/iavf/i40e_devids.h renamed from drivers/net/ethernet/intel/i40evf/i40e_devids.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_hmc.h renamed from drivers/net/ethernet/intel/i40evf/i40e_hmc.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_lan_hmc.h renamed from drivers/net/ethernet/intel/i40evf/i40e_lan_hmc.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_osdep.h renamed from drivers/net/ethernet/intel/i40evf/i40e_osdep.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_prototype.h renamed from drivers/net/ethernet/intel/i40evf/i40e_prototype.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_register.h renamed from drivers/net/ethernet/intel/i40evf/i40e_register.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_status.h renamed from drivers/net/ethernet/intel/i40evf/i40e_status.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_trace.h renamed from drivers/net/ethernet/intel/i40evf/i40e_trace.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_txrx.c renamed from drivers/net/ethernet/intel/i40evf/i40e_txrx.c +0 -0
drivers/net/ethernet/intel/iavf/i40e_txrx.h renamed from drivers/net/ethernet/intel/i40evf/i40e_txrx.h +0 -0
drivers/net/ethernet/intel/iavf/i40e_type.h renamed from drivers/net/ethernet/intel/i40evf/i40e_type.h +0 -0
drivers/net/ethernet/intel/iavf/i40evf.h renamed from drivers/net/ethernet/intel/i40evf/i40evf.h +0 -0
drivers/net/ethernet/intel/iavf/i40evf_client.c renamed from drivers/net/ethernet/intel/i40evf/i40evf_client.c +0 -0
drivers/net/ethernet/intel/iavf/i40evf_client.h renamed from drivers/net/ethernet/intel/i40evf/i40evf_client.h +0 -0
drivers/net/ethernet/intel/iavf/i40evf_ethtool.c renamed from drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c +0 -0
drivers/net/ethernet/intel/iavf/i40evf_main.c renamed from drivers/net/ethernet/intel/i40evf/i40evf_main.c +4 -3
@@ -17,20 +17,20 @@ static int i40evf_close(struct net_device *netdev);char i40evf_driver_name[] ="i40evf" ;static const char i40evf_driver_string[] = -"Intel(R) 40-10 Gigabit Virtual Function Network Driver" ; +"Intel(R) Ethernet Adaptive Virtual Function Network Driver" ;#define DRV_KERN "-k"#define DRV_VERSION_MAJOR 3#define DRV_VERSION_MINOR 2 -#define DRV_VERSION_BUILD 2 +#define DRV_VERSION_BUILD 3#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ __stringify(DRV_VERSION_MINOR) "." \ __stringify(DRV_VERSION_BUILD) \ DRV_KERNconst char i40evf_driver_version[] =DRV_VERSION ;static const char i40evf_copyright[] = -"Copyright (c) 2013 - 2015 Intel Corporation." ; +"Copyright (c) 2013 - 2018 Intel Corporation." ;/* i40evf_pci_tbl - PCI Device ID Table *
@@ -51,6 +51,7 @@ static const struct pci_device_id i40evf_pci_tbl[] = {MODULE_DEVICE_TABLE (pci, i40evf_pci_tbl); +MODULE_ALIAS ("i40evf" );MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) XL710 X710 Virtual Function Network Driver" );MODULE_LICENSE ("GPL" );
drivers/net/ethernet/intel/iavf/i40evf_virtchnl.c renamed from drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c +0 -0
Signature · 1 line
2.14.4
PATCH v2 2/14 iavf: diet and reformat
In reply to Jesse BrandeburgRemove a bunch of unused code and reformat a few lines. Also remove some now un-necessary files.
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 27 - drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h | 2277 +-------------------- drivers/net/ethernet/intel/iavf/i40e_common.c | 337 --- drivers/net/ethernet/intel/iavf/i40e_hmc.h | 215 -- drivers/net/ethernet/intel/iavf/i40e_lan_hmc.h | 158 -- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 65 +- drivers/net/ethernet/intel/iavf/i40e_register.h | 245 --- drivers/net/ethernet/intel/iavf/i40e_type.h | 783 +------ 8 files changed, 50 insertions(+), 4057 deletions(-) delete mode 100644 drivers/net/ethernet/intel/iavf/i40e_hmc.h delete mode 100644 drivers/net/ethernet/intel/iavf/i40e_lan_hmc.h
drivers/net/ethernet/intel/iavf/i40e_adminq.c +0 -27
@@ -7,16 +7,6 @@#include "i40e_adminq.h" #include "i40e_prototype.h" -/** -* i40e_is_nvm_update_op - return true if this is an NVM update operation -* @desc: API request descriptor -**/ -static inline bool i40e_is_nvm_update_op (struct i40e_aq_desc *desc) -{ -return (desc->opcode == i40e_aqc_opc_nvm_erase) || - (desc->opcode == i40e_aqc_opc_nvm_update); -} -/** * i40e_adminq_init_regs - Initialize AdminQ registers * @hw: pointer to the hardware structure
@@ -569,9 +559,6 @@ i40e_status i40evf_shutdown_adminq(struct i40e_hw *hw)i40e_shutdown_asq (hw);i40e_shutdown_arq (hw); -if (hw->nvm_buff.va) -i40e_free_virt_mem (hw, &hw->nvm_buff); -return ret_code; }
@@ -951,17 +938,3 @@ i40e_status i40evf_clean_arq_element(struct i40e_hw *hw,return ret_code; } - -void i40evf_resume_aq (struct i40e_hw *hw) -{ -/* Registers are reset after PF reset */ - hw->aq.asq.next_to_use =0 ; - hw->aq.asq.next_to_clean =0 ; - -i40e_config_asq_regs (hw); - - hw->aq.arq.next_to_use =0 ; - hw->aq.arq.next_to_clean =0 ; - -i40e_config_arq_regs (hw); -}
drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h +44 -2233
2,324 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_common.c +0 -337
346 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_hmc.h deleted +0 -215
215 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_lan_hmc.h deleted +0 -158
73 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_prototype.h +3 -62
65 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_register.h +0 -245
245 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_type.h +3 -780
783 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.14.4
Part of the diff is not shown here. View the raw message.
PATCH v2 3/14 iavf: rename functions and structs to new name
In reply to Jesse BrandeburgThis basically begins the internal portion of the rename of i40evf to iavf, by renaming many of the functions, structs, variables and defines.
Most of the changes were made mechanically, which introduces some alignment issues.
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 38 +- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 3 +- drivers/net/ethernet/intel/iavf/i40e_common.c | 89 +- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 12 +- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 40 +- drivers/net/ethernet/intel/iavf/i40e_trace.h | 26 +- drivers/net/ethernet/intel/iavf/i40e_txrx.c | 94 +- drivers/net/ethernet/intel/iavf/i40e_txrx.h | 36 +- drivers/net/ethernet/intel/iavf/i40evf.h | 362 +++--- drivers/net/ethernet/intel/iavf/i40evf_client.c | 184 +-- drivers/net/ethernet/intel/iavf/i40evf_client.h | 30 +- drivers/net/ethernet/intel/iavf/i40evf_ethtool.c | 364 +++--- drivers/net/ethernet/intel/iavf/i40evf_main.c | 1424 ++++++++++----------- drivers/net/ethernet/intel/iavf/i40evf_virtchnl.c | 402 +++--- 14 files changed, 1550 insertions(+), 1554 deletions(-)
drivers/net/ethernet/intel/iavf/i40e_adminq.c +19 -19
@@ -495,7 +495,7 @@ static i40e_status i40e_shutdown_arq(struct i40e_hw *hw) }/** -* i40evf_init_adminq - main initialization routine for Admin Queue +* iavf_init_adminq - main initialization routine for Admin Queue * @hw: pointer to the hardware structure * * Prior to calling this function, drivers *MUST* set the following fields
@@ -505,7 +505,7 @@ static i40e_status i40e_shutdown_arq(struct i40e_hw *hw)* - hw->aq.arq_buf_size * - hw->aq.asq_buf_size **/ -i40e_status i40evf_init_adminq (struct i40e_hw *hw) +i40e_status iavf_init_adminq (struct i40e_hw *hw) {i40e_status ret_code;
@@ -546,15 +546,15 @@ i40e_status i40evf_init_adminq(struct i40e_hw *hw) }/** -* i40evf_shutdown_adminq - shutdown routine for the Admin Queue +* iavf_shutdown_adminq - shutdown routine for the Admin Queue * @hw: pointer to the hardware structure **/ -i40e_status i40evf_shutdown_adminq (struct i40e_hw *hw) +i40e_status iavf_shutdown_adminq (struct i40e_hw *hw) {i40e_status ret_code =0 ; -if (i40evf_check_asq_alive (hw)) -i40evf_aq_queue_shutdown (hw, true); +if (iavf_check_asq_alive (hw)) +iavf_aq_queue_shutdown (hw, true);i40e_shutdown_asq (hw);i40e_shutdown_arq (hw);
@@ -604,13 +604,13 @@ static u16 i40e_clean_asq(struct i40e_hw *hw) }/** -* i40evf_asq_done - check if FW has processed the Admin Send Queue +* iavf_asq_done - check if FW has processed the Admin Send Queue * @hw: pointer to the hw struct * * Returns true if the firmware has processed all descriptors on the * admin send queue. Returns false if there are still requests pending. **/ -bool i40evf_asq_done (struct i40e_hw *hw) +bool iavf_asq_done (struct i40e_hw *hw) {/* AQ designers suggest use of head for better * timing reliability than DD bit
@@ -620,7 +620,7 @@ bool i40evf_asq_done(struct i40e_hw *hw) }/** -* i40evf_asq_send_command - send command to Admin Queue +* iavf_asq_send_command - send command to Admin Queue * @hw: pointer to the hw struct * @desc: prefilled descriptor describing the command (non DMA mem) * @buff: buffer to use for indirect commands
@@ -630,7 +630,7 @@ bool i40evf_asq_done(struct i40e_hw *hw)* This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -i40e_status i40evf_asq_send_command(struct i40e_hw *hw, +i40e_status iavf_asq_send_command(struct i40e_hw *hw, struct i40e_aq_desc *desc, void *buff, /* can be NULL */ u16 buff_size,
@@ -741,7 +741,7 @@ i40e_status i40evf_asq_send_command(struct i40e_hw *hw,/* bump the tail */ i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer:\n" ); -i40evf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc_on_ring, +iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc_on_ring, buff, buff_size); (hw->aq.asq.next_to_use)++;if (hw->aq.asq.next_to_use == hw->aq.asq.count)
@@ -759,7 +759,7 @@ i40e_status i40evf_asq_send_command(struct i40e_hw *hw,/* AQ designers suggest use of head for better * timing reliability than DD bit */ -if (i40evf_asq_done (hw)) +if (iavf_asq_done (hw))break ;udelay (50 ); total_delay +=50 ;
@@ -767,7 +767,7 @@ i40e_status i40evf_asq_send_command(struct i40e_hw *hw, }/* if ready, copy the desc back to temp */ -if (i40evf_asq_done (hw)) { +if (iavf_asq_done (hw)) { *desc = *desc_on_ring;if (buff !=NULL )memcpy (buff, dma_buff->va, buff_size);
@@ -793,7 +793,7 @@ i40e_status i40evf_asq_send_command(struct i40e_hw *hw,i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer writeback:\n" ); -i40evf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, buff, +iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, buff, buff_size);/* save writeback aq if requested */
@@ -820,13 +820,13 @@ i40e_status i40evf_asq_send_command(struct i40e_hw *hw, }/** -* i40evf_fill_default_direct_cmd_desc - AQ descriptor helper function +* iavf_fill_default_direct_cmd_desc - AQ descriptor helper function * @desc: pointer to the temp descriptor (non DMA mem) * @opcode: the opcode can be used to decide which flags to turn off or on * * Fill the desc with default values **/ -void i40evf_fill_default_direct_cmd_desc (struct i40e_aq_desc *desc, +void iavf_fill_default_direct_cmd_desc (struct i40e_aq_desc *desc,u16 opcode) {/* zero out the desc */
@@ -836,7 +836,7 @@ void i40evf_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc, }/** -* i40evf_clean_arq_element +* iavf_clean_arq_element * @hw: pointer to the hw struct * @e: event info from the receive descriptor, includes any buffers * @pending: number of events that could be left to process
@@ -845,7 +845,7 @@ void i40evf_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc,* the contents through e. It can also return how many events are * left to process through 'pending' **/ -i40e_status i40evf_clean_arq_element (struct i40e_hw *hw, +i40e_status iavf_clean_arq_element (struct i40e_hw *hw,struct i40e_arq_event_info *e,u16 *pending) {
@@ -902,7 +902,7 @@ i40e_status i40evf_clean_arq_element(struct i40e_hw *hw, e->msg_len);i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQRX: desc and buffer:\n" ); -i40evf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, e->msg_buf, +iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, e->msg_buf, hw->aq.arq_buf_size);/* Restore the original datalen and buffer address in the desc,
drivers/net/ethernet/intel/iavf/i40e_adminq.h +1 -2
@@ -130,7 +130,6 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)#define I40E_AQ_LARGE_BUF 512#define I40E_ASQ_CMD_TIMEOUT 250000/* usecs */ -void i40evf_fill_default_direct_cmd_desc (struct i40e_aq_desc *desc, -u16 opcode); +void iavf_fill_default_direct_cmd_desc (struct i40e_aq_desc *desc,u16 opcode);#endif /* _I40E_ADMINQ_H_ */
drivers/net/ethernet/intel/iavf/i40e_common.c +44 -45
297 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_osdep.h +6 -6
@@ -34,18 +34,18 @@ struct i40e_dma_mem { };#define i40e_allocate_dma_mem (h, m, unused, s, a) \ - i40evf_allocate_dma_mem_d(h, m, s, a) -#define i40e_free_dma_mem (h, m) i40evf_free_dma_mem_d(h, m) + iavf_allocate_dma_mem_d(h, m, s, a) +#define i40e_free_dma_mem (h, m) iavf_free_dma_mem_d(h, m)struct i40e_virt_mem {void *va;u32 size; }; -#define i40e_allocate_virt_mem (h, m, s) i40evf_allocate_virt_mem_d(h, m, s) -#define i40e_free_virt_mem (h, m) i40evf_free_virt_mem_d(h, m) +#define i40e_allocate_virt_mem (h, m, s) iavf_allocate_virt_mem_d(h, m, s) +#define i40e_free_virt_mem (h, m) iavf_free_virt_mem_d(h, m) -#define i40e_debug (h, m, s, ...) i40evf_debug_d(h, m, s, ##__VA_ARGS__) -extern void i40evf_debug_d (void *hw,u32 mask,char *fmt_str, ...) +#define i40e_debug (h, m, s, ...) iavf_debug_d(h, m, s, ##__VA_ARGS__) +extern void iavf_debug_d (void *hw,u32 mask,char *fmt_str, ...) __attribute__ ((format (gnu_printf,3 ,4 )));typedef enum i40e_status_code i40e_status ;
drivers/net/ethernet/intel/iavf/i40e_prototype.h +20 -20
@@ -16,55 +16,55 @@*/ /* adminq functions */ -i40e_status i40evf_init_adminq (struct i40e_hw *hw); -i40e_status i40evf_shutdown_adminq (struct i40e_hw *hw); +i40e_status iavf_init_adminq (struct i40e_hw *hw); +i40e_status iavf_shutdown_adminq (struct i40e_hw *hw);void i40e_adminq_init_ring_data (struct i40e_hw *hw); -i40e_status i40evf_clean_arq_element (struct i40e_hw *hw, +i40e_status iavf_clean_arq_element (struct i40e_hw *hw,struct i40e_arq_event_info *e,u16 *events_pending); -i40e_status i40evf_asq_send_command (struct i40e_hw *hw, +i40e_status iavf_asq_send_command (struct i40e_hw *hw,struct i40e_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size,struct i40e_asq_cmd_details *cmd_details); -bool i40evf_asq_done (struct i40e_hw *hw); +bool iavf_asq_done (struct i40e_hw *hw);/* debug function for adminq */ -void i40evf_debug_aq (struct i40e_hw *hw,enum i40e_debug_mask mask, +void iavf_debug_aq (struct i40e_hw *hw,enum i40e_debug_mask mask,void *desc,void *buffer,u16 buf_len);void i40e_idle_aq (struct i40e_hw *hw); -void i40evf_resume_aq (struct i40e_hw *hw); -bool i40evf_check_asq_alive (struct i40e_hw *hw); -i40e_status i40evf_aq_queue_shutdown (struct i40e_hw *hw,bool unloading); -const char *i40evf_aq_str (struct i40e_hw *hw,enum i40e_admin_queue_err aq_err); -const char *i40evf_stat_str (struct i40e_hw *hw,i40e_status stat_err); +void iavf_resume_aq (struct i40e_hw *hw); +bool iavf_check_asq_alive (struct i40e_hw *hw); +i40e_status iavf_aq_queue_shutdown (struct i40e_hw *hw,bool unloading); +const char *iavf_aq_str (struct i40e_hw *hw,enum i40e_admin_queue_err aq_err); +const char *iavf_stat_str (struct i40e_hw *hw,i40e_status stat_err); -i40e_status i40evf_aq_get_rss_lut (struct i40e_hw *hw,u16 seid, +i40e_status iavf_aq_get_rss_lut (struct i40e_hw *hw,u16 seid,bool pf_lut,u8 *lut,u16 lut_size); -i40e_status i40evf_aq_set_rss_lut (struct i40e_hw *hw,u16 seid, +i40e_status iavf_aq_set_rss_lut (struct i40e_hw *hw,u16 seid,bool pf_lut,u8 *lut,u16 lut_size); -i40e_status i40evf_aq_get_rss_key (struct i40e_hw *hw, +i40e_status iavf_aq_get_rss_key (struct i40e_hw *hw,u16 seid,struct i40e_aqc_get_set_rss_key_data *key); -i40e_status i40evf_aq_set_rss_key (struct i40e_hw *hw, +i40e_status iavf_aq_set_rss_key (struct i40e_hw *hw,u16 seid,struct i40e_aqc_get_set_rss_key_data *key);i40e_status i40e_set_mac_type (struct i40e_hw *hw); -extern struct i40e_rx_ptype_decoded i40evf_ptype_lookup[]; +extern struct i40e_rx_ptype_decoded iavf_ptype_lookup[];static inline struct i40e_rx_ptype_decoded decode_rx_desc_ptype (u8 ptype) { -return i40evf_ptype_lookup[ptype]; +return iavf_ptype_lookup[ptype]; }/* i40e_common for VF drivers*/ -void i40e_vf_parse_hw_config (struct i40e_hw *hw, +void iavf_vf_parse_hw_config (struct i40e_hw *hw,struct virtchnl_vf_resource *msg); -i40e_status i40e_vf_reset (struct i40e_hw *hw); -i40e_status i40e_aq_send_msg_to_pf (struct i40e_hw *hw, +i40e_status iavf_vf_reset (struct i40e_hw *hw); +i40e_status iavf_aq_send_msg_to_pf (struct i40e_hw *hw,enum virtchnl_ops v_opcode,i40e_status v_retval,u8 *msg,u16 msglen,struct i40e_asq_cmd_details *cmd_details);
drivers/net/ethernet/intel/iavf/i40e_trace.h +13 -13
@@ -3,7 +3,7 @@/* Modeled on trace-events-sample.h */ -/* The trace subsystem name for i40evf will be "i40evf". +/* The trace subsystem name for iavf will be "iavf". * * This file is named i40e_trace.h. *
@@ -12,7 +12,7 @@* of this file. */ #undef TRACE_SYSTEM -#define TRACE_SYSTEM i40evf +#define TRACE_SYSTEM iavf/* See trace-events-sample.h for a detailed description of why this * guard clause is different from most normal include files.
@@ -42,7 +42,7 @@* Similarly, i40e_trace_enabled(trace_name) wraps references to * trace_i40e{,vf}_<trace_name>_enabled() functions. */ -#define _I40E_TRACE_NAME (trace_name) (trace_ ## i40evf ## _ ## trace_name) +#define _I40E_TRACE_NAME (trace_name) (trace_ ## iavf ## _ ## trace_name)#define I40E_TRACE_NAME (trace_name) _I40E_TRACE_NAME(trace_name) #define i40e_trace(trace_name, args...) I40E_TRACE_NAME(trace_name)(args)
@@ -50,14 +50,14 @@#define i40e_trace_enabled (trace_name) I40E_TRACE_NAME(trace_name##_enabled)()/* Events common to PF and VF. Corresponding versions will be defined -* for both, named trace_i40e_* and trace_i40evf_*. The i40e_trace() +* for both, named trace_i40e_* and trace_iavf_*. The i40e_trace() * macro above will select the right trace point name for the driver * being built from shared code. */ /* Events related to a vsi & ring */ DECLARE_EVENT_CLASS( - i40evf_tx_template, + iavf_tx_template, TP_PROTO(struct i40e_ring *ring, struct i40e_tx_desc *desc,
@@ -93,7 +93,7 @@ DECLARE_EVENT_CLASS( ); DEFINE_EVENT( - i40evf_tx_template, i40evf_clean_tx_irq, + iavf_tx_template, iavf_clean_tx_irq, TP_PROTO(struct i40e_ring *ring, struct i40e_tx_desc *desc, struct i40e_tx_buffer *buf),
@@ -101,7 +101,7 @@ DEFINE_EVENT( TP_ARGS(ring, desc, buf)); DEFINE_EVENT( - i40evf_tx_template, i40evf_clean_tx_irq_unmap, + iavf_tx_template, iavf_clean_tx_irq_unmap, TP_PROTO(struct i40e_ring *ring, struct i40e_tx_desc *desc, struct i40e_tx_buffer *buf),
@@ -109,7 +109,7 @@ DEFINE_EVENT( TP_ARGS(ring, desc, buf)); DECLARE_EVENT_CLASS( - i40evf_rx_template, + iavf_rx_template, TP_PROTO(struct i40e_ring *ring, union i40e_32byte_rx_desc *desc,
@@ -138,7 +138,7 @@ DECLARE_EVENT_CLASS( ); DEFINE_EVENT( - i40evf_rx_template, i40evf_clean_rx_irq, + iavf_rx_template, iavf_clean_rx_irq, TP_PROTO(struct i40e_ring *ring, union i40e_32byte_rx_desc *desc, struct sk_buff *skb),
@@ -146,7 +146,7 @@ DEFINE_EVENT( TP_ARGS(ring, desc, skb)); DEFINE_EVENT( - i40evf_rx_template, i40evf_clean_rx_irq_rx, + iavf_rx_template, iavf_clean_rx_irq_rx, TP_PROTO(struct i40e_ring *ring, union i40e_32byte_rx_desc *desc, struct sk_buff *skb),
@@ -154,7 +154,7 @@ DEFINE_EVENT( TP_ARGS(ring, desc, skb)); DECLARE_EVENT_CLASS( - i40evf_xmit_template, + iavf_xmit_template, TP_PROTO(struct sk_buff *skb, struct i40e_ring *ring),
@@ -180,14 +180,14 @@ DECLARE_EVENT_CLASS( );DEFINE_EVENT ( - i40evf_xmit_template, i40evf_xmit_frame_ring, + iavf_xmit_template, iavf_xmit_frame_ring, TP_PROTO(struct sk_buff *skb, struct i40e_ring *ring),TP_ARGS (skb, ring)); DEFINE_EVENT( - i40evf_xmit_template, i40evf_xmit_frame_ring_drop, + iavf_xmit_template, iavf_xmit_frame_ring_drop, TP_PROTO(struct sk_buff *skb, struct i40e_ring *ring),
drivers/net/ethernet/intel/iavf/i40e_txrx.c +47 -47
334 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_txrx.h +18 -18
@@ -380,12 +380,12 @@ struct i40e_ring {struct rcu_head rcu;/* to avoid race on free */ u16 next_to_alloc; -struct sk_buff *skb;/* When i40evf_clean_rx_ring_irq() must +struct sk_buff *skb;/* When iavf_clean_rx_ring_irq() must * return before it sees the EOP for * the current packet, we save that skb * here and resume receiving this * packet the next time -* i40evf_clean_rx_ring_irq() is called +* iavf_clean_rx_ring_irq() is called * for this ring. */ }____cacheline_internodealigned_in_smp ;
@@ -437,20 +437,20 @@ static inline unsigned int i40e_rx_pg_order(struct i40e_ring *ring)#define i40e_rx_pg_size (_ring) (PAGE_SIZE << i40e_rx_pg_order(_ring)) -bool i40evf_alloc_rx_buffers (struct i40e_ring *rxr,u16 cleaned_count); -netdev_tx_t i40evf_xmit_frame (struct sk_buff *skb,struct net_device *netdev); -void i40evf_clean_tx_ring (struct i40e_ring *tx_ring); -void i40evf_clean_rx_ring (struct i40e_ring *rx_ring); -int i40evf_setup_tx_descriptors (struct i40e_ring *tx_ring); -int i40evf_setup_rx_descriptors (struct i40e_ring *rx_ring); -void i40evf_free_tx_resources (struct i40e_ring *tx_ring); -void i40evf_free_rx_resources (struct i40e_ring *rx_ring); -int i40evf_napi_poll (struct napi_struct *napi,int budget); -void i40evf_force_wb (struct i40e_vsi *vsi,struct i40e_q_vector *q_vector); -u32 i40evf_get_tx_pending (struct i40e_ring *ring,bool in_sw); -void i40evf_detect_recover_hung (struct i40e_vsi *vsi); -int __i40evf_maybe_stop_tx (struct i40e_ring *tx_ring,int size); -bool __i40evf_chk_linearize (struct sk_buff *skb); +bool iavf_alloc_rx_buffers (struct i40e_ring *rxr,u16 cleaned_count); +netdev_tx_t iavf_xmit_frame (struct sk_buff *skb,struct net_device *netdev); +void iavf_clean_tx_ring (struct i40e_ring *tx_ring); +void iavf_clean_rx_ring (struct i40e_ring *rx_ring); +int iavf_setup_tx_descriptors (struct i40e_ring *tx_ring); +int iavf_setup_rx_descriptors (struct i40e_ring *rx_ring); +void iavf_free_tx_resources (struct i40e_ring *tx_ring); +void iavf_free_rx_resources (struct i40e_ring *rx_ring); +int iavf_napi_poll (struct napi_struct *napi,int budget); +void iavf_force_wb (struct i40e_vsi *vsi,struct i40e_q_vector *q_vector); +u32 iavf_get_tx_pending (struct i40e_ring *ring,bool in_sw); +void iavf_detect_recover_hung (struct i40e_vsi *vsi); +int __iavf_maybe_stop_tx (struct i40e_ring *tx_ring,int size); +bool __iavf_chk_linearize (struct sk_buff *skb);/** * i40e_xmit_descriptor_count - calculate number of Tx descriptors needed
@@ -490,7 +490,7 @@ static inline int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size) {if (likely (I40E_DESC_UNUSED (tx_ring) >= size))return 0 ; -return __i40evf_maybe_stop_tx (tx_ring, size); +return __iavf_maybe_stop_tx (tx_ring, size); }/**
@@ -509,7 +509,7 @@ static inline bool i40e_chk_linearize(struct sk_buff *skb, int count)return false;if (skb_is_gso (skb)) -return __i40evf_chk_linearize (skb); +return __iavf_chk_linearize (skb);/* we can support up to 8 data buffers for a single send */ return count !=I40E_MAX_BUFFER_TXD ;
drivers/net/ethernet/intel/iavf/i40evf.h +181 -181
483 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40evf_client.c +92 -92
509 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40evf_client.h +15 -15
@@ -1,21 +1,21 @@/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#ifndef _I40EVF_CLIENT_H_ -#define _I40EVF_CLIENT_H_ +#ifndef _IAVF_CLIENT_H_ +#define _IAVF_CLIENT_H_ -#define I40EVF_CLIENT_STR_LENGTH 10 +#define IAVF_CLIENT_STR_LENGTH 10 /* Client interface version should be updated anytime there is a change in the * existing APIs or data structures. */ -#define I40EVF_CLIENT_VERSION_MAJOR 0 -#define I40EVF_CLIENT_VERSION_MINOR 01 -#define I40EVF_CLIENT_VERSION_BUILD 00 -#define I40EVF_CLIENT_VERSION_STR \ - __stringify(I40EVF_CLIENT_VERSION_MAJOR) "." \ - __stringify(I40EVF_CLIENT_VERSION_MINOR) "." \ - __stringify(I40EVF_CLIENT_VERSION_BUILD) +#define IAVF_CLIENT_VERSION_MAJOR 0 +#define IAVF_CLIENT_VERSION_MINOR 01 +#define IAVF_CLIENT_VERSION_BUILD 00 +#define IAVF_CLIENT_VERSION_STR \ + __stringify(IAVF_CLIENT_VERSION_MAJOR) "." \ + __stringify(IAVF_CLIENT_VERSION_MINOR) "." \ + __stringify(IAVF_CLIENT_VERSION_BUILD) struct i40e_client_version { u8 major;
@@ -90,7 +90,7 @@ struct i40e_info {#define I40E_CLIENT_FTYPE_PF 0#define I40E_CLIENT_FTYPE_VF 1u8 ftype;/* function type, PF or VF */ -void *vf;/* cast to i40evf_adapter */ +void *vf;/* cast to iavf_adapter */ /* All L2 params that could change during the life span of the device * and needs to be communicated to the client when they change
@@ -151,7 +151,7 @@ struct i40e_client_instance {struct i40e_client {struct list_head list;/* list of registered clients */ -char name[I40EVF_CLIENT_STR_LENGTH ]; +char name[IAVF_CLIENT_STR_LENGTH ];struct i40e_client_version version;unsigned long state;/* client state */ atomic_t ref_cnt;/* Count of all the client devices of this kind */
@@ -164,6 +164,6 @@ struct i40e_client { };/* used by clients */ -int i40evf_register_client (struct i40e_client *client); -int i40evf_unregister_client (struct i40e_client *client); -#endif /* _I40EVF_CLIENT_H_ */ +int iavf_register_client (struct i40e_client *client); +int iavf_unregister_client (struct i40e_client *client); +#endif /* _IAVF_CLIENT_H_ */
drivers/net/ethernet/intel/iavf/i40evf_ethtool.c +181 -183
887 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40evf_main.c +712 -712
22 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40evf_virtchnl.c +201 -201
402 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.14.4
Part of the diff is not shown here. View the raw message.
PATCH v2 4/14 iavf: rename i40e_status to iavf_status
In reply to Jesse BrandeburgThis is just a rename of an internal variable i40e_status, but it was a pretty big change and so deserved it's own patch.
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 94 +++++++++--------- drivers/net/ethernet/intel/iavf/i40e_alloc.h | 8 +- drivers/net/ethernet/intel/iavf/i40e_common.c | 72 +++++++------- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 2 +- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 28 +++--- drivers/net/ethernet/intel/iavf/i40evf.h | 2 +- drivers/net/ethernet/intel/iavf/i40evf_client.c | 6 +- drivers/net/ethernet/intel/iavf/i40evf_ethtool.c | 52 ++++------ drivers/net/ethernet/intel/iavf/i40evf_main.c | 14 +-- drivers/net/ethernet/intel/iavf/i40evf_virtchnl.c | 115 +++++++++------------- 10 files changed, 179 insertions(+), 214 deletions(-)
drivers/net/ethernet/intel/iavf/i40e_adminq.c +45 -49
@@ -34,9 +34,9 @@ static void i40e_adminq_init_regs(struct i40e_hw *hw)* i40e_alloc_adminq_asq_ring - Allocate Admin Queue send rings * @hw: pointer to the hardware structure **/ -static i40e_status i40e_alloc_adminq_asq_ring (struct i40e_hw *hw) +static iavf_status i40e_alloc_adminq_asq_ring (struct i40e_hw *hw) { -i40e_status ret_code; +iavf_status ret_code; ret_code = i40e_allocate_dma_mem(hw, &hw->aq.asq.desc_buf, i40e_mem_atq_ring,
@@ -61,9 +61,9 @@ static i40e_status i40e_alloc_adminq_asq_ring(struct i40e_hw *hw)* i40e_alloc_adminq_arq_ring - Allocate Admin Queue receive rings * @hw: pointer to the hardware structure **/ -static i40e_status i40e_alloc_adminq_arq_ring (struct i40e_hw *hw) +static iavf_status i40e_alloc_adminq_arq_ring (struct i40e_hw *hw) { -i40e_status ret_code; +iavf_status ret_code; ret_code = i40e_allocate_dma_mem(hw, &hw->aq.arq.desc_buf, i40e_mem_arq_ring,
@@ -102,9 +102,9 @@ static void i40e_free_adminq_arq(struct i40e_hw *hw)* i40e_alloc_arq_bufs - Allocate pre-posted buffers for the receive queue * @hw: pointer to the hardware structure **/ -static i40e_status i40e_alloc_arq_bufs (struct i40e_hw *hw) +static iavf_status i40e_alloc_arq_bufs (struct i40e_hw *hw) { -i40e_status ret_code; +iavf_status ret_code;struct i40e_aq_desc *desc;struct i40e_dma_mem *bi;int i;
@@ -115,7 +115,7 @@ static i40e_status i40e_alloc_arq_bufs(struct i40e_hw *hw)/* buffer_info structures do not need alignment */ ret_code =i40e_allocate_virt_mem (hw, &hw->aq.arq.dma_head, - (hw->aq.num_arq_entries *sizeof (struct i40e_dma_mem ))); + (hw->aq.num_arq_entries *sizeof (struct i40e_dma_mem )));if (ret_code) goto alloc_arq_bufs; hw->aq.arq.r.arq_bi = (struct i40e_dma_mem *)hw->aq.arq.dma_head.va;
@@ -169,15 +169,15 @@ static i40e_status i40e_alloc_arq_bufs(struct i40e_hw *hw)* i40e_alloc_asq_bufs - Allocate empty buffer structs for the send queue * @hw: pointer to the hardware structure **/ -static i40e_status i40e_alloc_asq_bufs (struct i40e_hw *hw) +static iavf_status i40e_alloc_asq_bufs (struct i40e_hw *hw) { -i40e_status ret_code; +iavf_status ret_code;struct i40e_dma_mem *bi;int i;/* No mapped memory needed yet, just the buffer info structures */ ret_code =i40e_allocate_virt_mem (hw, &hw->aq.asq.dma_head, - (hw->aq.num_asq_entries *sizeof (struct i40e_dma_mem ))); + (hw->aq.num_asq_entries *sizeof (struct i40e_dma_mem )));if (ret_code) goto alloc_asq_bufs; hw->aq.asq.r.asq_bi = (struct i40e_dma_mem *)hw->aq.asq.dma_head.va;
@@ -253,9 +253,9 @@ static void i40e_free_asq_bufs(struct i40e_hw *hw)* * Configure base address and length registers for the transmit queue **/ -static i40e_status i40e_config_asq_regs (struct i40e_hw *hw) +static iavf_status i40e_config_asq_regs (struct i40e_hw *hw) { -i40e_status ret_code =0 ; +iavf_status ret_code =0 ;u32 reg =0 ;/* Clear Head and Tail */
@@ -282,9 +282,9 @@ static i40e_status i40e_config_asq_regs(struct i40e_hw *hw)* * Configure base address and length registers for the receive (event queue) **/ -static i40e_status i40e_config_arq_regs (struct i40e_hw *hw) +static iavf_status i40e_config_arq_regs (struct i40e_hw *hw) { -i40e_status ret_code =0 ; +iavf_status ret_code =0 ;u32 reg =0 ;/* Clear Head and Tail */
@@ -321,9 +321,9 @@ static i40e_status i40e_config_arq_regs(struct i40e_hw *hw)* Do *NOT* hold the lock when calling this as the memory allocation routines * called are not going to be atomic context safe **/ -static i40e_status i40e_init_asq (struct i40e_hw *hw) +static iavf_status i40e_init_asq (struct i40e_hw *hw) { -i40e_status ret_code =0 ; +iavf_status ret_code =0 ;if (hw->aq.asq.count >0 ) {/* queue already initialized */
@@ -380,9 +380,9 @@ static i40e_status i40e_init_asq(struct i40e_hw *hw)* Do *NOT* hold the lock when calling this as the memory allocation routines * called are not going to be atomic context safe **/ -static i40e_status i40e_init_arq (struct i40e_hw *hw) +static iavf_status i40e_init_arq (struct i40e_hw *hw) { -i40e_status ret_code =0 ; +iavf_status ret_code =0 ;if (hw->aq.arq.count >0 ) {/* queue already initialized */
@@ -432,9 +432,9 @@ static i40e_status i40e_init_arq(struct i40e_hw *hw)* * The main shutdown routine for the Admin Send Queue **/ -static i40e_status i40e_shutdown_asq (struct i40e_hw *hw) +static iavf_status i40e_shutdown_asq (struct i40e_hw *hw) { -i40e_status ret_code =0 ; +iavf_status ret_code =0 ;mutex_lock (&hw->aq.asq_mutex);
@@ -466,9 +466,9 @@ static i40e_status i40e_shutdown_asq(struct i40e_hw *hw)* * The main shutdown routine for the Admin Receive Queue **/ -static i40e_status i40e_shutdown_arq (struct i40e_hw *hw) +static iavf_status i40e_shutdown_arq (struct i40e_hw *hw) { -i40e_status ret_code =0 ; +iavf_status ret_code =0 ;mutex_lock (&hw->aq.arq_mutex);
@@ -505,9 +505,9 @@ static i40e_status i40e_shutdown_arq(struct i40e_hw *hw)* - hw->aq.arq_buf_size * - hw->aq.asq_buf_size **/ -i40e_status iavf_init_adminq (struct i40e_hw *hw) +iavf_status iavf_init_adminq (struct i40e_hw *hw) { -i40e_status ret_code; +iavf_status ret_code;/* verify input for valid configuration */ if ((hw->aq.num_arq_entries == 0) ||
@@ -549,9 +549,9 @@ i40e_status iavf_init_adminq(struct i40e_hw *hw)* iavf_shutdown_adminq - shutdown routine for the Admin Queue * @hw: pointer to the hardware structure **/ -i40e_status iavf_shutdown_adminq (struct i40e_hw *hw) +iavf_status iavf_shutdown_adminq (struct i40e_hw *hw) { -i40e_status ret_code =0 ; +iavf_status ret_code =0 ;if (iavf_check_asq_alive (hw))iavf_aq_queue_shutdown (hw, true);
@@ -570,7 +570,7 @@ i40e_status iavf_shutdown_adminq(struct i40e_hw *hw)**/ static u16 i40e_clean_asq (struct i40e_hw *hw) { -struct i40e_adminq_ring *asq = &(hw->aq.asq); +struct i40e_adminq_ring *asq = &hw->aq.asq;struct i40e_asq_cmd_details *details;u16 ntc = asq->next_to_clean;struct i40e_aq_desc desc_cb;
@@ -616,7 +616,6 @@ bool iavf_asq_done(struct i40e_hw *hw)* timing reliability than DD bit */ return rd32 (hw, hw->aq.asq.head) == hw->aq.asq.next_to_use; - }/**
@@ -630,17 +629,16 @@ bool iavf_asq_done(struct i40e_hw *hw)* This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -i40e_status iavf_asq_send_command (struct i40e_hw *hw, -struct i40e_aq_desc *desc, -void *buff,/* can be NULL */ -u16 buff_size, -struct i40e_asq_cmd_details *cmd_details) +iavf_status iavf_asq_send_command (struct i40e_hw *hw,struct i40e_aq_desc *desc, +void *buff,/* can be NULL */ +u16 buff_size, +struct i40e_asq_cmd_details *cmd_details) { -i40e_status status =0 ;struct i40e_dma_mem *dma_buff =NULL ;struct i40e_asq_cmd_details *details;struct i40e_aq_desc *desc_on_ring;bool cmd_completed = false; +iavf_status status =0 ;u16 retval =0 ;u32 val =0 ;
@@ -724,8 +722,8 @@ i40e_status iavf_asq_send_command(struct i40e_hw *hw, *desc_on_ring = *desc;/* if buff is not NULL assume indirect command */ -if (buff !=NULL ) { - dma_buff = &(hw->aq.asq.r.asq_bi[hw->aq.asq.next_to_use]); +if (buff) { + dma_buff = &hw->aq.asq.r.asq_bi[hw->aq.asq.next_to_use];/* copy the user buff into the respective DMA buff */ memcpy (dma_buff->va, buff, buff_size); desc_on_ring->datalen =cpu_to_le16 (buff_size);
@@ -742,7 +740,7 @@ i40e_status iavf_asq_send_command(struct i40e_hw *hw,/* bump the tail */ i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer:\n" );iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc_on_ring, - buff, buff_size); + buff, buff_size); (hw->aq.asq.next_to_use)++;if (hw->aq.asq.next_to_use == hw->aq.asq.count) hw->aq.asq.next_to_use =0 ;
@@ -769,7 +767,7 @@ i40e_status iavf_asq_send_command(struct i40e_hw *hw,/* if ready, copy the desc back to temp */ if (iavf_asq_done (hw)) { *desc = *desc_on_ring; -if (buff !=NULL ) +if (buff)memcpy (buff, dma_buff->va, buff_size); retval =le16_to_cpu (desc->retval);if (retval !=0 ) {
@@ -793,8 +791,7 @@ i40e_status iavf_asq_send_command(struct i40e_hw *hw,i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer writeback:\n" ); -iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, buff, - buff_size); +iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, buff, buff_size);/* save writeback aq if requested */ if (details->wb_desc)
@@ -826,8 +823,7 @@ i40e_status iavf_asq_send_command(struct i40e_hw *hw,* * Fill the desc with default values **/ -void iavf_fill_default_direct_cmd_desc (struct i40e_aq_desc *desc, -u16 opcode) +void iavf_fill_default_direct_cmd_desc (struct i40e_aq_desc *desc,u16 opcode) {/* zero out the desc */ memset ((void *)desc,0 ,sizeof (struct i40e_aq_desc ));
@@ -845,13 +841,13 @@ void iavf_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc,* the contents through e. It can also return how many events are * left to process through 'pending' **/ -i40e_status iavf_clean_arq_element (struct i40e_hw *hw, -struct i40e_arq_event_info *e, -u16 *pending) +iavf_status iavf_clean_arq_element (struct i40e_hw *hw, +struct i40e_arq_event_info *e, +u16 *pending) { -i40e_status ret_code =0 ;u16 ntc = hw->aq.arq.next_to_clean;struct i40e_aq_desc *desc; +iavf_status ret_code =0 ;struct i40e_dma_mem *bi;u16 desc_idx;u16 datalen;
@@ -897,13 +893,13 @@ i40e_status iavf_clean_arq_element(struct i40e_hw *hw, e->desc = *desc; datalen =le16_to_cpu (desc->datalen); e->msg_len =min (datalen, e->buf_len); -if (e->msg_buf !=NULL && (e->msg_len !=0 )) +if (e->msg_buf && (e->msg_len !=0 ))memcpy (e->msg_buf, hw->aq.arq.r.arq_bi[desc_idx].va, e->msg_len);i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQRX: desc and buffer:\n" );iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, e->msg_buf, - hw->aq.arq_buf_size); + hw->aq.arq_buf_size);/* Restore the original datalen and buffer address in the desc, * FW updates datalen to indicate the event message
@@ -930,7 +926,7 @@ i40e_status iavf_clean_arq_element(struct i40e_hw *hw, clean_arq_element_out:/* Set pending if needed, unlock and return */ -if (pending !=NULL ) +if (pending) *pending = (ntc > ntu ? hw->aq.arq.count :0 ) + (ntu - ntc); clean_arq_element_err:
drivers/net/ethernet/intel/iavf/i40e_alloc.h +4 -4
@@ -20,16 +20,16 @@ enum i40e_memory_type { };/* prototype for functions used for dynamic memory allocation */ -i40e_status i40e_allocate_dma_mem (struct i40e_hw *hw, +iavf_status i40e_allocate_dma_mem (struct i40e_hw *hw,struct i40e_dma_mem *mem,enum i40e_memory_type type,u64 size,u32 alignment); -i40e_status i40e_free_dma_mem (struct i40e_hw *hw, +iavf_status i40e_free_dma_mem (struct i40e_hw *hw,struct i40e_dma_mem *mem); -i40e_status i40e_allocate_virt_mem (struct i40e_hw *hw, +iavf_status i40e_allocate_virt_mem (struct i40e_hw *hw,struct i40e_virt_mem *mem,u32 size); -i40e_status i40e_free_virt_mem (struct i40e_hw *hw, +iavf_status i40e_free_virt_mem (struct i40e_hw *hw,struct i40e_virt_mem *mem);#endif /* _I40E_ALLOC_H_ */
drivers/net/ethernet/intel/iavf/i40e_common.c +33 -39
191 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_osdep.h +1 -1
@@ -48,5 +48,5 @@ struct i40e_virt_mem {extern void iavf_debug_d (void *hw,u32 mask,char *fmt_str, ...) __attribute__ ((format (gnu_printf,3 ,4 ))); -typedef enum i40e_status_code i40e_status ; +typedef enum i40e_status_code iavf_status ;#endif /* _I40E_OSDEP_H_ */
drivers/net/ethernet/intel/iavf/i40e_prototype.h +14 -14
@@ -16,13 +16,13 @@*/ /* adminq functions */ -i40e_status iavf_init_adminq (struct i40e_hw *hw); -i40e_status iavf_shutdown_adminq (struct i40e_hw *hw); +iavf_status iavf_init_adminq (struct i40e_hw *hw); +iavf_status iavf_shutdown_adminq (struct i40e_hw *hw);void i40e_adminq_init_ring_data (struct i40e_hw *hw); -i40e_status iavf_clean_arq_element (struct i40e_hw *hw, +iavf_status iavf_clean_arq_element (struct i40e_hw *hw,struct i40e_arq_event_info *e,u16 *events_pending); -i40e_status iavf_asq_send_command(struct i40e_hw *hw, +iavf_status iavf_asq_send_command(struct i40e_hw *hw, struct i40e_aq_desc *desc, void *buff, /* can be NULL */ u16 buff_size,
@@ -36,22 +36,22 @@ void iavf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask,void i40e_idle_aq (struct i40e_hw *hw);void iavf_resume_aq (struct i40e_hw *hw);bool iavf_check_asq_alive (struct i40e_hw *hw); -i40e_status iavf_aq_queue_shutdown (struct i40e_hw *hw,bool unloading); +iavf_status iavf_aq_queue_shutdown (struct i40e_hw *hw,bool unloading);const char *iavf_aq_str (struct i40e_hw *hw,enum i40e_admin_queue_err aq_err); -const char *iavf_stat_str (struct i40e_hw *hw,i40e_status stat_err); +const char *iavf_stat_str (struct i40e_hw *hw,iavf_status stat_err); -i40e_status iavf_aq_get_rss_lut (struct i40e_hw *hw,u16 seid, +iavf_status iavf_aq_get_rss_lut (struct i40e_hw *hw,u16 seid,bool pf_lut,u8 *lut,u16 lut_size); -i40e_status iavf_aq_set_rss_lut (struct i40e_hw *hw,u16 seid, +iavf_status iavf_aq_set_rss_lut (struct i40e_hw *hw,u16 seid,bool pf_lut,u8 *lut,u16 lut_size); -i40e_status iavf_aq_get_rss_key (struct i40e_hw *hw, +iavf_status iavf_aq_get_rss_key (struct i40e_hw *hw,u16 seid,struct i40e_aqc_get_set_rss_key_data *key); -i40e_status iavf_aq_set_rss_key (struct i40e_hw *hw, +iavf_status iavf_aq_set_rss_key (struct i40e_hw *hw,u16 seid,struct i40e_aqc_get_set_rss_key_data *key); -i40e_status i40e_set_mac_type (struct i40e_hw *hw); +iavf_status i40e_set_mac_type (struct i40e_hw *hw);extern struct i40e_rx_ptype_decoded iavf_ptype_lookup[];
@@ -63,9 +63,9 @@ static inline struct i40e_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype)/* i40e_common for VF drivers*/ void iavf_vf_parse_hw_config (struct i40e_hw *hw,struct virtchnl_vf_resource *msg); -i40e_status iavf_vf_reset (struct i40e_hw *hw); -i40e_status iavf_aq_send_msg_to_pf (struct i40e_hw *hw, +iavf_status iavf_vf_reset (struct i40e_hw *hw); +iavf_status iavf_aq_send_msg_to_pf (struct i40e_hw *hw,enum virtchnl_ops v_opcode, -i40e_status v_retval,u8 *msg,u16 msglen, +iavf_status v_retval,u8 *msg,u16 msglen,struct i40e_asq_cmd_details *cmd_details);#endif /* _I40E_PROTOTYPE_H_ */
drivers/net/ethernet/intel/iavf/i40evf.h +1 -1
@@ -411,7 +411,7 @@ void iavf_enable_vlan_stripping(struct iavf_adapter *adapter);void iavf_disable_vlan_stripping (struct iavf_adapter *adapter);void iavf_virtchnl_completion (struct iavf_adapter *adapter,enum virtchnl_ops v_opcode, -i40e_status v_retval,u8 *msg,u16 msglen); +iavf_status v_retval,u8 *msg,u16 msglen);int iavf_config_rss (struct iavf_adapter *adapter);int iavf_lan_add_device (struct iavf_adapter *adapter);int iavf_lan_del_device (struct iavf_adapter *adapter);
drivers/net/ethernet/intel/iavf/i40evf_client.c +3 -3
@@ -135,7 +135,7 @@ void iavf_notify_client_open(struct i40e_vsi *vsi)static int iavf_client_release_qvlist (struct i40e_info *ldev) {struct iavf_adapter *adapter = ldev->vf; -i40e_status err; +iavf_status err;if (adapter->aq_required)return -EAGAIN ;
@@ -420,7 +420,7 @@ static u32 iavf_client_virtchnl_send(struct i40e_info *ldev, u8 *msg, u16 len) {struct iavf_adapter *adapter = ldev->vf; -i40e_status err; +iavf_status err;if (adapter->aq_required)return -EAGAIN ;
@@ -449,7 +449,7 @@ static int iavf_client_setup_qvlist(struct i40e_info *ldev,struct virtchnl_iwarp_qvlist_info *v_qvlist_info;struct iavf_adapter *adapter = ldev->vf;struct i40e_qv_info *qv_info; -i40e_status err; +iavf_status err;u32 v_idx, i;u32 msg_size;
drivers/net/ethernet/intel/iavf/i40evf_ethtool.c +21 -31
167 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40evf_main.c +8 -6
@@ -66,7 +66,7 @@ static struct workqueue_struct *iavf_wq;* @size: size of memory requested * @alignment: what to align the allocation to **/ -i40e_status iavf_allocate_dma_mem_d (struct i40e_hw *hw, +iavf_status iavf_allocate_dma_mem_d (struct i40e_hw *hw,struct i40e_dma_mem *mem,u64 size,u32 alignment) {
@@ -89,7 +89,7 @@ i40e_status iavf_allocate_dma_mem_d(struct i40e_hw *hw,* @hw: pointer to the HW structure * @mem: ptr to mem struct to free **/ -i40e_status iavf_free_dma_mem_d (struct i40e_hw *hw,struct i40e_dma_mem *mem) +iavf_status iavf_free_dma_mem_d (struct i40e_hw *hw,struct i40e_dma_mem *mem) {struct iavf_adapter *adapter = (struct iavf_adapter *)hw->back;
@@ -106,7 +106,7 @@ i40e_status iavf_free_dma_mem_d(struct i40e_hw *hw, struct i40e_dma_mem *mem)* @mem: ptr to mem struct to fill out * @size: size of memory requested **/ -i40e_status iavf_allocate_virt_mem_d (struct i40e_hw *hw, +iavf_status iavf_allocate_virt_mem_d (struct i40e_hw *hw,struct i40e_virt_mem *mem,u32 size) {if (!mem)
@@ -126,7 +126,7 @@ i40e_status iavf_allocate_virt_mem_d(struct i40e_hw *hw,* @hw: pointer to the HW structure * @mem: ptr to mem struct to free **/ -i40e_status iavf_free_virt_mem_d (struct i40e_hw *hw, +iavf_status iavf_free_virt_mem_d (struct i40e_hw *hw,struct i40e_virt_mem *mem) {if (!mem)
@@ -469,6 +469,7 @@ iavf_request_traffic_irqs(struct iavf_adapter *adapter, char *basename)for (vector =0 ; vector < q_vectors; vector++) {struct i40e_q_vector *q_vector = &adapter->q_vectors[vector]; + irq_num = adapter->msix_entries[vector +NONQ_VECS ].vector;if (q_vector->tx.ring && q_vector->rx.ring) {
@@ -1427,6 +1428,7 @@ static void iavf_free_q_vectors(struct iavf_adapter *adapter)for (q_idx =0 ; q_idx < num_q_vectors; q_idx++) {struct i40e_q_vector *q_vector = &adapter->q_vectors[q_idx]; +if (q_idx < napi_vectors)netif_napi_del (&q_vector->napi); }
@@ -2049,7 +2051,7 @@ static void iavf_adminq_task(struct work_struct *work)struct i40e_hw *hw = &adapter->hw;struct i40e_arq_event_info event;enum virtchnl_ops v_op; -i40e_status ret, v_ret; +iavf_status ret, v_ret;u32 val, oldval;u16 pending;
@@ -2064,7 +2066,7 @@ static void iavf_adminq_task(struct work_struct *work) do { ret = iavf_clean_arq_element(hw, &event, &pending); v_op = (enum virtchnl_ops)le32_to_cpu(event.desc.cookie_high); - v_ret = (i40e_status)le32_to_cpu(event.desc.cookie_low); + v_ret = (iavf_status)le32_to_cpu(event.desc.cookie_low); if (ret || !v_op) break; /* No event to process or error cleaning ARQ */
drivers/net/ethernet/intel/iavf/i40evf_virtchnl.c +49 -66
322 lines not on this page · raw message
Signature · 1 line
2.14.4
PATCH v2 5/14 iavf: move i40evf files to new name
In reply to Jesse BrandeburgSimply move the i40evf files to the new name, updating the #includes to track the new names, and updating the Makefile as well.
A future patch will remove the i40e references (after the code removal patches later in this series).
---
drivers/net/ethernet/intel/iavf/Makefile | 4 ++--
drivers/net/ethernet/intel/iavf/{i40evf.h => iavf.h} | 2 +-
drivers/net/ethernet/intel/iavf/{i40evf_client.c => iavf_client.c} | 4 ++--
drivers/net/ethernet/intel/iavf/{i40evf_client.h => iavf_client.h} | 0
drivers/net/ethernet/intel/iavf/{i40evf_ethtool.c => iavf_ethtool.c} | 2 +-
drivers/net/ethernet/intel/iavf/{i40evf_main.c => iavf_main.c} | 4 ++--
drivers/net/ethernet/intel/iavf/{i40e_txrx.c => iavf_txrx.c} | 2 +-
drivers/net/ethernet/intel/iavf/{i40e_txrx.h => iavf_txrx.h} | 0
.../net/ethernet/intel/iavf/{i40evf_virtchnl.c => iavf_virtchnl.c} | 4 ++--
9 files changed, 11 insertions(+), 11 deletions(-)
rename drivers/net/ethernet/intel/iavf/{i40evf.h => iavf.h} (99%)
rename drivers/net/ethernet/intel/iavf/{i40evf_client.c => iavf_client.c} (99%)
rename drivers/net/ethernet/intel/iavf/{i40evf_client.h => iavf_client.h} (100%)
rename drivers/net/ethernet/intel/iavf/{i40evf_ethtool.c => iavf_ethtool.c} (99%)
rename drivers/net/ethernet/intel/iavf/{i40evf_main.c => iavf_main.c} (99%)
rename drivers/net/ethernet/intel/iavf/{i40e_txrx.c => iavf_txrx.c} (99%)
rename drivers/net/ethernet/intel/iavf/{i40e_txrx.h => iavf_txrx.h} (100%)
rename drivers/net/ethernet/intel/iavf/{i40evf_virtchnl.c => iavf_virtchnl.c} (99%)drivers/net/ethernet/intel/iavf/Makefile +2 -2
@@ -11,5 +11,5 @@ subdir-ccflags-y += -I$(src) obj-$(CONFIG_IAVF) += iavf.o -iavf-objs := i40evf_main.o i40evf_ethtool.o i40evf_virtchnl.o \ - i40e_txrx.o i40e_common.o i40e_adminq.o i40evf_client.o +iavf-objs := iavf_main.o iavf_ethtool.o iavf_virtchnl.o \ + iavf_txrx.o i40e_common.o i40e_adminq.o iavf_client.o
drivers/net/ethernet/intel/iavf/iavf.h renamed from drivers/net/ethernet/intel/iavf/i40evf.h +1 -1
@@ -36,7 +36,7 @@#include "i40e_type.h" #include <linux/avf/virtchnl.h> -#include "i40e_txrx.h" +#include "iavf_txrx.h" #define DEFAULT_DEBUG_LEVEL_SHIFT 3#define PFX "iavf: "
drivers/net/ethernet/intel/iavf/iavf_client.c renamed from drivers/net/ethernet/intel/iavf/i40evf_client.c +2 -2
@@ -4,9 +4,9 @@#include <linux/list.h> #include <linux/errno.h> -#include "i40evf.h" +#include "iavf.h" #include "i40e_prototype.h" -#include "i40evf_client.h" +#include "iavf_client.h" static const char iavf_client_interface_version_str[] =IAVF_CLIENT_VERSION_STR ;
drivers/net/ethernet/intel/iavf/iavf_client.h renamed from drivers/net/ethernet/intel/iavf/i40evf_client.h +0 -0
drivers/net/ethernet/intel/iavf/iavf_ethtool.c renamed from drivers/net/ethernet/intel/iavf/i40evf_ethtool.c +1 -1
@@ -2,7 +2,7 @@/* Copyright(c) 2013 - 2018 Intel Corporation. */ /* ethtool support for iavf */ -#include "i40evf.h" +#include "iavf.h" #include <linux/uaccess.h>
drivers/net/ethernet/intel/iavf/iavf_main.c renamed from drivers/net/ethernet/intel/iavf/i40evf_main.c +2 -2
@@ -1,9 +1,9 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include "i40evf.h" +#include "iavf.h" #include "i40e_prototype.h" -#include "i40evf_client.h" +#include "iavf_client.h" /* All iavf 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/iavf/iavf_txrx.c renamed from drivers/net/ethernet/intel/iavf/i40e_txrx.c +1 -1
@@ -4,7 +4,7 @@#include <linux/prefetch.h> #include <net/busy_poll.h> -#include "i40evf.h" +#include "iavf.h" #include "i40e_trace.h" #include "i40e_prototype.h"
drivers/net/ethernet/intel/iavf/iavf_txrx.h renamed from drivers/net/ethernet/intel/iavf/i40e_txrx.h +0 -0
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c renamed from drivers/net/ethernet/intel/iavf/i40evf_virtchnl.c +2 -2
@@ -1,9 +1,9 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include "i40evf.h" +#include "iavf.h" #include "i40e_prototype.h" -#include "i40evf_client.h" +#include "iavf_client.h" /* busy wait delay in msec */ #define IAVF_BUSY_WAIT_DELAY 10
Signature · 1 line
2.14.4
PATCH v2 6/14 iavf: remove references to old names
In reply to Jesse BrandeburgRemove the register name references to I40E_VF* and change to IAVF_VF. Update the descriptor names and defines to the IAVF name.
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 28 ++-- drivers/net/ethernet/intel/iavf/i40e_common.c | 2 +- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 2 +- drivers/net/ethernet/intel/iavf/i40e_register.h | 128 +++++++++--------- drivers/net/ethernet/intel/iavf/i40e_type.h | 170 ++++++++++++------------ drivers/net/ethernet/intel/iavf/iavf.h | 10 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 92 ++++++------- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 104 +++++++-------- drivers/net/ethernet/intel/iavf/iavf_txrx.h | 2 +- 9 files changed, 267 insertions(+), 271 deletions(-)
drivers/net/ethernet/intel/iavf/i40e_adminq.c +14 -14
@@ -17,16 +17,16 @@ static void i40e_adminq_init_regs(struct i40e_hw *hw) {/* set head and tail registers in our local struct */ if (i40e_is_vf (hw)) { - hw->aq.asq.tail =I40E_VF_ATQT1 ; - hw->aq.asq.head =I40E_VF_ATQH1 ; - hw->aq.asq.len =I40E_VF_ATQLEN1 ; - hw->aq.asq.bal =I40E_VF_ATQBAL1 ; - hw->aq.asq.bah =I40E_VF_ATQBAH1 ; - hw->aq.arq.tail =I40E_VF_ARQT1 ; - hw->aq.arq.head =I40E_VF_ARQH1 ; - hw->aq.arq.len =I40E_VF_ARQLEN1 ; - hw->aq.arq.bal =I40E_VF_ARQBAL1 ; - hw->aq.arq.bah =I40E_VF_ARQBAH1 ; + hw->aq.asq.tail =IAVF_VF_ATQT1 ; + hw->aq.asq.head =IAVF_VF_ATQH1 ; + hw->aq.asq.len =IAVF_VF_ATQLEN1 ; + hw->aq.asq.bal =IAVF_VF_ATQBAL1 ; + hw->aq.asq.bah =IAVF_VF_ATQBAH1 ; + hw->aq.arq.tail =IAVF_VF_ARQT1 ; + hw->aq.arq.head =IAVF_VF_ARQH1 ; + hw->aq.arq.len =IAVF_VF_ARQLEN1 ; + hw->aq.arq.bal =IAVF_VF_ARQBAL1 ; + hw->aq.arq.bah =IAVF_VF_ARQBAH1 ; } }
@@ -264,7 +264,7 @@ static iavf_status i40e_config_asq_regs(struct i40e_hw *hw)/* set starting point */ wr32 (hw, hw->aq.asq.len, (hw->aq.num_asq_entries | -I40E_VF_ATQLEN1_ATQENABLE_MASK )); +IAVF_VF_ATQLEN1_ATQENABLE_MASK ));wr32 (hw, hw->aq.asq.bal,lower_32_bits (hw->aq.asq.desc_buf.pa));wr32 (hw, hw->aq.asq.bah,upper_32_bits (hw->aq.asq.desc_buf.pa));
@@ -293,7 +293,7 @@ static iavf_status i40e_config_arq_regs(struct i40e_hw *hw)/* set starting point */ wr32 (hw, hw->aq.arq.len, (hw->aq.num_arq_entries | -I40E_VF_ARQLEN1_ARQENABLE_MASK )); +IAVF_VF_ARQLEN1_ARQENABLE_MASK ));wr32 (hw, hw->aq.arq.bal,lower_32_bits (hw->aq.arq.desc_buf.pa));wr32 (hw, hw->aq.arq.bah,upper_32_bits (hw->aq.arq.desc_buf.pa));
@@ -800,7 +800,7 @@ iavf_status iavf_asq_send_command(struct i40e_hw *hw, struct i40e_aq_desc *desc,/* update the error if time out occurred */ if ((!cmd_completed) && (!details->async && !details->postpone)) { -if (rd32 (hw, hw->aq.asq.len) &I40E_VF_ATQLEN1_ATQCRIT_MASK ) { +if (rd32 (hw, hw->aq.asq.len) &IAVF_VF_ATQLEN1_ATQCRIT_MASK ) {i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: AQ Critical error.\n" ); status =I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR ;
@@ -868,7 +868,7 @@ iavf_status iavf_clean_arq_element(struct i40e_hw *hw, }/* set next_to_use to head */ - ntu =rd32 (hw, hw->aq.arq.head) &I40E_VF_ARQH1_ARQH_MASK ; + ntu =rd32 (hw, hw->aq.arq.head) &IAVF_VF_ARQH1_ARQH_MASK ;if (ntu == ntc) {/* nothing to do - shouldn't need to update ring's values */ ret_code =I40E_ERR_ADMIN_QUEUE_NO_WORK ;
drivers/net/ethernet/intel/iavf/i40e_common.c +1 -1
@@ -335,7 +335,7 @@ bool iavf_check_asq_alive(struct i40e_hw *hw) {if (hw->aq.asq.len)return !!(rd32 (hw, hw->aq.asq.len) & -I40E_VF_ATQLEN1_ATQENABLE_MASK ); +IAVF_VF_ATQLEN1_ATQENABLE_MASK );else return false; }
drivers/net/ethernet/intel/iavf/i40e_osdep.h +1 -1
@@ -24,7 +24,7 @@#define wr64 (a, reg, value) writeq((value), ((a)->hw_addr + (reg)))#define rd64 (a, reg) readq((a)->hw_addr + (reg)) -#define i40e_flush (a) readl((a)->hw_addr + I40E_VFGEN_RSTAT) +#define iavf_flush (a) readl((a)->hw_addr + IAVF_VFGEN_RSTAT)/* memory allocation tracking */ struct i40e_dma_mem {
drivers/net/ethernet/intel/iavf/i40e_register.h +64 -64
132 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_type.h +85 -85
235 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf.h +5 -5
@@ -77,14 +77,14 @@ struct i40e_vsi {#define MAXIMUM_ETHERNET_VLAN_SIZE (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN) -#define I40E_RX_DESC (R , i) (&(((union i40e_32byte_rx_desc *)((R)->desc))[i])) -#define I40E_TX_DESC (R , i) (&(((struct i40e_tx_desc *)((R)->desc))[i])) -#define I40E_TX_CTXTDESC (R , i) \ +#define IAVF_RX_DESC (R , i) (&(((union i40e_32byte_rx_desc *)((R)->desc))[i])) +#define IAVF_TX_DESC (R , i) (&(((struct i40e_tx_desc *)((R)->desc))[i])) +#define IAVF_TX_CTXTDESC (R , i) \ (&(((struct i40e_tx_context_desc *)((R)->desc))[i]))#define IAVF_MAX_REQ_QUEUES 4 -#define IAVF_HKEY_ARRAY_SIZE ((I40E_VFQF_HKEY_MAX_INDEX + 1) * 4) -#define IAVF_HLUT_ARRAY_SIZE ((I40E_VFQF_HLUT_MAX_INDEX + 1) * 4) +#define IAVF_HKEY_ARRAY_SIZE ((IAVF_VFQF_HKEY_MAX_INDEX + 1) * 4) +#define IAVF_HLUT_ARRAY_SIZE ((IAVF_VFQF_HLUT_MAX_INDEX + 1) * 4)#define IAVF_MBPS_DIVISOR 125000/* divisor to convert to Mbps */ /* MAX_MSIX_Q_VECTORS of these are allocated,
drivers/net/ethernet/intel/iavf/iavf_main.c +44 -48
227 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_txrx.c +52 -52
316 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_txrx.h +1 -1
@@ -186,7 +186,7 @@ static inline bool i40e_test_staterr(union i40e_rx_desc *rx_desc, (i)++; \if ((i) == (r)->count) \ i =0 ; \ - (n) =I40E_RX_DESC ((r), (i)); \ + (n) =IAVF_RX_DESC ((r), (i)); \ }while (0 ) #define I40E_RX_NEXT_DESC_PREFETCH(r, i, n) \
Signature · 1 line
2.14.4
PATCH v2 7/14 iavf: rename device ID defines
In reply to Jesse BrandeburgRename the device ID defines to have IAVF in them
and remove all the unused defines.
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 22 +++++++-------- drivers/net/ethernet/intel/iavf/i40e_common.c | 29 +++---------------- drivers/net/ethernet/intel/iavf/i40e_devids.h | 40 ++++++--------------------- drivers/net/ethernet/intel/iavf/i40e_type.h | 6 ---- drivers/net/ethernet/intel/iavf/iavf_main.c | 8 +++--- 5 files changed, 27 insertions(+), 78 deletions(-)
drivers/net/ethernet/intel/iavf/i40e_adminq.c +10 -12
@@ -16,18 +16,16 @@static void i40e_adminq_init_regs (struct i40e_hw *hw) {/* set head and tail registers in our local struct */ -if (i40e_is_vf (hw)) { - hw->aq.asq.tail =IAVF_VF_ATQT1 ; - hw->aq.asq.head =IAVF_VF_ATQH1 ; - hw->aq.asq.len =IAVF_VF_ATQLEN1 ; - hw->aq.asq.bal =IAVF_VF_ATQBAL1 ; - hw->aq.asq.bah =IAVF_VF_ATQBAH1 ; - hw->aq.arq.tail =IAVF_VF_ARQT1 ; - hw->aq.arq.head =IAVF_VF_ARQH1 ; - hw->aq.arq.len =IAVF_VF_ARQLEN1 ; - hw->aq.arq.bal =IAVF_VF_ARQBAL1 ; - hw->aq.arq.bah =IAVF_VF_ARQBAH1 ; - } + hw->aq.asq.tail =IAVF_VF_ATQT1 ; + hw->aq.asq.head =IAVF_VF_ATQH1 ; + hw->aq.asq.len =IAVF_VF_ATQLEN1 ; + hw->aq.asq.bal =IAVF_VF_ATQBAL1 ; + hw->aq.asq.bah =IAVF_VF_ATQBAH1 ; + hw->aq.arq.tail =IAVF_VF_ARQT1 ; + hw->aq.arq.head =IAVF_VF_ARQH1 ; + hw->aq.arq.len =IAVF_VF_ARQLEN1 ; + hw->aq.arq.bal =IAVF_VF_ARQBAL1 ; + hw->aq.arq.bah =IAVF_VF_ARQBAH1 ; }/**
drivers/net/ethernet/intel/iavf/i40e_common.c +4 -25
@@ -19,33 +19,12 @@ iavf_status i40e_set_mac_type(struct i40e_hw *hw)if (hw->vendor_id ==PCI_VENDOR_ID_INTEL ) {switch (hw->device_id) { -case I40E_DEV_ID_SFP_XL710 : -case I40E_DEV_ID_QEMU : -case I40E_DEV_ID_KX_B : -case I40E_DEV_ID_KX_C : -case I40E_DEV_ID_QSFP_A : -case I40E_DEV_ID_QSFP_B : -case I40E_DEV_ID_QSFP_C : -case I40E_DEV_ID_10G_BASE_T : -case I40E_DEV_ID_10G_BASE_T4 : -case I40E_DEV_ID_20G_KR2 : -case I40E_DEV_ID_20G_KR2_A : -case I40E_DEV_ID_25G_B : -case I40E_DEV_ID_25G_SFP28 : - hw->mac.type =I40E_MAC_XL710 ; -break ; -case I40E_DEV_ID_SFP_X722 : -case I40E_DEV_ID_1G_BASE_T_X722 : -case I40E_DEV_ID_10G_BASE_T_X722 : -case I40E_DEV_ID_SFP_I_X722 : - hw->mac.type =I40E_MAC_X722 ; -break ; -case I40E_DEV_ID_X722_VF : +case IAVF_DEV_ID_X722_VF : hw->mac.type =I40E_MAC_X722_VF ;break ; -case I40E_DEV_ID_VF : -case I40E_DEV_ID_VF_HV : -case I40E_DEV_ID_ADAPTIVE_VF : +case IAVF_DEV_ID_VF : +case IAVF_DEV_ID_VF_HV : +case IAVF_DEV_ID_ADAPTIVE_VF : hw->mac.type =I40E_MAC_VF ;break ;default :
drivers/net/ethernet/intel/iavf/i40e_devids.h +9 -31
@@ -1,34 +1,12 @@/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#ifndef _I40E_DEVIDS_H_ -#define _I40E_DEVIDS_H_ - -/* Device IDs */ -#define I40E_DEV_ID_SFP_XL710 0x1572 -#define I40E_DEV_ID_QEMU 0x1574 -#define I40E_DEV_ID_KX_B 0x1580 -#define I40E_DEV_ID_KX_C 0x1581 -#define I40E_DEV_ID_QSFP_A 0x1583 -#define I40E_DEV_ID_QSFP_B 0x1584 -#define I40E_DEV_ID_QSFP_C 0x1585 -#define I40E_DEV_ID_10G_BASE_T 0x1586 -#define I40E_DEV_ID_20G_KR2 0x1587 -#define I40E_DEV_ID_20G_KR2_A 0x1588 -#define I40E_DEV_ID_10G_BASE_T4 0x1589 -#define I40E_DEV_ID_25G_B 0x158A -#define I40E_DEV_ID_25G_SFP28 0x158B -#define I40E_DEV_ID_VF 0x154C -#define I40E_DEV_ID_VF_HV 0x1571 -#define I40E_DEV_ID_ADAPTIVE_VF 0x1889 -#define I40E_DEV_ID_SFP_X722 0x37D0 -#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1 -#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 -#define I40E_DEV_ID_SFP_I_X722 0x37D3 -#define I40E_DEV_ID_X722_VF 0x37CD - -#define i40e_is_40G_device (d) ((d) == I40E_DEV_ID_QSFP_A || \ - (d) == I40E_DEV_ID_QSFP_B || \ - (d) == I40E_DEV_ID_QSFP_C) - -#endif /* _I40E_DEVIDS_H_ */ +#ifndef _IAVF_DEVIDS_H_ +#define _IAVF_DEVIDS_H_ + +/* Device IDs for the VF driver */ +#define IAVF_DEV_ID_VF 0x154C +#define IAVF_DEV_ID_VF_HV 0x1571 +#define IAVF_DEV_ID_ADAPTIVE_VF 0x1889 +#define IAVF_DEV_ID_X722_VF 0x37CD +#endif /* _IAVF_DEVIDS_H_ */
drivers/net/ethernet/intel/iavf/i40e_type.h +0 -6
@@ -193,12 +193,6 @@ struct i40e_hw {char err_str[16 ]; }; -static inline bool i40e_is_vf (struct i40e_hw *hw) -{ -return (hw->mac.type ==I40E_MAC_VF || - hw->mac.type ==I40E_MAC_X722_VF ); -} -struct i40e_driver_version {u8 major_version;u8 minor_version;
drivers/net/ethernet/intel/iavf/iavf_main.c +4 -4
@@ -41,10 +41,10 @@ static const char iavf_copyright[] =* Class, Class Mask, private data (not used) } */ static const struct pci_device_id iavf_pci_tbl[] = { - {PCI_VDEVICE (INTEL ,I40E_DEV_ID_VF ),0 }, - {PCI_VDEVICE (INTEL ,I40E_DEV_ID_VF_HV ),0 }, - {PCI_VDEVICE (INTEL ,I40E_DEV_ID_X722_VF ),0 }, - {PCI_VDEVICE (INTEL ,I40E_DEV_ID_ADAPTIVE_VF ),0 }, + {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_VF ),0 }, + {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_VF_HV ),0 }, + {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_X722_VF ),0 }, + {PCI_VDEVICE (INTEL ,IAVF_DEV_ID_ADAPTIVE_VF ),0 },/* required last entry */ {0 , } };
Signature · 1 line
2.14.4
PATCH v2 8/14 iavf: rename I40E_ADMINQ_DESC
In reply to Jesse BrandeburgTake care of some renames containing I40E_ADMINQ_DESC.
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 18 +++++++++--------- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-)
drivers/net/ethernet/intel/iavf/i40e_adminq.c +9 -9
@@ -40,7 +40,7 @@ static iavf_status i40e_alloc_adminq_asq_ring(struct i40e_hw *hw) i40e_mem_atq_ring, (hw->aq.num_asq_entries *sizeof (struct i40e_aq_desc )), - I40E_ADMINQ_DESC_ALIGNMENT); + IAVF_ADMINQ_DESC_ALIGNMENT);if (ret_code)return ret_code;
@@ -67,7 +67,7 @@ static iavf_status i40e_alloc_adminq_arq_ring(struct i40e_hw *hw) i40e_mem_arq_ring, (hw->aq.num_arq_entries *sizeof (struct i40e_aq_desc )), - I40E_ADMINQ_DESC_ALIGNMENT); + IAVF_ADMINQ_DESC_ALIGNMENT);return ret_code; }
@@ -124,12 +124,12 @@ static iavf_status i40e_alloc_arq_bufs(struct i40e_hw *hw) ret_code =i40e_allocate_dma_mem (hw, bi, i40e_mem_arq_buf, hw->aq.arq_buf_size, -I40E_ADMINQ_DESC_ALIGNMENT ); +IAVF_ADMINQ_DESC_ALIGNMENT );if (ret_code) goto unwind_alloc_arq_bufs;/* now configure the descriptors for use */ - desc =I40E_ADMINQ_DESC (hw->aq.arq, i); + desc =IAVF_ADMINQ_DESC (hw->aq.arq, i); desc->flags =cpu_to_le16 (I40E_AQ_FLAG_BUF );if (hw->aq.arq_buf_size >I40E_AQ_LARGE_BUF )
@@ -186,7 +186,7 @@ static iavf_status i40e_alloc_asq_bufs(struct i40e_hw *hw) ret_code =i40e_allocate_dma_mem (hw, bi, i40e_mem_asq_buf, hw->aq.asq_buf_size, -I40E_ADMINQ_DESC_ALIGNMENT ); +IAVF_ADMINQ_DESC_ALIGNMENT );if (ret_code) goto unwind_alloc_asq_bufs; }
@@ -574,7 +574,7 @@ static u16 i40e_clean_asq(struct i40e_hw *hw)struct i40e_aq_desc desc_cb;struct i40e_aq_desc *desc; - desc =I40E_ADMINQ_DESC (*asq, ntc); + desc =IAVF_ADMINQ_DESC (*asq, ntc); details =I40E_ADMINQ_DETAILS (*asq, ntc);while (rd32 (hw, hw->aq.asq.head) != ntc) { i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
@@ -592,7 +592,7 @@ static u16 i40e_clean_asq(struct i40e_hw *hw) ntc++;if (ntc == asq->count) ntc =0 ; - desc =I40E_ADMINQ_DESC (*asq, ntc); + desc =IAVF_ADMINQ_DESC (*asq, ntc); details =I40E_ADMINQ_DETAILS (*asq, ntc); }
@@ -714,7 +714,7 @@ iavf_status iavf_asq_send_command(struct i40e_hw *hw, struct i40e_aq_desc *desc, }/* initialize the temp desc pointer with the right desc */ - desc_on_ring =I40E_ADMINQ_DESC (hw->aq.asq, hw->aq.asq.next_to_use); + desc_on_ring =IAVF_ADMINQ_DESC (hw->aq.asq, hw->aq.asq.next_to_use);/* if the desc is available copy the temp desc to the right place */ *desc_on_ring = *desc;
@@ -874,7 +874,7 @@ iavf_status iavf_clean_arq_element(struct i40e_hw *hw, }/* now clean the next descriptor */ - desc =I40E_ADMINQ_DESC (hw->aq.arq, ntc); + desc =IAVF_ADMINQ_DESC (hw->aq.arq, ntc); desc_idx = ntc; hw->aq.arq_last_status =
drivers/net/ethernet/intel/iavf/i40e_adminq.h +2 -2
@@ -8,10 +8,10 @@#include "i40e_status.h" #include "i40e_adminq_cmd.h" -#define I40E_ADMINQ_DESC (R , i) \ +#define IAVF_ADMINQ_DESC (R , i) \ (&(((struct i40e_aq_desc *)((R).desc_buf.va))[i])) -#define I40E_ADMINQ_DESC_ALIGNMENT 4096 +#define IAVF_ADMINQ_DESC_ALIGNMENT 4096struct i40e_adminq_ring {struct i40e_virt_mem dma_head;/* space for dma structures */
Signature · 1 line
2.14.4
PATCH v2 9/14 iavf: rename i40e_hw to iavf_hw
In reply to Jesse BrandeburgFix up the i40e_hw names to new name, including versions inside other strings.
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 42 +++++++-------- drivers/net/ethernet/intel/iavf/i40e_alloc.h | 21 +++----- drivers/net/ethernet/intel/iavf/i40e_common.c | 30 +++++------ drivers/net/ethernet/intel/iavf/i40e_prototype.h | 65 +++++++++++------------- drivers/net/ethernet/intel/iavf/i40e_type.h | 10 ++-- drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 52 +++++++++---------- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 6 +-- 9 files changed, 111 insertions(+), 119 deletions(-)
drivers/net/ethernet/intel/iavf/i40e_adminq.c +21 -21
@@ -13,7 +13,7 @@* * This assumes the alloc_asq and alloc_arq functions have already been called **/ -static void i40e_adminq_init_regs (struct i40e_hw *hw) +static void i40e_adminq_init_regs (struct iavf_hw *hw) {/* set head and tail registers in our local struct */ hw->aq.asq.tail =IAVF_VF_ATQT1 ;
@@ -32,7 +32,7 @@ static void i40e_adminq_init_regs(struct i40e_hw *hw)* i40e_alloc_adminq_asq_ring - Allocate Admin Queue send rings * @hw: pointer to the hardware structure **/ -static iavf_status i40e_alloc_adminq_asq_ring (struct i40e_hw *hw) +static iavf_status i40e_alloc_adminq_asq_ring (struct iavf_hw *hw) {iavf_status ret_code;
@@ -59,7 +59,7 @@ static iavf_status i40e_alloc_adminq_asq_ring(struct i40e_hw *hw)* i40e_alloc_adminq_arq_ring - Allocate Admin Queue receive rings * @hw: pointer to the hardware structure **/ -static iavf_status i40e_alloc_adminq_arq_ring (struct i40e_hw *hw) +static iavf_status i40e_alloc_adminq_arq_ring (struct iavf_hw *hw) {iavf_status ret_code;
@@ -79,7 +79,7 @@ static iavf_status i40e_alloc_adminq_arq_ring(struct i40e_hw *hw)* This assumes the posted send buffers have already been cleaned * and de-allocated **/ -static void i40e_free_adminq_asq (struct i40e_hw *hw) +static void i40e_free_adminq_asq (struct iavf_hw *hw) {i40e_free_dma_mem (hw, &hw->aq.asq.desc_buf); }
@@ -91,7 +91,7 @@ static void i40e_free_adminq_asq(struct i40e_hw *hw)* This assumes the posted receive buffers have already been cleaned * and de-allocated **/ -static void i40e_free_adminq_arq (struct i40e_hw *hw) +static void i40e_free_adminq_arq (struct iavf_hw *hw) {i40e_free_dma_mem (hw, &hw->aq.arq.desc_buf); }
@@ -100,7 +100,7 @@ static void i40e_free_adminq_arq(struct i40e_hw *hw)* i40e_alloc_arq_bufs - Allocate pre-posted buffers for the receive queue * @hw: pointer to the hardware structure **/ -static iavf_status i40e_alloc_arq_bufs (struct i40e_hw *hw) +static iavf_status i40e_alloc_arq_bufs (struct iavf_hw *hw) {iavf_status ret_code;struct i40e_aq_desc *desc;
@@ -167,7 +167,7 @@ static iavf_status i40e_alloc_arq_bufs(struct i40e_hw *hw)* i40e_alloc_asq_bufs - Allocate empty buffer structs for the send queue * @hw: pointer to the hardware structure **/ -static iavf_status i40e_alloc_asq_bufs (struct i40e_hw *hw) +static iavf_status i40e_alloc_asq_bufs (struct iavf_hw *hw) {iavf_status ret_code;struct i40e_dma_mem *bi;
@@ -207,7 +207,7 @@ static iavf_status i40e_alloc_asq_bufs(struct i40e_hw *hw)* i40e_free_arq_bufs - Free receive queue buffer info elements * @hw: pointer to the hardware structure **/ -static void i40e_free_arq_bufs (struct i40e_hw *hw) +static void i40e_free_arq_bufs (struct iavf_hw *hw) {int i;
@@ -226,7 +226,7 @@ static void i40e_free_arq_bufs(struct i40e_hw *hw)* i40e_free_asq_bufs - Free send queue buffer info elements * @hw: pointer to the hardware structure **/ -static void i40e_free_asq_bufs (struct i40e_hw *hw) +static void i40e_free_asq_bufs (struct iavf_hw *hw) {int i;
@@ -251,7 +251,7 @@ static void i40e_free_asq_bufs(struct i40e_hw *hw)* * Configure base address and length registers for the transmit queue **/ -static iavf_status i40e_config_asq_regs (struct i40e_hw *hw) +static iavf_status i40e_config_asq_regs (struct iavf_hw *hw) {iavf_status ret_code =0 ;u32 reg =0 ;
@@ -280,7 +280,7 @@ static iavf_status i40e_config_asq_regs(struct i40e_hw *hw)* * Configure base address and length registers for the receive (event queue) **/ -static iavf_status i40e_config_arq_regs (struct i40e_hw *hw) +static iavf_status i40e_config_arq_regs (struct iavf_hw *hw) {iavf_status ret_code =0 ;u32 reg =0 ;
@@ -319,7 +319,7 @@ static iavf_status i40e_config_arq_regs(struct i40e_hw *hw)* Do *NOT* hold the lock when calling this as the memory allocation routines * called are not going to be atomic context safe **/ -static iavf_status i40e_init_asq (struct i40e_hw *hw) +static iavf_status i40e_init_asq (struct iavf_hw *hw) {iavf_status ret_code =0 ;
@@ -378,7 +378,7 @@ static iavf_status i40e_init_asq(struct i40e_hw *hw)* Do *NOT* hold the lock when calling this as the memory allocation routines * called are not going to be atomic context safe **/ -static iavf_status i40e_init_arq (struct i40e_hw *hw) +static iavf_status i40e_init_arq (struct iavf_hw *hw) {iavf_status ret_code =0 ;
@@ -430,7 +430,7 @@ static iavf_status i40e_init_arq(struct i40e_hw *hw)* * The main shutdown routine for the Admin Send Queue **/ -static iavf_status i40e_shutdown_asq (struct i40e_hw *hw) +static iavf_status i40e_shutdown_asq (struct iavf_hw *hw) {iavf_status ret_code =0 ;
@@ -464,7 +464,7 @@ static iavf_status i40e_shutdown_asq(struct i40e_hw *hw)* * The main shutdown routine for the Admin Receive Queue **/ -static iavf_status i40e_shutdown_arq (struct i40e_hw *hw) +static iavf_status i40e_shutdown_arq (struct iavf_hw *hw) {iavf_status ret_code =0 ;
@@ -503,7 +503,7 @@ static iavf_status i40e_shutdown_arq(struct i40e_hw *hw)* - hw->aq.arq_buf_size * - hw->aq.asq_buf_size **/ -iavf_status iavf_init_adminq (struct i40e_hw *hw) +iavf_status iavf_init_adminq (struct iavf_hw *hw) {iavf_status ret_code;
@@ -547,7 +547,7 @@ iavf_status iavf_init_adminq(struct i40e_hw *hw)* iavf_shutdown_adminq - shutdown routine for the Admin Queue * @hw: pointer to the hardware structure **/ -iavf_status iavf_shutdown_adminq (struct i40e_hw *hw) +iavf_status iavf_shutdown_adminq (struct iavf_hw *hw) {iavf_status ret_code =0 ;
@@ -566,7 +566,7 @@ iavf_status iavf_shutdown_adminq(struct i40e_hw *hw)* * returns the number of free desc **/ -static u16 i40e_clean_asq (struct i40e_hw *hw) +static u16 i40e_clean_asq (struct iavf_hw *hw) {struct i40e_adminq_ring *asq = &hw->aq.asq;struct i40e_asq_cmd_details *details;
@@ -608,7 +608,7 @@ static u16 i40e_clean_asq(struct i40e_hw *hw)* Returns true if the firmware has processed all descriptors on the * admin send queue. Returns false if there are still requests pending. **/ -bool iavf_asq_done (struct i40e_hw *hw) +bool iavf_asq_done (struct iavf_hw *hw) {/* AQ designers suggest use of head for better * timing reliability than DD bit
@@ -627,7 +627,7 @@ bool iavf_asq_done(struct i40e_hw *hw)* This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -iavf_status iavf_asq_send_command (struct i40e_hw *hw,struct i40e_aq_desc *desc, +iavf_status iavf_asq_send_command (struct iavf_hw *hw,struct i40e_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size,struct i40e_asq_cmd_details *cmd_details)
@@ -839,7 +839,7 @@ void iavf_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc, u16 opcode)* the contents through e. It can also return how many events are * left to process through 'pending' **/ -iavf_status iavf_clean_arq_element (struct i40e_hw *hw, +iavf_status iavf_clean_arq_element (struct iavf_hw *hw,struct i40e_arq_event_info *e,u16 *pending) {
drivers/net/ethernet/intel/iavf/i40e_alloc.h +8 -13
@@ -4,7 +4,7 @@#ifndef _I40E_ALLOC_H_#define _I40E_ALLOC_H_ -struct i40e_hw ; +struct iavf_hw ;/* Memory allocation types */ enum i40e_memory_type {
@@ -20,16 +20,11 @@ enum i40e_memory_type { };/* prototype for functions used for dynamic memory allocation */ -iavf_status i40e_allocate_dma_mem (struct i40e_hw *hw, -struct i40e_dma_mem *mem, -enum i40e_memory_type type, -u64 size,u32 alignment); -iavf_status i40e_free_dma_mem (struct i40e_hw *hw, -struct i40e_dma_mem *mem); -iavf_status i40e_allocate_virt_mem (struct i40e_hw *hw, -struct i40e_virt_mem *mem, -u32 size); -iavf_status i40e_free_virt_mem (struct i40e_hw *hw, -struct i40e_virt_mem *mem); - +iavf_status i40e_allocate_dma_mem (struct iavf_hw *hw,struct i40e_dma_mem *mem, +enum i40e_memory_type type,u64 size, +u32 alignment); +iavf_status i40e_free_dma_mem (struct iavf_hw *hw,struct i40e_dma_mem *mem); +iavf_status i40e_allocate_virt_mem (struct iavf_hw *hw, +struct i40e_virt_mem *mem,u32 size); +iavf_status i40e_free_virt_mem (struct iavf_hw *hw,struct i40e_virt_mem *mem);#endif /* _I40E_ALLOC_H_ */
drivers/net/ethernet/intel/iavf/i40e_common.c +15 -15
@@ -13,7 +13,7 @@* This function sets the mac type of the adapter based on the * vendor ID and device ID stored in the hw structure. **/ -iavf_status i40e_set_mac_type (struct i40e_hw *hw) +iavf_status i40e_set_mac_type (struct iavf_hw *hw) {iavf_status status =0 ;
@@ -44,7 +44,7 @@ iavf_status i40e_set_mac_type(struct i40e_hw *hw)* @hw: pointer to the HW structure * @aq_err: the AQ error code to convert **/ -const char *iavf_aq_str (struct i40e_hw *hw,enum i40e_admin_queue_err aq_err) +const char *iavf_aq_str (struct iavf_hw *hw,enum i40e_admin_queue_err aq_err) {switch (aq_err) {case I40E_AQ_RC_OK :
@@ -104,7 +104,7 @@ const char *iavf_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err)* @hw: pointer to the HW structure * @stat_err: the status error code to convert **/ -const char *iavf_stat_str (struct i40e_hw *hw,iavf_status stat_err) +const char *iavf_stat_str (struct iavf_hw *hw,iavf_status stat_err) {switch (stat_err) {case 0 :
@@ -257,7 +257,7 @@ const char *iavf_stat_str(struct i40e_hw *hw, iavf_status stat_err)* * Dumps debug log about adminq command with descriptor contents. **/ -void iavf_debug_aq (struct i40e_hw *hw,enum i40e_debug_mask mask,void *desc, +void iavf_debug_aq (struct iavf_hw *hw,enum i40e_debug_mask mask,void *desc,void *buffer,u16 buf_len) {struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;
@@ -310,7 +310,7 @@ void iavf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,* * Returns true if Queue is enabled else false. **/ -bool iavf_check_asq_alive (struct i40e_hw *hw) +bool iavf_check_asq_alive (struct iavf_hw *hw) {if (hw->aq.asq.len) return !!(rd32(hw, hw->aq.asq.len) &
@@ -327,7 +327,7 @@ bool iavf_check_asq_alive(struct i40e_hw *hw)* Tell the Firmware that we're shutting down the AdminQ and whether * or not the driver is unloading as well. **/ -iavf_status iavf_aq_queue_shutdown (struct i40e_hw *hw,bool unloading) +iavf_status iavf_aq_queue_shutdown (struct iavf_hw *hw,bool unloading) {struct i40e_aq_desc desc; struct i40e_aqc_queue_shutdown *cmd =
@@ -354,7 +354,7 @@ iavf_status iavf_aq_queue_shutdown(struct i40e_hw *hw, bool unloading)* * Internal function to get or set RSS look up table **/ -static iavf_status i40e_aq_get_set_rss_lut (struct i40e_hw *hw, +static iavf_status i40e_aq_get_set_rss_lut (struct iavf_hw *hw,u16 vsi_id,bool pf_lut,u8 *lut,u16 lut_size,bool set)
@@ -407,7 +407,7 @@ static iavf_status i40e_aq_get_set_rss_lut(struct i40e_hw *hw,* * get the RSS lookup table, PF or VSI type **/ -iavf_status iavf_aq_get_rss_lut (struct i40e_hw *hw,u16 vsi_id, +iavf_status iavf_aq_get_rss_lut (struct iavf_hw *hw,u16 vsi_id,bool pf_lut,u8 *lut,u16 lut_size) { return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size,
@@ -424,7 +424,7 @@ iavf_status iavf_aq_get_rss_lut(struct i40e_hw *hw, u16 vsi_id,* * set the RSS lookup table, PF or VSI type **/ -iavf_status iavf_aq_set_rss_lut (struct i40e_hw *hw,u16 vsi_id, +iavf_status iavf_aq_set_rss_lut (struct iavf_hw *hw,u16 vsi_id,bool pf_lut,u8 *lut,u16 lut_size) {return i40e_aq_get_set_rss_lut (hw, vsi_id, pf_lut, lut, lut_size, true);
@@ -440,7 +440,7 @@ iavf_status iavf_aq_set_rss_lut(struct i40e_hw *hw, u16 vsi_id,* get the RSS key per VSI **/ static -iavf_status i40e_aq_get_set_rss_key (struct i40e_hw *hw,u16 vsi_id, +iavf_status i40e_aq_get_set_rss_key (struct iavf_hw *hw,u16 vsi_id,struct i40e_aqc_get_set_rss_key_data *key,bool set) {
@@ -479,7 +479,7 @@ iavf_status i40e_aq_get_set_rss_key(struct i40e_hw *hw, u16 vsi_id,* @key: pointer to key info struct * **/ -iavf_status iavf_aq_get_rss_key (struct i40e_hw *hw,u16 vsi_id, +iavf_status iavf_aq_get_rss_key (struct iavf_hw *hw,u16 vsi_id,struct i40e_aqc_get_set_rss_key_data *key) {return i40e_aq_get_set_rss_key (hw, vsi_id, key, false);
@@ -493,7 +493,7 @@ iavf_status iavf_aq_get_rss_key(struct i40e_hw *hw, u16 vsi_id,* * set the RSS key per VSI **/ -iavf_status iavf_aq_set_rss_key (struct i40e_hw *hw,u16 vsi_id, +iavf_status iavf_aq_set_rss_key (struct iavf_hw *hw,u16 vsi_id,struct i40e_aqc_get_set_rss_key_data *key) {return i40e_aq_get_set_rss_key (hw, vsi_id, key, true);
@@ -877,7 +877,7 @@ struct i40e_rx_ptype_decoded iavf_ptype_lookup[] = {* is sent asynchronously, i.e. iavf_asq_send_command() does not wait for * completion before returning. **/ -iavf_status iavf_aq_send_msg_to_pf (struct i40e_hw *hw, +iavf_status iavf_aq_send_msg_to_pf (struct iavf_hw *hw,enum virtchnl_ops v_opcode,iavf_status v_retval,u8 *msg,u16 msglen,struct i40e_asq_cmd_details *cmd_details)
@@ -914,7 +914,7 @@ iavf_status iavf_aq_send_msg_to_pf(struct i40e_hw *hw,* Given a VF resource message from the PF, populate the hw struct * with appropriate information. **/ -void iavf_vf_parse_hw_config (struct i40e_hw *hw, +void iavf_vf_parse_hw_config (struct iavf_hw *hw,struct virtchnl_vf_resource *msg) {struct virtchnl_vsi_resource *vsi_res;
@@ -948,7 +948,7 @@ void iavf_vf_parse_hw_config(struct i40e_hw *hw,* as none will be forthcoming. Immediately after calling this function, * the admin queue should be shut down and (optionally) reinitialized. **/ -iavf_status iavf_vf_reset (struct i40e_hw *hw) +iavf_status iavf_vf_reset (struct iavf_hw *hw) {return iavf_aq_send_msg_to_pf (hw,VIRTCHNL_OP_RESET_VF ,0 ,NULL ,0 ,NULL );
drivers/net/ethernet/intel/iavf/i40e_prototype.h +31 -34
83 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_type.h +5 -5
@@ -20,8 +20,8 @@#define I40E_MAX_CHAINED_RX_BUFFERS 5/* forward declaration */ -struct i40e_hw ; -typedef void (*I40E_ADMINQ_CALLBACK )(struct i40e_hw *,struct i40e_aq_desc *); +struct iavf_hw ; +typedef void (*I40E_ADMINQ_CALLBACK )(struct iavf_hw *,struct i40e_aq_desc *);/* Data type manipulation macros. */
@@ -99,7 +99,7 @@ enum i40e_queue_type {#define I40E_HW_CAP_MAX_GPIO 30/* Capabilities of a PF or a VF or the whole device */ -struct i40e_hw_capabilities { +struct iavf_hw_capabilities {bool dcb;bool fcoe;u32 num_vsis;
@@ -167,7 +167,7 @@ struct i40e_bus_info {#define I40E_MAX_TRAFFIC_CLASS 8#define I40E_MAX_USER_PRIORITY 8/* Port hardware description */ -struct i40e_hw { +struct iavf_hw {u8 __iomem *hw_addr;void *back;
@@ -183,7 +183,7 @@ struct i40e_hw {u8 revision_id;/* capabilities for entire device and PCI func */ -struct i40e_hw_capabilities dev_caps; +struct iavf_hw_capabilities dev_caps;/* Admin Queue info */ struct i40e_adminq_info aq;
drivers/net/ethernet/intel/iavf/iavf.h +1 -1
@@ -307,7 +307,7 @@ struct iavf_adapter {struct net_device *netdev;struct pci_dev *pdev; -struct i40e_hw hw;/* defined in i40e_type.h */ +struct iavf_hw hw;/* defined in i40e_type.h */ enum iavf_state_t state;unsigned long crit_section;
drivers/net/ethernet/intel/iavf/iavf_main.c +26 -26
208 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_txrx.c +1 -1
@@ -1627,7 +1627,7 @@ static inline u32 i40e_buildreg_itr(const int type, u16 itr)static inline void i40e_update_enable_itr (struct i40e_vsi *vsi,struct i40e_q_vector *q_vector) { -struct i40e_hw *hw = &vsi->back->hw; +struct iavf_hw *hw = &vsi->back->hw;u32 intval;/* These will do nothing if dynamic updates are not enabled */
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +3 -3
@@ -21,7 +21,7 @@static int iavf_send_pf_msg (struct iavf_adapter *adapter,enum virtchnl_ops op,u8 *msg,u16 len) { -struct i40e_hw *hw = &adapter->hw; +struct iavf_hw *hw = &adapter->hw;iavf_status err;if (adapter->flags &IAVF_FLAG_PF_COMMS_FAILED )
@@ -66,7 +66,7 @@ int iavf_send_api_ver(struct iavf_adapter *adapter)int iavf_verify_api_ver (struct iavf_adapter *adapter) {struct virtchnl_version_info *pf_vvi; -struct i40e_hw *hw = &adapter->hw; +struct iavf_hw *hw = &adapter->hw;struct i40e_arq_event_info event;enum virtchnl_ops op;iavf_status err;
@@ -188,7 +188,7 @@ static void iavf_validate_num_queues(struct iavf_adapter *adapter)**/ int iavf_get_vf_config (struct iavf_adapter *adapter) { -struct i40e_hw *hw = &adapter->hw; +struct iavf_hw *hw = &adapter->hw;struct i40e_arq_event_info event;enum virtchnl_ops op;iavf_status err;
Signature · 1 line
2.14.4
PATCH v2 10/14 iavf: replace i40e_debug with iavf version
In reply to Jesse BrandeburgChange another string (i40e_debug)
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 28 ++++++++++++------------ drivers/net/ethernet/intel/iavf/i40e_common.c | 12 +++++----- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 2 +- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 2 +- drivers/net/ethernet/intel/iavf/i40e_type.h | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-)
drivers/net/ethernet/intel/iavf/i40e_adminq.c +14 -14
@@ -577,7 +577,7 @@ static u16 i40e_clean_asq(struct iavf_hw *hw) desc =IAVF_ADMINQ_DESC (*asq, ntc); details =I40E_ADMINQ_DETAILS (*asq, ntc);while (rd32 (hw, hw->aq.asq.head) != ntc) { -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"ntc %d head %d.\n" , ntc,rd32 (hw, hw->aq.asq.head));if (details->callback) {
@@ -643,7 +643,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,mutex_lock (&hw->aq.asq_mutex);if (hw->aq.asq.count ==0 ) { -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: Admin queue not initialized.\n" ); status =I40E_ERR_QUEUE_EMPTY ; goto asq_send_command_error;
@@ -653,7 +653,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, val =rd32 (hw, hw->aq.asq.head);if (val >= hw->aq.num_asq_entries) { -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: head overrun at %d\n" , val); status =I40E_ERR_QUEUE_EMPTY ; goto asq_send_command_error;
@@ -682,7 +682,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, desc->flags |=cpu_to_le16 (details->flags_ena);if (buff_size > hw->aq.asq_buf_size) { -i40e_debug (hw, +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: Invalid buffer size: %d.\n" , buff_size);
@@ -691,7 +691,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, }if (details->postpone && !details->async) { -i40e_debug (hw, +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: Async flag not set along with postpone flag" ); status =I40E_ERR_PARAM ;
@@ -706,7 +706,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,* in case of asynchronous completions */ if (i40e_clean_asq (hw) ==0 ) { -i40e_debug (hw, +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: Error queue is full.\n" ); status =I40E_ERR_ADMIN_QUEUE_FULL ;
@@ -736,7 +736,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, }/* bump the tail */ -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer:\n" ); +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer:\n" );iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc_on_ring, buff, buff_size); (hw->aq.asq.next_to_use)++;
@@ -769,7 +769,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,memcpy (buff, dma_buff->va, buff_size); retval =le16_to_cpu (desc->retval);if (retval !=0 ) { -i40e_debug (hw, +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: Command completed with error 0x%X.\n" , retval);
@@ -787,7 +787,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, hw->aq.asq_last_status = (enum i40e_admin_queue_err )retval; } -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer writeback:\n" );iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, buff, buff_size);
@@ -799,11 +799,11 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,if ((!cmd_completed) && (!details->async && !details->postpone)) {if (rd32 (hw, hw->aq.asq.len) &IAVF_VF_ATQLEN1_ATQCRIT_MASK ) { -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: AQ Critical error.\n" ); status =I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR ; }else { -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: Writeback timeout.\n" ); status =I40E_ERR_ADMIN_QUEUE_TIMEOUT ; }
@@ -859,7 +859,7 @@ iavf_status iavf_clean_arq_element(struct iavf_hw *hw,mutex_lock (&hw->aq.arq_mutex);if (hw->aq.arq.count ==0 ) { -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQRX: Admin queue not initialized.\n" ); ret_code =I40E_ERR_QUEUE_EMPTY ; goto clean_arq_element_err;
@@ -882,7 +882,7 @@ iavf_status iavf_clean_arq_element(struct iavf_hw *hw, flags =le16_to_cpu (desc->flags);if (flags &I40E_AQ_FLAG_ERR ) { ret_code =I40E_ERR_ADMIN_QUEUE_ERROR ; -i40e_debug (hw, +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQRX: Event received with error 0x%X.\n" , hw->aq.arq_last_status);
@@ -895,7 +895,7 @@ iavf_status iavf_clean_arq_element(struct iavf_hw *hw,memcpy (e->msg_buf, hw->aq.arq.r.arq_bi[desc_idx].va, e->msg_len); -i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQRX: desc and buffer:\n" ); +iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQRX: desc and buffer:\n" );iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, e->msg_buf, hw->aq.arq_buf_size);
drivers/net/ethernet/intel/iavf/i40e_common.c +6 -6
@@ -257,7 +257,7 @@ const char *iavf_stat_str(struct iavf_hw *hw, iavf_status stat_err)* * Dumps debug log about adminq command with descriptor contents. **/ -void iavf_debug_aq (struct iavf_hw *hw,enum i40e_debug_mask mask,void *desc, +void iavf_debug_aq (struct iavf_hw *hw,enum iavf_debug_mask mask,void *desc,void *buffer,u16 buf_len) {struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;
@@ -266,26 +266,26 @@ void iavf_debug_aq(struct iavf_hw *hw, enum i40e_debug_mask mask, void *desc,if ((!(mask & hw->debug_mask)) || !desc)return ; -i40e_debug (hw, mask, +iavf_debug (hw, mask,"AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n" ,le16_to_cpu (aq_desc->opcode),le16_to_cpu (aq_desc->flags),le16_to_cpu (aq_desc->datalen),le16_to_cpu (aq_desc->retval)); -i40e_debug (hw, mask,"\tcookie (h,l) 0x%08X 0x%08X\n" , +iavf_debug (hw, mask,"\tcookie (h,l) 0x%08X 0x%08X\n" ,le32_to_cpu (aq_desc->cookie_high),le32_to_cpu (aq_desc->cookie_low)); -i40e_debug (hw, mask,"\tparam (0,1) 0x%08X 0x%08X\n" , +iavf_debug (hw, mask,"\tparam (0,1) 0x%08X 0x%08X\n" ,le32_to_cpu (aq_desc->params.internal.param0),le32_to_cpu (aq_desc->params.internal.param1)); -i40e_debug (hw, mask,"\taddr (h,l) 0x%08X 0x%08X\n" , +iavf_debug (hw, mask,"\taddr (h,l) 0x%08X 0x%08X\n" ,le32_to_cpu (aq_desc->params.external.addr_high),le32_to_cpu (aq_desc->params.external.addr_low));if (buffer && aq_desc->datalen) {u16 len =le16_to_cpu (aq_desc->datalen); -i40e_debug (hw, mask,"AQ CMD Buffer:\n" ); +iavf_debug (hw, mask,"AQ CMD Buffer:\n" );if (buf_len < len) len = buf_len;/* write the full 16-byte chunks */
drivers/net/ethernet/intel/iavf/i40e_osdep.h +1 -1
@@ -44,7 +44,7 @@ struct i40e_virt_mem {#define i40e_allocate_virt_mem (h, m, s) iavf_allocate_virt_mem_d(h, m, s)#define i40e_free_virt_mem (h, m) iavf_free_virt_mem_d(h, m) -#define i40e_debug (h, m, s, ...) iavf_debug_d(h, m, s, ##__VA_ARGS__) +#define iavf_debug (h, m, s, ...) iavf_debug_d(h, m, s, ##__VA_ARGS__)extern void iavf_debug_d (void *hw,u32 mask,char *fmt_str, ...) __attribute__ ((format (gnu_printf,3 ,4 )));
drivers/net/ethernet/intel/iavf/i40e_prototype.h +1 -1
@@ -29,7 +29,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,bool iavf_asq_done (struct iavf_hw *hw);/* debug function for adminq */ -void iavf_debug_aq (struct iavf_hw *hw,enum i40e_debug_mask mask,void *desc, +void iavf_debug_aq (struct iavf_hw *hw,enum iavf_debug_mask mask,void *desc,void *buffer,u16 buf_len);void i40e_idle_aq (struct iavf_hw *hw);
drivers/net/ethernet/intel/iavf/i40e_type.h +1 -1
@@ -35,7 +35,7 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct iavf_hw *, struct i40e_aq_desc *);#define I40E_QTX_CTL_PF_QUEUE 0x2/* debug masks - set these bits in hw->debug_mask to control output */ -enum i40e_debug_mask { +enum iavf_debug_mask {I40E_DEBUG_INIT =0x00000001 ,I40E_DEBUG_RELEASE =0x00000002 ,
Signature · 1 line
2.14.4
PATCH v2 11/14 iavf: tracing infrastructure rename
In reply to Jesse BrandeburgRename the i40e_trace file and fix up all the callers to the new names inside the iavf_trace.h file.
---
drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
.../intel/iavf/{i40e_trace.h => iavf_trace.h} | 28 +++++++++++-----------
drivers/net/ethernet/intel/iavf/iavf_txrx.c | 14 +++++------
3 files changed, 22 insertions(+), 22 deletions(-)
rename drivers/net/ethernet/intel/iavf/{i40e_trace.h => iavf_trace.h} (85%)drivers/net/ethernet/intel/iavf/iavf_main.c +1 -1
@@ -9,7 +9,7 @@* CREATE_TRACE_POINTS defined */ #define CREATE_TRACE_POINTS -#include "i40e_trace.h" +#include "iavf_trace.h" static int iavf_setup_all_tx_resources (struct iavf_adapter *adapter);static int iavf_setup_all_rx_resources (struct iavf_adapter *adapter);
drivers/net/ethernet/intel/iavf/iavf_trace.h renamed from drivers/net/ethernet/intel/iavf/i40e_trace.h +14 -14
@@ -5,7 +5,7 @@/* The trace subsystem name for iavf will be "iavf". * -* This file is named i40e_trace.h. +* This file is named iavf_trace.h. * * Since this include file's name is different from the trace * subsystem name, we'll have to define TRACE_INCLUDE_FILE at the end
@@ -23,14 +23,14 @@#include <linux/tracepoint.h> /** -* i40e_trace() macro enables shared code to refer to trace points +* iavf_trace() macro enables shared code to refer to trace points * like: * -* trace_i40e{,vf}_example(args...) +* trace_iavf{,vf}_example(args...) * * ... as: * -* i40e_trace(example, args...) +* iavf_trace(example, args...) * * ... to resolve to the PF or VF version of the tracepoint without * ifdefs, and to allow tracepoints to be disabled entirely at build
@@ -39,18 +39,18 @@* Trace point should always be referred to in the driver via this * macro. * -* Similarly, i40e_trace_enabled(trace_name) wraps references to -* trace_i40e{,vf}_<trace_name>_enabled() functions. +* Similarly, iavf_trace_enabled(trace_name) wraps references to +* trace_iavf{,vf}_<trace_name>_enabled() functions. */ -#define _I40E_TRACE_NAME (trace_name) (trace_ ## iavf ## _ ## trace_name) -#define I40E_TRACE_NAME (trace_name) _I40E_TRACE_NAME(trace_name) +#define _IAVF_TRACE_NAME (trace_name) (trace_ ## iavf ## _ ## trace_name) +#define IAVF_TRACE_NAME (trace_name) _IAVF_TRACE_NAME(trace_name) -#define i40e_trace(trace_name, args...) I40E_TRACE_NAME(trace_name)(args) +#define iavf_trace(trace_name, args...) IAVF_TRACE_NAME(trace_name)(args) -#define i40e_trace_enabled (trace_name) I40E_TRACE_NAME(trace_name##_enabled)() +#define iavf_trace_enabled (trace_name) IAVF_TRACE_NAME(trace_name##_enabled)()/* Events common to PF and VF. Corresponding versions will be defined -* for both, named trace_i40e_* and trace_iavf_*. The i40e_trace() +* for both, named trace_iavf_* and trace_iavf_*. The iavf_trace() * macro above will select the right trace point name for the driver * being built from shared code. */
@@ -195,8 +195,8 @@ DEFINE_EVENT(/* Events unique to the VF. */ -#endif /* _I40E_TRACE_H_ */ -/* This must be outside ifdef _I40E_TRACE_H */ +#endif /* _IAVF_TRACE_H_ */ +/* This must be outside ifdef _IAVF_TRACE_H */ /* This trace include file is not located in the .../include/trace * with the kernel tracepoint definitions, because we're a loadable
@@ -205,5 +205,5 @@ DEFINE_EVENT(#undef TRACE_INCLUDE_PATH#define TRACE_INCLUDE_PATH .#undef TRACE_INCLUDE_FILE -#define TRACE_INCLUDE_FILE i40e_trace +#define TRACE_INCLUDE_FILE iavf_trace#include <trace/define_trace.h>
drivers/net/ethernet/intel/iavf/iavf_txrx.c +7 -7
@@ -5,7 +5,7 @@#include <net/busy_poll.h> #include "iavf.h" -#include "i40e_trace.h" +#include "iavf_trace.h" #include "i40e_prototype.h" static inline __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
@@ -211,7 +211,7 @@ static bool i40e_clean_tx_irq(struct i40e_vsi *vsi,/* prevent any other reads prior to eop_desc */ smp_rmb (); -i40e_trace (clean_tx_irq, tx_ring, tx_desc, tx_buf); +iavf_trace (clean_tx_irq, tx_ring, tx_desc, tx_buf);/* if the descriptor isn't done, no work yet to do */ if (!(eop_desc->cmd_type_offset_bsz &cpu_to_le64 (IAVF_TX_DESC_DTYPE_DESC_DONE )))
@@ -239,7 +239,7 @@ static bool i40e_clean_tx_irq(struct i40e_vsi *vsi,/* unmap remaining buffers */ while (tx_desc != eop_desc) { -i40e_trace (clean_tx_irq_unmap, +iavf_trace (clean_tx_irq_unmap, tx_ring, tx_desc, tx_buf); tx_buf++;
@@ -1503,7 +1503,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)if (!size)break ; -i40e_trace (clean_rx_irq, rx_ring, rx_desc, skb); +iavf_trace (clean_rx_irq, rx_ring, rx_desc, skb); rx_buffer =i40e_get_rx_buffer (rx_ring, size);/* retrieve a buffer from the ring */
@@ -1557,7 +1557,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget) vlan_tag = (qword &BIT (IAVF_RX_DESC_STATUS_L2TAG1P_SHIFT )) ?le16_to_cpu (rx_desc->wb.qword0.lo_dword.l2tag1) :0 ; -i40e_trace (clean_rx_irq_rx, rx_ring, rx_desc, skb); +iavf_trace (clean_rx_irq_rx, rx_ring, rx_desc, skb);i40e_receive_skb (rx_ring, skb, vlan_tag); skb =NULL ;
@@ -2407,7 +2407,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,/* prefetch the data, we'll need it later */ prefetch (skb->data); -i40e_trace (xmit_frame_ring, skb, tx_ring); +iavf_trace (xmit_frame_ring, skb, tx_ring); count =i40e_xmit_descriptor_count (skb);if (i40e_chk_linearize (skb, count)) {
@@ -2476,7 +2476,7 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,return NETDEV_TX_OK ; out_drop: -i40e_trace (xmit_frame_ring_drop, first->skb, tx_ring); +iavf_trace (xmit_frame_ring_drop, first->skb, tx_ring);dev_kfree_skb_any (first->skb); first->skb =NULL ;return NETDEV_TX_OK ;
Signature · 1 line
2.14.4
PATCH v2 12/14 iavf: rename most of i40e strings
In reply to Jesse BrandeburgThis is the big rename patch, it takes most of the i40e_ and I40E_ strings and renames them to iavf_ and IAVF_.
Some of the adminq code, as well as most of the client interface code used by RDMA is left unchanged in order to indicate that the driver is talking to non-internal to iavf code.
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 96 ++-- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 24 +- drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h | 4 +- drivers/net/ethernet/intel/iavf/i40e_alloc.h | 38 +- drivers/net/ethernet/intel/iavf/i40e_common.c | 590 ++++++++++---------- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 20 +- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 13 +- drivers/net/ethernet/intel/iavf/i40e_status.h | 8 +- drivers/net/ethernet/intel/iavf/i40e_type.h | 633 +++++++++++----------- drivers/net/ethernet/intel/iavf/iavf.h | 59 +- drivers/net/ethernet/intel/iavf/iavf_client.c | 26 +- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 142 +++-- drivers/net/ethernet/intel/iavf/iavf_main.c | 107 ++-- drivers/net/ethernet/intel/iavf/iavf_trace.h | 36 +- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 616 ++++++++++----------- drivers/net/ethernet/intel/iavf/iavf_txrx.h | 341 ++++++------ drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 20 +- 17 files changed, 1366 insertions(+), 1407 deletions(-)
drivers/net/ethernet/intel/iavf/i40e_adminq.c +48 -48
@@ -36,7 +36,7 @@ static iavf_status i40e_alloc_adminq_asq_ring(struct iavf_hw *hw) {iavf_status ret_code; - ret_code = i40e_allocate_dma_mem(hw, &hw->aq.asq.desc_buf, + ret_code = iavf_allocate_dma_mem(hw, &hw->aq.asq.desc_buf, i40e_mem_atq_ring, (hw->aq.num_asq_entries * sizeof(struct i40e_aq_desc)),
@@ -44,11 +44,11 @@ static iavf_status i40e_alloc_adminq_asq_ring(struct iavf_hw *hw)if (ret_code)return ret_code; - ret_code =i40e_allocate_virt_mem (hw, &hw->aq.asq.cmd_buf, + ret_code =iavf_allocate_virt_mem (hw, &hw->aq.asq.cmd_buf, (hw->aq.num_asq_entries *sizeof (struct i40e_asq_cmd_details )));if (ret_code) { -i40e_free_dma_mem (hw, &hw->aq.asq.desc_buf); +iavf_free_dma_mem (hw, &hw->aq.asq.desc_buf);return ret_code; }
@@ -63,7 +63,7 @@ static iavf_status i40e_alloc_adminq_arq_ring(struct iavf_hw *hw) {iavf_status ret_code; - ret_code = i40e_allocate_dma_mem(hw, &hw->aq.arq.desc_buf, + ret_code = iavf_allocate_dma_mem(hw, &hw->aq.arq.desc_buf, i40e_mem_arq_ring, (hw->aq.num_arq_entries * sizeof(struct i40e_aq_desc)),
@@ -81,7 +81,7 @@ static iavf_status i40e_alloc_adminq_arq_ring(struct iavf_hw *hw)**/ static void i40e_free_adminq_asq (struct iavf_hw *hw) { -i40e_free_dma_mem (hw, &hw->aq.asq.desc_buf); +iavf_free_dma_mem (hw, &hw->aq.asq.desc_buf); }/**
@@ -93,7 +93,7 @@ static void i40e_free_adminq_asq(struct iavf_hw *hw)**/ static void i40e_free_adminq_arq (struct iavf_hw *hw) { -i40e_free_dma_mem (hw, &hw->aq.arq.desc_buf); +iavf_free_dma_mem (hw, &hw->aq.arq.desc_buf); }/**
@@ -104,7 +104,7 @@ static iavf_status i40e_alloc_arq_bufs(struct iavf_hw *hw) {iavf_status ret_code;struct i40e_aq_desc *desc; -struct i40e_dma_mem *bi; +struct iavf_dma_mem *bi;int i;/* We'll be allocating the buffer info memory first, then we can
@@ -112,16 +112,16 @@ static iavf_status i40e_alloc_arq_bufs(struct iavf_hw *hw)*/ /* buffer_info structures do not need alignment */ - ret_code =i40e_allocate_virt_mem (hw, &hw->aq.arq.dma_head, - (hw->aq.num_arq_entries *sizeof (struct i40e_dma_mem ))); + ret_code =iavf_allocate_virt_mem (hw, &hw->aq.arq.dma_head, + (hw->aq.num_arq_entries *sizeof (struct iavf_dma_mem )));if (ret_code) goto alloc_arq_bufs; - hw->aq.arq.r.arq_bi = (struct i40e_dma_mem *)hw->aq.arq.dma_head.va; + hw->aq.arq.r.arq_bi = (struct iavf_dma_mem *)hw->aq.arq.dma_head.va;/* allocate the mapped buffers */ 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, + ret_code =iavf_allocate_dma_mem (hw, bi, i40e_mem_arq_buf, hw->aq.arq_buf_size,IAVF_ADMINQ_DESC_ALIGNMENT );
@@ -157,8 +157,8 @@ static iavf_status i40e_alloc_arq_bufs(struct iavf_hw *hw)/* don't try to free the one that failed... */ i--;for (; i >=0 ; i--) -i40e_free_dma_mem (hw, &hw->aq.arq.r.arq_bi[i]); -i40e_free_virt_mem (hw, &hw->aq.arq.dma_head); +iavf_free_dma_mem (hw, &hw->aq.arq.r.arq_bi[i]); +iavf_free_virt_mem (hw, &hw->aq.arq.dma_head);return ret_code; }
@@ -170,20 +170,20 @@ static iavf_status i40e_alloc_arq_bufs(struct iavf_hw *hw)static iavf_status i40e_alloc_asq_bufs (struct iavf_hw *hw) {iavf_status ret_code; -struct i40e_dma_mem *bi; +struct iavf_dma_mem *bi;int i;/* No mapped memory needed yet, just the buffer info structures */ - ret_code =i40e_allocate_virt_mem (hw, &hw->aq.asq.dma_head, - (hw->aq.num_asq_entries *sizeof (struct i40e_dma_mem ))); + ret_code =iavf_allocate_virt_mem (hw, &hw->aq.asq.dma_head, + (hw->aq.num_asq_entries *sizeof (struct iavf_dma_mem )));if (ret_code) goto alloc_asq_bufs; - hw->aq.asq.r.asq_bi = (struct i40e_dma_mem *)hw->aq.asq.dma_head.va; + hw->aq.asq.r.asq_bi = (struct iavf_dma_mem *)hw->aq.asq.dma_head.va;/* allocate the mapped buffers */ 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, + ret_code =iavf_allocate_dma_mem (hw, bi, i40e_mem_asq_buf, hw->aq.asq_buf_size,IAVF_ADMINQ_DESC_ALIGNMENT );
@@ -197,8 +197,8 @@ static iavf_status i40e_alloc_asq_bufs(struct iavf_hw *hw)/* don't try to free the one that failed... */ i--;for (; i >=0 ; i--) -i40e_free_dma_mem (hw, &hw->aq.asq.r.asq_bi[i]); -i40e_free_virt_mem (hw, &hw->aq.asq.dma_head); +iavf_free_dma_mem (hw, &hw->aq.asq.r.asq_bi[i]); +iavf_free_virt_mem (hw, &hw->aq.asq.dma_head);return ret_code; }
@@ -213,13 +213,13 @@ static void i40e_free_arq_bufs(struct iavf_hw *hw)/* free descriptors */ for (i =0 ; i < hw->aq.num_arq_entries; i++) -i40e_free_dma_mem (hw, &hw->aq.arq.r.arq_bi[i]); +iavf_free_dma_mem (hw, &hw->aq.arq.r.arq_bi[i]);/* free the descriptor memory */ -i40e_free_dma_mem (hw, &hw->aq.arq.desc_buf); +iavf_free_dma_mem (hw, &hw->aq.arq.desc_buf);/* free the dma header */ -i40e_free_virt_mem (hw, &hw->aq.arq.dma_head); +iavf_free_virt_mem (hw, &hw->aq.arq.dma_head); }/**
@@ -233,16 +233,16 @@ static void i40e_free_asq_bufs(struct iavf_hw *hw)/* only unmap if the address is non-NULL */ for (i =0 ; i < hw->aq.num_asq_entries; i++)if (hw->aq.asq.r.asq_bi[i].pa) -i40e_free_dma_mem (hw, &hw->aq.asq.r.asq_bi[i]); +iavf_free_dma_mem (hw, &hw->aq.asq.r.asq_bi[i]);/* free the buffer info list */ -i40e_free_virt_mem (hw, &hw->aq.asq.cmd_buf); +iavf_free_virt_mem (hw, &hw->aq.asq.cmd_buf);/* free the descriptor memory */ -i40e_free_dma_mem (hw, &hw->aq.asq.desc_buf); +iavf_free_dma_mem (hw, &hw->aq.asq.desc_buf);/* free the dma header */ -i40e_free_virt_mem (hw, &hw->aq.asq.dma_head); +iavf_free_virt_mem (hw, &hw->aq.asq.dma_head); }/**
@@ -568,7 +568,7 @@ iavf_status iavf_shutdown_adminq(struct iavf_hw *hw)**/ static u16 i40e_clean_asq (struct iavf_hw *hw) { -struct i40e_adminq_ring *asq = &hw->aq.asq; +struct iavf_adminq_ring *asq = &hw->aq.asq;struct i40e_asq_cmd_details *details;u16 ntc = asq->next_to_clean;struct i40e_aq_desc desc_cb;
@@ -577,7 +577,7 @@ static u16 i40e_clean_asq(struct iavf_hw *hw) desc =IAVF_ADMINQ_DESC (*asq, ntc); details =I40E_ADMINQ_DETAILS (*asq, ntc);while (rd32 (hw, hw->aq.asq.head) != ntc) { -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"ntc %d head %d.\n" , ntc,rd32 (hw, hw->aq.asq.head));if (details->callback) {
@@ -598,7 +598,7 @@ static u16 i40e_clean_asq(struct iavf_hw *hw) asq->next_to_clean = ntc; -return I40E_DESC_UNUSED (asq); +return IAVF_DESC_UNUSED (asq); }/**
@@ -632,7 +632,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,u16 buff_size, struct i40e_asq_cmd_details *cmd_details) { - struct i40e_dma_mem *dma_buff = NULL; + struct iavf_dma_mem *dma_buff = NULL;struct i40e_asq_cmd_details *details;struct i40e_aq_desc *desc_on_ring;bool cmd_completed = false;
@@ -643,7 +643,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,mutex_lock (&hw->aq.asq_mutex);if (hw->aq.asq.count ==0 ) { -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Admin queue not initialized.\n" ); status =I40E_ERR_QUEUE_EMPTY ; goto asq_send_command_error;
@@ -653,7 +653,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, val =rd32 (hw, hw->aq.asq.head);if (val >= hw->aq.num_asq_entries) { -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: head overrun at %d\n" , val); status =I40E_ERR_QUEUE_EMPTY ; goto asq_send_command_error;
@@ -683,7 +683,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,if (buff_size > hw->aq.asq_buf_size) {iavf_debug (hw, -I40E_DEBUG_AQ_MESSAGE , +IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Invalid buffer size: %d.\n" , buff_size); status =I40E_ERR_INVALID_SIZE ;
@@ -692,7 +692,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,if (details->postpone && !details->async) {iavf_debug (hw, -I40E_DEBUG_AQ_MESSAGE , +IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Async flag not set along with postpone flag" ); status =I40E_ERR_PARAM ; goto asq_send_command_error;
@@ -707,7 +707,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,*/ if (i40e_clean_asq (hw) ==0 ) {iavf_debug (hw, -I40E_DEBUG_AQ_MESSAGE , +IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Error queue is full.\n" ); status =I40E_ERR_ADMIN_QUEUE_FULL ; goto asq_send_command_error;
@@ -736,8 +736,8 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, }/* bump the tail */ -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer:\n" ); -iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc_on_ring, +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer:\n" ); +iavf_debug_aq (hw,IAVF_DEBUG_AQ_COMMAND , (void *)desc_on_ring, buff, buff_size); (hw->aq.asq.next_to_use)++;if (hw->aq.asq.next_to_use == hw->aq.asq.count)
@@ -770,7 +770,7 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, retval =le16_to_cpu (desc->retval);if (retval !=0 ) {iavf_debug (hw, -I40E_DEBUG_AQ_MESSAGE , +IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Command completed with error 0x%X.\n" , retval);
@@ -787,9 +787,9 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc, hw->aq.asq_last_status = (enum i40e_admin_queue_err )retval; } -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: desc and buffer writeback:\n" ); -iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, buff, buff_size); +iavf_debug_aq (hw,IAVF_DEBUG_AQ_COMMAND , (void *)desc, buff, buff_size);/* save writeback aq if requested */ if (details->wb_desc)
@@ -799,11 +799,11 @@ iavf_status iavf_asq_send_command(struct iavf_hw *hw, struct i40e_aq_desc *desc,if ((!cmd_completed) && (!details->async && !details->postpone)) {if (rd32 (hw, hw->aq.asq.len) &IAVF_VF_ATQLEN1_ATQCRIT_MASK ) { -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: AQ Critical error.\n" ); status =I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR ; }else { -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Writeback timeout.\n" ); status =I40E_ERR_ADMIN_QUEUE_TIMEOUT ; }
@@ -846,7 +846,7 @@ iavf_status iavf_clean_arq_element(struct iavf_hw *hw,u16 ntc = hw->aq.arq.next_to_clean;struct i40e_aq_desc *desc;iavf_status ret_code =0 ; -struct i40e_dma_mem *bi; +struct iavf_dma_mem *bi;u16 desc_idx;u16 datalen;u16 flags;
@@ -859,7 +859,7 @@ iavf_status iavf_clean_arq_element(struct iavf_hw *hw,mutex_lock (&hw->aq.arq_mutex);if (hw->aq.arq.count ==0 ) { -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE , +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQRX: Admin queue not initialized.\n" ); ret_code =I40E_ERR_QUEUE_EMPTY ; goto clean_arq_element_err;
@@ -883,7 +883,7 @@ iavf_status iavf_clean_arq_element(struct iavf_hw *hw,if (flags &I40E_AQ_FLAG_ERR ) { ret_code =I40E_ERR_ADMIN_QUEUE_ERROR ;iavf_debug (hw, -I40E_DEBUG_AQ_MESSAGE , +IAVF_DEBUG_AQ_MESSAGE ,"AQRX: Event received with error 0x%X.\n" , hw->aq.arq_last_status); }
@@ -895,8 +895,8 @@ iavf_status iavf_clean_arq_element(struct iavf_hw *hw,memcpy (e->msg_buf, hw->aq.arq.r.arq_bi[desc_idx].va, e->msg_len); -iavf_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"AQRX: desc and buffer:\n" ); -iavf_debug_aq (hw,I40E_DEBUG_AQ_COMMAND , (void *)desc, e->msg_buf, +iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQRX: desc and buffer:\n" ); +iavf_debug_aq (hw,IAVF_DEBUG_AQ_COMMAND , (void *)desc, e->msg_buf, hw->aq.arq_buf_size);/* Restore the original datalen and buffer address in the desc,
drivers/net/ethernet/intel/iavf/i40e_adminq.h +12 -12
@@ -1,8 +1,8 @@/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#ifndef _I40E_ADMINQ_H_ -#define _I40E_ADMINQ_H_ +#ifndef _IAVF_ADMINQ_H_ +#define _IAVF_ADMINQ_H_#include "i40e_osdep.h" #include "i40e_status.h"
@@ -13,14 +13,14 @@#define IAVF_ADMINQ_DESC_ALIGNMENT 4096 -struct i40e_adminq_ring { -struct i40e_virt_mem dma_head;/* space for dma structures */ -struct i40e_dma_mem desc_buf;/* descriptor ring memory */ -struct i40e_virt_mem cmd_buf;/* command buffer memory */ +struct iavf_adminq_ring { +struct iavf_virt_mem dma_head;/* space for dma structures */ +struct iavf_dma_mem desc_buf;/* descriptor ring memory */ +struct iavf_virt_mem cmd_buf;/* command buffer memory */ union { -struct i40e_dma_mem *asq_bi; -struct i40e_dma_mem *arq_bi; +struct iavf_dma_mem *asq_bi; +struct iavf_dma_mem *arq_bi; } r;u16 count;/* Number of descriptors */
@@ -61,9 +61,9 @@ struct i40e_arq_event_info { };/* Admin Queue information */ -struct i40e_adminq_info { -struct i40e_adminq_ring arq;/* receive queue */ -struct i40e_adminq_ring asq;/* send queue */ +struct iavf_adminq_info { +struct iavf_adminq_ring arq;/* receive queue */ +struct iavf_adminq_ring asq;/* send queue */ u32 asq_cmd_timeout;/* send queue cmd write back timeout*/ u16 num_arq_entries;/* receive queue depth */ u16 num_asq_entries;/* send queue depth */
@@ -132,4 +132,4 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)void iavf_fill_default_direct_cmd_desc (struct i40e_aq_desc *desc,u16 opcode); -#endif /* _I40E_ADMINQ_H_ */ +#endif /* _IAVF_ADMINQ_H_ */
drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h +3 -1
@@ -5,7 +5,9 @@#define _I40E_ADMINQ_CMD_H_/* This header file defines the i40e Admin Queue commands and is shared between -* i40e Firmware and Software. +* i40e Firmware and Software. Do not change the names in this file to IAVF +* because this file should be diff-able against the i40e version, even +* though many parts have been removed in this VF version. * * This file needs to comply with the Linux Kernel coding style. */
drivers/net/ethernet/intel/iavf/i40e_alloc.h +19 -19
@@ -1,30 +1,30 @@/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#ifndef _I40E_ALLOC_H_ -#define _I40E_ALLOC_H_ +#ifndef _IAVF_ALLOC_H_ +#define _IAVF_ALLOC_H_struct iavf_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 +enum iavf_memory_type { + iavf_mem_arq_buf =0 ,/* ARQ indirect command buffer */ + iavf_mem_asq_buf =1 , + iavf_mem_atq_buf =2 ,/* ATQ indirect command buffer */ + iavf_mem_arq_ring =3 ,/* ARQ descriptor ring */ + iavf_mem_atq_ring =4 ,/* ATQ descriptor ring */ + iavf_mem_pd =5 ,/* Page Descriptor */ + iavf_mem_bp =6 ,/* Backing Page - 4KB */ + iavf_mem_bp_jumbo =7 ,/* Backing Page - > 4KB */ + iavf_mem_reserved };/* prototype for functions used for dynamic memory allocation */ -iavf_status i40e_allocate_dma_mem (struct iavf_hw *hw,struct i40e_dma_mem *mem, -enum i40e_memory_type type,u64 size, +iavf_status iavf_allocate_dma_mem (struct iavf_hw *hw,struct iavf_dma_mem *mem, +enum iavf_memory_type type,u64 size,u32 alignment); -iavf_status i40e_free_dma_mem (struct iavf_hw *hw,struct i40e_dma_mem *mem); -iavf_status i40e_allocate_virt_mem (struct iavf_hw *hw, -struct i40e_virt_mem *mem,u32 size); -iavf_status i40e_free_virt_mem (struct iavf_hw *hw,struct i40e_virt_mem *mem); -#endif /* _I40E_ALLOC_H_ */ +iavf_status iavf_free_dma_mem (struct iavf_hw *hw,struct iavf_dma_mem *mem); +iavf_status iavf_allocate_virt_mem (struct iavf_hw *hw, +struct iavf_virt_mem *mem,u32 size); +iavf_status iavf_free_virt_mem (struct iavf_hw *hw,struct iavf_virt_mem *mem); +#endif /* _IAVF_ALLOC_H_ */
drivers/net/ethernet/intel/iavf/i40e_common.c +295 -295
726 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/i40e_osdep.h +10 -10
@@ -1,8 +1,8 @@/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#ifndef _I40E_OSDEP_H_ -#define _I40E_OSDEP_H_ +#ifndef _IAVF_OSDEP_H_ +#define _IAVF_OSDEP_H_#include <linux/types.h> #include <linux/if_ether.h>
@@ -27,26 +27,26 @@#define iavf_flush (a) readl((a)->hw_addr + IAVF_VFGEN_RSTAT)/* memory allocation tracking */ -struct i40e_dma_mem { +struct iavf_dma_mem {void *va;dma_addr_t pa;u32 size; }; -#define i40e_allocate_dma_mem (h, m, unused, s, a) \ +#define iavf_allocate_dma_mem (h, m, unused, s, a) \ iavf_allocate_dma_mem_d(h, m, s, a) -#define i40e_free_dma_mem (h, m) iavf_free_dma_mem_d(h, m) +#define iavf_free_dma_mem (h, m) iavf_free_dma_mem_d(h, m) -struct i40e_virt_mem { +struct iavf_virt_mem {void *va;u32 size; }; -#define i40e_allocate_virt_mem (h, m, s) iavf_allocate_virt_mem_d(h, m, s) -#define i40e_free_virt_mem (h, m) iavf_free_virt_mem_d(h, m) +#define iavf_allocate_virt_mem (h, m, s) iavf_allocate_virt_mem_d(h, m, s) +#define iavf_free_virt_mem (h, m) iavf_free_virt_mem_d(h, m)#define iavf_debug (h, m, s, ...) iavf_debug_d(h, m, s, ##__VA_ARGS__)extern void iavf_debug_d (void *hw,u32 mask,char *fmt_str, ...) __attribute__ ((format (gnu_printf,3 ,4 ))); -typedef enum i40e_status_code iavf_status ; -#endif /* _I40E_OSDEP_H_ */ +typedef enum iavf_status_code iavf_status ; +#endif /* _IAVF_OSDEP_H_ */
drivers/net/ethernet/intel/iavf/i40e_prototype.h +6 -7
@@ -1,8 +1,8 @@/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#ifndef _I40E_PROTOTYPE_H_ -#define _I40E_PROTOTYPE_H_ +#ifndef _IAVF_PROTOTYPE_H_ +#define _IAVF_PROTOTYPE_H_#include "i40e_type.h" #include "i40e_alloc.h"
@@ -48,16 +48,15 @@ iavf_status iavf_aq_get_rss_key(struct iavf_hw *hw, u16 seid,iavf_status iavf_aq_set_rss_key (struct iavf_hw *hw,u16 seid,struct i40e_aqc_get_set_rss_key_data *key); -iavf_status i40e_set_mac_type (struct iavf_hw *hw); +iavf_status iavf_set_mac_type (struct iavf_hw *hw); -extern struct i40e_rx_ptype_decoded iavf_ptype_lookup[]; +extern struct iavf_rx_ptype_decoded iavf_ptype_lookup[]; -static inline struct i40e_rx_ptype_decoded decode_rx_desc_ptype (u8 ptype) +static inline struct iavf_rx_ptype_decoded decode_rx_desc_ptype (u8 ptype) {return iavf_ptype_lookup[ptype]; } -/* i40e_common for VF drivers*/ void iavf_vf_parse_hw_config (struct iavf_hw *hw,struct virtchnl_vf_resource *msg);iavf_status iavf_vf_reset (struct iavf_hw *hw);
@@ -65,4 +64,4 @@ iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw,enum virtchnl_ops v_opcode, iavf_status v_retval, u8 *msg, u16 msglen, struct i40e_asq_cmd_details *cmd_details); -#endif /* _I40E_PROTOTYPE_H_ */ +#endif /* _IAVF_PROTOTYPE_H_ */
drivers/net/ethernet/intel/iavf/i40e_status.h +4 -4
@@ -1,11 +1,11 @@/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#ifndef _I40E_STATUS_H_ -#define _I40E_STATUS_H_ +#ifndef _IAVF_STATUS_H_ +#define _IAVF_STATUS_H_/* Error Codes */ -enum i40e_status_code { +enum iavf_status_code {I40E_SUCCESS =0 ,I40E_ERR_NVM =-1 , I40E_ERR_NVM_CHECKSUM = -2,
@@ -75,4 +75,4 @@ enum i40e_status_code { I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR = -66, }; -#endif /* _I40E_STATUS_H_ */ +#endif /* _IAVF_STATUS_H_ */
drivers/net/ethernet/intel/iavf/i40e_type.h +304 -329
867 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf.h +25 -34
147 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_client.c +13 -13
@@ -11,7 +11,7 @@static const char iavf_client_interface_version_str[] =IAVF_CLIENT_VERSION_STR ;static struct i40e_client *vf_registered_client; -static LIST_HEAD (iavf_devices); +static LIST_HEAD (i40e_devices);static DEFINE_MUTEX (iavf_device_mutex); static u32 iavf_client_virtchnl_send(struct i40e_info *ldev,
@@ -33,7 +33,7 @@ static struct i40e_ops iavf_lan_ops = {* @params: client param struct **/ static -void iavf_client_get_params (struct i40e_vsi *vsi,struct i40e_params *params) +void iavf_client_get_params (struct iavf_vsi *vsi,struct i40e_params *params) {int i;
@@ -41,7 +41,7 @@ void iavf_client_get_params(struct i40e_vsi *vsi, struct i40e_params *params) params->mtu = vsi->netdev->mtu; params->link_up = vsi->back->link_up; -for (i =0 ; i <I40E_MAX_USER_PRIORITY ; i++) { +for (i =0 ; i <IAVF_MAX_USER_PRIORITY ; i++) { params->qos.prio_qos[i].tc =0 ; params->qos.prio_qos[i].qs_handle = vsi->qs_handle; }
@@ -55,7 +55,7 @@ void iavf_client_get_params(struct i40e_vsi *vsi, struct i40e_params *params)* * If there is a client to this VSI, call the client **/ -void iavf_notify_client_message (struct i40e_vsi *vsi,u8 *msg,u16 len) +void iavf_notify_client_message (struct iavf_vsi *vsi,u8 *msg,u16 len) {struct i40e_client_instance *cinst;
@@ -79,7 +79,7 @@ void iavf_notify_client_message(struct i40e_vsi *vsi, u8 *msg, u16 len)* * If there is a client to this VSI, call the client **/ -void iavf_notify_client_l2_params (struct i40e_vsi *vsi) +void iavf_notify_client_l2_params (struct iavf_vsi *vsi) {struct i40e_client_instance *cinst;struct i40e_params params;
@@ -107,7 +107,7 @@ void iavf_notify_client_l2_params(struct i40e_vsi *vsi)* * If there is a client to this netdev, call the client with open **/ -void iavf_notify_client_open (struct i40e_vsi *vsi) +void iavf_notify_client_open (struct iavf_vsi *vsi) {struct iavf_adapter *adapter = vsi->back;struct i40e_client_instance *cinst = adapter->cinst;
@@ -159,7 +159,7 @@ static int iavf_client_release_qvlist(struct i40e_info *ldev)* * If there is a client to this netdev, call the client with close **/ -void iavf_notify_client_close (struct i40e_vsi *vsi,bool reset) +void iavf_notify_client_close (struct iavf_vsi *vsi,bool reset) {struct iavf_adapter *adapter = vsi->back;struct i40e_client_instance *cinst = adapter->cinst;
@@ -185,7 +185,7 @@ static struct i40e_client_instance * iavf_client_add_instance(struct iavf_adapter *adapter) {struct i40e_client_instance *cinst =NULL ; -struct i40e_vsi *vsi = &adapter->vsi; +struct iavf_vsi *vsi = &adapter->vsi;struct netdev_hw_addr *mac =NULL ;struct i40e_params params;
@@ -295,7 +295,7 @@ int iavf_lan_add_device(struct iavf_adapter *adapter)int ret =0 ;mutex_lock (&iavf_device_mutex); -list_for_each_entry (ldev, &iavf_devices, list) { +list_for_each_entry (ldev, &i40e_devices, list) {if (ldev->vf == adapter) { ret = -EEXIST ; goto out;
@@ -308,7 +308,7 @@ int iavf_lan_add_device(struct iavf_adapter *adapter) } ldev->vf = adapter;INIT_LIST_HEAD (&ldev->list); -list_add (&ldev->list, &iavf_devices); +list_add (&ldev->list, &i40e_devices);dev_info (&adapter->pdev->dev,"Added LAN device bus=0x%02x dev=0x%02x func=0x%02x\n" , adapter->hw.bus.bus_id, adapter->hw.bus.device, adapter->hw.bus.func);
@@ -335,7 +335,7 @@ int iavf_lan_del_device(struct iavf_adapter *adapter)int ret = -ENODEV ;mutex_lock (&iavf_device_mutex); -list_for_each_entry_safe (ldev, tmp, &iavf_devices, list) { +list_for_each_entry_safe (ldev, tmp, &i40e_devices, list) {if (ldev->vf == adapter) { dev_info(&adapter->pdev->dev, "Deleted LAN device bus=0x%02x dev=0x%02x func=0x%02x\n",
@@ -364,7 +364,7 @@ static void iavf_client_release(struct i40e_client *client)struct iavf_adapter *adapter;mutex_lock (&iavf_device_mutex); -list_for_each_entry (ldev, &iavf_devices, list) { +list_for_each_entry (ldev, &i40e_devices, list) { adapter = ldev->vf; cinst = adapter->cinst;if (!cinst)
@@ -398,7 +398,7 @@ static void iavf_client_prepare(struct i40e_client *client)struct iavf_adapter *adapter;mutex_lock (&iavf_device_mutex); -list_for_each_entry (ldev, &iavf_devices, list) { +list_for_each_entry (ldev, &i40e_devices, list) { adapter = ldev->vf;/* Signal the watchdog to service the client */ adapter->flags |=IAVF_FLAG_SERVICE_CLIENT_REQUESTED ;
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +68 -74
325 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_main.c +53 -54
326 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_trace.h +18 -18
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/iavf/iavf_txrx.c +308 -308
616 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_txrx.h +170 -171
341 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +10 -10
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.14.4
Part of the diff is not shown here. View the raw message.
PATCH v2 13/14 iavf: finish renaming files to iavf
In reply to Jesse BrandeburgThis finishes the process of renaming the files that make sense to rename (skipping adminq related files that talk to i40e), and fixes up the build and the #includes so that everything builds nicely.
---
drivers/net/ethernet/intel/iavf/Makefile | 2 +-
drivers/net/ethernet/intel/iavf/i40e_adminq.c | 8 ++++----
drivers/net/ethernet/intel/iavf/i40e_adminq.h | 4 ++--
drivers/net/ethernet/intel/iavf/iavf.h | 4 ++--
drivers/net/ethernet/intel/iavf/{i40e_alloc.h => iavf_alloc.h} | 0
drivers/net/ethernet/intel/iavf/iavf_client.c | 2 +-
drivers/net/ethernet/intel/iavf/{i40e_common.c => iavf_common.c} | 4 ++--
drivers/net/ethernet/intel/iavf/{i40e_devids.h => iavf_devids.h} | 0
drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
drivers/net/ethernet/intel/iavf/{i40e_osdep.h => iavf_osdep.h} | 0
.../ethernet/intel/iavf/{i40e_prototype.h => iavf_prototype.h} | 4 ++--
.../net/ethernet/intel/iavf/{i40e_register.h => iavf_register.h} | 0
drivers/net/ethernet/intel/iavf/{i40e_status.h => iavf_status.h} | 0
drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +-
drivers/net/ethernet/intel/iavf/{i40e_type.h => iavf_type.h} | 8 ++++----
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +-
16 files changed, 21 insertions(+), 21 deletions(-)
rename drivers/net/ethernet/intel/iavf/{i40e_alloc.h => iavf_alloc.h} (100%)
rename drivers/net/ethernet/intel/iavf/{i40e_common.c => iavf_common.c} (99%)
rename drivers/net/ethernet/intel/iavf/{i40e_devids.h => iavf_devids.h} (100%)
rename drivers/net/ethernet/intel/iavf/{i40e_osdep.h => iavf_osdep.h} (100%)
rename drivers/net/ethernet/intel/iavf/{i40e_prototype.h => iavf_prototype.h} (98%)
rename drivers/net/ethernet/intel/iavf/{i40e_register.h => iavf_register.h} (100%)
rename drivers/net/ethernet/intel/iavf/{i40e_status.h => iavf_status.h} (100%)
rename drivers/net/ethernet/intel/iavf/{i40e_type.h => iavf_type.h} (99%)drivers/net/ethernet/intel/iavf/Makefile +1 -1
@@ -12,4 +12,4 @@ subdir-ccflags-y += -I$(src) obj-$(CONFIG_IAVF) += iavf.o iavf-objs := iavf_main.o iavf_ethtool.o iavf_virtchnl.o \ - iavf_txrx.o i40e_common.o i40e_adminq.o iavf_client.o + iavf_txrx.o iavf_common.o i40e_adminq.o iavf_client.o
drivers/net/ethernet/intel/iavf/i40e_adminq.c +4 -4
@@ -1,11 +1,11 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include "i40e_status.h" -#include "i40e_type.h" -#include "i40e_register.h" +#include "iavf_status.h" +#include "iavf_type.h" +#include "iavf_register.h" #include "i40e_adminq.h" -#include "i40e_prototype.h" +#include "iavf_prototype.h" /** * i40e_adminq_init_regs - Initialize AdminQ registers
drivers/net/ethernet/intel/iavf/i40e_adminq.h +2 -2
@@ -4,8 +4,8 @@#ifndef _IAVF_ADMINQ_H_#define _IAVF_ADMINQ_H_ -#include "i40e_osdep.h" -#include "i40e_status.h" +#include "iavf_osdep.h" +#include "iavf_status.h" #include "i40e_adminq_cmd.h" #define IAVF_ADMINQ_DESC (R , i) \
drivers/net/ethernet/intel/iavf/iavf.h +2 -2
@@ -34,7 +34,7 @@#include <net/tc_act/tc_gact.h> #include <net/tc_act/tc_mirred.h> -#include "i40e_type.h" +#include "iavf_type.h" #include <linux/avf/virtchnl.h> #include "iavf_txrx.h"
@@ -298,7 +298,7 @@ struct iavf_adapter {struct net_device *netdev;struct pci_dev *pdev; -struct iavf_hw hw;/* defined in i40e_type.h */ +struct iavf_hw hw;/* defined in iavf_type.h */ enum iavf_state_t state;unsigned long crit_section;
drivers/net/ethernet/intel/iavf/iavf_alloc.h renamed from drivers/net/ethernet/intel/iavf/i40e_alloc.h +0 -0
drivers/net/ethernet/intel/iavf/iavf_client.c +1 -1
@@ -5,7 +5,7 @@#include <linux/errno.h> #include "iavf.h" -#include "i40e_prototype.h" +#include "iavf_prototype.h" #include "iavf_client.h" static
drivers/net/ethernet/intel/iavf/iavf_common.c renamed from drivers/net/ethernet/intel/iavf/i40e_common.c +2 -2
@@ -1,9 +1,9 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2013 - 2018 Intel Corporation. */ -#include "i40e_type.h" +#include "iavf_type.h" #include "i40e_adminq.h" -#include "i40e_prototype.h" +#include "iavf_prototype.h" #include <linux/avf/virtchnl.h> /**
drivers/net/ethernet/intel/iavf/iavf_devids.h renamed from drivers/net/ethernet/intel/iavf/i40e_devids.h +0 -0
drivers/net/ethernet/intel/iavf/iavf_main.c +1 -1
@@ -2,7 +2,7 @@/* Copyright(c) 2013 - 2018 Intel Corporation. */ #include "iavf.h" -#include "i40e_prototype.h" +#include "iavf_prototype.h" #include "iavf_client.h" /* All iavf tracepoints are defined by the include below, which must * be included exactly once across the whole kernel with
drivers/net/ethernet/intel/iavf/iavf_osdep.h renamed from drivers/net/ethernet/intel/iavf/i40e_osdep.h +0 -0
drivers/net/ethernet/intel/iavf/iavf_prototype.h renamed from drivers/net/ethernet/intel/iavf/i40e_prototype.h +2 -2
@@ -4,8 +4,8 @@#ifndef _IAVF_PROTOTYPE_H_#define _IAVF_PROTOTYPE_H_ -#include "i40e_type.h" -#include "i40e_alloc.h" +#include "iavf_type.h" +#include "iavf_alloc.h" #include <linux/avf/virtchnl.h> /* Prototypes for shared code functions that are not in
drivers/net/ethernet/intel/iavf/iavf_register.h renamed from drivers/net/ethernet/intel/iavf/i40e_register.h +0 -0
drivers/net/ethernet/intel/iavf/iavf_status.h renamed from drivers/net/ethernet/intel/iavf/i40e_status.h +0 -0
drivers/net/ethernet/intel/iavf/iavf_txrx.c +1 -1
@@ -6,7 +6,7 @@#include "iavf.h" #include "iavf_trace.h" -#include "i40e_prototype.h" +#include "iavf_prototype.h" static inline __le64 build_ctob (u32 td_cmd,u32 td_offset,unsigned int size,u32 td_tag)
drivers/net/ethernet/intel/iavf/iavf_type.h renamed from drivers/net/ethernet/intel/iavf/i40e_type.h +4 -4
@@ -4,11 +4,11 @@#ifndef _IAVF_TYPE_H_#define _IAVF_TYPE_H_ -#include "i40e_status.h" -#include "i40e_osdep.h" -#include "i40e_register.h" +#include "iavf_status.h" +#include "iavf_osdep.h" +#include "iavf_register.h" #include "i40e_adminq.h" -#include "i40e_devids.h" +#include "iavf_devids.h" #define IAVF_RXQ_CTX_DBUFF_SHIFT 7
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +1 -1
@@ -2,7 +2,7 @@/* Copyright(c) 2013 - 2018 Intel Corporation. */ #include "iavf.h" -#include "i40e_prototype.h" +#include "iavf_prototype.h" #include "iavf_client.h" /* busy wait delay in msec */
Signature · 1 line
2.14.4
PATCH v2 14/14 intel-ethernet: use correct module license
In reply to Jesse BrandeburgWe recently updated all our SPDX identifiers to correctly indicate our net/ethernet/intel/* drivers were always released and intended to be released under GPL v2, but the MODULE_LICENSE declaration was never updated.
Fix the MODULE_LICENSE to be GPL v2, for all our drivers.
--- drivers/net/ethernet/intel/e100.c | 2 +- drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++-- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-)
drivers/net/ethernet/intel/e100.c +1 -1
@@ -164,7 +164,7 @@MODULE_DESCRIPTION (DRV_DESCRIPTION );MODULE_AUTHOR (DRV_COPYRIGHT ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );MODULE_FIRMWARE (FIRMWARE_D101M );MODULE_FIRMWARE (FIRMWARE_D101S );
drivers/net/ethernet/intel/e1000/e1000_main.c +1 -1
@@ -195,7 +195,7 @@ static struct pci_driver e1000_driver = {MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) PRO/1000 Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)
drivers/net/ethernet/intel/e1000e/netdev.c +1 -1
@@ -7592,7 +7592,7 @@ module_exit(e1000_exit_module);MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) PRO/1000 Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );/* netdev.c */
drivers/net/ethernet/intel/fm10k/fm10k_main.c +1 -1
@@ -21,7 +21,7 @@ static const char fm10k_copyright[] =MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION (DRV_SUMMARY ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );/* single workqueue for entire fm10k driver */
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
@@ -91,7 +91,7 @@ MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all), Debug mask (0x8XXXXXXXMODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) Ethernet Connection XL710 Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );static struct workqueue_struct *i40e_wq;
drivers/net/ethernet/intel/iavf/iavf_main.c +2 -2
@@ -53,8 +53,8 @@ MODULE_DEVICE_TABLE(pci, iavf_pci_tbl);MODULE_ALIAS ("i40evf" );MODULE_AUTHOR ("Intel Corporation, <[email protected]>" ); -MODULE_DESCRIPTION ("Intel(R) XL710 X710 Virtual Function Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("Intel(R) Ethernet Adaptive Virtual Function Network Driver" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );static struct workqueue_struct *iavf_wq;
drivers/net/ethernet/intel/ice/ice_main.c +1 -1
@@ -15,7 +15,7 @@ static const char ice_copyright[] = "Copyright (c) 2018, Intel Corporation.";MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION (DRV_SUMMARY ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );static int debug =-1 ;
drivers/net/ethernet/intel/igb/igb_main.c +1 -1
@@ -243,7 +243,7 @@ static struct pci_driver igb_driver = {MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) Gigabit Ethernet Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)
drivers/net/ethernet/intel/igbvf/netdev.c +1 -1
@@ -3011,7 +3011,7 @@ module_exit(igbvf_exit_module);MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) Gigabit Virtual Function Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );/* netdev.c */
drivers/net/ethernet/intel/ixgb/ixgb_main.c +1 -1
@@ -107,7 +107,7 @@ static struct pci_driver ixgb_driver = {MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) PRO/10GbE Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -1
@@ -159,7 +159,7 @@ MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) 10 Gigabit PCI Express Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );static struct workqueue_struct *ixgbe_wq;
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +1 -1
@@ -79,7 +79,7 @@ MODULE_DEVICE_TABLE(pci, ixgbevf_pci_tbl);MODULE_AUTHOR ("Intel Corporation, <[email protected]>" );MODULE_DESCRIPTION ("Intel(R) 10 Gigabit Virtual Function Network Driver" ); -MODULE_LICENSE ("GPL" ); +MODULE_LICENSE ("GPL v2" );MODULE_VERSION (DRV_VERSION );#define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK)
Signature · 1 line
2.14.4
Bowers
PATCH v2 1/14 intel-ethernet: rename i40evf to iavf
In reply to Jesse BrandeburgQuoted 21 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 01/14] intel-ethernet: rename i40evf to iavfRename the Intel Ethernet Adaptive Virtual Function driver (i40evf) to a new name (iavf) that is more consistent with the ongoing maintenance of the driver as the universal VF driver for multiple product lines.
This first patch fixes up the directory names and the .ko name, intentionally ignoring the function names inside the driver for now. Basically this is the simplest patch that gets the rename done and will be followed by other patches that rename the internal functions.
This patch also addresses a couple of string/name issues and updates the Copyright year.
Quoted 7 lines
Also, made sure to add a
MODULE_ALIASto the old name.Signed-off-by Jesse Brandeburg <[email protected]>---
v2: add
Kconfigmigration as suggested by davem
RE: [Intel-wired-lan] [PATCH net-next v2 02/14] iavf: diet and reformat
In reply to Jesse BrandeburgQuoted 11 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 02/14] iavf: diet and reformatRemove a bunch of unused code and reformat a few lines. Also remove some now un-necessary files.
Signed-off-by Jesse Brandeburg <[email protected]>
Quoted 13 lines
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 27 - drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h | 2277 +------------------ -- drivers/net/ethernet/intel/iavf/i40e_common.c | 337 --- drivers/net/ethernet/intel/iavf/i40e_hmc.h | 215 -- drivers/net/ethernet/intel/iavf/i40e_lan_hmc.h | 158 -- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 65 +- drivers/net/ethernet/intel/iavf/i40e_register.h | 245 --- drivers/net/ethernet/intel/iavf/i40e_type.h | 783 +------ 8 files changed, 50 insertions(+), 4057 deletions(-) delete mode 100644 drivers/net/ethernet/intel/iavf/i40e_hmc.h delete mode 100644 drivers/net/ethernet/intel/iavf/i40e_lan_hmc.h
Bowers
PATCH v2 3/14 iavf: rename functions and structs to new name
In reply to Jesse BrandeburgQuoted 24 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 03/14] iavf: rename functions and structs to new nameThis basically begins the internal portion of the rename of i40evf to iavf, by renaming many of the functions, structs, variables and defines.
Most of the changes were made mechanically, which introduces some alignment issues.
Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 38 +- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 3 +- drivers/net/ethernet/intel/iavf/i40e_common.c | 89 +- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 12 +- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 40 +- drivers/net/ethernet/intel/iavf/i40e_trace.h | 26 +- drivers/net/ethernet/intel/iavf/i40e_txrx.c | 94 +- drivers/net/ethernet/intel/iavf/i40e_txrx.h | 36 +-
Quoted 8 lines
drivers/net/ethernet/intel/iavf/i40evf.h | 362 +++--- drivers/net/ethernet/intel/iavf/i40evf_client.c | 184 +-- drivers/net/ethernet/intel/iavf/i40evf_client.h | 30 +- drivers/net/ethernet/intel/iavf/i40evf_ethtool.c | 364 +++--- drivers/net/ethernet/intel/iavf/i40evf_main.c | 1424 ++++++++++--------- -- drivers/net/ethernet/intel/iavf/i40evf_virtchnl.c | 402 +++--- 14 files changed, 1550 insertions(+), 1554 deletions(-)
Bowers
PATCH v2 4/14 iavf: rename i40e_status to iavf_status
In reply to Jesse BrandeburgQuoted 12 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 04/14] iavf: renamei40e_statustoiavf_statusThis is just a rename of an internal variable
i40e_status, but it was a pretty big change and so deserved it's own patch.Signed-off-by Jesse Brandeburg <[email protected]>
Quoted 13 lines
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 94 +++++++++--------- drivers/net/ethernet/intel/iavf/i40e_alloc.h | 8 +- drivers/net/ethernet/intel/iavf/i40e_common.c | 72 +++++++------- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 2 +- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 28 +++--- drivers/net/ethernet/intel/iavf/i40evf.h | 2 +- drivers/net/ethernet/intel/iavf/i40evf_client.c | 6 +- drivers/net/ethernet/intel/iavf/i40evf_ethtool.c | 52 ++++------ drivers/net/ethernet/intel/iavf/i40evf_main.c | 14 +-- drivers/net/ethernet/intel/iavf/i40evf_virtchnl.c | 115 +++++++++------------ - 10 files changed, 179 insertions(+), 214 deletions(-)
Bowers
PATCH v2 5/14 iavf: move i40evf files to new name
In reply to Jesse BrandeburgQuoted 26 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 05/14] iavf: move i40evf files to new nameSimply move the i40evf files to the new name, updating the #includes to track the new names, and updating the
Makefileas well.A future patch will remove the i40e references (after the code removal patches later in this series).
Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/iavf/Makefile | 4 ++-- drivers/net/ethernet/intel/iavf/{i40evf.h => iavf.h} | 2 +- drivers/net/ethernet/intel/iavf/{i40evf_client.c => iavf_client.c} | 4 ++-- drivers/net/ethernet/intel/iavf/{i40evf_client.h => iavf_client.h} | 0 drivers/net/ethernet/intel/iavf/{i40evf_ethtool.c => iavf_ethtool.c} | 2 +- drivers/net/ethernet/intel/iavf/{i40evf_main.c => iavf_main.c} | 4 ++-- drivers/net/ethernet/intel/iavf/{i40e_txrx.c => iavf_txrx.c} | 2 +- drivers/net/ethernet/intel/iavf/{i40e_txrx.h => iavf_txrx.h} | 0 .../net/ethernet/intel/iavf/{i40evf_virtchnl.c => iavf_virtchnl.c} | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) rename
Quoted 11 lines
drivers/net/ethernet/intel/iavf/{i40evf.h=>iavf.h} (99%) renamedrivers/net/ethernet/intel/iavf/{i40evf_client.c=>iavf_client.c} (99%) renamedrivers/net/ethernet/intel/iavf/{i40evf_client.h=>iavf_client.h} (100%) renamedrivers/net/ethernet/intel/iavf/{i40evf_ethtool.c=>iavf_ethtool.c} (99%) renamedrivers/net/ethernet/intel/iavf/{i40evf_main.c=>iavf_main.c} (99%) renamedrivers/net/ethernet/intel/iavf/{i40e_txrx.c=>iavf_txrx.c} (99%) renamedrivers/net/ethernet/intel/iavf/{i40e_txrx.h=>iavf_txrx.h} (100%) renamedrivers/net/ethernet/intel/iavf/{i40evf_virtchnl.c=>iavf_virtchnl.c} (99%)
Bowers
PATCH v2 6/14 iavf: remove references to old names
In reply to Jesse BrandeburgQuoted 12 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 06/14] iavf: remove references to old namesRemove the register name references to I40E_VF* and change to
IAVF_VF. Update the descriptor names and defines to the IAVF name.Signed-off-by Jesse Brandeburg <[email protected]>
Quoted 12 lines
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 28 ++-- drivers/net/ethernet/intel/iavf/i40e_common.c | 2 +- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 2 +- drivers/net/ethernet/intel/iavf/i40e_register.h | 128 +++++++++--------- drivers/net/ethernet/intel/iavf/i40e_type.h | 170 ++++++++++++---------- -- drivers/net/ethernet/intel/iavf/iavf.h | 10 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 92 ++++++------- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 104 +++++++-------- drivers/net/ethernet/intel/iavf/iavf_txrx.h | 2 +- 9 files changed, 267 insertions(+), 271 deletions(-)
Bowers
PATCH v2 7/14 iavf: rename device ID defines
In reply to Jesse BrandeburgQuoted 11 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 07/14] iavf: rename device ID definesRename the device ID defines to have IAVF in them and remove all the unused defines.
Quoted 8 lines
Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 22 +++++++-------- drivers/net/ethernet/intel/iavf/i40e_common.c | 29 +++---------------- drivers/net/ethernet/intel/iavf/i40e_devids.h | 40 ++++++--------------------- drivers/net/ethernet/intel/iavf/i40e_type.h | 6 ---- drivers/net/ethernet/intel/iavf/iavf_main.c | 8 +++--- 5 files changed, 27 insertions(+), 78 deletions(-)
Bowers
PATCH v2 8/14 iavf: rename I40E_ADMINQ_DESC
In reply to Jesse BrandeburgQuoted 8 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 08/14] iavf: renameI40E_ADMINQ_DESC
Quoted 7 lines
Take care of some renames containing
I40E_ADMINQ_DESC.Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 18 +++++++++--------- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-)
Bowers
PATCH v2 9/14 iavf: rename i40e_hw to iavf_hw
In reply to Jesse BrandeburgQuoted 12 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 09/14] iavf: renamei40e_hwtoiavf_hwFix up the
i40e_hwnames to new name, including versions inside other strings.Signed-off-by Jesse Brandeburg <[email protected]>
Quoted 12 lines
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 42 +++++++-------- drivers/net/ethernet/intel/iavf/i40e_alloc.h | 21 +++----- drivers/net/ethernet/intel/iavf/i40e_common.c | 30 +++++------ drivers/net/ethernet/intel/iavf/i40e_prototype.h | 65 +++++++++++--------- ---- drivers/net/ethernet/intel/iavf/i40e_type.h | 10 ++-- drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 52 +++++++++---------- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 6 +-- 9 files changed, 111 insertions(+), 119 deletions(-)
Bowers
PATCH v2 10/14 iavf: replace i40e_debug with iavf version
In reply to Jesse BrandeburgQuoted 11 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 10/14] iavf: replacei40e_debugwith iavf versionChange another string (
i40e_debug)Signed-off-by Jesse Brandeburg <[email protected]>
Quoted 8 lines
--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 28 ++++++++++++--------- --- drivers/net/ethernet/intel/iavf/i40e_common.c | 12 +++++----- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 2 +- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 2 +- drivers/net/ethernet/intel/iavf/i40e_type.h | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-)
Bowers
PATCH v2 11/14 iavf: tracing infrastructure rename
In reply to Jesse BrandeburgQuoted 11 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 11/14] iavf: tracing infrastructure renameRename the
i40e_tracefile and fix up all the callers to the new names inside theiavf_trace.hfile.
Quoted 6 lines
Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- .../intel/iavf/{i40e_trace.h => iavf_trace.h} | 28 +++++++++++----------- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 14 +++++------ 3 files changed, 22 insertions(+), 22 deletions(-) rename
Bowers
PATCH v2 12/14 iavf: rename most of i40e strings
In reply to Jesse BrandeburgQuoted 30 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 12/14] iavf: rename most of i40e stringsThis is the big rename patch, it takes most of the
i40e_andI40E_strings and renames them toiavf_andIAVF_.Some of the adminq code, as well as most of the client interface code used by RDMA is left unchanged in order to indicate that the driver is talking to non-internal to iavf code.
Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 96 ++-- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 24 +- drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h | 4 +- drivers/net/ethernet/intel/iavf/i40e_alloc.h | 38 +- drivers/net/ethernet/intel/iavf/i40e_common.c | 590 ++++++++++-------- -- drivers/net/ethernet/intel/iavf/i40e_osdep.h | 20 +- drivers/net/ethernet/intel/iavf/i40e_prototype.h | 13 +- drivers/net/ethernet/intel/iavf/i40e_status.h | 8 +- drivers/net/ethernet/intel/iavf/i40e_type.h | 633 +++++++++++---------- - drivers/net/ethernet/intel/iavf/iavf.h | 59 +-
Quoted 8 lines
drivers/net/ethernet/intel/iavf/iavf_client.c | 26 +- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 142 +++-- drivers/net/ethernet/intel/iavf/iavf_main.c | 107 ++-- drivers/net/ethernet/intel/iavf/iavf_trace.h | 36 +- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 616 ++++++++++----------- drivers/net/ethernet/intel/iavf/iavf_txrx.h | 341 ++++++------ drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 20 +- 17 files changed, 1366 insertions(+), 1407 deletions(-)
Bowers
PATCH v2 13/14 iavf: finish renaming files to iavf
In reply to Jesse BrandeburgQuoted 23 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 13/14] iavf: finish renaming files to iavfThis finishes the process of renaming the files that make sense to rename (skipping adminq related files that talk to i40e), and fixes up the build and the #includes so that everything builds nicely.
Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/iavf/Makefile | 2 +- drivers/net/ethernet/intel/iavf/i40e_adminq.c | 8 ++++---- drivers/net/ethernet/intel/iavf/i40e_adminq.h | 4 ++-- drivers/net/ethernet/intel/iavf/iavf.h | 4 ++-- drivers/net/ethernet/intel/iavf/{i40e_alloc.h => iavf_alloc.h} | 0 drivers/net/ethernet/intel/iavf/iavf_client.c | 2 +- drivers/net/ethernet/intel/iavf/{i40e_common.c => iavf_common.c} | 4 ++- - drivers/net/ethernet/intel/iavf/{i40e_devids.h => iavf_devids.h} | 0 drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
Quoted 8 lines
drivers/net/ethernet/intel/iavf/{i40e_osdep.h => iavf_osdep.h} | 0
.../ethernet/intel/iavf/{i40e_prototype.h => iavf_prototype.h} | 4 ++--
.../net/ethernet/intel/iavf/{i40e_register.h => iavf_register.h} | 0
drivers/net/ethernet/intel/iavf/{i40e_status.h => iavf_status.h} | 0
drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +-
drivers/net/ethernet/intel/iavf/{i40e_type.h => iavf_type.h} | 8 ++++----
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +-
16 files changed, 21 insertions(+), 21 deletions(-) renameBowers
PATCH v2 14/14 intel-ethernet: use correct module license
In reply to Jesse BrandeburgQuoted 16 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, September 14, 2018 5:38 PM
To: netdev at vger.kernel.org; intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 14/14] intel-ethernet: use correct module licenseWe recently updated all our SPDX identifiers to correctly indicate our
net/ethernet/intel/*drivers were always released and intended to be released under GPL v2, but theMODULE_LICENSEdeclaration was never updated.Fix the
MODULE_LICENSEto be GPL v2, for all our drivers.Signed-off-by Jesse Brandeburg <[email protected]>
Quoted 14 lines
--- drivers/net/ethernet/intel/e100.c | 2 +- drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++-- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-)