Re: [PATCH net-next v3 04/10] net: pktgen: fix 'rate 0' error handling (return -EINVAL)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 03, 2025 at 06:01:55PM +0100, Peter Seiderer wrote:
> Given an invalid 'rate' command e.g. 'rate 0' the return value is '1',
> leading to the following misleading output:
> 
> - the good case
> 
> 	$ echo "rate 100" > /proc/net/pktgen/lo\@0
> 	$ grep "Result:" /proc/net/pktgen/lo\@0
> 	Result: OK: rate=100
> 
> - the bad case (before the patch)
> 
> 	$ echo "rate 0" > /proc/net/pktgen/lo\@0"
> 	-bash: echo: write error: Invalid argument
> 	$ grep "Result:" /proc/net/pktgen/lo\@0
> 	Result: No such parameter "ate"
> 
> - with patch 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 <ps.report@xxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux