Re: [EXT] Re: [PATCH v3 net-next 0/2] pktgen: scripts improvements

2021-03-15 Thread Igor Russkikh
>> v3: change us to ns in docs >> v2: Review comments from Jesper >> >> CC: Jesper Dangaard Brouer > > Did a quick review and everything looks okay. > The patches are already applied, but you will still get my ACK, > even-though it will not make it to the commit log. > > Acked-by: Jesper Danga

Re: [PATCH v3 net-next 0/2] pktgen: scripts improvements

2021-03-15 Thread Jesper Dangaard Brouer
On Thu, 11 Mar 2021 11:32:51 +0100 Igor Russkikh wrote: > Hello netdev community, > > Please consider small improvements to pktgen scripts we use in our > environment. > > Adding delay parameter through command line, > Adding new -a (append) parameter to make flex runs

Re: [PATCH v3 net-next 0/2] pktgen: scripts improvements

2021-03-14 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Thu, 11 Mar 2021 11:32:51 +0100 you wrote: > Hello netdev community, > > Please consider small improvements to pktgen scripts we use in our > environment. > > Adding delay parameter through comm

[PATCH v3 net-next 2/2] samples: pktgen: new append mode

2021-03-11 Thread Igor Russkikh
To configure various complex flows we for sure can create custom pktgen init scripts, but sometimes thats not that easy. New "-a" (append) option in all the existing sample scripts allows to append more "devices" into pktgen threads. The most straightforward usecases f

[PATCH v3 net-next 0/2] pktgen: scripts improvements

2021-03-11 Thread Igor Russkikh
Hello netdev community, Please consider small improvements to pktgen scripts we use in our environment. Adding delay parameter through command line, Adding new -a (append) parameter to make flex runs v3: change us to ns in docs v2: Review comments from Jesper CC: Jesper Dangaard Brouer Igor

[PATCH v3 net-next 1/2] samples: pktgen: allow to specify delay parameter via new opt

2021-03-11 Thread Igor Russkikh
DELAY may now be explicitly specified via common parameter -w Signed-off-by: Igor Russkikh --- samples/pktgen/README.rst | 1 + samples/pktgen/parameters.sh | 10 +- samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh | 3

[PATCH AUTOSEL 4.9 05/12] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-02-24 Thread Sasha Levin
From: Di Zhu [ Upstream commit 275b1e88cabb34dbcbe99756b67e9939d34a99b6 ] pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and

[PATCH AUTOSEL 4.4 05/11] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-02-24 Thread Sasha Levin
From: Di Zhu [ Upstream commit 275b1e88cabb34dbcbe99756b67e9939d34a99b6 ] pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and

[PATCH AUTOSEL 4.19 06/26] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-02-24 Thread Sasha Levin
From: Di Zhu [ Upstream commit 275b1e88cabb34dbcbe99756b67e9939d34a99b6 ] pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and

[PATCH AUTOSEL 4.14 05/16] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-02-24 Thread Sasha Levin
From: Di Zhu [ Upstream commit 275b1e88cabb34dbcbe99756b67e9939d34a99b6 ] pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and

[PATCH AUTOSEL 5.4 06/40] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-02-24 Thread Sasha Levin
From: Di Zhu [ Upstream commit 275b1e88cabb34dbcbe99756b67e9939d34a99b6 ] pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and

[PATCH AUTOSEL 5.10 09/56] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-02-24 Thread Sasha Levin
From: Di Zhu [ Upstream commit 275b1e88cabb34dbcbe99756b67e9939d34a99b6 ] pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and

[PATCH AUTOSEL 5.11 13/67] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-02-24 Thread Sasha Levin
From: Di Zhu [ Upstream commit 275b1e88cabb34dbcbe99756b67e9939d34a99b6 ] pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and

Re: [EXT] Re: [PATCH v2 net-next 1/2] samples: pktgen: allow to specify delay parameter via new opt

2021-02-11 Thread Jesper Dangaard Brouer
fix. Also remember that you made similar mistake in next patch. When adding documentation in samples/pktgen/README.rst. Strictly speaking, the doc update for DELAY belongs in patch-1. > One extra thing I wanted to raise is "set -o errexit" in functions.sh. > It basically contradicts

RE: [EXT] Re: [PATCH v2 net-next 1/2] samples: pktgen: allow to specify delay parameter via new opt

2021-02-11 Thread Igor Russkikh
>> +echo " -w : (\$DELAY) Tx Delay value (us)" >This is not in "us" it is in "ns" (nanosec). (Like I pointed out last time...) Ah, sorry lost that. Will fix. One extra thing I wanted to raise is "set -o errexit" in functions.sh. It basically contradicts with the usecase I'm using (doing

