pds_core: small code updates
Subsystems (3)
cover pds_core: small code updates
These are a few little code touch ups for a kdoc complaint, quicker error detection, and a cleaner initialization.
Shannon Nelson (3):
pds_core: remove extra name description
pds_core: smaller adminq poll starting interval
pds_core: init viftype default in declaration
drivers/net/ethernet/amd/pds_core/adminq.c | 4 ++-- drivers/net/ethernet/amd/pds_core/core.c | 4 +--- include/linux/pds/pds_adminq.h | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/3 pds_core: remove extra name description
Fix the kernel-doc complaintinclude/linux/pds/pds_adminq.h:481: warning: Excess struct member 'name' description in 'pds_core_lif_getattr_comp'
--- include/linux/pds/pds_adminq.h | 1 - 1 file changed, 1 deletion(-)
include/linux/pds/pds_adminq.h +0 -1
@@ -463,7 +463,6 @@ struct pds_core_lif_getattr_cmd {* @rsvd: Word boundary padding * @comp_index: Index in the descriptor ring for which this is the completion * @state: LIF state (enum pds_core_lif_state) -* @name: LIF name string, 0 terminated * @features: Features (enum pds_core_hw_features) * @rsvd2: Word boundary padding * @color: Color bit
Signature · 1 line
2.17.1
PATCH 2/3 pds_core: smaller adminq poll starting interval
In reply to Shannon NelsonShorten the adminq poll starting interval in order to notice any transaction errors more quickly.
--- drivers/net/ethernet/amd/pds_core/adminq.c | 4 ++-- include/linux/pds/pds_adminq.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/amd/pds_core/adminq.c +2 -2
@@ -225,7 +225,7 @@ int pdsc_adminq_post(struct pdsc *pdsc, union pds_core_adminq_comp *comp, bool fast_poll) { -unsigned long poll_interval =1 ; +unsigned long poll_interval =200 ;unsigned long poll_jiffies;unsigned long time_limit;unsigned long time_start;
@@ -252,7 +252,7 @@ int pdsc_adminq_post(struct pdsc *pdsc, time_limit = time_start +HZ * pdsc->devcmd_timeout; do { /* Timeslice the actual wait to catch IO errors etc early */ - poll_jiffies = msecs_to_jiffies(poll_interval); + poll_jiffies = usecs_to_jiffies(poll_interval); remaining = wait_for_completion_timeout(wc, poll_jiffies); if (remaining) break;
include/linux/pds/pds_adminq.h +1 -1
@@ -4,7 +4,7 @@#ifndef _PDS_CORE_ADMINQ_H_#define _PDS_CORE_ADMINQ_H_ -#define PDSC_ADMINQ_MAX_POLL_INTERVAL 256 +#define PDSC_ADMINQ_MAX_POLL_INTERVAL 256000/* usecs */ enum pds_core_adminq_flags { PDS_AQ_FLAG_FASTPOLL = BIT(1), /* completion poll at 1ms */
Signature · 1 line
2.17.1
Re: [PATCH net-next 2/3] pds_core: smaller adminq poll starting interval
Quoted 2 lines · Shannon Nelson
Shorten the adminq poll starting interval in order to notice any transaction errors more quickly.
It might be nice to add a bit more colour to what sort of scenarios this helps. But that isn't a hard requirement from my side.
Quoted 2 lines
Signed-off-by Shannon Nelson <[email protected]>
PATCH 3/3 pds_core: init viftype default in declaration
In reply to Shannon NelsonInitialize the .enabled field of the FWCTL viftype default in the declaration rather than as a bit of code as it is always to be enabled and needs no logic around it.
--- drivers/net/ethernet/amd/pds_core/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/amd/pds_core/core.c +1 -3
@@ -402,6 +402,7 @@ static int pdsc_core_init(struct pdsc *pdsc)static struct pdsc_viftype pdsc_viftype_defaults[] = { [PDS_DEV_TYPE_FWCTL ] = { .name =PDS_DEV_TYPE_FWCTL_STR , + .enabled = true, .vif_id =PDS_DEV_TYPE_FWCTL , .dl_id =-1 }, [PDS_DEV_TYPE_VDPA ] = { .name =PDS_DEV_TYPE_VDPA_STR ,
@@ -431,9 +432,6 @@ static int pdsc_viftypes_init(struct pdsc *pdsc)/* See what the Core device has for support */ vt_support = !!le16_to_cpu (pdsc->dev_ident.vif_types[vt]); -if (vt ==PDS_DEV_TYPE_FWCTL ) - pdsc->viftype_status[vt].enabled = true; -dev_dbg (pdsc->dev,"VIF %s is %ssupported\n" , pdsc->viftype_status[vt].name, vt_support ?"" :"not " );
Signature · 1 line
2.17.1
Re: [PATCH net-next 3/3] pds_core: init viftype default in declaration
Quoted 5 lines · Shannon Nelson
Initialize the .enabled field of the FWCTL viftype default in the declaration rather than as a bit of code as it is always to be enabled and needs no logic around it.
Signed-off-by Shannon Nelson <[email protected]>
Thanks, this looks like a nice clean-up to me.
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 9 lines · On Fri, 25 Apr 2025 13:46:15 -0700 you wrote:
These are a few little code touch ups for a kdoc complaint, quicker error detection, and a cleaner initialization.
Shannon Nelson (3):
pds_core: remove extra name description
pds_core: smaller adminq poll starting interval
pds_core: init viftype default in declaration[...]
Here is the summary with links:
- [net-next,1/3] pds_core: remove extra name description
https://git.kernel.org/netdev/net-next/c/144530c15ec7 - [net-next,2/3] pds_core: smaller adminq poll starting interval https://git.kernel.org/netdev/net-next/c/7c4f4c4fa9b6 - [net-next,3/3] pds_core: init viftype default in declaration https://git.kernel.org/netdev/net-next/c/6828208a45c1
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html