Re: [lng-odp] [PATCH] test: performance: set a packet rate pass threshold for l2fwd

2015-12-10 Thread Stuart Haslam
ping

odp_generator appears to be broken on master, this would've caught it.

Stuart.

On 11 November 2015 at 15:01, Stuart Haslam  wrote:
> Report a failure if the maximum achieved packet rate is less than a
> predefined threshold (currently set at 5000pps).
>
> Signed-off-by: Stuart Haslam 
> ---
>  test/performance/odp_l2fwd_run | 25 ++---
>  1 file changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run
> index e0c61e7..001d8c2 100755
> --- a/test/performance/odp_l2fwd_run
> +++ b/test/performance/odp_l2fwd_run
> @@ -61,16 +61,35 @@ run_l2fwd()
> 2>&1 > /dev/null &
> GEN_PID=$!
>
> -   echo "Run odp_l2fwd -i $IF1,$IF2 -m 0 -t 30 -c 2"
> -   odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2
> +   # this just turns off output buffering so that you still get periodic
> +   # output while piping to tee, as long as stdbuf is available.
> +   if [ "$(which stdbuf)" != "" ]; then
> +   STDBUF="stdbuf -o 0"
> +   else
> +   STDBUF=
> +   fi
> +   LOG=odp_l2fwd_tmp.log
> +   $STDBUF odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 | tee $LOG
> ret=$?
>
> kill ${GEN_PID}
>
> +   if [ ! -f $LOG ]; then
> +   echo "FAIL: $LOG not found"
> +   ret=1
> +   elif [ $ret -eq 0 ]; then
> +   PASS_PPS=5000
> +   MAX_PPS=$(awk '/TEST RESULT/ {print $3}' $LOG)
> +   if [ "$MAX_PPS" -lt "$PASS_PPS" ]; then
> +   echo "FAIL: pps below threshold $MAX_PPS < $PASS_PPS"
> +   ret=1
> +   fi
> +   fi
> +
> +   rm -f $LOG
> cleanup_pktio_env
> if [ $? -ne 0 ]; then
> echo "cleanup_pktio_env error $?"
> -   exit $TEST_SKIPPED
> fi
>
> exit $ret
> --
> 2.1.1
>
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] test: performance: set a packet rate pass threshold for l2fwd

2015-12-10 Thread Maxim Uvarov

Merged.
Maxim.

On 12/10/2015 17:07, Stuart Haslam wrote:

ping

odp_generator appears to be broken on master, this would've caught it.

Stuart.

On 11 November 2015 at 15:01, Stuart Haslam  wrote:

Report a failure if the maximum achieved packet rate is less than a
predefined threshold (currently set at 5000pps).

Signed-off-by: Stuart Haslam 
---
  test/performance/odp_l2fwd_run | 25 ++---
  1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run
index e0c61e7..001d8c2 100755
--- a/test/performance/odp_l2fwd_run
+++ b/test/performance/odp_l2fwd_run
@@ -61,16 +61,35 @@ run_l2fwd()
 2>&1 > /dev/null &
 GEN_PID=$!

-   echo "Run odp_l2fwd -i $IF1,$IF2 -m 0 -t 30 -c 2"
-   odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2
+   # this just turns off output buffering so that you still get periodic
+   # output while piping to tee, as long as stdbuf is available.
+   if [ "$(which stdbuf)" != "" ]; then
+   STDBUF="stdbuf -o 0"
+   else
+   STDBUF=
+   fi
+   LOG=odp_l2fwd_tmp.log
+   $STDBUF odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 | tee $LOG
 ret=$?

 kill ${GEN_PID}

+   if [ ! -f $LOG ]; then
+   echo "FAIL: $LOG not found"
+   ret=1
+   elif [ $ret -eq 0 ]; then
+   PASS_PPS=5000
+   MAX_PPS=$(awk '/TEST RESULT/ {print $3}' $LOG)
+   if [ "$MAX_PPS" -lt "$PASS_PPS" ]; then
+   echo "FAIL: pps below threshold $MAX_PPS < $PASS_PPS"
+   ret=1
+   fi
+   fi
+
+   rm -f $LOG
 cleanup_pktio_env
 if [ $? -ne 0 ]; then
 echo "cleanup_pktio_env error $?"
