On 9/3/21 13:05, Kevin Traynor wrote: > On 02/09/2021 18:23, Kumar Amber wrote: >> Added 2 separate test-cases for DPCLS and DPIF commands: >> 1018: PMD - dpcls configuration >> 1017: PMD - dpif configuration >> >> The above added tests are to test the commands which are used >> to either get or set the dpcls and dpif function pointers to >> various different implementations like AVX512 or auto-validator >> based on different CPU ISA supported. >> >> Signed-off-by: Kumar Amber <[email protected]> >> >> --- >> v4: >> - include description about tests in the commit msg. >> - added out of range priority for dpcls. >> v3: >> - include comments from Kevin. >> - minor fixes in name and title. >> - include check for get commands. >> - include multiple scenarios for dpcls including max prio, min pro, >> same prio, changing prio and check for each fo them. >> v2: >> - move the test-case to pmd.at from dpdk suit. >> - removed avx512 specific set command as per discussion. >> --- >> tests/pmd.at | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 92 insertions(+) >> >> diff --git a/tests/pmd.at b/tests/pmd.at >> index 225d4ee3a..c875a744f 100644 >> --- a/tests/pmd.at >> +++ b/tests/pmd.at >> @@ -1068,3 +1068,95 @@ AT_CHECK([ovs-appctl dpctl/del-dp dummy@dp0], [0], >> [dnl >> >> OVS_VSWITCHD_STOP >> AT_CLEANUP >> + >> +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-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 >> + >> +AT_SETUP([PMD - dpcls 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-vsctl show], [], [stdout]) >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep generic], >> [], [dnl >> + 1 : generic >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep >> autovalidator], [], [dnl >> + 0 : autovalidator >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set autovalidator 3], >> [0], [dnl >> +Lookup priority change affected 0 dpcls ports and 0 subtables. >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep >> autovalidator], [], [dnl >> + 3 : autovalidator >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set generic 4], [0], >> [dnl >> +Lookup priority change affected 0 dpcls ports and 0 subtables. >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep generic], >> [], [dnl >> + 4 : generic >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set generic 8], [0], >> [dnl >> +Lookup priority change affected 0 dpcls ports and 0 subtables. >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep generic], >> [], [dnl >> + 8 : generic >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set autovalidator 8], >> [0], [dnl >> +Lookup priority change affected 0 dpcls ports and 0 subtables. >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep >> autovalidator], [], [dnl >> + 8 : autovalidator >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set generic 0], [0], >> [dnl >> +Lookup priority change affected 0 dpcls ports and 0 subtables. >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep generic], >> [], [dnl >> + 0 : generic >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set generic 255], >> [0], [dnl >> +Lookup priority change affected 0 dpcls ports and 0 subtables. >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-get | grep generic], >> [], [dnl >> + 255 : generic >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set generic -1], [2], >> +[], [dnl >> +error converting priority, use integer in range 0-255 >> +ovs-appctl: ovs-vswitchd: server returned an error >> +]) >> + >> +AT_CHECK([ovs-appctl dpif-netdev/subtable-lookup-prio-set generic 300], [2], >> +[], [dnl >> +error converting priority, use integer in range 0-255 >> +ovs-appctl: ovs-vswitchd: server returned an error >> +]) > > Not really sure why you changed it from 256 to 300 to test that range, > but it's still a test above the valid range, so not a big deal. > > 1018: PMD - dpif configuration ok > 1019: PMD - dpcls configuration ok > > https://github.com/kevintraynor/ovs/actions/runs/1197677798 > > Acked-by: Kevin Traynor <[email protected]>
Thanks! Applied. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
