From: Rasesh Mody <rasesh.mody@cavium.com>
To: dev@dpdk.org, ferruh.yigit@intel.com
Cc: Rasesh Mody <rasesh.mody@cavium.com>, Dept-EngDPDKDev@cavium.com
Subject: [dpdk-dev] [PATCH 10/17] net/qede/base: semantic changes
Date: Fri, 6 Oct 2017 23:31:05 -0700 [thread overview]
Message-ID: <1507357872-26475-11-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1507357872-26475-1-git-send-email-rasesh.mody@cavium.com>
- Move define CRC8_TABLE_SIZE to header file
- Move/relocate ecore_vf_start()
- Other semantic changes
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/qede/base/ecore.h | 2 ++
drivers/net/qede/base/ecore_dcbx.c | 8 +++----
drivers/net/qede/base/ecore_dev.c | 34 +++++++++++++--------------
drivers/net/qede/base/ecore_init_fw_funcs.c | 1 -
drivers/net/qede/base/ecore_mcp.c | 4 ++--
drivers/net/qede/base/ecore_spq.c | 4 ++--
6 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/drivers/net/qede/base/ecore.h b/drivers/net/qede/base/ecore.h
index dc09847..5eff6aa 100644
--- a/drivers/net/qede/base/ecore.h
+++ b/drivers/net/qede/base/ecore.h
@@ -871,6 +871,8 @@ struct ecore_dev {
#define NUM_OF_ENG_PFS(dev) (ECORE_IS_BB(dev) ? MAX_NUM_PFS_BB \
: MAX_NUM_PFS_K2)
+#define CRC8_TABLE_SIZE 256
+
/**
* @brief ecore_concrete_to_sw_fid - get the sw function id from
* the concrete value.
diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c
index af8a239..edb711e 100644
--- a/drivers/net/qede/base/ecore_dcbx.c
+++ b/drivers/net/qede/base/ecore_dcbx.c
@@ -318,14 +318,14 @@ u8 ecore_dcbx_get_dscp_value(struct ecore_hwfn *p_hwfn, u8 pri)
ecore_dcbx_process_mib_info(struct ecore_hwfn *p_hwfn)
{
struct dcbx_app_priority_feature *p_app;
- enum _ecore_status_t rc = ECORE_SUCCESS;
- struct ecore_dcbx_results data = { 0 };
struct dcbx_app_priority_entry *p_tbl;
+ struct ecore_dcbx_results data = { 0 };
struct dcbx_ets_feature *p_ets;
struct ecore_hw_info *p_info;
u32 pri_tc_tbl, flags;
u8 dcbx_version;
int num_entries;
+ enum _ecore_status_t rc = ECORE_SUCCESS;
flags = p_hwfn->p_dcbx_info->operational.flags;
dcbx_version = GET_MFW_FIELD(flags, DCBX_CONFIG_VERSION);
@@ -363,9 +363,9 @@ u8 ecore_dcbx_get_dscp_value(struct ecore_hwfn *p_hwfn, u8 pri)
struct ecore_dcbx_mib_meta_data *p_data,
enum ecore_mib_read_type type)
{
- enum _ecore_status_t rc = ECORE_SUCCESS;
u32 prefix_seq_num, suffix_seq_num;
int read_count = 0;
+ enum _ecore_status_t rc = ECORE_SUCCESS;
/* The data is considered to be valid only if both sequence numbers are
* the same.
@@ -859,7 +859,7 @@ static enum _ecore_status_t ecore_dcbx_read_mib(struct ecore_hwfn *p_hwfn,
DP_ERR(p_hwfn, "MIB read err, unknown mib type %d\n", type);
}
- return rc;
+ return ECORE_SUCCESS;
}
/*
diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c
index c81048a..412af07 100644
--- a/drivers/net/qede/base/ecore_dev.c
+++ b/drivers/net/qede/base/ecore_dev.c
@@ -2283,19 +2283,6 @@ static void ecore_reset_mb_shadow(struct ecore_hwfn *p_hwfn,
p_hwfn->mcp_info->mfw_mb_length);
}
-enum _ecore_status_t ecore_vf_start(struct ecore_hwfn *p_hwfn,
- struct ecore_hw_init_params *p_params)
-{
- if (p_params->p_tunn) {
- ecore_vf_set_vf_start_tunn_update_param(p_params->p_tunn);
- ecore_vf_pf_tunnel_param_update(p_hwfn, p_params->p_tunn);
- }
-
- p_hwfn->b_int_enabled = 1;
-
- return ECORE_SUCCESS;
-}
-
static void ecore_pglueb_clear_err(struct ecore_hwfn *p_hwfn,
struct ecore_ptt *p_ptt)
{
@@ -2327,6 +2314,19 @@ static void ecore_pglueb_clear_err(struct ecore_hwfn *p_hwfn,
}
}
+enum _ecore_status_t ecore_vf_start(struct ecore_hwfn *p_hwfn,
+ struct ecore_hw_init_params *p_params)
+{
+ if (p_params->p_tunn) {
+ ecore_vf_set_vf_start_tunn_update_param(p_params->p_tunn);
+ ecore_vf_pf_tunnel_param_update(p_hwfn, p_params->p_tunn);
+ }
+
+ p_hwfn->b_int_enabled = 1;
+
+ return ECORE_SUCCESS;
+}
+
enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,
struct ecore_hw_init_params *p_params)
{
@@ -4414,11 +4414,11 @@ void ecore_chain_free(struct ecore_dev *p_dev, struct ecore_chain *p_chain)
struct ecore_chain *p_chain,
struct ecore_chain_ext_pbl *ext_pbl)
{
- void *p_virt = OSAL_NULL;
- u8 *p_pbl_virt = OSAL_NULL;
- void **pp_virt_addr_tbl = OSAL_NULL;
- dma_addr_t p_phys = 0, p_pbl_phys = 0;
u32 page_cnt = p_chain->page_cnt, size, i;
+ dma_addr_t p_phys = 0, p_pbl_phys = 0;
+ void **pp_virt_addr_tbl = OSAL_NULL;
+ u8 *p_pbl_virt = OSAL_NULL;
+ void *p_virt = OSAL_NULL;
size = page_cnt * sizeof(*pp_virt_addr_tbl);
pp_virt_addr_tbl = (void **)OSAL_VZALLOC(p_dev, size);
diff --git a/drivers/net/qede/base/ecore_init_fw_funcs.c b/drivers/net/qede/base/ecore_init_fw_funcs.c
index a739ba8..1da80a6 100644
--- a/drivers/net/qede/base/ecore_init_fw_funcs.c
+++ b/drivers/net/qede/base/ecore_init_fw_funcs.c
@@ -1769,7 +1769,6 @@ u32 ecore_get_mstorm_eth_vf_prods_offset(struct ecore_hwfn *p_hwfn,
#ifndef LINUX_REMOVE
#define CRC8_INIT_VALUE 0xFF
-#define CRC8_TABLE_SIZE 256
#endif
static u8 cdu_crc8_table[CRC8_TABLE_SIZE];
diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c
index 3caf08b..028fbb3 100644
--- a/drivers/net/qede/base/ecore_mcp.c
+++ b/drivers/net/qede/base/ecore_mcp.c
@@ -2555,9 +2555,9 @@ enum _ecore_status_t
struct ecore_ptt *p_ptt,
enum ecore_ov_client client)
{
- enum _ecore_status_t rc;
u32 resp = 0, param = 0;
u32 drv_mb_param;
+ enum _ecore_status_t rc;
switch (client) {
case ECORE_OV_CLIENT_DRV:
@@ -2587,9 +2587,9 @@ enum _ecore_status_t
struct ecore_ptt *p_ptt,
enum ecore_ov_driver_state drv_state)
{
- enum _ecore_status_t rc;
u32 resp = 0, param = 0;
u32 drv_mb_param;
+ enum _ecore_status_t rc;
switch (drv_state) {
case ECORE_OV_DRIVER_STATE_NOT_LOADED:
diff --git a/drivers/net/qede/base/ecore_spq.c b/drivers/net/qede/base/ecore_spq.c
index 75adcda..70ffa8c 100644
--- a/drivers/net/qede/base/ecore_spq.c
+++ b/drivers/net/qede/base/ecore_spq.c
@@ -178,10 +178,10 @@ static enum _ecore_status_t ecore_spq_block(struct ecore_hwfn *p_hwfn,
static void ecore_spq_hw_initialize(struct ecore_hwfn *p_hwfn,
struct ecore_spq *p_spq)
{
- struct ecore_cxt_info cxt_info;
struct e4_core_conn_context *p_cxt;
- enum _ecore_status_t rc;
+ struct ecore_cxt_info cxt_info;
u16 physical_q;
+ enum _ecore_status_t rc;
cxt_info.iid = p_spq->cid;
--
1.7.10.3
next prev parent reply other threads:[~2017-10-07 6:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-07 6:30 [dpdk-dev] [PATCH 00/17] update QEDE base driver to 8.30.8.0 Rasesh Mody
2017-10-07 6:30 ` [dpdk-dev] [PATCH 01/17] net/qede/base: add xcvr type and DON FW defines Rasesh Mody
2017-10-07 6:30 ` [dpdk-dev] [PATCH 02/17] net/qede/base: add NVRAM config options Rasesh Mody
2017-10-07 6:30 ` [dpdk-dev] [PATCH 03/17] net/qede/base: introduce HW/SW channel Rasesh Mody
2017-10-07 6:30 ` [dpdk-dev] [PATCH 04/17] net/qede/base: add LLDP support Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 05/17] net/qede/base: add check for DMA engine state Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 06/17] net/qede/base: use the correct size value Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 07/17] net/qede/base: add various OS abtraction macros Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 08/17] net/qede/base: add/fix comments Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 09/17] net/qede/base: add/change/revise logs Rasesh Mody
2017-10-07 6:31 ` Rasesh Mody [this message]
2017-10-07 6:31 ` [dpdk-dev] [PATCH 11/17] net/qede/base: code cleanup Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 12/17] net/qede/base: check device personality for feature setting Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 13/17] net/qede/base: change default page size of ILT clients Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 14/17] net/qede/base: fix access to an uninitialized list Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 15/17] net/qede/base: fix for VF malicious indication Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 16/17] net/qede/base: fix return code to align with FW Rasesh Mody
2017-10-07 6:31 ` [dpdk-dev] [PATCH 17/17] net/qede/base: update base driver version to 8.30.8.0 Rasesh Mody
2017-10-09 3:33 ` [dpdk-dev] [PATCH 00/17] update QEDE base driver " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507357872-26475-11-git-send-email-rasesh.mody@cavium.com \
--to=rasesh.mody@cavium.com \
--cc=Dept-EngDPDKDev@cavium.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).