-   exit $TEST_SKIPPED
 fi

 exit $ret
--
2.1.1


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [PATCH] test: performance: set a packet rate pass threshold for l2fwd

2015-12-10 Thread Maxim Uvarov

On 12/10/2015 17:07, Stuart Haslam wrote:

ping

odp_generator appears to be broken on master, this would've caught it.

Stuart.

Thank we need to fix it and then apply that patch.

Maxim.



On 11 November 2015 at 15:01, Stuart Haslam  wrote:

Report a failure if the maximum achieved packet rate is less than a
predefined threshold (currently set at 5000pps).

Signed-off-by: Stuart Haslam 
---
  test/performance/odp_l2fwd_run | 25 ++---
  1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run
index e0c61e7..001d8c2 100755
--- a/test/performance/odp_l2fwd_run
+++ b/test/performance/odp_l2fwd_run
@@ -61,16 +61,35 @@ run_l2fwd()
 2>&1 > /dev/null &
 GEN_PID=$!

-   echo "Run odp_l2fwd -i $IF1,$IF2 -m 0 -t 30 -c 2"
-   odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2
+   # this just turns off output buffering so that you still get periodic
+   # output while piping to tee, as long as stdbuf is available.
+   if [ "$(which stdbuf)" != "" ]; then
+   STDBUF="stdbuf -o 0"
+   else
+   STDBUF=
+   fi
+   LOG=odp_l2fwd_tmp.log
+   $STDBUF odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 | tee $LOG
 ret=$?

 kill ${GEN_PID}

+   if [ ! -f $LOG ]; then
+   echo "FAIL: $LOG not found"
+   ret=1
+   elif [ $ret -eq 0 ]; then
+   PASS_PPS=5000
+   MAX_PPS=$(awk '/TEST RESULT/ {print $3}' $LOG)
+   if [ "$MAX_PPS" -lt "$PASS_PPS" ]; then
+   echo "FAIL: pps below threshold $MAX_PPS < $PASS_PPS"
+   ret=1
+   fi
+   fi
+
+   rm -f $LOG
 cleanup_pktio_env
 if [ $? -ne 0 ]; then
 echo "cleanup_pktio_env error $?"
-   exit $TEST_SKIPPED
 fi

 exit $ret
--
2.1.1


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH] test: performance: set a packet rate pass threshold for l2fwd

2015-11-11 Thread Stuart Haslam
Report a failure if the maximum achieved packet rate is less than a
predefined threshold (currently set at 5000pps).

Signed-off-by: Stuart Haslam 
---
 test/performance/odp_l2fwd_run | 25 ++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run
index e0c61e7..001d8c2 100755
--- a/test/performance/odp_l2fwd_run
+++ b/test/performance/odp_l2fwd_run
@@ -61,16 +61,35 @@ run_l2fwd()
2>&1 > /dev/null &
GEN_PID=$!
 
-   echo "Run odp_l2fwd -i $IF1,$IF2 -m 0 -t 30 -c 2"
-   odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2
+   # this just turns off output buffering so that you still get periodic
+   # output while piping to tee, as long as stdbuf is available.
+   if [ "$(which stdbuf)" != "" ]; then
+   STDBUF="stdbuf -o 0"
+   else
+   STDBUF=
+   fi
+   LOG=odp_l2fwd_tmp.log
+   $STDBUF odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 | tee $LOG
ret=$?
 
kill ${GEN_PID}
 
+   if [ ! -f $LOG ]; then
+   echo "FAIL: $LOG not found"
+   ret=1
+   elif [ $ret -eq 0 ]; then
+   PASS_PPS=5000
+   MAX_PPS=$(awk '/TEST RESULT/ {print $3}' $LOG)
+   if [ "$MAX_PPS" -lt "$PASS_PPS" ]; then
+   echo "FAIL: pps below threshold $MAX_PPS < $PASS_PPS"
+   ret=1
+   fi
+   fi
+
+   rm -f $LOG
cleanup_pktio_env
if [ $? -ne 0 ]; then
echo "cleanup_pktio_env error $?"
-   exit $TEST_SKIPPED
fi
 
exit $ret
-- 
2.1.1

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp