diff mbox series

[ovs-dev,v4,1/4] system-dpdk: Refactor common logs matching.

Message ID 20220103141552.27060-1-david.marchand@redhat.com
State Accepted
Commit d446dcb7e03fc7bd4e3050c83c22233b0a46d364
Headers show
Series [ovs-dev,v4,1/4] system-dpdk: Refactor common logs matching. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

David Marchand Jan. 3, 2022, 2:15 p.m. UTC
Move EAL logs and commonly ignored logs to a common macro.
Remove/update obsolete ones (like i40e [1], timer [2], EAL [3][4] logs).
Set log level for DPDK drivers to error only: the rationale is that we are
not testing DPDK drivers in system-dpdk.
Extend regex on hugepage logs since a check on hugepages availability is
already present on OVS side, and as a consequence, we don't care about
the warnings on availability for certain hugepage size.
Add logs checks for MFEX tests that were missing them.

1: https://git.dpdk.org/dpdk/commit/?id=a075ce2b3e8c
2: https://git.dpdk.org/dpdk/commit/?id=c1077933d45b
3: https://git.dpdk.org/dpdk/commit/?id=e9b3d79b0696
4: https://git.dpdk.org/dpdk/commit/?id=c69150679891

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
---
Changes since v3:
- updated with v21.11 log updates,
- restored telemetry log,

Changes since v2:
- configured dpdk drivers log level to error,
- added OVS flow control warning to common list,

---
 tests/system-dpdk-macros.at |  3 ++
 tests/system-dpdk.at        | 60 +++++++++++++++++--------------------
 2 files changed, 31 insertions(+), 32 deletions(-)

Comments

Ilya Maximets Jan. 3, 2022, 11:26 p.m. UTC | #1
On 1/3/22 15:15, David Marchand wrote:
> Move EAL logs and commonly ignored logs to a common macro.
> Remove/update obsolete ones (like i40e [1], timer [2], EAL [3][4] logs).
> Set log level for DPDK drivers to error only: the rationale is that we are
> not testing DPDK drivers in system-dpdk.
> Extend regex on hugepage logs since a check on hugepages availability is
> already present on OVS side, and as a consequence, we don't care about
> the warnings on availability for certain hugepage size.
> Add logs checks for MFEX tests that were missing them.
> 
> 1: https://git.dpdk.org/dpdk/commit/?id=a075ce2b3e8c
> 2: https://git.dpdk.org/dpdk/commit/?id=c1077933d45b
> 3: https://git.dpdk.org/dpdk/commit/?id=e9b3d79b0696
> 4: https://git.dpdk.org/dpdk/commit/?id=c69150679891
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Acked-by: Eelco Chaudron <echaudro@redhat.com>
> ---
> Changes since v3:
> - updated with v21.11 log updates,
> - restored telemetry log,
> 
> Changes since v2:
> - configured dpdk drivers log level to error,
> - added OVS flow control warning to common list,
> 
> ---
>  tests/system-dpdk-macros.at |  3 ++
>  tests/system-dpdk.at        | 60 +++++++++++++++++--------------------
>  2 files changed, 31 insertions(+), 32 deletions(-)

Hi, David.  Thanks for the update.  I applied this one patch for
now.  With that I have system-dpdk almost working on my setup.
There is still an ERR log from the vhost-user server mode test about
removing a still attached port.  But that will require a separate fix.

I have a few problems with the rest of a set.  Will reply to each
patch separately tomorrow.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
index c6708caaf0..ef0e84e939 100644
--- a/tests/system-dpdk-macros.at
+++ b/tests/system-dpdk-macros.at
@@ -58,6 +58,9 @@  m4_define([OVS_DPDK_START],
    dnl Enable DPDK functionality
    AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true])
 
+   dnl Change DPDK drivers log levels so that tests only catch errors
+   AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-extra=--log-level=pmd.*:error])
+
    dnl Start ovs-vswitchd.
    AT_CHECK([ovs-vswitchd --detach --no-chdir --pidfile --log-file -vvconn -vofproto_dpif -vunixctl], [0], [stdout], [stderr])
    AT_CAPTURE_FILE([ovs-vswitchd.log])
diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
index e39fc0d938..1dd7aae1b7 100644
--- a/tests/system-dpdk.at
+++ b/tests/system-dpdk.at
@@ -3,6 +3,13 @@  m4_define([CONFIGURE_VETH_OFFLOADS],
 
 AT_BANNER([OVS-DPDK unit tests])
 
+m4_define([SYSTEM_DPDK_ALLOWED_LOGS],[
+\@does not exist. The Open vSwitch kernel module is probably not loaded.@d
+\@EAL: No \(available\|free\) .*hugepages reported@d
+\@Failed to enable flow control@d
+\@TELEMETRY: No legacy callbacks, legacy socket not created@d
+])
+
 dnl --------------------------------------------------------------------------
 dnl Check if EAL init is successful
 AT_SETUP([OVS-DPDK - EAL init])
@@ -12,11 +19,7 @@  OVS_DPDK_START()
 AT_CHECK([grep "DPDK Enabled - initializing..." ovs-vswitchd.log], [], [stdout])
 AT_CHECK([grep "EAL" ovs-vswitchd.log], [], [stdout])
 AT_CHECK([grep "DPDK Enabled - initialized" ovs-vswitchd.log], [], [stdout])
-OVS_VSWITCHD_STOP(["/Global register is changed during/d
-/EAL:   Invalid NUMA socket, default to 0/d
-/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d
-/EAL: No free hugepages reported in hugepages-1048576kB/d
-/TELEMETRY: No legacy callbacks, legacy socket not created/d"])
+OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -38,12 +41,7 @@  sleep 2
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 phy0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["/does not exist. The Open vSwitch kernel module is probably not loaded./d
-/Failed to enable flow control/d
-/Global register is changed during/d
-/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d
-/EAL: No free hugepages reported in hugepages-1048576kB/d
-/TELEMETRY: No legacy callbacks, legacy socket not created/d"])
+OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -69,14 +67,9 @@  AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/dpdkvhostclient0: reconnecting..." ovs
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d
-\@Failed to enable flow control@d
+OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
 \@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory@d
-\@Global register is changed during@d
-\@EAL:   Invalid NUMA socket, default to 0@d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB@d
-\@TELEMETRY: No legacy callbacks, legacy socket not created@d"])
+])")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -146,17 +139,12 @@  pkill -f -x -9 'tail -f /dev/null'
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuser0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d
-\@Failed to enable flow control@d
+OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
 \@VHOST_CONFIG: recvmsg failed@d
 \@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostuser0: No such file or directory@d
-\@Global register is changed during@d
 \@dpdkvhostuser ports are considered deprecated;  please migrate to dpdkvhostuserclient ports.@d
 \@failed to enumerate system datapaths: No such file or directory@d
-\@EAL:   Invalid NUMA socket, default to 0@d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB@d
-\@TELEMETRY: No legacy callbacks, legacy socket not created@d"])
+])")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -223,17 +211,12 @@  pkill -f -x -9 'tail -f /dev/null'
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
-OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d
-\@Failed to enable flow control@d
+OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
 \@VHOST_CONFIG: recvmsg failed@d
 \@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory@d
-\@Global register is changed during@d
 \@dpdkvhostuser ports are considered deprecated;  please migrate to dpdkvhostuserclient ports.@d
 \@failed to enumerate system datapaths: No such file or directory@d
-\@EAL:   Invalid NUMA socket, default to 0@d
-\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
-\@EAL: No free hugepages reported in hugepages-1048576kB@d
-\@TELEMETRY: No legacy callbacks, legacy socket not created@d"])
+])")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -260,6 +243,7 @@  OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics | grep -oP 'rx_packe
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
+OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -287,6 +271,7 @@  OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics | grep -oP 'rx_packe
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
+OVS_VSWITCHD_STOP("[SYSTEM_DPDK_ALLOWED_LOGS]")
 AT_CLEANUP
 dnl --------------------------------------------------------------------------
 
@@ -394,5 +379,16 @@  ovs-appctl: ovs-vswitchd: server returned an error
 
 dnl Clean up
 AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
+OVS_VSWITCHD_STOP("m4_join([], [SYSTEM_DPDK_ALLOWED_LOGS], [
+\@Error: unknown argument 1.@d
+\@Error: invalid study_pkt_cnt value: xyz.@d
+\@Error: unknown argument abcd.@d
+\@Error: -pmd option requires a thread id argument.@d
+\@Error: invalid study_pkt_cnt value: abcd.@d
+\@Error: miniflow extract parser not changed, PMD thread passed is not valid: 'zero'. Pass a valid pmd thread ID.@d
+\@Error: no miniflow extract name provided. Output of miniflow-parser-get shows implementation list.@d
+\@Error: unknown miniflow extract implementation superstudy.@d
+\@Error: invalid study_pkt_cnt value: -pmd.@d
+])")
 AT_CLEANUP dnl
 dnl --------------------------------------------------------------------------