Re: [PATCH v2 net-next 1/2] samples: pktgen: allow to specify delay parameter via new opt

2021-02-11 Thread Jesper Dangaard Brouer
On Thu, 11 Feb 2021 16:56:25 +0100 Igor Russkikh wrote: > diff --git a/samples/pktgen/parameters.sh b/samples/pktgen/parameters.sh > index ff0ed474fee9..70cc2878d479 100644 > --- a/samples/pktgen/parameters.sh > +++ b/samples/pktgen/parameters.sh > @@ -19,12 +19,13 @@

[PATCH v2 net-next 1/2] samples: pktgen: allow to specify delay parameter via new opt

2021-02-11 Thread Igor Russkikh
DELAY may now be explicitly specified via common parameter -w Signed-off-by: Igor Russkikh --- samples/pktgen/parameters.sh | 10 +- samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh | 3 --- samples/pktgen/pktgen_bench_xmit_mode_queue_xmit.sh| 3

[PATCH v2 net-next 2/2] samples: pktgen: new append mode

2021-02-11 Thread Igor Russkikh
To configure various complex flows we for sure can create custom pktgen init scripts, but sometimes thats not that easy. New "-a" (append) option in all the existing sample scripts allows to append more "devices" into pktgen threads. The most straightforward usecases f

[PATCH v2 net-next 0/2] pktgen: scripts improvements

2021-02-11 Thread Igor Russkikh
Hello netdev community, Please consider small improvements to pktgen scripts we use in our environment. Adding delay parameter through command line, Adding new -a (append) parameter to make flex runs v2: Review comments from Jesper CC: Jesper Dangaard Brouer Igor Russkikh (2): samples

Re: [PATCH] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-01-27 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 25 Jan 2021 20:42:29 +0800 you wrote: > From: Di Zhu > > pktgen create threads for all online cpus and bond these threads to > relevant cpu repecivtily. when this thread firstly be woken up, it > w

Re: [EXT] Re: [PATCH net-next 2/2] samples: pktgen: new append mode

