diff mbox series

[net-next,v6,2/7] net: pktgen: enable 'param=value' parsing

Message ID 20250219084527.20488-3-ps.report@gmx.net
State New
Headers show
Series [net-next,v6,1/7] net: pktgen: replace ENOTSUPP with EOPNOTSUPP | expand

Commit Message

Peter Seiderer Feb. 19, 2025, 8:45 a.m. UTC
Enable more flexible parameters syntax, allowing 'param=value' in
addition to the already supported 'param value' pattern (additional
this gives the skipping '=' in count_trail_chars() a purpose).

Tested with:

	$ 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/pktgen/lo\@0
	$ echo "min_pkt_size = 999" > /proc/net/pktgen/lo\@0

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Simon Horman <horms@kernel.org>
---
Changes v5 -> v6
  - add rev-by Simon Horman

Changes v4 -> v5
  - split up patchset into part i/ii (suggested by Simon Horman)

Changes v3 -> v4:
  - rephrase commit message (suggested by Paolo Abeni)

Changes v2 -> v3:
  - no changes

Changes v1 -> v2:
  - no changes
---
 net/core/pktgen.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 496aa16773e7..4f8ec6c9bed4 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -823,6 +823,7 @@  static int strn_len(const char __user * user_buffer, unsigned int maxlen)
 		case '\r':
 		case '\t':
 		case ' ':
+		case '=':
 			goto done_str;
 		default:
 			break;