dpaa2-switch: small cleanup
Subsystems (5)
cover dpaa2-switch: small cleanup
From: Ioana Ciornei <[email protected]>
This patch set addresses various low-hanging issues in both dpaa2-switch and dpaa2-eth drivers.
Unused ABI functions are removed from dpaa2-switch, all the kernel-doc warnings are fixed up in both drivers and the coding style for the remaining ABIs is fixed-up a bit.
Ioana Ciornei (5):
dpaa2-switch: remove unused ABI functions
dpaa2-switch: fix kdoc warnings
dpaa2-switch: reduce the size of the if_id bitmap to 64 bits
dpaa2-switch: fit the function declaration on the same line
dpaa2-eth: fixup kdoc warnings
drivers/net/ethernet/freescale/dpaa2/dpkg.h | 5 +- drivers/net/ethernet/freescale/dpaa2/dpmac.h | 24 +- drivers/net/ethernet/freescale/dpaa2/dpni.c | 6 + drivers/net/ethernet/freescale/dpaa2/dpni.h | 162 +++++----- drivers/net/ethernet/freescale/dpaa2/dprtc.h | 3 - .../net/ethernet/freescale/dpaa2/dpsw-cmd.h | 11 +- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 281 ++++-------------- drivers/net/ethernet/freescale/dpaa2/dpsw.h | 265 +++++------------ 8 files changed, 217 insertions(+), 540 deletions(-)
Signature · 1 line
2.30.0
PATCH 1/5 dpaa2-switch: remove unused ABI functions
From: Ioana Ciornei <[email protected]>
Cleanup the dpaa2-switch driver a bit by removing any unused MC firmware ABI definitions.
--- .../net/ethernet/freescale/dpaa2/dpsw-cmd.h | 7 -- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 70 +------------------ drivers/net/ethernet/freescale/dpaa2/dpsw.h | 6 -- 3 files changed, 1 insertion(+), 82 deletions(-)
drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h +0 -7
@@ -75,8 +75,6 @@#define DPSW_CMDID_FDB_DUMP DPSW_CMD_ID(0x08A)#define DPSW_CMDID_IF_GET_PORT_MAC_ADDR DPSW_CMD_ID(0x0A7) -#define DPSW_CMDID_IF_GET_PRIMARY_MAC_ADDR DPSW_CMD_ID(0x0A8) -#define DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR DPSW_CMD_ID(0x0A9)#define DPSW_CMDID_CTRL_IF_GET_ATTR DPSW_CMD_ID(0x0A0)#define DPSW_CMDID_CTRL_IF_SET_POOLS DPSW_CMD_ID(0x0A1)
@@ -443,11 +441,6 @@ struct dpsw_rsp_if_get_mac_addr {u8 mac_addr[6 ]; }; -struct dpsw_cmd_if_set_mac_addr { -__le16 if_id; -u8 mac_addr[6 ]; -}; -struct dpsw_cmd_set_egress_flood {__le16 fdb_id;u8 flood_type;
drivers/net/ethernet/freescale/dpaa2/dpsw.c +1 -69
82 lines not on this page · raw message
drivers/net/ethernet/freescale/dpaa2/dpsw.h +0 -6
@@ -707,12 +707,6 @@ int dpsw_get_api_version(struct fsl_mc_io *mc_io,int dpsw_if_get_port_mac_addr (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 if_id,u8 mac_addr[6 ]); -int dpsw_if_get_primary_mac_addr (struct fsl_mc_io *mc_io,u32 cmd_flags, -u16 token,u16 if_id,u8 mac_addr[6 ]); - -int dpsw_if_set_primary_mac_addr (struct fsl_mc_io *mc_io,u32 cmd_flags, -u16 token,u16 if_id,u8 mac_addr[6 ]); -/** * struct dpsw_fdb_cfg - FDB Configuration * @num_fdb_entries: Number of FDB entries
Signature · 1 line
2.30.0
PATCH 2/5 dpaa2-switch: fix kdoc warnings
In reply to Ioana CiorneiFrom: Ioana Ciornei <[email protected]>
Running kernel-doc over the dpaa2-switch driver generates a bunch of warnings. Fix them up by removing code comments for macros which are self-explanatory and adding a bit more context for the dpsw_if_get_port_mac_addr() function and the fields of the dpsw_vlan_if_cfg structure.
--- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 2 +- drivers/net/ethernet/freescale/dpaa2/dpsw.h | 57 +++++---------------- 2 files changed, 15 insertions(+), 44 deletions(-)
drivers/net/ethernet/freescale/dpaa2/dpsw.c +1 -1
@@ -1319,7 +1319,7 @@ int dpsw_get_api_version(struct fsl_mc_io *mc_io, }/** -* dpsw_if_get_port_mac_addr() +* dpsw_if_get_port_mac_addr() - Retrieve MAC address associated to the physical port * @mc_io: Pointer to MC portal's I/O object * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' * @token: Token of DPSW object
drivers/net/ethernet/freescale/dpaa2/dpsw.h +14 -43
122 lines not on this page · raw message
Signature · 1 line
2.30.0
PATCH 3/5 dpaa2-switch: reduce the size of the if_id bitmap to 64 bits
In reply to Ioana CiorneiFrom: Ioana Ciornei <[email protected]>
The maximum number of DPAA2 switch interfaces, including the control interface, is 64. Even though this restriction existed from the first place, the command structures which use an interface id bitmap were poorly described and even though a single uint64_t is enough, all of them used an array of 4 uint64_t's.
Fix this by reducing the size of the interface id field to a single uint64_t.
--- .../net/ethernet/freescale/dpaa2/dpsw-cmd.h | 4 ++-- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-)
drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h +2 -2
@@ -340,7 +340,7 @@ struct dpsw_cmd_vlan_manage_if {__le16 vlan_id;__le32 pad1;/* cmd word 1-4 */ -__le64 if_id[4 ]; +__le64 if_id; };struct dpsw_cmd_vlan_remove {
@@ -386,7 +386,7 @@ struct dpsw_cmd_fdb_multicast_op {u8 mac_addr[6 ];__le16 pad2;/* cmd word 2-5 */ -__le64 if_id[4 ]; +__le64 if_id; };struct dpsw_cmd_fdb_dump {
drivers/net/ethernet/freescale/dpaa2/dpsw.c +10 -8
@@ -773,16 +773,18 @@ int dpsw_vlan_add_if(struct fsl_mc_io *mc_io,u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg) { + struct dpsw_cmd_vlan_add_if *cmd_params;struct fsl_mc_command cmd = {0 }; -struct dpsw_cmd_vlan_manage_if *cmd_params;/* prepare command */ cmd.header =mc_encode_cmd_header (DPSW_CMDID_VLAN_ADD_IF , cmd_flags, token); - cmd_params = (struct dpsw_cmd_vlan_manage_if *)cmd.params; + cmd_params = (struct dpsw_cmd_vlan_add_if *)cmd.params; cmd_params->vlan_id =cpu_to_le16 (vlan_id); -build_if_id_bitmap (cmd_params->if_id, cfg->if_id, cfg->num_ifs); + cmd_params->options =cpu_to_le16 (cfg->options); + cmd_params->fdb_id =cpu_to_le16 (cfg->fdb_id); +build_if_id_bitmap (&cmd_params->if_id, cfg->if_id, cfg->num_ifs);/* send command to mc*/ return mc_send_command (mc_io, &cmd);
@@ -820,7 +822,7 @@ int dpsw_vlan_add_if_untagged(struct fsl_mc_io *mc_io, token); cmd_params = (struct dpsw_cmd_vlan_manage_if *)cmd.params; cmd_params->vlan_id =cpu_to_le16 (vlan_id); -build_if_id_bitmap (cmd_params->if_id, cfg->if_id, cfg->num_ifs); +build_if_id_bitmap (&cmd_params->if_id, cfg->if_id, cfg->num_ifs);/* send command to mc*/ return mc_send_command (mc_io, &cmd);
@@ -854,7 +856,7 @@ int dpsw_vlan_remove_if(struct fsl_mc_io *mc_io, token); cmd_params = (struct dpsw_cmd_vlan_manage_if *)cmd.params; cmd_params->vlan_id =cpu_to_le16 (vlan_id); -build_if_id_bitmap (cmd_params->if_id, cfg->if_id, cfg->num_ifs); +build_if_id_bitmap (&cmd_params->if_id, cfg->if_id, cfg->num_ifs);/* send command to mc*/ return mc_send_command (mc_io, &cmd);
@@ -890,7 +892,7 @@ int dpsw_vlan_remove_if_untagged(struct fsl_mc_io *mc_io, token); cmd_params = (struct dpsw_cmd_vlan_manage_if *)cmd.params; cmd_params->vlan_id =cpu_to_le16 (vlan_id); -build_if_id_bitmap (cmd_params->if_id, cfg->if_id, cfg->num_ifs); +build_if_id_bitmap (&cmd_params->if_id, cfg->if_id, cfg->num_ifs);/* send command to mc*/ return mc_send_command (mc_io, &cmd);
@@ -1140,7 +1142,7 @@ int dpsw_fdb_add_multicast(struct fsl_mc_io *mc_io, cmd_params->fdb_id =cpu_to_le16 (fdb_id); cmd_params->num_ifs =cpu_to_le16 (cfg->num_ifs);dpsw_set_field (cmd_params->type,ENTRY_TYPE , cfg->type); -build_if_id_bitmap (cmd_params->if_id, cfg->if_id, cfg->num_ifs); +build_if_id_bitmap (&cmd_params->if_id, cfg->if_id, cfg->num_ifs);for (i =0 ; i <6 ; i++) cmd_params->mac_addr[i] = cfg->mac_addr[5 - i];
@@ -1182,7 +1184,7 @@ int dpsw_fdb_remove_multicast(struct fsl_mc_io *mc_io, cmd_params->fdb_id =cpu_to_le16 (fdb_id); cmd_params->num_ifs =cpu_to_le16 (cfg->num_ifs);dpsw_set_field (cmd_params->type,ENTRY_TYPE , cfg->type); -build_if_id_bitmap (cmd_params->if_id, cfg->if_id, cfg->num_ifs); +build_if_id_bitmap (&cmd_params->if_id, cfg->if_id, cfg->num_ifs);for (i =0 ; i <6 ; i++) cmd_params->mac_addr[i] = cfg->mac_addr[5 - i];
Signature · 1 line
2.30.0
Re: [PATCH net-next 3/5] dpaa2-switch: reduce the size of the if_id bitmap to 64 bits
Quoted 43 lines · Ioana Ciornei
From: Ioana Ciornei <[email protected]>
The maximum number of DPAA2 switch interfaces, including the control interface, is 64. Even though this restriction existed from the first place, the command structures which use an interface id bitmap were poorly described and even though a single
uint64_tis enough, all of them used an array of 4 uint64_t's.
Fix this by reducing the size of the interface id field to a singleuint64_t.Signed-off-by Ioana Ciornei <[email protected]>--- .../net/ethernet/freescale/dpaa2/dpsw-cmd.h | 4 ++-- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-)drivers/net/ethernet/freescale/dpaa2/dpsw-cmd.h +2
-2@@ -340,7 +340,7 @@ struct dpsw_cmd_vlan_manage_if {__le16 vlan_id;__le32 pad1;/* cmd word 1-4 */ -__le64 if_id[4 ]; +__le64 if_id; };struct dpsw_cmd_vlan_remove {@@ -386,7 +386,7 @@ struct dpsw_cmd_fdb_multicast_op {u8 mac_addr[6 ];__le16 pad2;/* cmd word 2-5 */ -__le64 if_id[4 ]; +__le64 if_id; };struct dpsw_cmd_fdb_dump {drivers/net/ethernet/freescale/dpaa2/dpsw.c +0
-0
drivers/net/ethernet/freescale/dpaa2/dpsw.c int dpsw_vlan_add_if(struct fsl_mc_io *mc_io, · line 777
Quoted 6 lines
drivers/net/ethernet/freescale/dpaa2/dpsw.c +1
-1@@ -773,16 +773,18 @@ int dpsw_vlan_add_if(struct fsl_mc_io *mc_io,u16 vlan_id, const struct dpsw_vlan_if_cfg *cfg) { + struct dpsw_cmd_vlan_add_if *cmd_params;struct fsl_mc_command cmd = {0 }; -struct dpsw_cmd_vlan_manage_if *cmd_params;
There is no mention in the commit message about replacing dpsw_cmd_vlan_manage_if with dpsw_cmd_vlan_add_if. I wounder if this should be a separate patch?
Andrew
PATCH 4/5 dpaa2-switch: fit the function declaration on the same line
In reply to Ioana CiorneiFrom: Ioana Ciornei <[email protected]>
Multiple ABI function declarations are split unnecessarry on multiple lines. Fix this so that we have a consistent coding style.
--- drivers/net/ethernet/freescale/dpaa2/dpsw.c | 191 +++++------------- drivers/net/ethernet/freescale/dpaa2/dpsw.h | 202 ++++++-------------- 2 files changed, 107 insertions(+), 286 deletions(-)
drivers/net/ethernet/freescale/dpaa2/dpsw.c +50 -141
@@ -9,9 +9,7 @@#include "dpsw.h" #include "dpsw-cmd.h" -static void build_if_id_bitmap (__le64 *bmap, -const u16 *id, -const u16 num_ifs) +static void build_if_id_bitmap (__le64 *bmap,const u16 *id,const u16 num_ifs) {int i;
@@ -38,10 +36,7 @@ static void build_if_id_bitmap(__le64 *bmap,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_open (struct fsl_mc_io *mc_io, -u32 cmd_flags, -int dpsw_id, -u16 *token) +int dpsw_open (struct fsl_mc_io *mc_io,u32 cmd_flags,int dpsw_id,u16 *token) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_open *cmd_params;
@@ -76,9 +71,7 @@ int dpsw_open(struct fsl_mc_io *mc_io,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_close (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token) +int dpsw_close (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token) {struct fsl_mc_command cmd = {0 };
@@ -99,9 +92,7 @@ int dpsw_close(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_enable (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token) +int dpsw_enable (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token) {struct fsl_mc_command cmd = {0 };
@@ -122,9 +113,7 @@ int dpsw_enable(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_disable (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token) +int dpsw_disable (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token) {struct fsl_mc_command cmd = {0 };
@@ -145,9 +134,7 @@ int dpsw_disable(struct fsl_mc_io *mc_io,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_reset (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token) +int dpsw_reset (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token) {struct fsl_mc_command cmd = {0 };
@@ -175,11 +162,8 @@ int dpsw_reset(struct fsl_mc_io *mc_io,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_set_irq_enable (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u8 irq_index, -u8 en) +int dpsw_set_irq_enable (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u8 irq_index,u8 en) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_set_irq_enable *cmd_params;
@@ -212,11 +196,8 @@ int dpsw_set_irq_enable(struct fsl_mc_io *mc_io,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_set_irq_mask (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u8 irq_index, -u32 mask) +int dpsw_set_irq_mask (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u8 irq_index,u32 mask) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_set_irq_mask *cmd_params;
@@ -245,11 +226,8 @@ int dpsw_set_irq_mask(struct fsl_mc_io *mc_io,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_get_irq_status (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u8 irq_index, -u32 *status) +int dpsw_get_irq_status (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u8 irq_index,u32 *status) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_get_irq_status *cmd_params;
@@ -288,11 +266,8 @@ int dpsw_get_irq_status(struct fsl_mc_io *mc_io,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_clear_irq_status (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u8 irq_index, -u32 status) +int dpsw_clear_irq_status (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u8 irq_index,u32 status) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_clear_irq_status *cmd_params;
@@ -318,9 +293,7 @@ int dpsw_clear_irq_status(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_get_attributes (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, +int dpsw_get_attributes (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,struct dpsw_attr *attr) {struct fsl_mc_command cmd = {0 };
@@ -367,10 +340,7 @@ int dpsw_get_attributes(struct fsl_mc_io *mc_io,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_if_set_link_cfg (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id, +int dpsw_if_set_link_cfg (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 if_id,struct dpsw_link_cfg *cfg) {struct fsl_mc_command cmd = {0 };
@@ -399,11 +369,8 @@ int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_if_get_link_state (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id, -struct dpsw_link_state *state) +int dpsw_if_get_link_state (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 if_id,struct dpsw_link_state *state) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_if_get_link_state *cmd_params;
@@ -441,10 +408,7 @@ int dpsw_if_get_link_state(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_set_tci (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id, +int dpsw_if_set_tci (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 if_id,const struct dpsw_tci_cfg *cfg) {struct fsl_mc_command cmd = {0 };
@@ -476,10 +440,7 @@ int dpsw_if_set_tci(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_get_tci (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id, +int dpsw_if_get_tci (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 if_id,struct dpsw_tci_cfg *cfg) {struct fsl_mc_command cmd = {0 };
@@ -521,10 +482,7 @@ int dpsw_if_get_tci(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_set_stp (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id, +int dpsw_if_set_stp (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 if_id,const struct dpsw_stp_cfg *cfg) {struct fsl_mc_command cmd = {0 };
@@ -554,12 +512,8 @@ int dpsw_if_set_stp(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_get_counter (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id, -enum dpsw_counter type, -u64 *counter) +int dpsw_if_get_counter (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 if_id,enum dpsw_counter type,u64 *counter) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_if_get_counter *cmd_params;
@@ -595,10 +549,7 @@ int dpsw_if_get_counter(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_enable (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id) +int dpsw_if_enable (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 if_id) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_if *cmd_params;
@@ -623,10 +574,7 @@ int dpsw_if_enable(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_disable (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id) +int dpsw_if_disable (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 if_id) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_if *cmd_params;
@@ -693,11 +641,8 @@ int dpsw_if_get_attributes(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_if_set_max_frame_length (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id, -u16 frame_length) +int dpsw_if_set_max_frame_length (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 if_id,u16 frame_length) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_if_set_max_frame_length *cmd_params;
@@ -731,11 +676,8 @@ int dpsw_if_set_max_frame_length(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_add (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 vlan_id, -const struct dpsw_vlan_cfg *cfg) +int dpsw_vlan_add (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 vlan_id,const struct dpsw_vlan_cfg *cfg) {struct fsl_mc_command cmd = {0 };struct dpsw_vlan_add *cmd_params;
@@ -767,11 +709,8 @@ int dpsw_vlan_add(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_add_if (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 vlan_id, -const struct dpsw_vlan_if_cfg *cfg) +int dpsw_vlan_add_if (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 vlan_id,const struct dpsw_vlan_if_cfg *cfg) {struct dpsw_cmd_vlan_add_if *cmd_params;struct fsl_mc_command cmd = {0 };
@@ -807,11 +746,8 @@ int dpsw_vlan_add_if(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_add_if_untagged (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 vlan_id, -const struct dpsw_vlan_if_cfg *cfg) +int dpsw_vlan_add_if_untagged (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 vlan_id,const struct dpsw_vlan_if_cfg *cfg) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_vlan_manage_if *cmd_params;
@@ -841,11 +777,8 @@ int dpsw_vlan_add_if_untagged(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_remove_if (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 vlan_id, -const struct dpsw_vlan_if_cfg *cfg) +int dpsw_vlan_remove_if (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 vlan_id,const struct dpsw_vlan_if_cfg *cfg) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_vlan_manage_if *cmd_params;
@@ -877,11 +810,8 @@ int dpsw_vlan_remove_if(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_remove_if_untagged (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 vlan_id, -const struct dpsw_vlan_if_cfg *cfg) +int dpsw_vlan_remove_if_untagged (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 vlan_id,const struct dpsw_vlan_if_cfg *cfg) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_vlan_manage_if *cmd_params;
@@ -907,9 +837,7 @@ int dpsw_vlan_remove_if_untagged(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_vlan_remove (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, +int dpsw_vlan_remove (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 vlan_id) {struct fsl_mc_command cmd = {0 };
@@ -996,11 +924,8 @@ int dpsw_fdb_remove(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u16 fdb_i* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_fdb_add_unicast (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 fdb_id, -const struct dpsw_fdb_unicast_cfg *cfg) +int dpsw_fdb_add_unicast (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 fdb_id,const struct dpsw_fdb_unicast_cfg *cfg) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_fdb_unicast_op *cmd_params;
@@ -1039,13 +964,8 @@ int dpsw_fdb_add_unicast(struct fsl_mc_io *mc_io,* The struct fdb_dump_entry array must be parsed until the end of memory * area or until an entry with mac_addr set to zero is found. */ -int dpsw_fdb_dump (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 fdb_id, -u64 iova_addr, -u32 iova_size, -u16 *num_entries) +int dpsw_fdb_dump (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 fdb_id, +u64 iova_addr,u32 iova_size,u16 *num_entries) {struct dpsw_cmd_fdb_dump *cmd_params;struct dpsw_rsp_fdb_dump *rsp_params;
@@ -1082,11 +1002,8 @@ int dpsw_fdb_dump(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_fdb_remove_unicast (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 fdb_id, -const struct dpsw_fdb_unicast_cfg *cfg) +int dpsw_fdb_remove_unicast (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 fdb_id,const struct dpsw_fdb_unicast_cfg *cfg) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_fdb_unicast_op *cmd_params;
@@ -1124,11 +1041,8 @@ int dpsw_fdb_remove_unicast(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_fdb_add_multicast (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 fdb_id, -const struct dpsw_fdb_multicast_cfg *cfg) +int dpsw_fdb_add_multicast (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 fdb_id,const struct dpsw_fdb_multicast_cfg *cfg) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_fdb_multicast_op *cmd_params;
@@ -1166,11 +1080,8 @@ int dpsw_fdb_add_multicast(struct fsl_mc_io *mc_io,* * Return: Completion status. '0' on Success; Error code otherwise. */ -int dpsw_fdb_remove_multicast (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 fdb_id, -const struct dpsw_fdb_multicast_cfg *cfg) +int dpsw_fdb_remove_multicast (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token, +u16 fdb_id,const struct dpsw_fdb_multicast_cfg *cfg) {struct fsl_mc_command cmd = {0 };struct dpsw_cmd_fdb_multicast_op *cmd_params;
@@ -1296,10 +1207,8 @@ int dpsw_ctrl_if_set_queue(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token,* * Return: '0' on Success; Error code otherwise. */ -int dpsw_get_api_version (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 *major_ver, -u16 *minor_ver) +int dpsw_get_api_version (struct fsl_mc_io *mc_io,u32 cmd_flags, +u16 *major_ver,u16 *minor_ver) {struct fsl_mc_command cmd = {0 };struct dpsw_rsp_get_api_version *rsp_params;
drivers/net/ethernet/freescale/dpaa2/dpsw.h +57 -145
308 lines not on this page · raw message
Signature · 1 line
2.30.0
Re: [PATCH net-next 4/5] dpaa2-switch: fit the function declaration on the same line
drivers/net/ethernet/freescale/dpaa2/dpsw.c int dpsw_get_attributes(struct fsl_mc_io *mc_io, · line 344
Quoted 6 lines
drivers/net/ethernet/freescale/dpaa2/dpsw.c +1
-4-int dpsw_if_set_link_cfg (struct fsl_mc_io *mc_io, -u32 cmd_flags, -u16 token, -u16 if_id, +int dpsw_if_set_link_cfg (struct fsl_mc_io *mc_io,u32 cmd_flags,u16 token,u16 if_id,struct dpsw_link_cfg *cfg)
Hi Ioana
It looks like this one might violate the 80 character limit? The limit has been increased in Linux in general, but netdev maintainers would like to keep the old 80 limit where possible.
Andrew
PATCH 5/5 dpaa2-eth: fixup kdoc warnings
In reply to Ioana CiorneiFrom: Ioana Ciornei <[email protected]>
Running kernel-doc over the dpaa2-eth driver generates a bunch of warnings. Fix them up by removing code comments for macros which are self-explanatory, respecting the kdoc format for macro documentation and other small changes like describing the expected return values of functions.
--- drivers/net/ethernet/freescale/dpaa2/dpkg.h | 5 +- drivers/net/ethernet/freescale/dpaa2/dpmac.h | 24 +-- drivers/net/ethernet/freescale/dpaa2/dpni.c | 6 + drivers/net/ethernet/freescale/dpaa2/dpni.h | 162 ++++++++----------- drivers/net/ethernet/freescale/dpaa2/dprtc.h | 3 - 5 files changed, 82 insertions(+), 118 deletions(-)
drivers/net/ethernet/freescale/dpaa2/dpkg.h +3 -2
@@ -13,11 +13,12 @@/** Key Generator properties */ /** -* Number of masks per key extraction +* DPKG_NUM_OF_MASKS - Number of masks per key extraction */ #define DPKG_NUM_OF_MASKS 4 +/** -* Number of extractions per key profile +* DPKG_MAX_NUM_OF_EXTRACTS - Number of extractions per key profile */ #define DPKG_MAX_NUM_OF_EXTRACTS 10
drivers/net/ethernet/freescale/dpaa2/dpmac.h +3 -21
@@ -83,39 +83,21 @@ int dpmac_get_attributes(struct fsl_mc_io *mc_io,u16 token, struct dpmac_attr *attr); -/** -* DPMAC link configuration/state options -*/ +/* DPMAC link configuration/state options */ -/** -* Enable auto-negotiation -*/ #define DPMAC_LINK_OPT_AUTONEG BIT_ULL(0) -/** -* Enable half-duplex mode -*/ #define DPMAC_LINK_OPT_HALF_DUPLEX BIT_ULL(1) -/** -* Enable pause frames -*/ #define DPMAC_LINK_OPT_PAUSE BIT_ULL(2) -/** -* Enable a-symmetric pause frames -*/ #define DPMAC_LINK_OPT_ASYM_PAUSE BIT_ULL(3) -/** -* Advertised link speeds -*/ +/* Advertised link speeds */ #define DPMAC_ADVERTISED_10BASET_FULL BIT_ULL(0)#define DPMAC_ADVERTISED_100BASET_FULL BIT_ULL(1)#define DPMAC_ADVERTISED_1000BASET_FULL BIT_ULL(2)#define DPMAC_ADVERTISED_10000BASET_FULL BIT_ULL(4)#define DPMAC_ADVERTISED_2500BASEX_FULL BIT_ULL(5) -/** -* Advertise auto-negotiation enable -*/ +/* Advertise auto-negotiation enable */ #define DPMAC_ADVERTISED_AUTONEG BIT_ULL(3)/**
drivers/net/ethernet/freescale/dpaa2/dpni.c +6 -0
@@ -17,6 +17,8 @@* This function has to be called before the following functions: * - dpni_set_rx_tc_dist() * - dpni_set_qos_table() +* +* Return: '0' on Success; Error code otherwise. */ int dpni_prepare_key_cfg (const struct dpkg_profile_cfg *cfg,u8 *key_cfg_buf) {
@@ -1793,6 +1795,8 @@ int dpni_get_api_version(struct fsl_mc_io *mc_io,* If cfg.enable is set to 0 the command will clear flow steering table. * The packets will be classified according to settings made in * dpni_set_rx_hash_dist() +* +* Return: '0' on Success; Error code otherwise. */ int dpni_set_rx_fs_dist(struct fsl_mc_io *mc_io, u32 cmd_flags,
@@ -1826,6 +1830,8 @@ int dpni_set_rx_fs_dist(struct fsl_mc_io *mc_io,* If cfg.enable is set to 1 the packets will be classified using a hash * function based on the key received in cfg.key_cfg_iova parameter. * If cfg.enable is set to 0 the packets will be sent to the default queue +* +* Return: '0' on Success; Error code otherwise. */ int dpni_set_rx_hash_dist(struct fsl_mc_io *mc_io, u32 cmd_flags,
drivers/net/ethernet/freescale/dpaa2/dpni.h +70 -92
338 lines not on this page · raw message
drivers/net/ethernet/freescale/dpaa2/dprtc.h +0 -3
@@ -13,9 +13,6 @@struct fsl_mc_io ; -/** -* Number of irq's -*/ #define DPRTC_MAX_IRQ_NUM 1#define DPRTC_IRQ_INDEX 0
Signature · 1 line
2.30.0
Quoted 7 lines · On Tue, 16 Mar 2021 16:55:07 +0200 Ioana Ciornei wrote:
From: Ioana Ciornei <[email protected]>
This patch set addresses various low-hanging issues in both dpaa2-switch and dpaa2-eth drivers.
Unused ABI functions are removed from dpaa2-switch, all the kernel-doc warnings are fixed up in both drivers and the coding style for the remaining ABIs is fixed-up a bit.
This series was applied to netdev/net-next.git (refs/heads/master):
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
Quoted 9 lines · On Tue, 16 Mar 2021 16:55:07 +0200 you wrote:
From: Ioana Ciornei <[email protected]>
This patch set addresses various low-hanging issues in both dpaa2-switch and dpaa2-eth drivers.
Unused ABI functions are removed from dpaa2-switch, all the kernel-doc warnings are fixed up in both drivers and the coding style for the remaining ABIs is fixed-up a bit.[...]
Here is the summary with links:
- [net-next,1/5] dpaa2-switch: remove unused ABI functions
https://git.kernel.org/netdev/net-next/c/cba0445633bc - [net-next,2/5] dpaa2-switch: fix kdoc warnings https://git.kernel.org/netdev/net-next/c/05b363608b5b - [net-next,3/5] dpaa2-switch: reduce the size of the if_id bitmap to 64 bits https://git.kernel.org/netdev/net-next/c/2b7e3f7d1b7e - [net-next,4/5] dpaa2-switch: fit the function declaration on the same line https://git.kernel.org/netdev/net-next/c/5ac2d254382c - [net-next,5/5] dpaa2-eth: fixup kdoc warnings https://git.kernel.org/netdev/net-next/c/4fe72de61ec8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html