iavf: Rename i40e_adminq* files to iavf_adminq*
Subsystems (2)
PATCH 1/9 iavf: Rename i40e_adminq* files to iavf_adminq*
With the rename of the iavf driver, there were some files that were missed in renaming. Update these to be iavf as well.
---
drivers/net/ethernet/intel/iavf/Makefile | 2 +-
.../net/ethernet/intel/iavf/{i40e_adminq.c => iavf_adminq.c} | 2 +-
.../net/ethernet/intel/iavf/{i40e_adminq.h => iavf_adminq.h} | 2 +-
.../intel/iavf/{i40e_adminq_cmd.h => iavf_adminq_cmd.h} | 0
drivers/net/ethernet/intel/iavf/iavf_common.c | 2 +-
drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +-
6 files changed, 5 insertions(+), 5 deletions(-)
rename drivers/net/ethernet/intel/iavf/{i40e_adminq.c => iavf_adminq.c} (99%)
rename drivers/net/ethernet/intel/iavf/{i40e_adminq.h => iavf_adminq.h} (99%)
rename drivers/net/ethernet/intel/iavf/{i40e_adminq_cmd.h => iavf_adminq_cmd.h} (100%)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 iavf_common.o i40e_adminq.o iavf_client.o + iavf_txrx.o iavf_common.o iavf_adminq.o iavf_client.o
drivers/net/ethernet/intel/iavf/iavf_adminq.c renamed from drivers/net/ethernet/intel/iavf/i40e_adminq.c +1 -1
@@ -4,7 +4,7 @@#include "iavf_status.h" #include "iavf_type.h" #include "iavf_register.h" -#include "i40e_adminq.h" +#include "iavf_adminq.h" #include "iavf_prototype.h" /**
drivers/net/ethernet/intel/iavf/iavf_adminq.h renamed from drivers/net/ethernet/intel/iavf/i40e_adminq.h +1 -1
@@ -6,7 +6,7 @@#include "iavf_osdep.h" #include "iavf_status.h" -#include "i40e_adminq_cmd.h" +#include "iavf_adminq_cmd.h" #define IAVF_ADMINQ_DESC (R , i) \ (&(((struct i40e_aq_desc *)((R).desc_buf.va))[i]))
drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h renamed from drivers/net/ethernet/intel/iavf/i40e_adminq_cmd.h +0 -0
drivers/net/ethernet/intel/iavf/iavf_common.c +1 -1
@@ -2,7 +2,7 @@/* Copyright(c) 2013 - 2018 Intel Corporation. */ #include "iavf_type.h" -#include "i40e_adminq.h" +#include "iavf_adminq.h" #include "iavf_prototype.h" #include <linux/avf/virtchnl.h>
drivers/net/ethernet/intel/iavf/iavf_type.h +1 -1
@@ -7,7 +7,7 @@#include "iavf_status.h" #include "iavf_osdep.h" #include "iavf_register.h" -#include "i40e_adminq.h" +#include "iavf_adminq.h" #include "iavf_devids.h" #define IAVF_RXQ_CTX_DBUFF_SHIFT 7
Signature · 1 line
2.19.2
PATCH 2/9 iavf: change iavf_status_code to iavf_status
From: Sergey Nemov <[email protected]>
Instead of typedefing the enum iavf_status_code with iavf_status, just shorten the enum itself and get rid of typedef.
--- drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 67 ++++++++++--------- drivers/net/ethernet/intel/iavf/iavf_alloc.h | 17 +++-- drivers/net/ethernet/intel/iavf/iavf_client.c | 6 +- drivers/net/ethernet/intel/iavf/iavf_common.c | 53 ++++++++------- drivers/net/ethernet/intel/iavf/iavf_main.c | 20 +++--- drivers/net/ethernet/intel/iavf/iavf_osdep.h | 1 - .../net/ethernet/intel/iavf/iavf_prototype.h | 52 +++++++------- drivers/net/ethernet/intel/iavf/iavf_status.h | 2 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 14 ++-- 10 files changed, 121 insertions(+), 113 deletions(-)
drivers/net/ethernet/intel/iavf/iavf.h +1 -1
@@ -402,7 +402,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, -iavf_status v_retval,u8 *msg,u16 msglen); +enum 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/iavf_adminq.c +34 -33
174 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_alloc.h +10 -7
@@ -20,12 +20,15 @@ enum iavf_memory_type { };/* prototype for functions used for dynamic memory allocation */ -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 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); +enum iavf_status iavf_allocate_dma_mem (struct iavf_hw *hw, +struct iavf_dma_mem *mem, +enum iavf_memory_type type, +u64 size,u32 alignment); +enum iavf_status iavf_free_dma_mem (struct iavf_hw *hw, +struct iavf_dma_mem *mem); +enum iavf_status iavf_allocate_virt_mem (struct iavf_hw *hw, +struct iavf_virt_mem *mem,u32 size); +enum iavf_status iavf_free_virt_mem (struct iavf_hw *hw, +struct iavf_virt_mem *mem);#endif /* _IAVF_ALLOC_H_ */
drivers/net/ethernet/intel/iavf/iavf_client.c +3 -3
@@ -135,7 +135,7 @@ void iavf_notify_client_open(struct iavf_vsi *vsi)static int iavf_client_release_qvlist (struct i40e_info *ldev) {struct iavf_adapter *adapter = ldev->vf; -iavf_status err; +enum 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; -iavf_status err; +enum 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; -iavf_status err; +enum iavf_status err;u32 v_idx, i;size_t msg_size;
drivers/net/ethernet/intel/iavf/iavf_common.c +27 -26
132 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_main.c +11 -9
@@ -66,9 +66,9 @@ static struct workqueue_struct *iavf_wq;* @size: size of memory requested * @alignment: what to align the allocation to **/ -iavf_status iavf_allocate_dma_mem_d (struct iavf_hw *hw, -struct iavf_dma_mem *mem, -u64 size,u32 alignment) +enum iavf_status iavf_allocate_dma_mem_d (struct iavf_hw *hw, +struct iavf_dma_mem *mem, +u64 size,u32 alignment) {struct iavf_adapter *adapter = (struct iavf_adapter *)hw->back;
@@ -89,7 +89,8 @@ iavf_status iavf_allocate_dma_mem_d(struct iavf_hw *hw,* @hw: pointer to the HW structure * @mem: ptr to mem struct to free **/ -iavf_status iavf_free_dma_mem_d (struct iavf_hw *hw,struct iavf_dma_mem *mem) +enum iavf_status iavf_free_dma_mem_d (struct iavf_hw *hw, +struct iavf_dma_mem *mem) {struct iavf_adapter *adapter = (struct iavf_adapter *)hw->back;
@@ -106,8 +107,8 @@ iavf_status iavf_free_dma_mem_d(struct iavf_hw *hw, struct iavf_dma_mem *mem)* @mem: ptr to mem struct to fill out * @size: size of memory requested **/ -iavf_status iavf_allocate_virt_mem_d (struct iavf_hw *hw, -struct iavf_virt_mem *mem,u32 size) +enum iavf_status iavf_allocate_virt_mem_d (struct iavf_hw *hw, +struct iavf_virt_mem *mem,u32 size) {if (!mem)return I40E_ERR_PARAM ;
@@ -126,7 +127,8 @@ iavf_status iavf_allocate_virt_mem_d(struct iavf_hw *hw,* @hw: pointer to the HW structure * @mem: ptr to mem struct to free **/ -iavf_status iavf_free_virt_mem_d (struct iavf_hw *hw,struct iavf_virt_mem *mem) +enum iavf_status iavf_free_virt_mem_d (struct iavf_hw *hw, +struct iavf_virt_mem *mem) {if (!mem)return I40E_ERR_PARAM ;
@@ -2022,7 +2024,7 @@ static void iavf_adminq_task(struct work_struct *work)struct iavf_hw *hw = &adapter->hw;struct i40e_arq_event_info event;enum virtchnl_ops v_op; -iavf_status ret, v_ret; +enum iavf_status ret, v_ret;u32 val, oldval;u16 pending;
@@ -2037,7 +2039,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 = (iavf_status)le32_to_cpu(event.desc.cookie_low); + v_ret = (enum 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/iavf_osdep.h +0 -1
@@ -48,5 +48,4 @@ struct iavf_virt_mem { extern void iavf_debug_d(void *hw, u32 mask, char *fmt_str, ...) __printf(3, 4); -typedef enum iavf_status_code iavf_status ;#endif /* _IAVF_OSDEP_H_ */
drivers/net/ethernet/intel/iavf/iavf_prototype.h +27 -25
72 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_status.h +1 -1
@@ -5,7 +5,7 @@#define _IAVF_STATUS_H_/* Error Codes */ -enum iavf_status_code { +enum iavf_status {I40E_SUCCESS =0 ,I40E_ERR_NVM =-1 ,I40E_ERR_NVM_CHECKSUM =-2 ,
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +7 -7
@@ -22,7 +22,7 @@ static int iavf_send_pf_msg(struct iavf_adapter *adapter, enum virtchnl_ops op, u8 *msg, u16 len) { struct iavf_hw *hw = &adapter->hw; -iavf_status err; +enum iavf_status err;if (adapter->flags &IAVF_FLAG_PF_COMMS_FAILED )return 0 ;/* nothing to see here, move along */
@@ -69,7 +69,7 @@ int iavf_verify_api_ver(struct iavf_adapter *adapter)struct iavf_hw *hw = &adapter->hw;struct i40e_arq_event_info event;enum virtchnl_ops op; -iavf_status err; +enum iavf_status err; event.buf_len =IAVF_MAX_AQ_BUF_SIZE ; event.msg_buf =kzalloc (event.buf_len,GFP_KERNEL );
@@ -92,7 +92,7 @@ int iavf_verify_api_ver(struct iavf_adapter *adapter) } - err = (iavf_status )le32_to_cpu (event.desc.cookie_low); + err = (enum iavf_status )le32_to_cpu (event.desc.cookie_low);if (err) goto out_alloc;
@@ -191,7 +191,7 @@ int iavf_get_vf_config(struct iavf_adapter *adapter)struct iavf_hw *hw = &adapter->hw;struct i40e_arq_event_info event;enum virtchnl_ops op; -iavf_status err; +enum iavf_status err;u16 len; len = sizeof(struct virtchnl_vf_resource) +
@@ -216,7 +216,7 @@ int iavf_get_vf_config(struct iavf_adapter *adapter)break ; } - err = (iavf_status )le32_to_cpu (event.desc.cookie_low); + err = (enum iavf_status )le32_to_cpu (event.desc.cookie_low);memcpy (adapter->vf_res, event.msg_buf,min (event.msg_len, len));/* some PFs send more queues than we should have so validate that
@@ -1184,8 +1184,8 @@ void iavf_request_reset(struct iavf_adapter *adapter)* This function handles the reply messages. **/ void iavf_virtchnl_completion (struct iavf_adapter *adapter, -enum virtchnl_ops v_opcode,iavf_status v_retval, -u8 *msg,u16 msglen) +enum virtchnl_ops v_opcode, +enum iavf_status v_retval,u8 *msg,u16 msglen) {struct net_device *netdev = adapter->netdev;
Signature · 1 line
2.19.2
Bowers
PATCH 2/9 iavf: change iavf_status_code to iavf_status
Quoted 15 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:18 PM
To: Michael, Alice <[email protected]>; intel-wired- lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 2/9] iavf: changeiavf_status_codetoiavf_statusFrom: Sergey Nemov <[email protected]>
Instead of typedefing the enum
iavf_status_codewithiavf_status, just shorten the enum itself and get rid of typedef.Signed-off-by Sergey Nemov <[email protected]>
Quoted 12 lines
--- drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 67 ++++++++++--------- drivers/net/ethernet/intel/iavf/iavf_alloc.h | 17 +++-- drivers/net/ethernet/intel/iavf/iavf_client.c | 6 +- drivers/net/ethernet/intel/iavf/iavf_common.c | 53 ++++++++------- drivers/net/ethernet/intel/iavf/iavf_main.c | 20 +++--- drivers/net/ethernet/intel/iavf/iavf_osdep.h | 1 - .../net/ethernet/intel/iavf/iavf_prototype.h | 52 +++++++------- drivers/net/ethernet/intel/iavf/iavf_status.h | 2 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 14 ++-- 10 files changed, 121 insertions(+), 113 deletions(-)
PATCH 3/9 iavf: rename i40e functions to be iavf
In reply to Alice MichaelUpdate the old i40e function names to be iavf
--- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 6 +++--- drivers/net/ethernet/intel/iavf/iavf_prototype.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_adminq.c +3 -3
@@ -8,12 +8,12 @@#include "iavf_prototype.h" /** -* i40e_adminq_init_regs - Initialize AdminQ registers +* iavf_adminq_init_regs - Initialize AdminQ registers * @hw: pointer to the hardware structure * * This assumes the alloc_asq and alloc_arq functions have already been called **/ -static void i40e_adminq_init_regs (struct iavf_hw *hw) +static void iavf_adminq_init_regs (struct iavf_hw *hw) {/* set head and tail registers in our local struct */ hw->aq.asq.tail =IAVF_VF_ATQT1 ;
@@ -519,7 +519,7 @@ enum iavf_status iavf_init_adminq(struct iavf_hw *hw) }/* Set up register offsets */ -i40e_adminq_init_regs (hw); +iavf_adminq_init_regs (hw);/* setup ASQ command write back timeout */ hw->aq.asq_cmd_timeout =I40E_ASQ_CMD_TIMEOUT ;
drivers/net/ethernet/intel/iavf/iavf_prototype.h +2 -2
@@ -18,7 +18,7 @@/* adminq functions */ enum iavf_status iavf_init_adminq (struct iavf_hw *hw);enum iavf_status iavf_shutdown_adminq (struct iavf_hw *hw); -void i40e_adminq_init_ring_data (struct iavf_hw *hw); +void iavf_adminq_init_ring_data (struct iavf_hw *hw);enum iavf_status iavf_clean_arq_element (struct iavf_hw *hw,struct i40e_arq_event_info *e,u16 *events_pending);
@@ -33,7 +33,7 @@ bool iavf_asq_done(struct iavf_hw *hw);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); +void iavf_idle_aq (struct iavf_hw *hw);void iavf_resume_aq (struct iavf_hw *hw);bool iavf_check_asq_alive (struct iavf_hw *hw);enum iavf_status iavf_aq_queue_shutdown (struct iavf_hw *hw,bool unloading);
Signature · 1 line
2.19.2
Bowers
PATCH 3/9 iavf: rename i40e functions to be iavf
Quoted 9 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:18 PM
To: Michael, Alice <[email protected]>; intel-wired- lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 3/9] iavf: rename i40e functions to be iavf
Quoted 7 lines
Update the old i40e function names to be iavf
Signed-off-by Alice Michael <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 6 +++--- drivers/net/ethernet/intel/iavf/iavf_prototype.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
PATCH 4/9 iavf: replace i40e variables with iavf
In reply to Alice MichaelUpdate the old variables and flags marked as i40e to match the iavf name of the driver.
--- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 80 +-- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 72 +- .../net/ethernet/intel/iavf/iavf_adminq_cmd.h | 656 +++++++++--------- drivers/net/ethernet/intel/iavf/iavf_common.c | 182 ++--- .../net/ethernet/intel/iavf/iavf_ethtool.c | 12 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 18 +- .../net/ethernet/intel/iavf/iavf_prototype.h | 14 +- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 12 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 16 +- 10 files changed, 532 insertions(+), 532 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_adminq.c +40 -40
@@ -37,16 +37,16 @@ static enum iavf_status i40e_alloc_adminq_asq_ring(struct iavf_hw *hw)enum iavf_status ret_code; ret_code =iavf_allocate_dma_mem (hw, &hw->aq.asq.desc_buf, - i40e_mem_atq_ring, + iavf_mem_atq_ring, (hw->aq.num_asq_entries * -sizeof (struct i40e_aq_desc )), +sizeof (struct iavf_aq_desc )),IAVF_ADMINQ_DESC_ALIGNMENT );if (ret_code)return ret_code; ret_code =iavf_allocate_virt_mem (hw, &hw->aq.asq.cmd_buf, (hw->aq.num_asq_entries * -sizeof (struct i40e_asq_cmd_details ))); +sizeof (struct iavf_asq_cmd_details )));if (ret_code) {iavf_free_dma_mem (hw, &hw->aq.asq.desc_buf);return ret_code;
@@ -64,9 +64,9 @@ static enum iavf_status i40e_alloc_adminq_arq_ring(struct iavf_hw *hw)enum iavf_status ret_code; ret_code =iavf_allocate_dma_mem (hw, &hw->aq.arq.desc_buf, - i40e_mem_arq_ring, + iavf_mem_arq_ring, (hw->aq.num_arq_entries * -sizeof (struct i40e_aq_desc )), +sizeof (struct iavf_aq_desc )),IAVF_ADMINQ_DESC_ALIGNMENT );return ret_code;
@@ -102,7 +102,7 @@ static void i40e_free_adminq_arq(struct iavf_hw *hw)**/ static enum iavf_status i40e_alloc_arq_bufs (struct iavf_hw *hw) { -struct i40e_aq_desc *desc; +struct iavf_aq_desc *desc;struct iavf_dma_mem *bi;enum iavf_status ret_code;int i;
@@ -123,7 +123,7 @@ static enum iavf_status i40e_alloc_arq_bufs(struct iavf_hw *hw)for (i =0 ; i < hw->aq.num_arq_entries; i++) { bi = &hw->aq.arq.r.arq_bi[i]; ret_code =iavf_allocate_dma_mem (hw, bi, - i40e_mem_arq_buf, + iavf_mem_arq_buf, hw->aq.arq_buf_size,IAVF_ADMINQ_DESC_ALIGNMENT );if (ret_code)
@@ -132,9 +132,9 @@ static enum iavf_status i40e_alloc_arq_bufs(struct iavf_hw *hw)/* now configure the descriptors for use */ 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 ) - desc->flags |=cpu_to_le16 (I40E_AQ_FLAG_LB ); + desc->flags =cpu_to_le16 (IAVF_AQ_FLAG_BUF ); +if (hw->aq.arq_buf_size >IAVF_AQ_LARGE_BUF ) + desc->flags |=cpu_to_le16 (IAVF_AQ_FLAG_LB ); desc->opcode =0 ;/* This is in accordance with Admin queue design, there is no * register for buffer size configuration
@@ -186,7 +186,7 @@ static enum iavf_status i40e_alloc_asq_bufs(struct iavf_hw *hw)for (i =0 ; i < hw->aq.num_asq_entries; i++) { bi = &hw->aq.asq.r.asq_bi[i]; ret_code =iavf_allocate_dma_mem (hw, bi, - i40e_mem_asq_buf, + iavf_mem_asq_buf, hw->aq.asq_buf_size,IAVF_ADMINQ_DESC_ALIGNMENT );if (ret_code)
@@ -522,7 +522,7 @@ enum iavf_status iavf_init_adminq(struct iavf_hw *hw)iavf_adminq_init_regs (hw);/* setup ASQ command write back timeout */ - hw->aq.asq_cmd_timeout =I40E_ASQ_CMD_TIMEOUT ; + hw->aq.asq_cmd_timeout =IAVF_ASQ_CMD_TIMEOUT ;/* allocate the ASQ */ ret_code =i40e_init_asq (hw);
@@ -571,13 +571,13 @@ enum iavf_status iavf_shutdown_adminq(struct iavf_hw *hw)static u16 i40e_clean_asq (struct iavf_hw *hw) {struct iavf_adminq_ring *asq = &hw->aq.asq; -struct i40e_asq_cmd_details *details; +struct iavf_asq_cmd_details *details;u16 ntc = asq->next_to_clean; -struct i40e_aq_desc desc_cb; -struct i40e_aq_desc *desc; +struct iavf_aq_desc desc_cb; +struct iavf_aq_desc *desc; desc =IAVF_ADMINQ_DESC (*asq, ntc); - details =I40E_ADMINQ_DETAILS (*asq, ntc); + details =IAVF_ADMINQ_DETAILS (*asq, ntc);while (rd32 (hw, hw->aq.asq.head) != ntc) {iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"ntc %d head %d.\n" , ntc,rd32 (hw, hw->aq.asq.head));
@@ -588,14 +588,14 @@ static u16 i40e_clean_asq(struct iavf_hw *hw) desc_cb = *desc;cb_func (hw, &desc_cb); } -memset ((void *)desc,0 ,sizeof (struct i40e_aq_desc )); +memset ((void *)desc,0 ,sizeof (struct iavf_aq_desc ));memset ((void *)details,0 , -sizeof (struct i40e_asq_cmd_details )); +sizeof (struct iavf_asq_cmd_details )); ntc++;if (ntc == asq->count) ntc =0 ; desc =IAVF_ADMINQ_DESC (*asq, ntc); - details =I40E_ADMINQ_DETAILS (*asq, ntc); + details =IAVF_ADMINQ_DETAILS (*asq, ntc); } asq->next_to_clean = ntc;
@@ -630,14 +630,14 @@ bool iavf_asq_done(struct iavf_hw *hw)* queue. It runs the queue, cleans the queue, etc **/ enum iavf_status iavf_asq_send_command (struct iavf_hw *hw, -struct i40e_aq_desc *desc, +struct iavf_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size, -struct i40e_asq_cmd_details *cmd_details) +struct iavf_asq_cmd_details *cmd_details) {struct iavf_dma_mem *dma_buff =NULL ; -struct i40e_asq_cmd_details *details; -struct i40e_aq_desc *desc_on_ring; +struct iavf_asq_cmd_details *details; +struct iavf_aq_desc *desc_on_ring;bool cmd_completed = false;enum iavf_status status =0 ;u16 retval =0 ;
@@ -652,7 +652,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw, goto asq_send_command_error; } - hw->aq.asq_last_status =I40E_AQ_RC_OK ; + hw->aq.asq_last_status =IAVF_AQ_RC_OK ; val =rd32 (hw, hw->aq.asq.head);if (val >= hw->aq.num_asq_entries) {
@@ -662,7 +662,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw, goto asq_send_command_error; } - details =I40E_ADMINQ_DETAILS (hw->aq.asq, hw->aq.asq.next_to_use); + details =IAVF_ADMINQ_DETAILS (hw->aq.asq, hw->aq.asq.next_to_use);if (cmd_details) { *details = *cmd_details;
@@ -677,7 +677,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,cpu_to_le32 (lower_32_bits (details->cookie)); } }else { -memset (details,0 ,sizeof (struct i40e_asq_cmd_details )); +memset (details,0 ,sizeof (struct iavf_asq_cmd_details )); }/* clear requested flags and then set additional flags if defined */
@@ -781,13 +781,13 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw, retval &=0xff ; } cmd_completed = true; -if ((enum i40e_admin_queue_err )retval ==I40E_AQ_RC_OK ) +if ((enum iavf_admin_queue_err )retval ==IAVF_AQ_RC_OK ) status =0 ; -else if ((enum i40e_admin_queue_err )retval ==I40E_AQ_RC_EBUSY ) +else if ((enum iavf_admin_queue_err )retval ==IAVF_AQ_RC_EBUSY ) status =I40E_ERR_NOT_READY ;else status =I40E_ERR_ADMIN_QUEUE_ERROR ; - hw->aq.asq_last_status = (enum i40e_admin_queue_err )retval; + hw->aq.asq_last_status = (enum iavf_admin_queue_err )retval; } iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE,
@@ -824,12 +824,12 @@ enum iavf_status iavf_asq_send_command(struct iavf_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 iavf_aq_desc *desc,u16 opcode) {/* zero out the desc */ -memset ((void *)desc,0 ,sizeof (struct i40e_aq_desc )); +memset ((void *)desc,0 ,sizeof (struct iavf_aq_desc )); desc->opcode =cpu_to_le16 (opcode); - desc->flags =cpu_to_le16 (I40E_AQ_FLAG_SI ); + desc->flags =cpu_to_le16 (IAVF_AQ_FLAG_SI ); }/**
@@ -843,11 +843,11 @@ void iavf_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc, u16 opcode)* left to process through 'pending' **/ enum iavf_status iavf_clean_arq_element (struct iavf_hw *hw, -struct i40e_arq_event_info *e, +struct iavf_arq_event_info *e,u16 *pending) {u16 ntc = hw->aq.arq.next_to_clean; -struct i40e_aq_desc *desc; +struct iavf_aq_desc *desc;enum iavf_status ret_code =0 ;struct iavf_dma_mem *bi;u16 desc_idx;
@@ -881,9 +881,9 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw, desc_idx = ntc; hw->aq.arq_last_status = - (enum i40e_admin_queue_err )le16_to_cpu (desc->retval); + (enum iavf_admin_queue_err )le16_to_cpu (desc->retval); flags =le16_to_cpu (desc->flags); -if (flags &I40E_AQ_FLAG_ERR ) { +if (flags &IAVF_AQ_FLAG_ERR ) { ret_code =I40E_ERR_ADMIN_QUEUE_ERROR ; iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE,
@@ -907,11 +907,11 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,* size */ bi = &hw->aq.arq.r.arq_bi[ntc]; -memset ((void *)desc,0 ,sizeof (struct i40e_aq_desc )); +memset ((void *)desc,0 ,sizeof (struct iavf_aq_desc )); - desc->flags =cpu_to_le16 (I40E_AQ_FLAG_BUF ); -if (hw->aq.arq_buf_size >I40E_AQ_LARGE_BUF ) - desc->flags |=cpu_to_le16 (I40E_AQ_FLAG_LB ); + desc->flags =cpu_to_le16 (IAVF_AQ_FLAG_BUF ); +if (hw->aq.arq_buf_size >IAVF_AQ_LARGE_BUF ) + desc->flags |=cpu_to_le16 (IAVF_AQ_FLAG_LB ); desc->datalen =cpu_to_le16 ((u16 )bi->size); desc->params.external.addr_high =cpu_to_le32 (upper_32_bits (bi->pa)); desc->params.external.addr_low =cpu_to_le32 (lower_32_bits (bi->pa));
drivers/net/ethernet/intel/iavf/iavf_adminq.h +36 -36
111 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h +328 -328
815 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_common.c +91 -91
271 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +6 -6
@@ -280,10 +280,10 @@ static int iavf_get_link_ksettings(struct net_device *netdev, cmd->base.port =PORT_NONE ;/* Set speed and duplex */ switch (adapter->link_speed) { -case I40E_LINK_SPEED_40GB : +case IAVF_LINK_SPEED_40GB : cmd->base.speed =SPEED_40000 ;break ; -case I40E_LINK_SPEED_25GB : +case IAVF_LINK_SPEED_25GB :#ifdef SPEED_25000 cmd->base.speed =SPEED_25000 ;#else
@@ -291,16 +291,16 @@ static int iavf_get_link_ksettings(struct net_device *netdev, "Speed is 25G, display not supported by this version of ethtool.\n");#endif break ; -case I40E_LINK_SPEED_20GB : +case IAVF_LINK_SPEED_20GB : cmd->base.speed =SPEED_20000 ;break ; -case I40E_LINK_SPEED_10GB : +case IAVF_LINK_SPEED_10GB : cmd->base.speed =SPEED_10000 ;break ; -case I40E_LINK_SPEED_1GB : +case IAVF_LINK_SPEED_1GB : cmd->base.speed =SPEED_1000 ;break ; -case I40E_LINK_SPEED_100MB : +case IAVF_LINK_SPEED_100MB : cmd->base.speed =SPEED_100 ;break ;default :
drivers/net/ethernet/intel/iavf/iavf_main.c +9 -9
@@ -1229,8 +1229,8 @@ static int iavf_set_interrupt_capability(struct iavf_adapter *adapter)**/ static int iavf_config_rss_aq (struct iavf_adapter *adapter) { -struct i40e_aqc_get_set_rss_key_data *rss_key = - (struct i40e_aqc_get_set_rss_key_data *)adapter->rss_key; +struct iavf_aqc_get_set_rss_key_data *rss_key = + (struct iavf_aqc_get_set_rss_key_data *)adapter->rss_key;struct iavf_hw *hw = &adapter->hw;int ret =0 ;
@@ -2022,7 +2022,7 @@ static void iavf_adminq_task(struct work_struct *work)struct iavf_adapter *adapter = container_of(work, struct iavf_adapter, adminq_task);struct iavf_hw *hw = &adapter->hw; -struct i40e_arq_event_info event; +struct iavf_arq_event_info event;enum virtchnl_ops v_op;enum iavf_status ret, v_ret;u32 val, oldval;
@@ -2241,22 +2241,22 @@ static int iavf_validate_tx_bandwidth(struct iavf_adapter *adapter,int speed =0 , ret =0 ;switch (adapter->link_speed) { -case I40E_LINK_SPEED_40GB : +case IAVF_LINK_SPEED_40GB : speed =40000 ;break ; -case I40E_LINK_SPEED_25GB : +case IAVF_LINK_SPEED_25GB : speed =25000 ;break ; -case I40E_LINK_SPEED_20GB : +case IAVF_LINK_SPEED_20GB : speed =20000 ;break ; -case I40E_LINK_SPEED_10GB : +case IAVF_LINK_SPEED_10GB : speed =10000 ;break ; -case I40E_LINK_SPEED_1GB : +case IAVF_LINK_SPEED_1GB : speed =1000 ;break ; -case I40E_LINK_SPEED_100MB : +case IAVF_LINK_SPEED_100MB : speed =100 ;break ;default :
drivers/net/ethernet/intel/iavf/iavf_prototype.h +7 -7
@@ -20,13 +20,13 @@ enum iavf_status iavf_init_adminq(struct iavf_hw *hw);enum iavf_status iavf_shutdown_adminq (struct iavf_hw *hw);void iavf_adminq_init_ring_data (struct iavf_hw *hw);enum iavf_status iavf_clean_arq_element (struct iavf_hw *hw, -struct i40e_arq_event_info *e, +struct iavf_arq_event_info *e,u16 *events_pending);enum iavf_status iavf_asq_send_command (struct iavf_hw *hw, -struct i40e_aq_desc *desc, +struct iavf_aq_desc *desc,void *buff,/* can be NULL */ u16 buff_size, -struct i40e_asq_cmd_details *cmd_details); +struct iavf_asq_cmd_details *cmd_details);bool iavf_asq_done (struct iavf_hw *hw);/* debug function for adminq */
@@ -37,7 +37,7 @@ void iavf_idle_aq(struct iavf_hw *hw);void iavf_resume_aq (struct iavf_hw *hw);bool iavf_check_asq_alive (struct iavf_hw *hw);enum iavf_status iavf_aq_queue_shutdown (struct iavf_hw *hw,bool unloading); -const char *iavf_aq_str (struct iavf_hw *hw,enum i40e_admin_queue_err aq_err); +const char *iavf_aq_str (struct iavf_hw *hw,enum iavf_admin_queue_err aq_err);const char *iavf_stat_str (struct iavf_hw *hw,enum iavf_status stat_err); enum iavf_status iavf_aq_get_rss_lut(struct iavf_hw *hw, u16 seid,
@@ -45,9 +45,9 @@ enum iavf_status iavf_aq_get_rss_lut(struct iavf_hw *hw, u16 seid,enum iavf_status iavf_aq_set_rss_lut (struct iavf_hw *hw,u16 seid,bool pf_lut,u8 *lut,u16 lut_size);enum iavf_status iavf_aq_get_rss_key (struct iavf_hw *hw,u16 seid, -struct i40e_aqc_get_set_rss_key_data *key); +struct iavf_aqc_get_set_rss_key_data *key);enum iavf_status iavf_aq_set_rss_key (struct iavf_hw *hw,u16 seid, -struct i40e_aqc_get_set_rss_key_data *key); +struct iavf_aqc_get_set_rss_key_data *key);enum iavf_status iavf_set_mac_type (struct iavf_hw *hw);
@@ -65,5 +65,5 @@ enum iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw,enum virtchnl_ops v_opcode, enum iavf_status v_retval, u8 *msg, u16 msglen, - struct i40e_asq_cmd_details *cmd_details); + struct iavf_asq_cmd_details *cmd_details);#endif /* _IAVF_PROTOTYPE_H_ */
drivers/net/ethernet/intel/iavf/iavf_txrx.c +6 -6
@@ -379,19 +379,19 @@ static inline unsigned int iavf_itr_divisor(struct iavf_q_vector *q_vector)unsigned int divisor;switch (q_vector->adapter->link_speed) { -case I40E_LINK_SPEED_40GB : +case IAVF_LINK_SPEED_40GB : divisor =IAVF_ITR_ADAPTIVE_MIN_INC *1024 ;break ; -case I40E_LINK_SPEED_25GB : -case I40E_LINK_SPEED_20GB : +case IAVF_LINK_SPEED_25GB : +case IAVF_LINK_SPEED_20GB : divisor =IAVF_ITR_ADAPTIVE_MIN_INC *512 ;break ;default : -case I40E_LINK_SPEED_10GB : +case IAVF_LINK_SPEED_10GB : divisor =IAVF_ITR_ADAPTIVE_MIN_INC *256 ;break ; -case I40E_LINK_SPEED_1GB : -case I40E_LINK_SPEED_100MB : +case IAVF_LINK_SPEED_1GB : +case IAVF_LINK_SPEED_100MB : divisor =IAVF_ITR_ADAPTIVE_MIN_INC *32 ;break ; }
drivers/net/ethernet/intel/iavf/iavf_type.h +1 -1
@@ -21,7 +21,7 @@/* forward declaration */ struct iavf_hw ; -typedef void (*I40E_ADMINQ_CALLBACK )(struct iavf_hw *,struct i40e_aq_desc *); +typedef void (*I40E_ADMINQ_CALLBACK )(struct iavf_hw *,struct iavf_aq_desc *);/* Data type manipulation macros. */
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +8 -8
@@ -67,7 +67,7 @@ int iavf_verify_api_ver(struct iavf_adapter *adapter) {struct virtchnl_version_info *pf_vvi;struct iavf_hw *hw = &adapter->hw; -struct i40e_arq_event_info event; +struct iavf_arq_event_info event;enum virtchnl_ops op;enum iavf_status err;
@@ -189,7 +189,7 @@ static void iavf_validate_num_queues(struct iavf_adapter *adapter)int iavf_get_vf_config (struct iavf_adapter *adapter) {struct iavf_hw *hw = &adapter->hw; -struct i40e_arq_event_info event; +struct iavf_arq_event_info event;enum virtchnl_ops op;enum iavf_status err;u16 len;
@@ -938,22 +938,22 @@ static void iavf_print_link_message(struct iavf_adapter *adapter) }switch (adapter->link_speed) { -case I40E_LINK_SPEED_40GB : +case IAVF_LINK_SPEED_40GB : speed ="40 G" ;break ; -case I40E_LINK_SPEED_25GB : +case IAVF_LINK_SPEED_25GB : speed ="25 G" ;break ; -case I40E_LINK_SPEED_20GB : +case IAVF_LINK_SPEED_20GB : speed ="20 G" ;break ; -case I40E_LINK_SPEED_10GB : +case IAVF_LINK_SPEED_10GB : speed ="10 G" ;break ; -case I40E_LINK_SPEED_1GB : +case IAVF_LINK_SPEED_1GB : speed ="1000 M" ;break ; -case I40E_LINK_SPEED_100MB : +case IAVF_LINK_SPEED_100MB : speed ="100 M" ;break ;default :
Signature · 1 line
2.19.2
Bowers
PATCH 4/9 iavf: replace i40e variables with iavf
Quoted 13 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:18 PM
To: Michael, Alice <[email protected]>; intel-wired-
lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 4/9] iavf: replace i40e variables with iavfUpdate the old variables and flags marked as i40e to match the iavf name of the driver.
Signed-off-by Alice Michael <[email protected]>
Quoted 12 lines
--- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 80 +-- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 72 +- .../net/ethernet/intel/iavf/iavf_adminq_cmd.h | 656 +++++++++--------- drivers/net/ethernet/intel/iavf/iavf_common.c | 182 ++--- .../net/ethernet/intel/iavf/iavf_ethtool.c | 12 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 18 +- .../net/ethernet/intel/iavf/iavf_prototype.h | 14 +- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 12 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 16 +- 10 files changed, 532 insertions(+), 532 deletions(-)
PATCH 5/9 iavf: rename iavf_status structure flags
In reply to Alice Michaelrename the flags inside of iavf_status from I40E_* to IAVF_*
--- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 42 +-- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_client.c | 6 +- drivers/net/ethernet/intel/iavf/iavf_common.c | 266 +++++++++--------- drivers/net/ethernet/intel/iavf/iavf_main.c | 38 +-- drivers/net/ethernet/intel/iavf/iavf_status.h | 134 ++++----- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 7 files changed, 245 insertions(+), 245 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_adminq.c +21 -21
@@ -271,7 +271,7 @@ static enum iavf_status i40e_config_asq_regs(struct iavf_hw *hw)/* Check one register to verify that config was applied */ reg =rd32 (hw, hw->aq.asq.bal);if (reg !=lower_32_bits (hw->aq.asq.desc_buf.pa)) - ret_code =I40E_ERR_ADMIN_QUEUE_ERROR ; + ret_code =IAVF_ERR_ADMIN_QUEUE_ERROR ;return ret_code; }
@@ -303,7 +303,7 @@ static enum iavf_status i40e_config_arq_regs(struct iavf_hw *hw)/* Check one register to verify that config was applied */ reg =rd32 (hw, hw->aq.arq.bal);if (reg !=lower_32_bits (hw->aq.arq.desc_buf.pa)) - ret_code =I40E_ERR_ADMIN_QUEUE_ERROR ; + ret_code =IAVF_ERR_ADMIN_QUEUE_ERROR ;return ret_code; }
@@ -327,14 +327,14 @@ static enum iavf_status i40e_init_asq(struct iavf_hw *hw)if (hw->aq.asq.count >0 ) {/* queue already initialized */ - ret_code =I40E_ERR_NOT_READY ; + ret_code =IAVF_ERR_NOT_READY ; goto init_adminq_exit; }/* verify input for valid configuration */ if ((hw->aq.num_asq_entries ==0 ) || (hw->aq.asq_buf_size ==0 )) { - ret_code =I40E_ERR_CONFIG ; + ret_code =IAVF_ERR_CONFIG ; goto init_adminq_exit; }
@@ -386,14 +386,14 @@ static enum iavf_status i40e_init_arq(struct iavf_hw *hw)if (hw->aq.arq.count >0 ) {/* queue already initialized */ - ret_code =I40E_ERR_NOT_READY ; + ret_code =IAVF_ERR_NOT_READY ; goto init_adminq_exit; }/* verify input for valid configuration */ if ((hw->aq.num_arq_entries ==0 ) || (hw->aq.arq_buf_size ==0 )) { - ret_code =I40E_ERR_CONFIG ; + ret_code =IAVF_ERR_CONFIG ; goto init_adminq_exit; }
@@ -439,7 +439,7 @@ static enum iavf_status i40e_shutdown_asq(struct iavf_hw *hw)mutex_lock (&hw->aq.asq_mutex);if (hw->aq.asq.count ==0 ) { - ret_code =I40E_ERR_NOT_READY ; + ret_code =IAVF_ERR_NOT_READY ; goto shutdown_asq_out; }
@@ -473,7 +473,7 @@ static enum iavf_status i40e_shutdown_arq(struct iavf_hw *hw)mutex_lock (&hw->aq.arq_mutex);if (hw->aq.arq.count ==0 ) { - ret_code =I40E_ERR_NOT_READY ; + ret_code =IAVF_ERR_NOT_READY ; goto shutdown_arq_out; }
@@ -514,7 +514,7 @@ enum iavf_status iavf_init_adminq(struct iavf_hw *hw) (hw->aq.num_asq_entries == 0) || (hw->aq.arq_buf_size == 0) || (hw->aq.asq_buf_size == 0)) { - ret_code =I40E_ERR_CONFIG ; + ret_code =IAVF_ERR_CONFIG ; goto init_adminq_exit; }
@@ -648,7 +648,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,if (hw->aq.asq.count ==0 ) {iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Admin queue not initialized.\n" ); - status =I40E_ERR_QUEUE_EMPTY ; + status =IAVF_ERR_QUEUE_EMPTY ; goto asq_send_command_error; }
@@ -658,7 +658,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,if (val >= hw->aq.num_asq_entries) {iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: head overrun at %d\n" , val); - status =I40E_ERR_QUEUE_EMPTY ; + status =IAVF_ERR_QUEUE_EMPTY ; goto asq_send_command_error; }
@@ -689,7 +689,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Invalid buffer size: %d.\n" , buff_size); - status =I40E_ERR_INVALID_SIZE ; + status =IAVF_ERR_INVALID_SIZE ; goto asq_send_command_error; }
@@ -697,7 +697,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Async flag not set along with postpone flag" ); - status =I40E_ERR_PARAM ; + status =IAVF_ERR_PARAM ; goto asq_send_command_error; }
@@ -712,7 +712,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Error queue is full.\n" ); - status =I40E_ERR_ADMIN_QUEUE_FULL ; + status =IAVF_ERR_ADMIN_QUEUE_FULL ; goto asq_send_command_error; }
@@ -784,9 +784,9 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,if ((enum iavf_admin_queue_err )retval ==IAVF_AQ_RC_OK ) status =0 ;else if ((enum iavf_admin_queue_err )retval ==IAVF_AQ_RC_EBUSY ) - status =I40E_ERR_NOT_READY ; + status =IAVF_ERR_NOT_READY ;else - status =I40E_ERR_ADMIN_QUEUE_ERROR ; + status =IAVF_ERR_ADMIN_QUEUE_ERROR ; hw->aq.asq_last_status = (enum iavf_admin_queue_err )retval; }
@@ -804,11 +804,11 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,if (rd32 (hw, hw->aq.asq.len) &IAVF_VF_ATQLEN1_ATQCRIT_MASK ) {iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: AQ Critical error.\n" ); - status =I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR ; + status =IAVF_ERR_ADMIN_QUEUE_CRITICAL_ERROR ; }else {iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Writeback timeout.\n" ); - status =I40E_ERR_ADMIN_QUEUE_TIMEOUT ; + status =IAVF_ERR_ADMIN_QUEUE_TIMEOUT ; } }
@@ -864,7 +864,7 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,if (hw->aq.arq.count ==0 ) {iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQRX: Admin queue not initialized.\n" ); - ret_code =I40E_ERR_QUEUE_EMPTY ; + ret_code =IAVF_ERR_QUEUE_EMPTY ; goto clean_arq_element_err; }
@@ -872,7 +872,7 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw, 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 ; + ret_code =IAVF_ERR_ADMIN_QUEUE_NO_WORK ; goto clean_arq_element_out; }
@@ -884,7 +884,7 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw, (enum iavf_admin_queue_err )le16_to_cpu (desc->retval); flags =le16_to_cpu (desc->flags);if (flags &IAVF_AQ_FLAG_ERR ) { - ret_code =I40E_ERR_ADMIN_QUEUE_ERROR ; + ret_code =IAVF_ERR_ADMIN_QUEUE_ERROR ; iavf_debug(hw, IAVF_DEBUG_AQ_MESSAGE, "AQRX: Event received with error 0x%X.\n",
drivers/net/ethernet/intel/iavf/iavf_adminq.h +1 -1
@@ -117,7 +117,7 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc) };/* aq_rc is invalid if AQ timed out */ -if (aq_ret ==I40E_ERR_ADMIN_QUEUE_TIMEOUT ) +if (aq_ret ==IAVF_ERR_ADMIN_QUEUE_TIMEOUT )return -EAGAIN ;if (!((u32 )aq_rc < (sizeof (aq_to_posix) /sizeof ((aq_to_posix)[0 ]))))
drivers/net/ethernet/intel/iavf/iavf_client.c +3 -3
@@ -142,7 +142,7 @@ static int iavf_client_release_qvlist(struct i40e_info *ldev) err =iavf_aq_send_msg_to_pf (&adapter->hw,VIRTCHNL_OP_RELEASE_IWARP_IRQ_MAP , -I40E_SUCCESS ,NULL ,0 ,NULL ); +IAVF_SUCCESS ,NULL ,0 ,NULL );if (err) dev_err(&adapter->pdev->dev,
@@ -426,7 +426,7 @@ static u32 iavf_client_virtchnl_send(struct i40e_info *ldev,return -EAGAIN ; err =iavf_aq_send_msg_to_pf (&adapter->hw,VIRTCHNL_OP_IWARP , -I40E_SUCCESS , msg, len,NULL ); +IAVF_SUCCESS , msg, len,NULL );if (err)dev_err (&adapter->pdev->dev,"Unable to send iWarp message to PF, error %d, aq status %d\n" , err, adapter->hw.aq.asq_last_status);
@@ -474,7 +474,7 @@ static int iavf_client_setup_qvlist(struct i40e_info *ldev, adapter->client_pending |=BIT (VIRTCHNL_OP_CONFIG_IWARP_IRQ_MAP ); err =iavf_aq_send_msg_to_pf (&adapter->hw, -VIRTCHNL_OP_CONFIG_IWARP_IRQ_MAP ,I40E_SUCCESS , +VIRTCHNL_OP_CONFIG_IWARP_IRQ_MAP ,IAVF_SUCCESS , (u8 *)v_qvlist_info, msg_size,NULL );if (err) {
drivers/net/ethernet/intel/iavf/iavf_common.c +133 -133
278 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_main.c +19 -19
@@ -73,7 +73,7 @@ enum iavf_status iavf_allocate_dma_mem_d(struct iavf_hw *hw,struct iavf_adapter *adapter = (struct iavf_adapter *)hw->back;if (!mem) -return I40E_ERR_PARAM ; +return IAVF_ERR_PARAM ; mem->size =ALIGN (size, alignment); mem->va = dma_alloc_coherent(&adapter->pdev->dev, mem->size,
@@ -81,7 +81,7 @@ enum iavf_status iavf_allocate_dma_mem_d(struct iavf_hw *hw,if (mem->va)return 0 ;else -return I40E_ERR_NO_MEMORY ; +return IAVF_ERR_NO_MEMORY ; }/**
@@ -95,7 +95,7 @@ enum iavf_status iavf_free_dma_mem_d(struct iavf_hw *hw,struct iavf_adapter *adapter = (struct iavf_adapter *)hw->back;if (!mem || !mem->va) -return I40E_ERR_PARAM ; +return IAVF_ERR_PARAM ;dma_free_coherent (&adapter->pdev->dev, mem->size, mem->va, (dma_addr_t )mem->pa);return 0 ;
@@ -111,7 +111,7 @@ enum iavf_status iavf_allocate_virt_mem_d(struct iavf_hw *hw, struct iavf_virt_mem *mem, u32 size) {if (!mem) -return I40E_ERR_PARAM ; +return IAVF_ERR_PARAM ; mem->size = size; mem->va =kzalloc (size,GFP_KERNEL );
@@ -119,7 +119,7 @@ enum iavf_status iavf_allocate_virt_mem_d(struct iavf_hw *hw,if (mem->va)return 0 ;else -return I40E_ERR_NO_MEMORY ; +return IAVF_ERR_NO_MEMORY ; }/**
@@ -131,7 +131,7 @@ enum iavf_status iavf_free_virt_mem_d(struct iavf_hw *hw, struct iavf_virt_mem *mem) {if (!mem) -return I40E_ERR_PARAM ; +return IAVF_ERR_PARAM ;/* it's ok to kfree a NULL pointer */ kfree (mem->va);
@@ -2510,7 +2510,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, }else {dev_err (&adapter->pdev->dev,"Bad ether dest mask %pM\n" , match.mask->dst); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; } }
@@ -2520,7 +2520,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, }else {dev_err (&adapter->pdev->dev,"Bad ether src mask %pM\n" , match.mask->src); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; } }
@@ -2555,7 +2555,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, }else {dev_err (&adapter->pdev->dev,"Bad vlan mask %u\n" , match.mask->vlan_id); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; } } vf->mask.tcp_spec.vlan_id |=cpu_to_be16 (0xffff );
@@ -2579,7 +2579,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, }else {dev_err (&adapter->pdev->dev,"Bad ip dst mask 0x%08x\n" ,be32_to_cpu (match.mask->dst)); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; } }
@@ -2589,13 +2589,13 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, }else {dev_err (&adapter->pdev->dev,"Bad ip src mask 0x%08x\n" ,be32_to_cpu (match.mask->dst)); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; } }if (field_flags &IAVF_CLOUD_FIELD_TEN_ID ) {dev_info (&adapter->pdev->dev,"Tenant id not allowed for ip filter\n" ); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; }if (match.key->dst) { vf->mask.tcp_spec.dst_ip[0 ] |=cpu_to_be32 (0xffffffff );
@@ -2616,7 +2616,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter,if (ipv6_addr_any (&match.mask->dst)) {dev_err (&adapter->pdev->dev,"Bad ipv6 dst mask 0x%02x\n" ,IPV6_ADDR_ANY ); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; }/* src and dest IPv6 address should not be LOOPBACK
@@ -2626,7 +2626,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, ipv6_addr_loopback(&match.key->src)) {dev_err (&adapter->pdev->dev,"ipv6 addr should not be loopback\n" ); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; }if (!ipv6_addr_any (&match.mask->dst) || !ipv6_addr_any (&match.mask->src))
@@ -2651,7 +2651,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, }else {dev_err (&adapter->pdev->dev,"Bad src port mask %u\n" ,be16_to_cpu (match.mask->src)); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; } }
@@ -2661,7 +2661,7 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, }else {dev_err (&adapter->pdev->dev,"Bad dst port mask %u\n" ,be16_to_cpu (match.mask->dst)); -return I40E_ERR_CONFIG ; +return IAVF_ERR_CONFIG ; } }if (match.key->dst) {
@@ -3404,7 +3404,7 @@ static void iavf_init_task(struct work_struct *work)/* aq msg sent, awaiting reply */ err =iavf_verify_api_ver (adapter);if (err) { -if (err ==I40E_ERR_ADMIN_QUEUE_NO_WORK ) +if (err ==IAVF_ERR_ADMIN_QUEUE_NO_WORK ) err =iavf_send_api_ver (adapter);else dev_err(&pdev->dev, "Unsupported PF API version %d.%d, expected %d.%d\n",
@@ -3432,10 +3432,10 @@ static void iavf_init_task(struct work_struct *work) goto err; } err =iavf_get_vf_config (adapter); -if (err ==I40E_ERR_ADMIN_QUEUE_NO_WORK ) { +if (err ==IAVF_ERR_ADMIN_QUEUE_NO_WORK ) { err =iavf_send_vf_config_msg (adapter); goto err; - }else if (err ==I40E_ERR_PARAM ) { + }else if (err ==IAVF_ERR_PARAM ) {/* We only get ERR_PARAM if the device is in a very bad * state or if we've been disabled for previous bad * behavior. Either way, we're done now.
drivers/net/ethernet/intel/iavf/iavf_status.h +67 -67
140 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +1 -1
@@ -60,7 +60,7 @@ int iavf_send_api_ver(struct iavf_adapter *adapter)* * Compare API versions with the PF. Must be called after admin queue is * initialized. Returns 0 if API versions match, -EIO if they do not, -* I40E_ERR_ADMIN_QUEUE_NO_WORK if the admin queue is empty, and any errors +* IAVF_ERR_ADMIN_QUEUE_NO_WORK if the admin queue is empty, and any errors * from the firmware are propagated. **/ int iavf_verify_api_ver (struct iavf_adapter *adapter)
Signature · 1 line
2.19.2
Bowers
PATCH 5/9 iavf: rename iavf_status structure flags
Quoted 12 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:18 PM
To: Michael, Alice <[email protected]>; intel-wired-
lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 5/9] iavf: renameiavf_statusstructure flagsrename the flags inside of
iavf_statusfrom I40E_* to IAVF_*Signed-off-by Alice Michael <[email protected]>
Quoted 9 lines
--- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 42 +-- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_client.c | 6 +- drivers/net/ethernet/intel/iavf/iavf_common.c | 266 +++++++++--------- drivers/net/ethernet/intel/iavf/iavf_main.c | 38 +-- drivers/net/ethernet/intel/iavf/iavf_status.h | 134 ++++----- .../net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 7 files changed, 245 insertions(+), 245 deletions(-)
PATCH 6/9 iavf: rename iavf_client.h defines to match driver name
In reply to Alice MichaelThe defines in iavf_client.h were still vastly i40e, and they should be iavf.
--- drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_client.c | 84 +++++++------- drivers/net/ethernet/intel/iavf/iavf_client.h | 104 +++++++++--------- 3 files changed, 95 insertions(+), 95 deletions(-)
drivers/net/ethernet/intel/iavf/iavf.h +1 -1
@@ -244,7 +244,7 @@ struct iavf_adapter {int num_iwarp_msix;int iwarp_base_vector;u32 client_pending; -struct i40e_client_instance *cinst; +struct iavf_client_instance *cinst;struct msix_entry *msix_entries;u32 flags;
drivers/net/ethernet/intel/iavf/iavf_client.c +42 -42
244 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_client.h +52 -52
204 lines not on this page · raw message
Signature · 1 line
2.19.2
Bowers
PATCH 6/9 iavf: rename iavf_client.h defines to match driver name
Quoted 9 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:18 PM
To: Michael, Alice <[email protected]>; intel-wired-
lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 6/9] iavf: renameiavf_client.hdefines to match driver name
Quoted 8 lines
The defines in
iavf_client.hwere still vastly i40e, and they should be iavf.Signed-off-by Alice Michael <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_client.c | 84 +++++++------- drivers/net/ethernet/intel/iavf/iavf_client.h | 104 +++++++++--------- 3 files changed, 95 insertions(+), 95 deletions(-)
PATCH 7/9 iavf: change remaining i40e defines to be iavf
In reply to Alice MichaelThere were a couple of eroneously missed i40e names to update to iavf left after the larger chunks. Updated them seperately so now they should all be aligned as iavf.
--- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 96 +++++++++---------- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 4 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- 3 files changed, 51 insertions(+), 51 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_adminq.c +48 -48
@@ -29,10 +29,10 @@ static void iavf_adminq_init_regs(struct iavf_hw *hw) }/** -* i40e_alloc_adminq_asq_ring - Allocate Admin Queue send rings +* iavf_alloc_adminq_asq_ring - Allocate Admin Queue send rings * @hw: pointer to the hardware structure **/ -static enum iavf_status i40e_alloc_adminq_asq_ring (struct iavf_hw *hw) +static enum iavf_status iavf_alloc_adminq_asq_ring (struct iavf_hw *hw) {enum iavf_status ret_code;
@@ -56,10 +56,10 @@ static enum iavf_status i40e_alloc_adminq_asq_ring(struct iavf_hw *hw) }/** -* i40e_alloc_adminq_arq_ring - Allocate Admin Queue receive rings +* iavf_alloc_adminq_arq_ring - Allocate Admin Queue receive rings * @hw: pointer to the hardware structure **/ -static enum iavf_status i40e_alloc_adminq_arq_ring (struct iavf_hw *hw) +static enum iavf_status iavf_alloc_adminq_arq_ring (struct iavf_hw *hw) {enum iavf_status ret_code;
@@ -73,34 +73,34 @@ static enum iavf_status i40e_alloc_adminq_arq_ring(struct iavf_hw *hw) }/** -* i40e_free_adminq_asq - Free Admin Queue send rings +* iavf_free_adminq_asq - Free Admin Queue send rings * @hw: pointer to the hardware structure * * This assumes the posted send buffers have already been cleaned * and de-allocated **/ -static void i40e_free_adminq_asq (struct iavf_hw *hw) +static void iavf_free_adminq_asq (struct iavf_hw *hw) {iavf_free_dma_mem (hw, &hw->aq.asq.desc_buf); }/** -* i40e_free_adminq_arq - Free Admin Queue receive rings +* iavf_free_adminq_arq - Free Admin Queue receive rings * @hw: pointer to the hardware structure * * This assumes the posted receive buffers have already been cleaned * and de-allocated **/ -static void i40e_free_adminq_arq (struct iavf_hw *hw) +static void iavf_free_adminq_arq (struct iavf_hw *hw) {iavf_free_dma_mem (hw, &hw->aq.arq.desc_buf); }/** -* i40e_alloc_arq_bufs - Allocate pre-posted buffers for the receive queue +* iavf_alloc_arq_bufs - Allocate pre-posted buffers for the receive queue * @hw: pointer to the hardware structure **/ -static enum iavf_status i40e_alloc_arq_bufs (struct iavf_hw *hw) +static enum iavf_status iavf_alloc_arq_bufs (struct iavf_hw *hw) {struct iavf_aq_desc *desc;struct iavf_dma_mem *bi;
@@ -165,10 +165,10 @@ static enum iavf_status i40e_alloc_arq_bufs(struct iavf_hw *hw) }/** -* i40e_alloc_asq_bufs - Allocate empty buffer structs for the send queue +* iavf_alloc_asq_bufs - Allocate empty buffer structs for the send queue * @hw: pointer to the hardware structure **/ -static enum iavf_status i40e_alloc_asq_bufs (struct iavf_hw *hw) +static enum iavf_status iavf_alloc_asq_bufs (struct iavf_hw *hw) {struct iavf_dma_mem *bi;enum iavf_status ret_code;
@@ -206,10 +206,10 @@ static enum iavf_status i40e_alloc_asq_bufs(struct iavf_hw *hw) }/** -* i40e_free_arq_bufs - Free receive queue buffer info elements +* iavf_free_arq_bufs - Free receive queue buffer info elements * @hw: pointer to the hardware structure **/ -static void i40e_free_arq_bufs (struct iavf_hw *hw) +static void iavf_free_arq_bufs (struct iavf_hw *hw) {int i;
@@ -225,10 +225,10 @@ static void i40e_free_arq_bufs(struct iavf_hw *hw) }/** -* i40e_free_asq_bufs - Free send queue buffer info elements +* iavf_free_asq_bufs - Free send queue buffer info elements * @hw: pointer to the hardware structure **/ -static void i40e_free_asq_bufs (struct iavf_hw *hw) +static void iavf_free_asq_bufs (struct iavf_hw *hw) {int i;
@@ -248,12 +248,12 @@ static void i40e_free_asq_bufs(struct iavf_hw *hw) }/** -* i40e_config_asq_regs - configure ASQ registers +* iavf_config_asq_regs - configure ASQ registers * @hw: pointer to the hardware structure * * Configure base address and length registers for the transmit queue **/ -static enum iavf_status i40e_config_asq_regs (struct iavf_hw *hw) +static enum iavf_status iavf_config_asq_regs (struct iavf_hw *hw) {enum iavf_status ret_code =0 ;u32 reg =0 ;
@@ -277,12 +277,12 @@ static enum iavf_status i40e_config_asq_regs(struct iavf_hw *hw) }/** -* i40e_config_arq_regs - ARQ register configuration +* iavf_config_arq_regs - ARQ register configuration * @hw: pointer to the hardware structure * * Configure base address and length registers for the receive (event queue) **/ -static enum iavf_status i40e_config_arq_regs (struct iavf_hw *hw) +static enum iavf_status iavf_config_arq_regs (struct iavf_hw *hw) {enum iavf_status ret_code =0 ;u32 reg =0 ;
@@ -309,7 +309,7 @@ static enum iavf_status i40e_config_arq_regs(struct iavf_hw *hw) }/** -* i40e_init_asq - main initialization routine for ASQ +* iavf_init_asq - main initialization routine for ASQ * @hw: pointer to the hardware structure * * This is the main initialization routine for the Admin Send Queue
@@ -321,7 +321,7 @@ static enum iavf_status i40e_config_arq_regs(struct iavf_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 enum iavf_status i40e_init_asq (struct iavf_hw *hw) +static enum iavf_status iavf_init_asq (struct iavf_hw *hw) {enum iavf_status ret_code =0 ;
@@ -342,17 +342,17 @@ static enum iavf_status i40e_init_asq(struct iavf_hw *hw) hw->aq.asq.next_to_clean =0 ;/* allocate the ring memory */ - ret_code =i40e_alloc_adminq_asq_ring (hw); + ret_code =iavf_alloc_adminq_asq_ring (hw);if (ret_code) goto init_adminq_exit;/* allocate buffers in the rings */ - ret_code =i40e_alloc_asq_bufs (hw); + ret_code =iavf_alloc_asq_bufs (hw);if (ret_code) goto init_adminq_free_rings;/* initialize base registers */ - ret_code =i40e_config_asq_regs (hw); + ret_code =iavf_config_asq_regs (hw);if (ret_code) goto init_adminq_free_rings;
@@ -361,14 +361,14 @@ static enum iavf_status i40e_init_asq(struct iavf_hw *hw) goto init_adminq_exit; init_adminq_free_rings: -i40e_free_adminq_asq (hw); +iavf_free_adminq_asq (hw); init_adminq_exit:return ret_code; }/** -* i40e_init_arq - initialize ARQ +* iavf_init_arq - initialize ARQ * @hw: pointer to the hardware structure * * The main initialization routine for the Admin Receive (Event) Queue.
@@ -380,7 +380,7 @@ static enum iavf_status i40e_init_asq(struct iavf_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 enum iavf_status i40e_init_arq (struct iavf_hw *hw) +static enum iavf_status iavf_init_arq (struct iavf_hw *hw) {enum iavf_status ret_code =0 ;
@@ -401,17 +401,17 @@ static enum iavf_status i40e_init_arq(struct iavf_hw *hw) hw->aq.arq.next_to_clean =0 ;/* allocate the ring memory */ - ret_code =i40e_alloc_adminq_arq_ring (hw); + ret_code =iavf_alloc_adminq_arq_ring (hw);if (ret_code) goto init_adminq_exit;/* allocate buffers in the rings */ - ret_code =i40e_alloc_arq_bufs (hw); + ret_code =iavf_alloc_arq_bufs (hw);if (ret_code) goto init_adminq_free_rings;/* initialize base registers */ - ret_code =i40e_config_arq_regs (hw); + ret_code =iavf_config_arq_regs (hw);if (ret_code) goto init_adminq_free_rings;
@@ -420,19 +420,19 @@ static enum iavf_status i40e_init_arq(struct iavf_hw *hw) goto init_adminq_exit; init_adminq_free_rings: -i40e_free_adminq_arq (hw); +iavf_free_adminq_arq (hw); init_adminq_exit:return ret_code; }/** -* i40e_shutdown_asq - shutdown the ASQ +* iavf_shutdown_asq - shutdown the ASQ * @hw: pointer to the hardware structure * * The main shutdown routine for the Admin Send Queue **/ -static enum iavf_status i40e_shutdown_asq (struct iavf_hw *hw) +static enum iavf_status iavf_shutdown_asq (struct iavf_hw *hw) {enum iavf_status ret_code =0 ;
@@ -453,7 +453,7 @@ static enum iavf_status i40e_shutdown_asq(struct iavf_hw *hw) hw->aq.asq.count =0 ;/* to indicate uninitialized queue */ /* free ring buffers */ -i40e_free_asq_bufs (hw); +iavf_free_asq_bufs (hw); shutdown_asq_out:mutex_unlock (&hw->aq.asq_mutex);
@@ -461,12 +461,12 @@ static enum iavf_status i40e_shutdown_asq(struct iavf_hw *hw) }/** -* i40e_shutdown_arq - shutdown ARQ +* iavf_shutdown_arq - shutdown ARQ * @hw: pointer to the hardware structure * * The main shutdown routine for the Admin Receive Queue **/ -static enum iavf_status i40e_shutdown_arq (struct iavf_hw *hw) +static enum iavf_status iavf_shutdown_arq (struct iavf_hw *hw) {enum iavf_status ret_code =0 ;
@@ -487,7 +487,7 @@ static enum iavf_status i40e_shutdown_arq(struct iavf_hw *hw) hw->aq.arq.count =0 ;/* to indicate uninitialized queue */ /* free ring buffers */ -i40e_free_arq_bufs (hw); +iavf_free_arq_bufs (hw); shutdown_arq_out:mutex_unlock (&hw->aq.arq_mutex);
@@ -525,12 +525,12 @@ enum iavf_status iavf_init_adminq(struct iavf_hw *hw) hw->aq.asq_cmd_timeout =IAVF_ASQ_CMD_TIMEOUT ;/* allocate the ASQ */ - ret_code =i40e_init_asq (hw); + ret_code =iavf_init_asq (hw);if (ret_code) goto init_adminq_destroy_locks;/* allocate the ARQ */ - ret_code =i40e_init_arq (hw); + ret_code =iavf_init_arq (hw);if (ret_code) goto init_adminq_free_asq;
@@ -538,7 +538,7 @@ enum iavf_status iavf_init_adminq(struct iavf_hw *hw) goto init_adminq_exit; init_adminq_free_asq: -i40e_shutdown_asq (hw); +iavf_shutdown_asq (hw); init_adminq_destroy_locks: init_adminq_exit:
@@ -556,19 +556,19 @@ enum iavf_status iavf_shutdown_adminq(struct iavf_hw *hw)if (iavf_check_asq_alive (hw))iavf_aq_queue_shutdown (hw, true); -i40e_shutdown_asq (hw); -i40e_shutdown_arq (hw); +iavf_shutdown_asq (hw); +iavf_shutdown_arq (hw);return ret_code; }/** -* i40e_clean_asq - cleans Admin send queue +* iavf_clean_asq - cleans Admin send queue * @hw: pointer to the hardware structure * * returns the number of free desc **/ -static u16 i40e_clean_asq (struct iavf_hw *hw) +static u16 iavf_clean_asq (struct iavf_hw *hw) {struct iavf_adminq_ring *asq = &hw->aq.asq;struct iavf_asq_cmd_details *details;
@@ -583,8 +583,8 @@ static u16 i40e_clean_asq(struct iavf_hw *hw) "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head));if (details->callback) { -I40E_ADMINQ_CALLBACK cb_func = - (I40E_ADMINQ_CALLBACK )details->callback; +IAVF_ADMINQ_CALLBACK cb_func = + (IAVF_ADMINQ_CALLBACK )details->callback; desc_cb = *desc;cb_func (hw, &desc_cb); }
@@ -708,7 +708,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,/* the clean function called here could be called in a separate thread * in case of asynchronous completions */ -if (i40e_clean_asq (hw) ==0 ) { +if (iavf_clean_asq (hw) ==0 ) {iavf_debug (hw,IAVF_DEBUG_AQ_MESSAGE ,"AQTX: Error queue is full.\n" );
drivers/net/ethernet/intel/iavf/iavf_adminq.h +2 -2
@@ -84,11 +84,11 @@ struct iavf_adminq_info { };/** -* i40e_aq_rc_to_posix - convert errors to user-land codes +* iavf_aq_rc_to_posix - convert errors to user-land codes * aq_ret: AdminQ handler error code can override aq_rc * aq_rc: AdminQ firmware error code to convert **/ -static inline int i40e_aq_rc_to_posix (int aq_ret,int aq_rc) +static inline int iavf_aq_rc_to_posix (int aq_ret,int aq_rc) {int aq_to_posix[] = {0 ,/* IAVF_AQ_RC_OK */
drivers/net/ethernet/intel/iavf/iavf_type.h +1 -1
@@ -21,7 +21,7 @@/* forward declaration */ struct iavf_hw ; -typedef void (*I40E_ADMINQ_CALLBACK )(struct iavf_hw *,struct iavf_aq_desc *); +typedef void (*IAVF_ADMINQ_CALLBACK )(struct iavf_hw *,struct iavf_aq_desc *);/* Data type manipulation macros. */
Signature · 1 line
2.19.2
Bowers
PATCH 7/9 iavf: change remaining i40e defines to be iavf
Quoted 13 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:18 PM
To: Michael, Alice <[email protected]>; intel-wired-
lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 7/9] iavf: change remaining i40e defines to be iavfThere were a couple of eroneously missed i40e names to update to iavf left after the larger chunks. Updated them seperately so now they should all be aligned as iavf.
Quoted 6 lines
Signed-off-by Alice Michael <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 96 +++++++++---------- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 4 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- 3 files changed, 51 insertions(+), 51 deletions(-)
PATCH 8/9 iavf: rename i40e_device to iavf_device
In reply to Alice MichaelRenaming remaining defines from i40e to iavf
--- drivers/net/ethernet/intel/iavf/iavf.h | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_client.c | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-)
drivers/net/ethernet/intel/iavf/iavf.h +2 -2
@@ -109,7 +109,7 @@ struct iavf_q_vector {/* Helper macros to switch between ints/sec and what the register uses. * And yes, it's the same math going both ways. The lowest value -* supported by all of the i40e hardware is 8. +* supported by all of the iavf hardware is 8. */ #define EITR_INTS_PER_SEC_TO_REG (_eitr) \ ((_eitr) ? (1000000000 / ((_eitr) * 256)) : 8)
@@ -351,7 +351,7 @@ struct iavf_adapter {/* Ethtool Private Flags */ /* lan device, used by client interface */ -struct i40e_device { +struct iavf_device {struct list_head list;struct iavf_adapter *vf; };
drivers/net/ethernet/intel/iavf/iavf_client.c +10 -10
@@ -11,7 +11,7 @@static const char iavf_client_interface_version_str[] =IAVF_CLIENT_VERSION_STR ;static struct iavf_client *vf_registered_client; -static LIST_HEAD (i40e_devices); +static LIST_HEAD (iavf_devices);static DEFINE_MUTEX (iavf_device_mutex); static u32 iavf_client_virtchnl_send(struct iavf_info *ldev,
@@ -291,11 +291,11 @@ void iavf_client_subtask(struct iavf_adapter *adapter)**/ int iavf_lan_add_device (struct iavf_adapter *adapter) { -struct i40e_device *ldev; +struct iavf_device *ldev;int ret =0 ;mutex_lock (&iavf_device_mutex); -list_for_each_entry (ldev, &i40e_devices, list) { +list_for_each_entry (ldev, &iavf_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, &i40e_devices); +list_add (&ldev->list, &iavf_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);
@@ -331,11 +331,11 @@ int iavf_lan_add_device(struct iavf_adapter *adapter)**/ int iavf_lan_del_device (struct iavf_adapter *adapter) { -struct i40e_device *ldev, *tmp; +struct iavf_device *ldev, *tmp;int ret = -ENODEV ;mutex_lock (&iavf_device_mutex); -list_for_each_entry_safe (ldev, tmp, &i40e_devices, list) { +list_for_each_entry_safe (ldev, tmp, &iavf_devices, list) {if (ldev->vf == adapter) { dev_info(&adapter->pdev->dev, "Deleted LAN device bus=0x%02x dev=0x%02x func=0x%02x\n",
@@ -360,11 +360,11 @@ int iavf_lan_del_device(struct iavf_adapter *adapter)static void iavf_client_release (struct iavf_client *client) {struct iavf_client_instance *cinst; -struct i40e_device *ldev; +struct iavf_device *ldev;struct iavf_adapter *adapter;mutex_lock (&iavf_device_mutex); -list_for_each_entry (ldev, &i40e_devices, list) { +list_for_each_entry (ldev, &iavf_devices, list) { adapter = ldev->vf; cinst = adapter->cinst;if (!cinst)
@@ -394,11 +394,11 @@ static void iavf_client_release(struct iavf_client *client)**/ static void iavf_client_prepare (struct iavf_client *client) { -struct i40e_device *ldev; +struct iavf_device *ldev;struct iavf_adapter *adapter;mutex_lock (&iavf_device_mutex); -list_for_each_entry (ldev, &i40e_devices, list) { +list_for_each_entry (ldev, &iavf_devices, list) { adapter = ldev->vf;/* Signal the watchdog to service the client */ adapter->flags |=IAVF_FLAG_SERVICE_CLIENT_REQUESTED ;
Signature · 1 line
2.19.2
Bowers
PATCH 8/9 iavf: rename i40e_device to iavf_device
Quoted 9 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:18 PM
To: Michael, Alice <[email protected]>; intel-wired-
lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 8/9] iavf: renamei40e_devicetoiavf_device
Quoted 7 lines
Renaming remaining defines from i40e to iavf
Signed-off-by Alice Michael <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf.h | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_client.c | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-)
PATCH 9/9 iavf: update comments and file checks to match iavf
In reply to Alice MichaelSome small things were missed with recent name changes from i40e to iavf. Having a seperate patch allows to correct the small misses in one place.
--- drivers/net/ethernet/intel/iavf/iavf_client.c | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_common.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_trace.h | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_client.c +2 -2
@@ -498,7 +498,7 @@ static int iavf_client_setup_qvlist(struct iavf_info *ldev, }/** -* iavf_register_client - Register a i40e client driver with the L2 driver +* iavf_register_client - Register a iavf client driver with the L2 driver * @client: pointer to the iavf_client struct * * Returns 0 on success or non-0 on error
@@ -549,7 +549,7 @@ int iavf_register_client(struct iavf_client *client)EXPORT_SYMBOL (iavf_register_client);/** -* iavf_unregister_client - Unregister a i40e client driver with the L2 driver +* iavf_unregister_client - Unregister a iavf client driver with the L2 driver * @client: pointer to the iavf_client struct * * Returns 0 on success or non-0 on error
drivers/net/ethernet/intel/iavf/iavf_common.c +1 -1
@@ -515,7 +515,7 @@ enum iavf_status iavf_aq_set_rss_key(struct iavf_hw *hw, u16 vsi_id,* IF NOT iavf_ptype_lookup[ptype].known * THEN * Packet is unknown -* ELSE IF iavf_ptype_lookup[ptype].outer_ip == I40E_RX_PTYPE_OUTER_IP +* ELSE IF iavf_ptype_lookup[ptype].outer_ip == IAVF_RX_PTYPE_OUTER_IP * Use the rest of the fields to look at the tunnels, inner protocols, etc * ELSE * Use the enum iavf_rx_l2_ptype to decode the packet type
drivers/net/ethernet/intel/iavf/iavf_trace.h +2 -2
@@ -17,8 +17,8 @@/* See trace-events-sample.h for a detailed description of why this * guard clause is different from most normal include files. */ -#if !defined(_I40E_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ ) -#define _I40E_TRACE_H_ +#if !defined(_IAVF_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ ) +#define _IAVF_TRACE_H_#include <linux/tracepoint.h>
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +2 -2
@@ -41,7 +41,7 @@ static int iavf_send_pf_msg(struct iavf_adapter *adapter,* * Send API version admin queue message to the PF. The reply is not checked * in this function. Returns 0 if the message was successfully -* sent, or one of the I40E_ADMIN_QUEUE_ERROR_ statuses if not. +* sent, or one of the IAVF_ADMIN_QUEUE_ERROR_ statuses if not. **/ int iavf_send_api_ver (struct iavf_adapter *adapter) {
@@ -123,7 +123,7 @@ int iavf_verify_api_ver(struct iavf_adapter *adapter)* * Send VF configuration request admin queue message to the PF. The reply * is not checked in this function. Returns 0 if the message was -* successfully sent, or one of the I40E_ADMIN_QUEUE_ERROR_ statuses if not. +* successfully sent, or one of the IAVF_ADMIN_QUEUE_ERROR_ statuses if not. **/ int iavf_send_vf_config_msg (struct iavf_adapter *adapter) {
Signature · 1 line
2.19.2
Bowers
PATCH 9/9 iavf: update comments and file checks to match iavf
Quoted 12 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:18 PM
To: Michael, Alice <[email protected]>; intel-wired- lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 9/9] iavf: update comments and file checks to match iavfSome small things were missed with recent name changes from i40e to iavf. Having a seperate patch allows to correct the small misses in one place.
Quoted 7 lines
Signed-off-by Alice Michael <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_client.c | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_common.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_trace.h | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
Bowers
PATCH 1/9 iavf: Rename i40e_adminq* files to iavf_adminq*
In reply to Alice MichaelQuoted 13 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, April 17, 2019 3:17 PM
To: Michael, Alice <[email protected]>; intel-wired- lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S4 iavf 1/9] iavf: Rename i40e_adminq* files to iavf_adminq*With the rename of the iavf driver, there were some files that were missed in renaming. Update these to be iavf as well.
Signed-off-by Alice Michael <[email protected]>
Quoted 8 lines
---
drivers/net/ethernet/intel/iavf/Makefile | 2 +-
.../net/ethernet/intel/iavf/{i40e_adminq.c => iavf_adminq.c} | 2 +-
.../net/ethernet/intel/iavf/{i40e_adminq.h => iavf_adminq.h} | 2 +-
.../intel/iavf/{i40e_adminq_cmd.h => iavf_adminq_cmd.h} | 0
drivers/net/ethernet/intel/iavf/iavf_common.c | 2 +-
drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +-
6 files changed, 5 insertions(+), 5 deletions(-) rename