From: Peter Seiderer Date: Wed, 19 Feb 2025 08:45:22 +0000 (+0100) Subject: net: pktgen: enable 'param=value' parsing X-Git-Tag: v6.15-rc1~160^2~261^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=80604d19b5fc3bc309039670445c73ee418d7a01;p=thirdparty%2Fkernel%2Flinux.git net: pktgen: enable 'param=value' parsing 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 Reviewed-by: Simon Horman Link: https://patch.msgid.link/20250219084527.20488-3-ps.report@gmx.net Signed-off-by: Jakub Kicinski --- diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 496aa16773e78..4f8ec6c9bed4a 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;