Skip to content

Commit

Permalink
Pmd.at: fix dpcls and dpif configuration test cases.
Browse files Browse the repository at this point in the history
Without running set command first the string matching
fails on get command beacuse DPCLS prio value is different
for different default builds like with --enable-autovalidator
build auto-validator prio is set to 255 and if the build
is a scalar than generic value is default 255.

The same problem is seen with dpif where re-arranging the get
command after set makes it consistent across any builds.

Fixes: cc0a87b (pmd.at: Add test-cases for DPCLS and DPIF commands.)
Signed-off-by: Kumar Amber <[email protected]>
Acked-by: Michael Phelan <[email protected]>
Signed-off-by: Ian Stokes <[email protected]>
  • Loading branch information
kamber-intel authored and istokes committed Jul 1, 2022
1 parent e72b056 commit 7045e91
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/pmd.at
Original file line number Diff line number Diff line change
Expand Up @@ -1113,15 +1113,15 @@ AT_SETUP([PMD - dpif configuration])
OVS_VSWITCHD_START([], [], [], [--dummy-numa 0,0])
AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd])

AT_CHECK([ovs-appctl dpif-netdev/dpif-impl-set dpif_scalar], [0], [dnl
DPIF implementation set to dpif_scalar.
])

AT_CHECK([ovs-vsctl show], [], [stdout])
AT_CHECK([ovs-appctl dpif-netdev/dpif-impl-get | grep "dpif_scalar"], [], [dnl
dpif_scalar (pmds: 0)
])

AT_CHECK([ovs-appctl dpif-netdev/dpif-impl-set dpif_scalar], [0], [dnl
DPIF implementation set to dpif_scalar.
])

OVS_VSWITCHD_STOP
AT_CLEANUP

Expand All @@ -1130,14 +1130,6 @@ OVS_VSWITCHD_START([], [], [], [--dummy-numa 0,0])
AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd])

AT_CHECK([ovs-vsctl show], [], [stdout])
AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-info-get | grep generic], [], [dnl
generic (Use count: 0, Priority: 1)
])

AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-info-get | grep autovalidator], [], [dnl
autovalidator (Use count: 0, Priority: 0)
])

AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set autovalidator 3], [0], [dnl
Lookup priority change affected 0 dpcls ports and 0 subtables.
])
Expand Down

0 comments on commit 7045e91

Please sign in to comment.