diff mbox series

[net] samples: pktgen: correct dev to DEV

Message ID 20241112030347.1849335-1-wei.fang@nxp.com (mailing list archive)
State Accepted
Commit 3342dc8b4623d835e7dd76a15cec2e5a94fe2f93
Delegated to: Netdev Maintainers
Headers show
Series [net] samples: pktgen: correct dev to DEV | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 3 this patch: 3
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-11-13--03-00 (tests: 786)

Commit Message

Wei Fang Nov. 12, 2024, 3:03 a.m. UTC
In the pktgen_sample01_simple.sh script, the device variable is uppercase
'DEV' instead of lowercase 'dev'. Because of this typo, the script cannot
enable UDP tx checksum.

Fixes: 460a9aa23de6 ("samples: pktgen: add UDP tx checksum support")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
 samples/pktgen/pktgen_sample01_simple.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Horman Nov. 12, 2024, 5:35 p.m. UTC | #1
On Tue, Nov 12, 2024 at 11:03:47AM +0800, Wei Fang wrote:
> In the pktgen_sample01_simple.sh script, the device variable is uppercase
> 'DEV' instead of lowercase 'dev'. Because of this typo, the script cannot
> enable UDP tx checksum.
> 
> Fixes: 460a9aa23de6 ("samples: pktgen: add UDP tx checksum support")
> Signed-off-by: Wei Fang <wei.fang@nxp.com>

Reviewed-by: Simon Horman <horms@kernel.org>
Jesper Dangaard Brouer Nov. 13, 2024, 9:44 a.m. UTC | #2
On 12/11/2024 04.03, Wei Fang wrote:
> In the pktgen_sample01_simple.sh script, the device variable is uppercase
> 'DEV' instead of lowercase 'dev'. Because of this typo, the script cannot
> enable UDP tx checksum.
> 
> Fixes: 460a9aa23de6 ("samples: pktgen: add UDP tx checksum support")
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> ---
>   samples/pktgen/pktgen_sample01_simple.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/samples/pktgen/pktgen_sample01_simple.sh b/samples/pktgen/pktgen_sample01_simple.sh
> index cdb9f497f87d..66cb707479e6 100755
> --- a/samples/pktgen/pktgen_sample01_simple.sh
> +++ b/samples/pktgen/pktgen_sample01_simple.sh

Why are you only fixing one script?

The fixes commit 460a9aa23de6 changes many files, introducing this bug.

> @@ -76,7 +76,7 @@ if [ -n "$DST_PORT" ]; then
>       pg_set $DEV "udp_dst_max $UDP_DST_MAX"
>   fi
>   
> -[ ! -z "$UDP_CSUM" ] && pg_set $dev "flag UDPCSUM"
> +[ ! -z "$UDP_CSUM" ] && pg_set $DEV "flag UDPCSUM"
>   

This fix looks correct, but we also need to fix other scripts

>   # Setup random UDP port src range
>   pg_set $DEV "flag UDPSRC_RND"


$ git whatchanged -1 460a9aa23de6 | grep 'M     samples'| awk -FM 
'{print $2}'
	samples/pktgen/parameters.sh
	samples/pktgen/pktgen_sample01_simple.sh
	samples/pktgen/pktgen_sample02_multiqueue.sh
	samples/pktgen/pktgen_sample03_burst_single_flow.sh
	samples/pktgen/pktgen_sample04_many_flows.sh
	samples/pktgen/pktgen_sample05_flow_per_thread.sh
	samples/pktgen/pktgen_sample06_numa_awared_queue_irq_affinity.sh

Thanks for spotting this, but please also fix the other scripts :-)

--Jesper
Wei Fang Nov. 13, 2024, 10:06 a.m. UTC | #3
> On 12/11/2024 04.03, Wei Fang wrote:
> > In the pktgen_sample01_simple.sh script, the device variable is
> > uppercase 'DEV' instead of lowercase 'dev'. Because of this typo, the
> > script cannot enable UDP tx checksum.
> >
> > Fixes: 460a9aa23de6 ("samples: pktgen: add UDP tx checksum support")
> > Signed-off-by: Wei Fang <wei.fang@nxp.com>
> > ---
> >   samples/pktgen/pktgen_sample01_simple.sh | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/samples/pktgen/pktgen_sample01_simple.sh
> > b/samples/pktgen/pktgen_sample01_simple.sh
> > index cdb9f497f87d..66cb707479e6 100755
> > --- a/samples/pktgen/pktgen_sample01_simple.sh
> > +++ b/samples/pktgen/pktgen_sample01_simple.sh
> 
> Why are you only fixing one script?
> 

