From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com
Subject: [PATCH v1 01/30] net/i40e/base: adjust whitespace
Date: Mon, 2 Sep 2024 10:54:13 +0100 [thread overview]
Message-ID: <52662f18b3afa2c6308ac3dce2946038a7dfeeba.1725270827.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1725270827.git.anatoly.burakov@intel.com>
There are some miscellaneous differences in whitespace between shared code
and DPDK snapshot. Adjust whitespace differences to make base code driver
updates easier in the future by reducing the diff between the two.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/i40e/base/i40e_adminq.c | 7 ++-----
drivers/net/i40e/base/i40e_adminq_cmd.h | 1 -
drivers/net/i40e/base/i40e_common.c | 24 ++++++++----------------
drivers/net/i40e/base/i40e_dcb.c | 1 -
drivers/net/i40e/base/i40e_dcb.h | 1 -
drivers/net/i40e/base/i40e_devids.h | 10 +++++-----
drivers/net/i40e/base/i40e_prototype.h | 18 +++++++++---------
drivers/net/i40e/base/i40e_register.h | 3 +--
drivers/net/i40e/base/i40e_type.h | 2 --
9 files changed, 25 insertions(+), 42 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 27c82d9b44..e7dff8ab48 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -688,7 +688,6 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
/* VF has no need of firmware */
if (i40e_is_vf(hw))
goto init_adminq_exit;
-
/* There are some cases where the firmware may not be quite ready
* for AdminQ operations, so we retry the AdminQ setup a few times
* if we see timeouts in this first AQ call.
@@ -723,10 +722,8 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi);
hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo;
i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, &cfg_ptr);
- i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF),
- &oem_hi);
- i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)),
- &oem_lo);
+ i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF), &oem_hi);
+ i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)), &oem_lo);
hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo;
if (aq->api_maj_ver > I40E_FW_API_VERSION_MAJOR) {
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index def307b59d..eda19ccf32 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -2660,7 +2660,6 @@ struct i40e_aqc_lldp_stop {
I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop);
/* Start LLDP (direct 0x0A06) */
-
struct i40e_aqc_lldp_start {
u8 command;
#define I40E_AQ_LLDP_AGENT_START 0x1
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ab655a0a72..2740ee68d9 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -950,7 +950,6 @@ struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = {
I40E_PTT_UNUSED_ENTRY(255)
};
-
/**
* i40e_validate_mac_addr - Validate unicast MAC address
* @mac_addr: pointer to MAC address
@@ -1427,7 +1426,6 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw)
i40e_clear_pxe_mode(hw);
-
return I40E_SUCCESS;
}
@@ -2022,7 +2020,6 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
enum i40e_status_code status;
bool tx_pause, rx_pause;
u16 command_flags;
-
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_get_link_status);
if (enable_lse)
@@ -2324,7 +2321,7 @@ enum i40e_status_code i40e_aq_add_vsi(struct i40e_hw *hw,
desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD));
status = i40e_asq_send_command(hw, &desc, &vsi_ctx->info,
- sizeof(vsi_ctx->info), cmd_details);
+ sizeof(vsi_ctx->info), cmd_details);
if (status != I40E_SUCCESS)
goto aq_add_vsi_exit;
@@ -2746,7 +2743,7 @@ enum i40e_status_code i40e_aq_update_vsi_params(struct i40e_hw *hw,
desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD));
status = i40e_asq_send_command(hw, &desc, &vsi_ctx->info,
- sizeof(vsi_ctx->info), cmd_details);
+ sizeof(vsi_ctx->info), cmd_details);
vsi_ctx->vsis_allocated = LE16_TO_CPU(resp->vsi_used);
vsi_ctx->vsis_unallocated = LE16_TO_CPU(resp->vsi_free);
@@ -2956,7 +2953,7 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
!(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
- hw->mac.type == I40E_MAC_X722) {
+ hw->mac.type == I40E_MAC_X722) {
status = i40e_aq_get_phy_capabilities(hw, false,
hw->mac.type ==
I40E_MAC_X722,
@@ -2981,7 +2978,6 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
return status;
}
-
/**
* i40e_get_link_speed
* @hw: pointer to the hw struct
@@ -3831,10 +3827,9 @@ enum i40e_status_code i40e_aq_write_nvm_config(struct i40e_hw *hw,
*
* Indicate NVM update in process.
**/
-enum i40e_status_code
-i40e_aq_nvm_update_in_process(struct i40e_hw *hw,
- bool update_flow_state,
- struct i40e_asq_cmd_details *cmd_details)
+enum i40e_status_code i40e_aq_nvm_update_in_process(struct i40e_hw *hw,
+ bool update_flow_state,
+ struct i40e_asq_cmd_details *cmd_details)
{
struct i40e_aq_desc desc;
struct i40e_aqc_nvm_update_in_process *cmd =
@@ -4892,7 +4887,6 @@ enum i40e_status_code i40e_aq_delete_element(struct i40e_hw *hw, u16 seid,
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_delete_element);
cmd->seid = CPU_TO_LE16(seid);
-
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status;
@@ -6167,7 +6161,6 @@ i40e_status_code i40e_aq_replace_cloud_filters(struct i40e_hw *hw,
return status;
}
-
/**
* i40e_aq_alternate_write
* @hw: pointer to the hardware structure
@@ -6525,7 +6518,6 @@ enum i40e_status_code i40e_aq_debug_dump(struct i40e_hw *hw, u8 cluster_id,
return status;
}
-
/**
* i40e_enable_eee
* @hw: pointer to the hardware structure
@@ -7280,9 +7272,9 @@ enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw,
*/
if ((hw->device_id == I40E_DEV_ID_10G_BASE_T_BC ||
hw->device_id == I40E_DEV_ID_5G_BASE_T_BC) &&
- hw->phy.link_info.link_speed != I40E_LINK_SPEED_1GB) {
+ hw->phy.link_info.link_speed != I40E_LINK_SPEED_1GB) {
enum i40e_status_code retval;
- u32 cmd_status = 0;
+ u32 cmd_status;
*is_clear = false;
retval = i40e_aq_run_phy_activity(hw,
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 8f9b7e823f..de0320bf3f 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -1308,7 +1308,6 @@ enum i40e_status_code i40e_dcb_config_to_lldp(u8 *lldpmib, u16 *miblen,
return ret;
}
-
/**
* _i40e_read_lldp_cfg - generic read of LLDP Configuration data from NVM
* @hw: pointer to the HW structure
diff --git a/drivers/net/i40e/base/i40e_dcb.h b/drivers/net/i40e/base/i40e_dcb.h
index 0409fd3e1a..08a5f1b996 100644
--- a/drivers/net/i40e/base/i40e_dcb.h
+++ b/drivers/net/i40e/base/i40e_dcb.h
@@ -183,7 +183,6 @@ struct i40e_dcbx_variables {
u32 deftsaassignment;
};
-
enum i40e_get_fw_lldp_status_resp {
I40E_GET_FW_LLDP_STATUS_DISABLED = 0,
I40E_GET_FW_LLDP_STATUS_ENABLED = 1
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index ee31e51f57..f0f206b636 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -9,6 +9,8 @@
#define I40E_INTEL_VENDOR_ID 0x8086
/* Device IDs */
+#define I40E_DEV_ID_X710_N3000 0x0CF8
+#define I40E_DEV_ID_XXV710_N3000 0x0D58
#define I40E_DEV_ID_SFP_XL710 0x1572
#define I40E_DEV_ID_QEMU 0x1574
#define I40E_DEV_ID_KX_B 0x1580
@@ -22,11 +24,7 @@
#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_X710_N3000 0x0CF8
-#define I40E_DEV_ID_XXV710_N3000 0x0D58
#define I40E_DEV_ID_10G_BASE_T_BC 0x15FF
-#define I40E_DEV_ID_5G_BASE_T_BC 0x101F
-#define I40E_DEV_ID_1G_BASE_T_BC 0x0DD2
#if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
#define I40E_DEV_ID_VF 0x154C
#define I40E_DEV_ID_VF_HV 0x1571
@@ -40,6 +38,8 @@
#endif
#define I40E_DEV_ID_10G_B 0x104F
#define I40E_DEV_ID_10G_SFP 0x104E
+#define I40E_DEV_ID_5G_BASE_T_BC 0x101F
+#define I40E_DEV_ID_1G_BASE_T_BC 0x0DD2
#define I40E_IS_X710TL_DEVICE(d) \
(((d) == I40E_DEV_ID_10G_BASE_T_BC) || \
((d) == I40E_DEV_ID_5G_BASE_T_BC))
@@ -49,10 +49,10 @@
#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_SFP_X722_A 0x0DDA
#if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
#define I40E_DEV_ID_X722_VF 0x37CD
#endif /* VF_DRIVER */
+#define I40E_DEV_ID_SFP_X722_A 0x0DDA
#define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \
(d) == I40E_DEV_ID_QSFP_B || \
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 691c977172..1c0d79229e 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -33,11 +33,12 @@ void i40e_adminq_init_ring_data(struct i40e_hw *hw);
enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,
struct i40e_arq_event_info *e,
u16 *events_pending);
-enum i40e_status_code i40e_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);
+enum i40e_status_code
+i40e_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);
enum i40e_status_code
i40e_asq_send_command_v2(struct i40e_hw *hw,
struct i40e_aq_desc *desc,
@@ -275,10 +276,9 @@ enum i40e_status_code i40e_aq_update_nvm(struct i40e_hw *hw, u8 module_pointer,
enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw,
u8 rearrange_nvm,
struct i40e_asq_cmd_details *cmd_details);
-enum i40e_status_code
-i40e_aq_nvm_update_in_process(struct i40e_hw *hw,
- bool update_flow_state,
- struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code i40e_aq_nvm_update_in_process(struct i40e_hw *hw,
+ bool update_flow_state,
+ struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_get_lldp_mib(struct i40e_hw *hw, u8 bridge_type,
u8 mib_type, void *buff, u16 buff_size,
u16 *local_len, u16 *remote_len,
diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h
index 75eff845f1..8476b13d92 100644
--- a/drivers/net/i40e/base/i40e_register.h
+++ b/drivers/net/i40e/base/i40e_register.h
@@ -2916,8 +2916,7 @@
#define I40E_PRTTSYN_AUX_0_EVNTLVL_SHIFT 16
#define I40E_PRTTSYN_AUX_0_EVNTLVL_MASK I40E_MASK(0x3, I40E_PRTTSYN_AUX_0_EVNTLVL_SHIFT)
#define I40E_PRTTSYN_AUX_0_PTPFLAG_SHIFT 17
-#define I40E_PRTTSYN_AUX_0_PTPFLAG_MASK \
- I40E_MASK(0x1, I40E_PRTTSYN_AUX_0_PTPFLAG_SHIFT)
+#define I40E_PRTTSYN_AUX_0_PTPFLAG_MASK I40E_MASK(0x1, I40E_PRTTSYN_AUX_0_PTPFLAG_SHIFT)
#define I40E_PRTTSYN_AUX_0_PTP_OUT_SYNC_CLK_IO 0xF
#define I40E_PRTTSYN_AUX_1(_i) (0x001E42E0 + ((_i) * 32)) /* _i=0...1 */ /* Reset: GLOBR */
#define I40E_PRTTSYN_AUX_1_MAX_INDEX 1
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index f4a3d66759..895429f9bb 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -50,7 +50,6 @@
/* Max timeout in ms for the phy to respond */
#define I40E_MAX_PHY_TIMEOUT 500
-
/* Check whether address is multicast. */
#define I40E_IS_MULTICAST(address) (bool)(((u8 *)(address))[0] & ((u8)0x01))
@@ -676,7 +675,6 @@ struct i40e_dcbx_config {
struct i40e_hw {
u8 *hw_addr;
void *back;
-
/* subsystem structs */
struct i40e_phy_info phy;
struct i40e_mac_info mac;
--
2.43.5
next prev parent reply other threads:[~2024-09-02 9:55 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 9:54 [PATCH v1 00/30] Update net/i40e base driver Anatoly Burakov
2024-09-02 9:54 ` Anatoly Burakov [this message]
2024-09-02 9:54 ` [PATCH v1 02/30] net/i40e/base: strip all tags from code Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 03/30] net/i40e/base: remove non-inclusive language Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 04/30] net/i40e/base: remove unused variables Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 05/30] net/i40e/base: don't set flags in i40e_init_shared_code Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 06/30] net/i40e/base: fix misleading debug logs and comments Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 07/30] net/i40e/base: add missing define to X710TL device check Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 08/30] net/i40e/base: add new device ID to 25G device list Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 09/30] net/i40e/base: fix setting MAC type for X722 Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 10/30] net/i40e/base: add definitions for rx_err1 Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 11/30] net/i40e/base: fix not blinking X722 with x557 PHY Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 12/30] net/i40e/base: add VLAN field for input set Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 13/30] net/i40e/base: allow reading LED blink setting Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 14/30] net/i40e/base: do not load DDP packages with reserved track ID Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 15/30] net/i40e/base: add DDP package type defines Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 16/30] net/i40e/base: add X722 defines for input set mask Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 17/30] net/i40e/base: improve typecasting Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 18/30] net/i40e/base: add named and raw structs to rx desc Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 19/30] net/i40e/base: align registers to the specification Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 20/30] net/i40e/base: add PHY debug register dump Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 21/30] net/i40e/base: make register dump read-only Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 22/30] net/i40e/base: fix unchecked return value Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 23/30] net/i40e/base: check loop bounds Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 24/30] net/i40e/base: make semaphore timeout 32-bit Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 25/30] net/i40e/base: add register definitions for FLU Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 26/30] net/i40e/base: add NVM acquire with custom timeout Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 27/30] net/i40e/base: change time variables from 64 bit to 32 bit Anatoly Burakov
2024-10-17 11:43 ` David Marchand
2024-10-25 11:45 ` David Marchand
2024-10-28 15:21 ` Ilgiewicz, Jaroslaw
2024-09-02 9:54 ` [PATCH v1 28/30] net/i40e/base: add trace buffer reading dependencies Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 29/30] net/i40e/base: add Shadow RAM pointer definition Anatoly Burakov
2024-09-02 9:54 ` [PATCH v1 30/30] net/i40e: update base driver README Anatoly Burakov
2024-09-12 15:52 ` [PATCH v1 00/30] Update net/i40e base driver Bruce Richardson
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=52662f18b3afa2c6308ac3dce2946038a7dfeeba.1725270827.git.anatoly.burakov@intel.com \
--to=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/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).