Hello T.J.,
On Tue, 8 Apr 2025 23:02:02 +, "T.J. Mercier" wrote:
> pid_max.c: In function ‘pid_max_cb’:
> pid_max.c:42:15: error: implicit declaration of function ‘mount’
>[-Wimplicit-function-declaration]
>42 | ret = mount("", "/", NULL,
he current indirect (but correct)
error handling.
Reported-by: Dan Carpenter
Closes:
https://lore.kernel.org/netdev/36cf3ee2-38b1-47e5-a42a-363efeb0ace3@stanley.mountain/
Signed-off-by: Peter Seiderer
---
net/core/pktgen.c | 8
1 file changed, 8 insertions(+)
diff --git a/net/core/pktgen.c
Add more imix_weights test cases (for incomplete input).
Signed-off-by: Peter Seiderer
---
tools/testing/selftests/net/proc_net_pktgen.c | 44 +++
1 file changed, 44 insertions(+)
diff --git a/tools/testing/selftests/net/proc_net_pktgen.c
b/tools/testing/selftests/net
Hello Siddharth,
On Mon, 3 Mar 2025 02:22:44 +0530, Siddharth Menon wrote:
> Fix compilation errors caused by missing headers in the pidfd selftest.
>
> The errors include:
> pidfd_fdinfo_test.c:230:13: error: implicit declaration of function ‘mount’
> pidfd_setns_test.c:172:54: error: implici
00f0e,0f0f"
> /proc/net/pktgen/lo\@0
-bash: echo: write error: Argument list too long
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v7 -> v8
- rebased on actual net-next/main
- slightly rephrase commit message, omit '/16' (suggested by Paol
Remove some superfluous variable initializing before hex32_arg call (as the
same init is done here already).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v7 -> v8
- rebased on actual net-next/main
- no changes
Changes v6 -> v7
- rebased on actual net-nex
Fix mix of int/long (and multiple conversion from/to) by using consequently
size_t for i and max and ssize_t for len and adjust function signatures
of hex32_arg(), count_trail_chars(), num_arg() and strn_len() accordingly.
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v7
/proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK: mpls=
$ echo "mpls 0001,0002" > /proc/net/pktgen/lo\@0
$ echo "mpls invalid" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK: m
Add some test for /proc/net/pktgen/... interface.
- enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v7 -> v8
- rebased on actual net-next/main
- fix c99 comments (suggested by Paolo Abeni)
nski)
- fix some checkpatch warnings (Missing a blank line after declarations)
- shrink line length by re-naming some variables (command -> cmd,
device -> dev)
- add 'rate 0' testcase
- add 'ratep 0' testcase
[1]
https://lore.kernel.org/netdev/2024100
Remove extra tmp variable in pktgen_if_write (re-use len instead).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v7 -> v8
- rebased on actual net-next/main
- no changes
Changes v6 -> v7
- rebased on actual net-next/main
- no changes
Changes v5 ->
Remove all superfluous index ('i += len') assignements (value not used
afterwards).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v7 -> v8
- rebased on actual net-next/main
- no changes
Changes v6 -> v7
- rebased on actual net-next/main
- no cha
Honour the user given buffer size for the hex32_arg(), num_arg(),
strn_len(), get_imix_entries() and get_labels() calls (otherwise they will
access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v7 -> v8
- rebased on actual
Hello Paolo,
On Thu, 27 Feb 2025 11:24:48 +0100, Paolo Abeni wrote:
> On 2/24/25 10:22 AM, Peter Seiderer wrote:
> > Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS/16 entries
> > (instead of up to MAX_MPLS_LABELS - 1).
>
> Very minor nit...
>
> The above
On Thu, 27 Feb 2025 11:19:33 +0100, Paolo Abeni wrote:
> On 2/24/25 10:22 AM, Peter Seiderer wrote:
> > diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> > index ae5e81e62733..bb13a4591709 100644
> > --- a/net/core/pktgen.c
> > +++ b/net/core/pktgen.c
> > @@
Hello *,
On Mon, 24 Feb 2025 10:22:35 +0100, Peter Seiderer wrote:
> Fix mix of int/long (and multiple conversion from/to) by using consequently
> size_t for i and max and ssize_t for len and adjust function signatures
> of hex32_arg(), count_trail_chars(), num_arg() and strn_len() ac
Remove some superfluous variable initializing before hex32_arg call (as the
same init is done here already).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v6 -> v7
- rebased on actual net-next/main
- no changes
Changes v5 -> v6
- adjust to dropped patch
Add some test for /proc/net/pktgen/... interface.
- enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config
Signed-off-by: Peter Seiderer
---
Changes v6 -> v7
- rebased on actual net-next/main
- fixed conflict in tools/testing/selftests/net/config
Changes v5 -> v
Fix mix of int/long (and multiple conversion from/to) by using consequently
size_t for i and max and ssize_t for len and adjust function signatures
of hex32_arg(), count_trail_chars(), num_arg() and strn_len() accordingly.
Signed-off-by: Peter Seiderer
---
Changes v6 -> v7
- rebased on act
Honour the user given buffer size for the hex32_arg(), num_arg(),
strn_len(), get_imix_entries() and get_labels() calls (otherwise they will
access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v6 -> v7
- rebased on actual
- shrink line length by re-naming some variables (command -> cmd,
device -> dev)
- add 'rate 0' testcase
- add 'ratep 0' testcase
[1]
https://lore.kernel.org/netdev/20241006221221.3744995-1-artem.chernys...@red-soft.ru/
[2] https://lore.kernel.org/netdev/20250
Remove extra tmp variable in pktgen_if_write (re-use len instead).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v6 -> v7
- rebased on actual net-next/main
- no changes
Changes v5 -> v6
- no changes
Changes v4 -> v5
- split up patchset into part i/ii (
00f0e,0f0f"
> /proc/net/pktgen/lo\@0
-bash: echo: write error: Argument list too long
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v6 -> v7
- rebased on actual net-next/main
- no changes
Changes v5 -> v6
- adjust to dropped patch ''net
/proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK: mpls=
$ echo "mpls 0001,0002" > /proc/net/pktgen/lo\@0
$ echo "mpls invalid" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result:
Remove all superfluous index ('i += len') assignements (value not used
afterwards).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v6 -> v7
- rebased on actual net-next/main
- no changes
Changes v5 -> v6
- add rev-by Simon Horman
Changes v4 -&g
obe pktgen to FIXTURE_SETUP() (suggested by Jakub Kicinski)
- fix some checkpatch warnings (Missing a blank line after declarations)
- shrink line length by re-naming some variables (command -> cmd,
device -> dev)
- add 'rate 0' testcase
- add 'ratep 0
/proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK: mpls=
$ echo "mpls 0001,0002" > /proc/net/pktgen/lo\@0
$ echo "mpls invalid" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK:
Add some test for /proc/net/pktgen/... interface.
- enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config
Signed-off-by: Peter Seiderer
---
Changes v5 -> v6
- no changes
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
- addapt
Fix mix of int/long (and multiple conversion from/to) by using consequently
size_t for i and max and ssize_t for len and adjust function signatures
of hex32_arg(), count_trail_chars(), num_arg() and strn_len() accordingly.
Signed-off-by: Peter Seiderer
---
Changes v5 -> v6
- adjust to drop
Honour the user given buffer size for the hex32_arg(), num_arg(),
strn_len(), get_imix_entries() and get_labels() calls (otherwise they will
access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- adjust to dropped pa
Remove all superfluous index ('i += len') assignements (value not used
afterwards).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- add rev-by Simon Horman
Changes v4 -> v5
- new patch (suggested by Simon Horman)
---
net/co
Remove some superfluous variable initializing before hex32_arg call (as the
same init is done here already).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- adjust to dropped patch ''net: pktgen: use defines for the various
dec/hex number p
00f0e,0f0f"
> /proc/net/pktgen/lo\@0
-bash: echo: write error: Argument list too long
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- adjust to dropped patch ''net: pktgen: use defines for the various
dec/hex number parsing digi
Remove extra tmp variable in pktgen_if_write (re-use len instead).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- no changes
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
- add rev-by Simon Horman
Changes v3 -> v
On Tue, 18 Feb 2025 17:26:19 -0700, Shuah Khan
wrote:
> On 2/12/25 17:24, Alessandro Zanni wrote:
> >> Running "make kselftest" results in several errors like these:
> >>
> >> pidfd_fdinfo_test.c:231:36: error: ‘MS_REC’ undeclared (first use in
> >> this function)
> >>231 | r = mount
ith patch applied
$ echo -n "reset" > /proc/net/pktgen/pgctrl
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- no changes
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
Changes v3 -> v4
- add rev-by
Result: OK: mpls=1230
- with patch applied
$ echo "mpls 123" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
mpls: 0123
Result: OK: mpls=0123
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Chang
Honour the user given buffer size for the strn_len() calls (otherwise
strn_len() will access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- no changes
Changes v4 -> v5
- split up patchset into part i/ii (sugges
Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
and e.g.
$ echo "clone_skb 1" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Unknown error 524
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
applied
$ echo "rate 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- no changes
Changes
after declarations)
- shrink line length by re-naming some variables (command -> cmd,
device -> dev)
- add 'rate 0' testcase
- add 'ratep 0' testcase
[1]
https://lore.kernel.org/netdev/20241006221221.3744995-1-artem.chernys...@red-soft.ru/
[2] https://lore
applied
$ echo "ratep 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v5 -> v6
- no change
> /proc/net/pktgen/lo\@0
$ echo "min_pkt_size=999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size =999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size= 999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size = 999" > /proc/net/pktge
> On Thu, 13 Feb 2025 12:00:25 +0100 Peter Seiderer wrote:
> > > > > Use defines for the various dec/hex number parsing digits lengths
> > > > > (hex32_arg/num_arg calls).
> > > >
> > > > I don't understand the v
00f0e,0f0f"
> /proc/net/pktgen/lo\@0
-bash: echo: write error: Argument list too long
Signed-off-by: Peter Seiderer
---
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
- change patch description ('Fixes:' -> 'Addresses the f
Remove all superfluous index ('i += len') assignements (value not used
afterwards).
Signed-off-by: Peter Seiderer
---
Changes v4 -> v5
- new patch (suggested by Simon Horman)
---
net/core/pktgen.c | 52 ++-
1 file changed, 6 inse
Add some test for /proc/net/pktgen/... interface.
- enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config
Signed-off-by: Peter Seiderer
---
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
- addapt to dropped patch 'net: pktgen:
Honour the user given buffer size for the hex32_arg(), num_arg(),
strn_len(), get_imix_entries() and get_labels() calls (otherwise they will
access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -> v5
- split up patchset i
Fix mix of int/long (and multiple conversion from/to) by using consequently
size_t for i and max and ssize_t for len and adjust function signatures
of hex32_arg(), count_trail_chars(), num_arg() and strn_len() accordingly.
Signed-off-by: Peter Seiderer
---
Changes v4 -> v5
- split up patch
Remove some superfluous variable initializing before hex32_arg call (as the
same init is done here already).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
- add rev-by Simon Horman
Changes
/proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK: mpls=
$ echo "mpls 0001,0002" > /proc/net/pktgen/lo\@0
$ echo "mpls invalid" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result:
Remove extra tmp variable in pktgen_if_write (re-use len instead).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
- add rev-by Simon Horman
Changes v3 -> v4
- new patch (factored out of
(Missing a blank line after declarations)
- shrink line length by re-naming some variables (command -> cmd,
device -> dev)
- add 'rate 0' testcase
- add 'ratep 0' testcase
[1]
https://lore.kernel.org/netdev/20241006221221.3744995-1-artem.chernys...@red-soft.ru/
ith patch applied
$ echo -n "reset" > /proc/net/pktgen/pgctrl
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
Changes v3 -> v4
- add rev-by Simon Horman
Changes
mand -> cmd,
device -> dev)
- add 'rate 0' testcase
- add 'ratep 0' testcase
[1]
https://lore.kernel.org/netdev/20241006221221.3744995-1-artem.chernys...@red-soft.ru/
[2] https://lore.kernel.org/netdev/20250109083039.14004-1-pchel...@ispras.ru/
[3]
https://git.
applied
$ echo "ratep 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -> v5
- split u
Result: OK: mpls=1230
- with patch applied
$ echo "mpls 123" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
mpls: 0123
Result: OK: mpls=0123
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -
Honour the user given buffer size for the strn_len() calls (otherwise
strn_len() will access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
Changes v3 -&
applied
$ echo "rate 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -> v5
- split up patchset i
Use defines for the various dec/hex number parsing digits lengths
(hex32_arg/num_arg calls).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v4 -> v5
- split up patchset into part i/ii (suggested by Simon Horman)
- add rev-by Simon Horman
Changes v3 -> v4
- new
> /proc/net/pktgen/lo\@0
$ echo "min_pkt_size=999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size =999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size= 999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size = 999" > /proc/net/pktg
Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
and e.g.
$ echo "clone_skb 1" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Unknown error 524
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
Hello Simon,
On Thu, 6 Feb 2025 13:51:54 +, Simon Horman wrote:
> On Wed, Feb 05, 2025 at 02:11:36PM +0100, Peter Seiderer wrote:
> > hile taking a look at '[PATCH net] pktgen: Avoid out-of-range in
> > get_imix_entries' ([1]) and '[PATCH net v2] pktgen: A
Hello Simon,
On Thu, 6 Feb 2025 13:25:38 +, Simon Horman wrote:
> On Wed, Feb 05, 2025 at 02:11:45PM +0100, Peter Seiderer wrote:
> > Align some variable declarations (in get_imix_entries and get_labels) to
> > the most common pattern (int instead of ssize_t/long) and
Honour the user given buffer size for the hex32_arg(), num_arg(),
strn_len(), get_imix_entries() and get_labels() calls (otherwise they will
access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4:
- replace C99 comment (suggested by Paolo Ab
/proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK: mpls=
$ echo "mpls 0001,0002" > /proc/net/pktgen/lo\@0
$ echo "mpls invalid" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK:
applied
$ echo "ratep 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v3 -> v4
- add rev-by
In hex32_arg() and num_arg() error out in case no characters are available
(maxlen = 0).
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4
- new patch (factored out of patch 'net: pktgen: fix access outside of user
given buffer in pktgen_if_write()')
---
net/core/pktgen.c
Align some variable declarations (in get_imix_entries and get_labels) to
the most common pattern (int instead of ssize_t/long) and adjust function
return value accordingly.
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4
- new patch (factored out of patch 'net: pktgen: fix access ou
Use defines for the various dec/hex number parsing digits lengths
(hex32_arg/num_arg calls).
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4
- new patch (suggested by Simon Horman)
---
net/core/pktgen.c | 80 ++-
1 file changed, 44 inserti
Honour the user given buffer size for the strn_len() calls (otherwise
strn_len() will access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v3 -> v4
- add rev-by Simon Horman
Changes v2 -> v3:
- no changes
Changes v1
Remove some superfluous variable initializing before hex32_arg call (as the
same init is done here already).
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4
- new patch (factored out of patch 'net: pktgen: fix access outside of user
given buffer in pktgen_if_write()')
Add some test for /proc/net/pktgen/... interface.
- enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4:
- no changes
Changes v2 -> v3:
- fix typo in change description ('v1 -> v1' and tyop)
In num_arg() error out in case no valid character is parsed.
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4
- new patch (factored out of patch 'net: pktgen: fix access outside of user
given buffer in pktgen_if_write()')
---
net/core/pktgen.c | 3 +++
1 file changed,
Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
and e.g.
$ echo "clone_skb 1" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Unknown error 524
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
gt; /proc/net/pktgen/lo\@0
-bash: echo: write error: Argument list too long
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4
- new patch (factored out of patch 'net: pktgen: fix access outside of user
given buffer in pktgen_if_write()')
---
net/core/pktgen.c | 6
Remove extra tmp variable in pktgen_if_write (re-use len instead).
Signed-off-by: Peter Seiderer
---
Changes v3 -> v4
- new patch (factored out of patch 'net: pktgen: fix access outside of user
given buffer in pktgen_if_write()')
---
net/core/pktgen.c | 9 -
1 fi
ith patch applied
$ echo -n "reset" > /proc/net/pktgen/pgctrl
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v3 -> v4
- add rev-by Simon Horman
Changes v2 -> v3:
- new patch
---
net/core/pktgen.c | 14 --
1 file changed, 8 insertio
> /proc/net/pktgen/lo\@0
$ echo "min_pkt_size=999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size =999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size= 999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size = 999" > /proc/net
Result: OK: mpls=1230
- with patch applied
$ echo "mpls 123" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
mpls: 0123
Result: OK: mpls=0123
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v3
applied
$ echo "rate 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer
Reviewed-by: Simon Horman
---
Changes v3 -> v4
- add rev-by
some checkpatch warnings (Missing a blank line after declarations)
- shrink line length by re-naming some variables (command -> cmd,
device -> dev)
- add 'rate 0' testcase
- add 'ratep 0' testcase
[1]
https://lore.kernel.org/netdev/20241006221221.3744995-1-artem.che
Hello Simon,
On Tue, 4 Feb 2025 10:52:51 +, Simon Horman wrote:
> On Mon, Feb 03, 2025 at 06:01:59PM +0100, Peter Seiderer wrote:
> > Honour the user given buffer size for the hex32_arg(), num_arg(),
> > strn_len(), get_imix_entries() and get_labels() calls (otherwise they
Hello Paolo,
On Tue, 4 Feb 2025 11:40:21 +0100, Paolo Abeni wrote:
> Hi,
>
> On 2/3/25 6:01 PM, Peter Seiderer wrote:
> > @@ -806,6 +812,9 @@ static long num_arg(const char __user *user_buffer,
> > unsigned long maxlen,
> >
Hello Paolo,
On Tue, 4 Feb 2025 11:55:57 +0100, Paolo Abeni wrote:
> On 2/3/25 6:01 PM, Peter Seiderer wrote:
> > Enable additional to 'parm value' the 'param=value' parsing
>
> It could be language bias on my side, by I find the above statement hard
>
Hello *,
On Wed, 5 Feb 2025 13:50:31 +0800, I Hsin Cheng
wrote:
> In the compilation of pidfs_setns_test.c , a warning as the following
> will pop out.
>
> pidfd_setns_test.c: In function ‘current_nsset_setup’:
> pidfd_setns_test.c:173:54: warning: implicit declaration of function \
> ‘ioctl’
Hello *,
On Wed, 5 Feb 2025 13:39:26 +0800, I Hsin Cheng
wrote:
> When compiling selftests files under tools/testing/selftests/pidfd/ ,
> some compiling errors and warnings will pop out as the following.
>
> CC pidfd_fdinfo_test
> pidfd_fdinfo_test.c: In function ‘child_fdinfo_nspid_t
Hello *,
On Thu, 30 Jan 2025 20:40:27 +, Lorenzo Stoakes
wrote:
> The pidfd_fdinfo_test.c and pidfd_setns_test.c tests appear to be missing
> fundamental system header imports required to execute correctly. Add these.
>
> Signed-off-by: Lorenzo Stoakes
> ---
> tools/testing/selftests/pidf
Honour the user given buffer size for the strn_len() calls (otherwise
strn_len() will access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
---
Changes v2 -> v3:
- no changes
Changes v1 -> v2:
- no changes
---
net/core/pktgen.c | 7 ---
1 file chan
ith patch applied
$ echo -n "reset" > /proc/net/pktgen/pgctrl
Signed-off-by: Peter Seiderer
---
Changes v2 -> v3:
- new patch
---
net/core/pktgen.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
in
.
Signed-off-by: Peter Seiderer
---
Changes v2 -> v3:
- no changes
Changes v1 -> v2:
- additional fix get_imix_entries() and get_labels()
---
net/core/pktgen.c | 211 ++
1 file changed, 139 insertions(+), 72 deletions(-)
diff --git a/net/core/pktg
applied
$ echo "rate 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer
---
Changes v2 -> v3:
- no changes
Changes v1 -> v2:
- new
/proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK: mpls=
$ echo "mpls 0001,0002" > /proc/net/pktgen/lo\@0
$ echo "mpls invalid" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
Result: OK
Result: OK: mpls=1230
- with patch applied
$ echo "mpls 123" > /proc/net/pktgen/lo\@0
$ grep mpls /proc/net/pktgen/lo\@0
mpls: 0123
Result: OK: mpls=0123
Signed-off-by: Peter Seiderer
---
Changes v1 -> v2:
- no changes
Ch
Add some test for /proc/net/pktgen/... interface.
- enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config
Signed-off-by: Peter Seiderer
---
Changes v2 -> v3:
- fix typo in change description ('v1 -> v1' and tyop)
- rename some vars to better matc
applied
$ echo "ratep 0" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Invalid argument
$ grep "Result:" /proc/net/pktgen/lo\@0
Result: Idle
Signed-off-by: Peter Seiderer
---
Changes v2 -> v3:
- no changes
Changes v1 -> v2:
-
add 'rate 0' testcase
- add 'ratep 0' testcase
[1]
https://lore.kernel.org/netdev/20241006221221.3744995-1-artem.chernys...@red-soft.ru/
[2] https://lore.kernel.org/netdev/20250109083039.14004-1-pchel...@ispras.ru/
[3]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi
/pktgen/lo\@0
$ echo "min_pkt_size =999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size= 999" > /proc/net/pktgen/lo\@0
$ echo "min_pkt_size = 999" > /proc/net/pktgen/lo\@0
Signed-off-by: Peter Seiderer
---
Changes v2 -> v3:
- no c
Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
and e.g.
$ echo "clone_skb 1" > /proc/net/pktgen/lo\@0
-bash: echo: write error: Unknown error 524
Signed-off-by: Peter Seiderer
---
Changes v2 -> v
Honour the user given buffer size for the strn_len() calls (otherwise
strn_len() will access memory outside of the user given buffer).
Signed-off-by: Peter Seiderer
---
Changes v1 -> v2:
- no changes
---
net/core/pktgen.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
d
1 - 100 of 140 matches
Mail list logo