Other scripts are correct, because they are all multi-threaded, "dev" is
defined for each thread like below.

dev=${DEV}@${thread}


> The fixes commit 460a9aa23de6 changes many files, introducing this bug.
> 
> > @@ -76,7 +76,7 @@ if [ -n "$DST_PORT" ]; then
> >       pg_set $DEV "udp_dst_max $UDP_DST_MAX"
> >   fi
> >
> > -[ ! -z "$UDP_CSUM" ] && pg_set $dev "flag UDPCSUM"
> > +[ ! -z "$UDP_CSUM" ] && pg_set $DEV "flag UDPCSUM"
> >
> 
> This fix looks correct, but we also need to fix other scripts
> 
> >   # Setup random UDP port src range
> >   pg_set $DEV "flag UDPSRC_RND"
> 
> 
> $ git whatchanged -1 460a9aa23de6 | grep 'M     samples'| awk -FM
> '{print $2}'
> 	samples/pktgen/parameters.sh
> 	samples/pktgen/pktgen_sample01_simple.sh
> 	samples/pktgen/pktgen_sample02_multiqueue.sh
> 	samples/pktgen/pktgen_sample03_burst_single_flow.sh
> 	samples/pktgen/pktgen_sample04_many_flows.sh
> 	samples/pktgen/pktgen_sample05_flow_per_thread.sh
> 	samples/pktgen/pktgen_sample06_numa_awared_queue_irq_affinity.sh
> 
> Thanks for spotting this, but please also fix the other scripts :-)
> 
> --Jesper
Jesper Dangaard Brouer Nov. 13, 2024, 12:19 p.m. UTC | #4
On 13/11/2024 11.06, Wei Fang wrote:
>> On 12/11/2024 04.03, Wei Fang wrote:
>>> In the pktgen_sample01_simple.sh script, the device variable is
>>> uppercase 'DEV' instead of lowercase 'dev'. Because of this typo, the
>>> script cannot enable UDP tx checksum.
>>>
>>> Fixes: 460a9aa23de6 ("samples: pktgen: add UDP tx checksum support")
>>> Signed-off-by: Wei Fang <wei.fang@nxp.com>
>>> ---
>>>    samples/pktgen/pktgen_sample01_simple.sh | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/samples/pktgen/pktgen_sample01_simple.sh
>>> b/samples/pktgen/pktgen_sample01_simple.sh
>>> index cdb9f497f87d..66cb707479e6 100755
>>> --- a/samples/pktgen/pktgen_sample01_simple.sh
>>> +++ b/samples/pktgen/pktgen_sample01_simple.sh
>>
>> Why are you only fixing one script?
>>
> 
> Other scripts are correct, because they are all multi-threaded, "dev" is
> defined for each thread like below.
> 
> dev=${DEV}@${thread}
> 

Good point! - then this patch is enough :-)

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>

Thanks for fixing this,
--Jesper
patchwork-bot+netdevbpf@kernel.org Nov. 14, 2024, 3:10 a.m. UTC | #5
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 12 Nov 2024 11:03:47 +0800 you wrote:
> In the pktgen_sample01_simple.sh script, the device variable is uppercase
> 'DEV' instead of lowercase 'dev'. Because of this typo, the script cannot
> enable UDP tx checksum.
> 
> Fixes: 460a9aa23de6 ("samples: pktgen: add UDP tx checksum support")
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> 
> [...]

Here is the summary with links:
  - [net] samples: pktgen: correct dev to DEV
    https://git.kernel.org/netdev/net/c/3342dc8b4623

You are awesome, thank you!
diff mbox series

Patch

diff --git a/samples/pktgen/pktgen_sample01_simple.sh b/samples/pktgen/pktgen_sample01_simple.sh
index cdb9f497f87d..66cb707479e6 100755
--- a/samples/pktgen/pktgen_sample01_simple.sh
+++ b/samples/pktgen/pktgen_sample01_simple.sh
@@ -76,7 +76,7 @@  if [ -n "$DST_PORT" ]; then
     pg_set $DEV "udp_dst_max $UDP_DST_MAX"
 fi
 
-[ ! -z "$UDP_CSUM" ] && pg_set $dev "flag UDPCSUM"
+[ ! -z "$UDP_CSUM" ] && pg_set $DEV "flag UDPCSUM"
 
 # Setup random UDP port src range
 pg_set $DEV "flag UDPSRC_RND"