2021-01-26 Thread Igor Russkikh
Hi Jesper, Thanks for reviewing this. >> DELAY may now be explicitly specified via common parameter -w > > What are you actually using this for? Basically, for the second patch. When running multidev pktgen (using that -a option) with large amount of clones and bursts (-c and -b

Re: [PATCH net-next 2/2] samples: pktgen: new append mode

2021-01-26 Thread Jesper Dangaard Brouer
On Fri, 22 Jan 2021 16:05:17 +0100 Igor Russkikh wrote: > To configure various complex flows we for sure can create custom > pktgen init scripts, but sometimes thats not that easy. > > New "-a" (append) option in all the existing sample scripts allows > to append m

Re: [PATCH net-next 1/2] samples: pktgen: allow to specify delay parameter via new opt

2021-01-26 Thread Jesper Dangaard Brouer
, it will use the "delay" variable. > Signed-off-by: Igor Russkikh > --- > samples/pktgen/parameters.sh | 10 +- > samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh | 3 --- > samples/pktgen/pktgen_bench_xmit_mode_queue

[PATCH] pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()

2021-01-25 Thread zhudi
From: Di Zhu pktgen create threads for all online cpus and bond these threads to relevant cpu repecivtily. when this thread firstly be woken up, it will compare cpu currently running with the cpu specified at the time of creation and if the two cpus are not equal, BUG_ON() will take effect

[PATCH net-next 0/2] pktgen: scripts improvements

2021-01-22 Thread Igor Russkikh
Hello netdev community, Please consider small improvements to pktgen scripts we use in our environment. Adding delay parameter through command line, Adding new -a (append) parameter to make flex runs Igor Russkikh (2): samples: pktgen: allow to specify delay parameter via new opt samples

[PATCH net-next 2/2] samples: pktgen: new append mode

2021-01-22 Thread Igor Russkikh
To configure various complex flows we for sure can create custom pktgen init scripts, but sometimes thats not that easy. New "-a" (append) option in all the existing sample scripts allows to append more "devices" into pktgen threads. The most straightforward usecases f

[PATCH net-next 1/2] samples: pktgen: allow to specify delay parameter via new opt

2021-01-22 Thread Igor Russkikh
DELAY may now be explicitly specified via common parameter -w Signed-off-by: Igor Russkikh --- samples/pktgen/parameters.sh | 10 +- samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh | 3 --- samples/pktgen/pktgen_bench_xmit_mode_queue_xmit.sh| 3

Re: [PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c

2020-10-01 Thread David Miller
From: Ye Bin Date: Wed, 30 Sep 2020 09:08:37 +0800 > Fix follow warnings: > [net/core/pktgen.c:925]: (warning) %u in format string (no. 1) > requires 'unsigned int' but the argument type is 'signed int'. > [net/core/pktgen.c:942]: (warning) %u in format string (no. 1) > requires 'unsi

[PATCH 1/2] pktgen: Fix inconsistent of format with argument type in pktgen.c

2020-09-29 Thread Ye Bin
Fix follow warnings: [net/core/pktgen.c:925]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [net/core/pktgen.c:942]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [net/core/

Re: [PATCH] pktgen: fix error message with wrong function name

2020-09-01 Thread David Miller
From: Leesoo Ahn Date: Tue, 1 Sep 2020 22:04:47 +0900 > Error on calling kthread_create_on_node prints wrong function name, > kernel_thread. > > Signed-off-by: Leesoo Ahn Applied with Fixes: tag added.

Re: [PATCH] pktgen: fix error message with wrong function name

2020-09-01 Thread Gustavo A. R. Silva
On Tue, Sep 01, 2020 at 10:04:47PM +0900, Leesoo Ahn wrote: > Error on calling kthread_create_on_node prints wrong function name, > kernel_thread. > > Signed-off-by: Leesoo Ahn You might need to add the following tag: Fixes: 94dcf29a11b3 ("kthread: use kthread_create_on_node()") Acked-by: Gust

[PATCH] pktgen: fix error message with wrong function name

2020-09-01 Thread Leesoo Ahn
Error on calling kthread_create_on_node prints wrong function name, kernel_thread. Signed-off-by: Leesoo Ahn --- net/core/pktgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 95f4c6b8f51a..44fdbb9c6e53 100644 --- a/net/core/pktg

Re: [PATCH net-next v5 0/4] samples: pktgen: allow to specify destination IP range

2019-10-07 Thread David Miller
From: "Daniel T. Lee" Date: Sat, 5 Oct 2019 17:25:05 +0900 > Currently, pktgen script supports specify destination port range. > > To further extend the capabilities, this commit allows to specify destination > IP range with CIDR when running pktgen script. > > Spe

Re: [PATCH net-next v5 2/4] samples: pktgen: fix proc_cmd command result check logic

2019-10-07 Thread Jesper Dangaard Brouer
and 'pg_set'. > > > > > > This commit fixes this logic by grep-ing the "Result:" string only when > > > the command is not for 'pg_ctrl'. > > > > > > For clarity of an execution flow, 'errexit' flag has been set. > > &

Re: [PATCH net-next v5 2/4] samples: pktgen: fix proc_cmd command result check logic

2019-10-07 Thread Daniel T. Lee
md is designed to check command result with grep the > > "Result:", but this might fail since this string is only shown in > > 'pg_thread' and 'pg_set'. > > > > This commit fixes this logic by grep-ing the "Result:" string only when > >

Re: [PATCH net-next v5 4/4] samples: pktgen: allow to specify destination IP range (CIDR)

2019-10-07 Thread Jesper Dangaard Brouer
On Sat, 5 Oct 2019 17:25:09 +0900 "Daniel T. Lee" wrote: > Currently, kernel pktgen has the feature to specify destination > address range for sending packet. (e.g. pgset "dst_min/dst_max") > > But on samples, each pktgen script doesn't have any option t

Re: [PATCH net-next v5 3/4] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-10-07 Thread Jesper Dangaard Brouer
will be used in prior to set target address in samples/pktgen. > > Signed-off-by: Daniel T. Lee Acked-by: Jesper Dangaard Brouer > --- > Changes since v3: > * Set errexit option to stop script execution on error > > Changes since v4: > * Set errexit option mov

Re: [PATCH net-next v5 2/4] samples: pktgen: fix proc_cmd command result check logic

2019-10-07 Thread Jesper Dangaard Brouer
t fail since this string is only shown in > 'pg_thread' and 'pg_set'. > > This commit fixes this logic by grep-ing the "Result:" string only when > the command is not for 'pg_ctrl'. > > For clarity of an execution flow, 'errexit&

Re: [PATCH net-next v5 1/4] samples: pktgen: make variable consistent with option

2019-10-07 Thread Jesper Dangaard Brouer
On Sat, 5 Oct 2019 17:25:06 +0900 "Daniel T. Lee" wrote: > This commit changes variable names that can cause confusion. > > For example, variable DST_MIN is quite confusing since the > keyword 'udp_dst_min' and keyword 'dst_min' is used with pg_ctrl. > > On the following commit, 'dst_min' will

Re: [PATCH net-next v5 0/4] samples: pktgen: allow to specify destination IP range

2019-10-06 Thread David Miller
From: "Daniel T. Lee" Date: Sat, 5 Oct 2019 17:25:05 +0900 > Currently, pktgen script supports specify destination port range. > > To further extend the capabilities, this commit allows to specify destination > IP range with CIDR when running pktgen script. > > Spe

[PATCH net-next v5 2/4] samples: pktgen: fix proc_cmd command result check logic

2019-10-05 Thread Daniel T. Lee
#x27;. This commit fixes this logic by grep-ing the "Result:" string only when the command is not for 'pg_ctrl'. For clarity of an execution flow, 'errexit' flag has been set. To cleanup pktgen on exit, trap has been added for EXIT signal. Signed-off-by: Daniel T. Le

[PATCH net-next v5 1/4] samples: pktgen: make variable consistent with option

2019-10-05 Thread Daniel T. Lee
existing variable name DST_MIN should be changed. Variable names are matched to the exact keyword used with pg_ctrl. Signed-off-by: Daniel T. Lee --- .../pktgen_bench_xmit_mode_netif_receive.sh | 8 .../pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 8 samples/pk

[PATCH net-next v5 3/4] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-10-05 Thread Daniel T. Lee
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) Validating the address should be preceded prior to the parsing. Helpers will be used in prior to set target address in samples/pktgen. Signed-off-by: Daniel T. Lee

[PATCH net-next v5 4/4] samples: pktgen: allow to specify destination IP range (CIDR)

2019-10-05 Thread Daniel T. Lee
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max") But on samples, each pktgen script doesn't have any option to achieve this. This commit adds the feature to specify the destination address range wit

[PATCH net-next v5 0/4] samples: pktgen: allow to specify destination IP range

2019-10-05 Thread Daniel T. Lee
Currently, pktgen script supports specify destination port range. To further extend the capabilities, this commit allows to specify destination IP range with CIDR when running pktgen script. Specifying destination IP range will be useful on various situation such as testing RSS/RPS with

Re: [v4 2/4] samples: pktgen: fix proc_cmd command result check logic

2019-10-04 Thread Daniel T. Lee
> @@ -105,6 +109,8 @@ function pgset() { > > fi > > } > > > > +trap 'pg_ctrl "reset"' EXIT > > + > > This line is activated when I ctrl-C the scripts, but something weird > happens, it reports: > > ERROR: proc file:/proc/net

Re: [v4 1/4] samples: pktgen: make variable consistent with option

2019-10-04 Thread Toke Høiland-Jørgensen
"Daniel T. Lee" writes: > On Fri, Oct 4, 2019 at 9:52 PM Jesper Dangaard Brouer > wrote: > >> >> On Fri, 4 Oct 2019 10:32:58 +0900 "Daniel T. Lee" >> wrote: >> >> > [...] >> >> > Thanks for the review! > > >> A general comment, you forgot a cover letter for your patchset. >> >> > At first, I t

Re: [v4 1/4] samples: pktgen: make variable consistent with option

2019-10-04 Thread Daniel T. Lee
On Fri, Oct 4, 2019 at 10:41 PM Jesper Dangaard Brouer wrote: > > On Fri, 4 Oct 2019 22:28:26 +0900 > "Daniel T. Lee" wrote: > > > On Fri, Oct 4, 2019 at 9:52 PM Jesper Dangaard Brouer > > wrote: > > > > > > > > > On Fri, 4 Oct 2019 10:32:58 +0900 "Daniel T. Lee" > > > wrote: > > > > > > > [

Re: [v4 1/4] samples: pktgen: make variable consistent with option

2019-10-04 Thread Jesper Dangaard Brouer
On Fri, 4 Oct 2019 22:28:26 +0900 "Daniel T. Lee" wrote: > On Fri, Oct 4, 2019 at 9:52 PM Jesper Dangaard Brouer > wrote: > > > > > > On Fri, 4 Oct 2019 10:32:58 +0900 "Daniel T. Lee" > > wrote: > > > > > [...] > > > > Thanks for the review! > > > A general comment, you forgot a cove

Re: [v4 1/4] samples: pktgen: make variable consistent with option

2019-10-04 Thread Daniel T. Lee
On Fri, Oct 4, 2019 at 9:52 PM Jesper Dangaard Brouer wrote: > > > On Fri, 4 Oct 2019 10:32:58 +0900 "Daniel T. Lee" > wrote: > > > [...] > Thanks for the review! > A general comment, you forgot a cover letter for your patchset. > At first, I thought the size of the patchset (the feature to

Re: [v4 2/4] samples: pktgen: fix proc_cmd command result check logic

2019-10-04 Thread Jesper Dangaard Brouer
t fail since this string is only shown in > 'pg_thread' and 'pg_set'. > > This commit fixes this logic by grep-ing the "Result:" string only when > the command is not for 'pg_ctrl'. > > For clarity of an execution flow, 'errexit&

Re: [v4 1/4] samples: pktgen: make variable consistent with option

2019-10-04 Thread Jesper Dangaard Brouer
On Fri, 4 Oct 2019 10:32:58 +0900 "Daniel T. Lee" wrote: > This commit changes variable names that can cause confusion. > > For example, variable DST_MIN is quite confusing since the > keyword 'udp_dst_min' and keyword 'dst_min' is used with pg_ctrl. > > On the following commit, 'dst_min' will

Re: [v4 1/4] samples: pktgen: make variable consistent with option

2019-10-04 Thread Jesper Dangaard Brouer
On Fri, 4 Oct 2019 10:32:58 +0900 "Daniel T. Lee" wrote: > [...] A general comment, you forgot a cover letter for your patchset. And also forgot the "PATCH" part of subj. but patchwork still found it: https://patchwork.ozlabs.org/project/netdev/list/?series=134102&state=2a -- Best regard

[v4 2/4] samples: pktgen: fix proc_cmd command result check logic

2019-10-03 Thread Daniel T. Lee
his commit fixes this logic by grep-ing the "Result:" string only when the command is not for 'pg_ctrl'. For clarity of an execution flow, 'errexit' flag has been set. To cleanup pktgen on exit, trap has been added for EXIT signal. Signed-off-by: Daniel T. Lee ---

[v4 1/4] samples: pktgen: make variable consistent with option

2019-10-03 Thread Daniel T. Lee
existing variable name DST_MIN should be changed. Variable names are matched to the exact keyword used with pg_ctrl. Signed-off-by: Daniel T. Lee --- .../pktgen_bench_xmit_mode_netif_receive.sh | 8 .../pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 8 samples/pk

[v4 3/4] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-10-03 Thread Daniel T. Lee
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) Validating the address should be preceded prior to the parsing. Helpers will be used in prior to set target address in samples/pktgen. Signed-off-by: Daniel T. Lee

[v4 4/4] samples: pktgen: allow to specify destination IP range (CIDR)

2019-10-03 Thread Daniel T. Lee
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max") But on samples, each pktgen script doesn't have any option to achieve this. This commit adds the feature to specify the destination address range wit

Re: [v3 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-19 Thread Daniel T. Lee
x27; and 'pktgen_thread'. So I thought just changing to below diff will solve the problem. diff --git a/samples/pktgen/functions.sh b/samples/pktgen/functions.sh index 87ae61701904..38cf9f62502f 100644 --- a/samples/pktgen/functions.sh +++ b/samples/pktgen/functions.sh @@ -60,6 +60,7 @

Re: [v3 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-16 Thread Toke Høiland-Jørgensen
l be used in prior to set target address in samples/pktgen. >> >> Signed-off-by: Daniel T. Lee >> --- >> Changes since v3: >> * Set errexit option to stop script execution on error >> >> samples/pktgen/functions.sh | 124 ++++

Re: [v3 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-15 Thread Jesper Dangaard Brouer
On Sun, 15 Sep 2019 00:13:52 +0900 "Daniel T. Lee" wrote: > This commit adds CIDR parsing and IP validate helper function to parse > single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) > > Helpers will be used in prior to set target address in samples/pktgen. >

[v3 3/3] samples: pktgen: allow to specify destination IP range (CIDR)

2019-09-14 Thread Daniel T. Lee
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max") But on samples, each of the scripts doesn't have any option to achieve this. This commit adds the feature to specify the destination address range wit

[v3 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-14 Thread Daniel T. Lee
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) Helpers will be used in prior to set target address in samples/pktgen. Signed-off-by: Daniel T. Lee --- Changes since v3: * Set errexit option to stop script

[v3 1/3] samples: pktgen: make variable consistent with option

2019-09-14 Thread Daniel T. Lee
existing variable name DST_MIN should be changed. Variable names are matched to the exact keyword used with pg_ctrl. Signed-off-by: Daniel T. Lee --- .../pktgen_bench_xmit_mode_netif_receive.sh | 8 .../pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 8 samples/pk

Re: [v2 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-14 Thread Daniel T. Lee
5) > > > > Helpers will be used in prior to set target address in samples/pktgen. > > > > Signed-off-by: Daniel T. Lee > > --- > > samples/pktgen/functions.sh | 122 ++++ > > 1 file changed, 122 insertions(+) > > &g

Re: [v2 3/3] samples: pktgen: allow to specify destination IP range (CIDR)

2019-09-14 Thread Daniel T. Lee
On Fri, Sep 13, 2019 at 9:37 PM Toke Høiland-Jørgensen wrote: > > Jesper Dangaard Brouer writes: > > > On Thu, 12 Sep 2019 03:48:07 +0900 > > "Daniel T. Lee" wrote: > > > >> diff --git a/samples/pktgen/pktgen_sample01_simple.sh > >>

Re: [v2 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-13 Thread Jesper Dangaard Brouer
On Thu, 12 Sep 2019 03:48:06 +0900 "Daniel T. Lee" wrote: > This commit adds CIDR parsing and IP validate helper function to parse > single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) > > Helpers will be used in prior to set target address in samples/pktgen. >

Re: [v2 3/3] samples: pktgen: allow to specify destination IP range (CIDR)

2019-09-13 Thread Toke Høiland-Jørgensen
Jesper Dangaard Brouer writes: > On Thu, 12 Sep 2019 03:48:07 +0900 > "Daniel T. Lee" wrote: > >> diff --git a/samples/pktgen/pktgen_sample01_simple.sh >> b/samples/pktgen/pktgen_sample01_simple.sh >> index 063ec0998906..08995fa70025 100755 >> ---

Re: [v2 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-13 Thread Jesper Dangaard Brouer
On Fri, 13 Sep 2019 02:53:26 +0900 "Daniel T. Lee" wrote: > On Fri, Sep 13, 2019 at 12:59 AM Jesper Dangaard Brouer > wrote: > > > > On Thu, 12 Sep 2019 03:48:06 +0900 > > "Daniel T. Lee" wrote: > > > > > This commit adds CIDR parsing and IP validate helper function to parse > > > single IP

Re: [v2 3/3] samples: pktgen: allow to specify destination IP range (CIDR)

2019-09-13 Thread Jesper Dangaard Brouer
On Thu, 12 Sep 2019 03:48:07 +0900 "Daniel T. Lee" wrote: > diff --git a/samples/pktgen/pktgen_sample01_simple.sh > b/samples/pktgen/pktgen_sample01_simple.sh > index 063ec0998906..08995fa70025 100755 > --- a/samples/pktgen/pktgen_sample01_simple.sh

Re: [v2 1/3] samples: pktgen: make variable consistent with option

2019-09-13 Thread Jesper Dangaard Brouer
On Thu, 12 Sep 2019 03:48:05 +0900 "Daniel T. Lee" wrote: > This commit changes variable names that can cause confusion. > > For example, variable DST_MIN is quite confusing since the > keyword 'udp_dst_min' and keyword 'dst_min' is used with pg_ctrl. > > On the following commit, 'dst_min' will

Re: [v2 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-12 Thread Daniel T. Lee
On Fri, Sep 13, 2019 at 12:59 AM Jesper Dangaard Brouer wrote: > > On Thu, 12 Sep 2019 03:48:06 +0900 > "Daniel T. Lee" wrote: > > > This commit adds CIDR parsing and IP validate helper function to parse > > single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) > > One question: You do know th

Re: [v2 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-12 Thread Jesper Dangaard Brouer
On Thu, 12 Sep 2019 03:48:06 +0900 "Daniel T. Lee" wrote: > This commit adds CIDR parsing and IP validate helper function to parse > single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) One question: You do know that this expansion of the CIDR will also include the CIDR network broadcast IP

[v2 1/3] samples: pktgen: make variable consistent with option

2019-09-11 Thread Daniel T. Lee
existing variable name DST_MIN should be changed. Variable names are matched to the exact keyword used with pg_ctrl. Signed-off-by: Daniel T. Lee --- .../pktgen_bench_xmit_mode_netif_receive.sh | 8 .../pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 8 samples/pk

[v2 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-09-11 Thread Daniel T. Lee
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) Helpers will be used in prior to set target address in samples/pktgen. Signed-off-by: Daniel T. Lee --- samples/pktgen/functions.sh | 122

[v2 3/3] samples: pktgen: allow to specify destination IP range (CIDR)

2019-09-11 Thread Daniel T. Lee
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max") But on samples, each of the scripts doesn't have any option to achieve this. This commit adds the feature to specify the destination address range wit

Re: [PATCH 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-08-30 Thread Daniel T. Lee
5) > > > > Helpers will be used in prior to set target address in samples/pktgen. > > > > Signed-off-by: Daniel T. Lee > > --- > > samples/pktgen/functions.sh | 134 ++++ > > 1 file changed, 134 insertions(+) > > &g

Re: [PATCH 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-08-30 Thread Jesper Dangaard Brouer
On Thu, 29 Aug 2019 05:42:42 +0900 "Daniel T. Lee" wrote: > This commit adds CIDR parsing and IP validate helper function to parse > single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) > > Helpers will be used in prior to set target address in samples/pktgen. >

Re: [PATCH 1/3] samples: pktgen: make variable consistent with option

2019-08-30 Thread Jesper Dangaard Brouer
On Thu, 29 Aug 2019 05:42:41 +0900 "Daniel T. Lee" wrote: > This commit changes variable names that can cause confusion. > > For example, variable DST_MIN is quite confusing since the > keyword 'udp_dst_min' and keyword 'dst_min' is used with pg_ctrl. > > On the following commit, 'dst_min' will

[PATCH 3/3] samples: pktgen: allow to specify destination IP range (CIDR)

2019-08-28 Thread Daniel T. Lee
Currently, kernel pktgen has the feature to specify destination address range for sending packet. (e.g. pgset "dst_min/dst_max") But on samples, each of them doesn't have any option to achieve this. The commit adds feature to specify destination address range with CIDR.

[PATCH 1/3] samples: pktgen: make variable consistent with option

2019-08-28 Thread Daniel T. Lee
existing variable name DST_MIN should be changed. Variable names are matched to the exact keyword used with pg_ctrl. Signed-off-by: Daniel T. Lee --- .../pktgen_bench_xmit_mode_netif_receive.sh | 8 .../pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 8 samples/pk

[PATCH 2/3] samples: pktgen: add helper functions for IP(v4/v6) CIDR parsing

2019-08-28 Thread Daniel T. Lee
This commit adds CIDR parsing and IP validate helper function to parse single IP or range of IP with CIDR. (e.g. 198.18.0.0/15) Helpers will be used in prior to set target address in samples/pktgen. Signed-off-by: Daniel T. Lee --- samples/pktgen/functions.sh | 134

Re: [PATCH 2/2] samples: pktgen: allow to specify destination port

2019-07-01 Thread Daniel T. Lee
9 22:33:58 +0900 > "Daniel T. Lee" wrote: > > > Currently, kernel pktgen has the feature to specify udp destination port > > for sending packet. (e.g. pgset "udp_dst_min 9") > > > > But on samples, each of the scripts doesn't have any option to ac

Re: [PATCH 1/2] samples: pktgen: add some helper functions for port parsing

2019-07-01 Thread David Miller
From: "Daniel T. Lee" Date: Sat, 29 Jun 2019 22:33:57 +0900 > This commit adds port parsing and port validate helper function to parse > single or range of port(s) from a given string. (e.g. 1234, 443-444) > > Helpers will be used in prior to set target port(s) in sampl

Re: [PATCH 2/2] samples: pktgen: allow to specify destination port

2019-07-01 Thread David Miller
From: "Daniel T. Lee" Date: Sat, 29 Jun 2019 22:33:58 +0900 > Currently, kernel pktgen has the feature to specify udp destination port > for sending packet. (e.g. pgset "udp_dst_min 9") > > But on samples, each of the scripts doesn't have any option to ac

Re: [PATCH 2/2] samples: pktgen: allow to specify destination port

2019-07-01 Thread Jesper Dangaard Brouer
On Sat, 29 Jun 2019 22:33:58 +0900 "Daniel T. Lee" wrote: > Currently, kernel pktgen has the feature to specify udp destination port > for sending packet. (e.g. pgset "udp_dst_min 9") > > But on samples, each of the scripts doesn't have any option to ac

Re: [PATCH 1/2] samples: pktgen: add some helper functions for port parsing

2019-07-01 Thread Jesper Dangaard Brouer
On Sat, 29 Jun 2019 22:33:57 +0900 "Daniel T. Lee" wrote: > This commit adds port parsing and port validate helper function to parse > single or range of port(s) from a given string. (e.g. 1234, 443-444) > > Helpers will be used in prior to set target port(s) in samples/p

[PATCH 1/2] samples: pktgen: add some helper functions for port parsing

2019-06-29 Thread Daniel T. Lee
This commit adds port parsing and port validate helper function to parse single or range of port(s) from a given string. (e.g. 1234, 443-444) Helpers will be used in prior to set target port(s) in samples/pktgen. Signed-off-by: Daniel T. Lee --- samples/pktgen/functions.sh | 34

[PATCH 2/2] samples: pktgen: allow to specify destination port

2019-06-29 Thread Daniel T. Lee
Currently, kernel pktgen has the feature to specify udp destination port for sending packet. (e.g. pgset "udp_dst_min 9") But on samples, each of the scripts doesn't have any option to achieve this. This commit adds the DST_PORT option to specify the target port(s) in the

Re: [PATCH net v2] pktgen: do not sleep with the thread lock held.

2019-06-06 Thread David Miller
From: Paolo Abeni Date: Thu, 6 Jun 2019 15:45:03 +0200 > Currently, the process issuing a "start" command on the pktgen procfs > interface, acquires the pktgen thread lock and never release it, until > all pktgen threads are completed. The above can blocks indefinitely

[PATCH net v2] pktgen: do not sleep with the thread lock held.

2019-06-06 Thread Paolo Abeni
Currently, the process issuing a "start" command on the pktgen procfs interface, acquires the pktgen thread lock and never release it, until all pktgen threads are completed. The above can blocks indefinitely any other pktgen command and any (even unrelated) netdevice removal - as

Re: [PATCH net] pktgen: do not sleep with the thread lock held.

2019-06-06 Thread Paolo Abeni
_for_each_entry(tmp, &pn->pktgen_threads, th_list) > > + if (tmp == t) > > + return true; > > + return false; > > +} > > Pointer equality is not object equality. Indeed. The trick is that pktgen threads are allocated only at net creation time.

Re: [PATCH net] pktgen: do not sleep with the thread lock held.

2019-06-05 Thread David Miller
struct pktgen_net *pn, struct pktgen_thread > *t) > +{ > + struct pktgen_thread *tmp; > + > + list_for_each_entry(tmp, &pn->pktgen_threads, th_list) > + if (tmp == t) > + return true; > + return false; > +} Pointer equali

[PATCH net] pktgen: do not sleep with the thread lock held.

2019-06-05 Thread Paolo Abeni
Currently, the process issuing a "start" command on the pktgen procfs interface, acquires the pktgen thread lock and never release it, until all pktgen threads are completed. The above can blocks indefinitely any other pktgen command and any (even unrelated) netdevice removal - as

Re: [PATCH net-next] pktgen: Fix fall-through annotation

2018-09-13 Thread David Miller
From: "Gustavo A. R. Silva" Date: Thu, 13 Sep 2018 14:03:20 -0500 > Replace "fallthru" with a proper "fall through" annotation. > > This fix is part of the ongoing efforts to enabling > -Wimplicit-fallthrough > > Signed-off-by: Gustavo A. R. Silva Applied.

Re: [PATCH net-next] pktgen: convert safe uses of strncpy() to strcpy() to avoid string truncation warning

2018-07-18 Thread David Miller
From: Jakub Kicinski Date: Tue, 17 Jul 2018 14:32:24 -0700 > GCC 8 complains: > > net/core/pktgen.c: In function ‘pktgen_if_write’: > net/core/pktgen.c:1419:4: warning: ‘strncpy’ output may be truncated copying > between 0 and 31 bytes from a string of length 127 [-Wstringop-truncation] > s

[PATCH net-next] pktgen: convert safe uses of strncpy() to strcpy() to avoid string truncation warning

2018-07-17 Thread Jakub Kicinski
GCC 8 complains: net/core/pktgen.c: In function ‘pktgen_if_write’: net/core/pktgen.c:1419:4: warning: ‘strncpy’ output may be truncated copying between 0 and 31 bytes from a string of length 127 [-Wstringop-truncation] strncpy(pkt_dev->src_max, buf, len); ^

Re: [PATCH] pktgen: Fix memory leak in pktgen_if_write

2018-03-14 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 14 Mar 2018 03:07:27 -0500 > _buf_ is an array and the one that must be freed is _tp_ instead. > > Fixes: a870a02cc963 ("pktgen: use dynamic allocation for debug print buffer") > Reported-by: Wang Jian > Signed-of

Re: [PATCH] pktgen: Fix memory leak in pktgen_if_write

2018-03-14 Thread Arnd Bergmann
On Wed, Mar 14, 2018 at 9:07 AM, Gustavo A. R. Silva wrote: > _buf_ is an array and the one that must be freed is _tp_ instead. > > Fixes: a870a02cc963 ("pktgen: use dynamic allocation for debug print buffer") > Reported-by: Wang Jian > Signed-off-by: Gustavo A.

Re: [PATCH] pktgen: use dynamic allocation for debug print buffer

2018-03-14 Thread Gustavo A. R. Silva
ed. Fixes: 35951393bbff ("pktgen: Remove VLA usage") Signed-off-by: Arnd Bergmann Applied, thanks.

[PATCH] pktgen: Fix memory leak in pktgen_if_write

2018-03-14 Thread Gustavo A. R. Silva
_buf_ is an array and the one that must be freed is _tp_ instead. Fixes: a870a02cc963 ("pktgen: use dynamic allocation for debug print buffer") Reported-by: Wang Jian Signed-off-by: Gustavo A. R. Silva --- net/core/pktgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

  1   2   3   4   5   >