diff mbox series

[ovs-dev,2/2] dpdk: add non-contiguous NUMA node support to auto tests

Message ID 20210512162755.2176656-3-drc@linux.vnet.ibm.com
State Superseded
Headers show
Series Enable support for non-contiguous NUMA nodes | expand

Commit Message

David Christensen May 12, 2021, 4:27 p.m. UTC
Remove explicit "--dummy-numa" check for contiguous NUMA nodes, extend
existing auto tests with an additional "--dummy-numa" configuration
that uses non-contiguous NUMA nodes.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
 lib/ovs-numa.c        |   8 +--
 tests/dpif-netdev.at  |  64 +++++++++++---------
 tests/ofproto-dpif.at | 100 ++++++++++++++++++--------------
 tests/pmd.at          | 132 ++++++++++++++++++++++--------------------
 4 files changed, 166 insertions(+), 138 deletions(-)
diff mbox series

Patch

diff --git a/lib/ovs-numa.c b/lib/ovs-numa.c
index 6f85d7023..ba12ccec5 100644
--- a/lib/ovs-numa.c
+++ b/lib/ovs-numa.c
@@ -128,8 +128,8 @@  insert_new_cpu_core(struct numa_node *n, unsigned core_id)
  * - "0,0,0,0": four cores on numa socket 0.
  * - "0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1": 16 cores on two numa sockets.
  * - "0,0,0,0,1,1,1,1": 8 cores on two numa sockets.
- *
- * The different numa ids must be consecutives or the function will abort. */
+ * - "0,0,0,0,8,8,8,8": 8 cores on two numa sockets, non-contiguous.
+ */
 static void
 discover_numa_and_core_dummy(void)
 {
@@ -166,10 +166,6 @@  discover_numa_and_core_dummy(void)
     }
 
     free(conf);
-
-    if (max_numa_id + 1 != hmap_count(&all_numa_nodes)) {
-        ovs_fatal(0, "dummy numa contains non consecutive numa ids");
-    }
 }
 
 /* Discovers all numa nodes and the corresponding cpu cores.
diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at
index 57cae383f..d519d7a9f 100644
--- a/tests/dpif-netdev.at
+++ b/tests/dpif-netdev.at
@@ -85,7 +85,7 @@  AT_CLEANUP
 
 
 m4_define([DPIF_NETDEV_DUMMY_IFACE],
-  [AT_SETUP([dpif-netdev - $1 interface])
+  [AT_SETUP([dpif-netdev - $1 interface $2])
    # Create br0 with interfaces p1 and p7
    #    and br1 with interfaces p2 and p8
    # with p1 and p2 connected via unix domain socket
@@ -98,7 +98,7 @@  m4_define([DPIF_NETDEV_DUMMY_IFACE],
                      fail-mode=secure -- \
       add-port br1 p2 -- set interface p2 type=$1 options:stream=unix:$OVS_RUNDIR/p0.sock ofport_request=2 -- \
       add-port br1 p8 -- set interface p8 ofport_request=8 type=$1 --], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
+      [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
    AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
 
    AT_CHECK([ovs-ofctl add-flow br0 action=normal])
@@ -120,17 +120,18 @@  recirc_id(0),in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-DPIF_NETDEV_DUMMY_IFACE([dummy])
-DPIF_NETDEV_DUMMY_IFACE([dummy-pmd])
+DPIF_NETDEV_DUMMY_IFACE([dummy], [])
+DPIF_NETDEV_DUMMY_IFACE([dummy-pmd], [(consecutive NUMA nodes)])
+DPIF_NETDEV_DUMMY_IFACE([dummy-pmd], [(non-consecutive NUMA nodes)])
 
 m4_define([DPIF_NETDEV_MISS_FLOW_INSTALL],
-  [AT_SETUP([dpif-netdev - miss upcall key matches flow_install - $1])
+  [AT_SETUP([dpif-netdev - miss upcall key matches flow_install - $1 $2])
    OVS_VSWITCHD_START(
      [add-port br0 p1 \
       -- set interface p1 type=$1 options:pstream=punix:$OVS_RUNDIR/p0.sock \
       -- set bridge br0 datapath-type=dummy \
                         other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
+      [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
    AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
 
    AT_CHECK([ovs-ofctl add-flow br0 action=normal])
@@ -162,17 +163,18 @@  skb_priority(0),skb_mark(0),ct_state(-new-est-rel-rpl-inv-trk-snat-dnat),ct_zone
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-DPIF_NETDEV_MISS_FLOW_INSTALL([dummy])
-DPIF_NETDEV_MISS_FLOW_INSTALL([dummy-pmd])
+DPIF_NETDEV_MISS_FLOW_INSTALL([dummy], [])
+DPIF_NETDEV_MISS_FLOW_INSTALL([dummy-pmd], [(consecutive NUMA nodes)])
+DPIF_NETDEV_MISS_FLOW_INSTALL([dummy-pmd], [(non-consecutive NUMA nodes)])
 
 m4_define([DPIF_NETDEV_FLOW_PUT_MODIFY],
-  [AT_SETUP([dpif-netdev - datapath flow modification - $1])
+  [AT_SETUP([dpif-netdev - datapath flow modification - $1 $2])
    OVS_VSWITCHD_START(
      [add-port br0 p1 -- set interface p1 type=$1 ofport_request=1 options:pstream=punix:$OVS_RUNDIR/p1.sock -- \
       add-port br0 p2 -- set interface p2 type=$1 ofport_request=2 options:pstream=punix:$OVS_RUNDIR/p2.sock -- \
       set bridge br0 datapath-type=dummy \
                      other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
+      [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
    AT_CHECK([ovs-appctl vlog/set dpif:file:dbg dpif_netdev:file:dbg])
 
    # Add a flow that directs some packets received on p1 to p2 and the
@@ -215,18 +217,20 @@  recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-DPIF_NETDEV_FLOW_PUT_MODIFY([dummy])
-DPIF_NETDEV_FLOW_PUT_MODIFY([dummy-pmd])
+DPIF_NETDEV_FLOW_PUT_MODIFY([dummy], [])
+DPIF_NETDEV_FLOW_PUT_MODIFY([dummy-pmd], [(consecutive NUMA nodes)])
+DPIF_NETDEV_FLOW_PUT_MODIFY([dummy-pmd], [(non-consecutive NUMA nodes)])
 
 
 m4_define([DPIF_NETDEV_MISS_FLOW_DUMP],
-  [AT_SETUP([dpif-netdev - miss upcall key matches flow_dump - $1])
+  [AT_SETUP([dpif-netdev - miss upcall key matches flow_dump - $1 $2])
    OVS_VSWITCHD_START(
      [add-port br0 p1 \
       -- set interface p1 type=$1 options:pstream=punix:$OVS_RUNDIR/p0.sock \
       -- set bridge br0 datapath-type=dummy \
                         other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
+      [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
+
    AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
 ], [])
    AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
@@ -263,8 +267,9 @@  skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-DPIF_NETDEV_MISS_FLOW_DUMP([dummy])
-DPIF_NETDEV_MISS_FLOW_DUMP([dummy-pmd])
+DPIF_NETDEV_MISS_FLOW_DUMP([dummy], [])
+DPIF_NETDEV_MISS_FLOW_DUMP([dummy-pmd], [(consecutive NUMA nodes)])
+DPIF_NETDEV_MISS_FLOW_DUMP([dummy-pmd], [(non-consecutive NUMA nodes)])
 
 AT_SETUP([dpif-netdev - meters])
 # Create br0 with interfaces p1 and p7
@@ -378,13 +383,13 @@  OVS_VSWITCHD_STOP
 AT_CLEANUP
 
 m4_define([DPIF_NETDEV_FLOW_HW_OFFLOAD],
-  [AT_SETUP([dpif-netdev - partial hw offload - $1])
+  [AT_SETUP([dpif-netdev - partial hw offload - $1 $2])
    OVS_VSWITCHD_START(
      [add-port br0 p1 -- \
       set interface p1 type=$1 ofport_request=1 options:pstream=punix:$OVS_RUNDIR/p1.sock options:ifindex=1100 -- \
       set bridge br0 datapath-type=dummy \
                      other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
+      [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
    AT_CHECK([ovs-appctl vlog/set dpif:file:dbg dpif_netdev:file:dbg netdev_dummy:file:dbg])
 
    AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=true])
@@ -436,18 +441,19 @@  p1: flow del: mark: 1
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-DPIF_NETDEV_FLOW_HW_OFFLOAD([dummy])
-DPIF_NETDEV_FLOW_HW_OFFLOAD([dummy-pmd])
+DPIF_NETDEV_FLOW_HW_OFFLOAD([dummy], [])
+DPIF_NETDEV_FLOW_HW_OFFLOAD([dummy-pmd], [(consecutive NUMA nodes)])
+DPIF_NETDEV_FLOW_HW_OFFLOAD([dummy-pmd], [(non-consecutive NUMA nodes)])
 
 
 m4_define([DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS],
-  [AT_SETUP([dpif-netdev - partial hw offload with packet modifications - $1])
+  [AT_SETUP([dpif-netdev - partial hw offload with packet modifications - $1 $2])
    OVS_VSWITCHD_START(
      [add-port br0 p1 -- \
       set interface p1 type=$1 ofport_request=1 options:pcap=p1.pcap options:ifindex=1101 -- \
       set bridge br0 datapath-type=dummy \
                      other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
+      [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
    AT_CHECK([ovs-appctl vlog/set dpif:file:dbg dpif_netdev:file:dbg netdev_dummy:file:dbg])
 
    AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=true])
@@ -514,17 +520,18 @@  udp,in_port=ANY,dl_vlan=99,dl_vlan_pcp=7,vlan_tci1=0x0000,dl_src=00:06:07:08:09:
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS([dummy])
-DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS([dummy-pmd])
+DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS([dummy], [])
+DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS([dummy-pmd], [(consecutive NUMA nodes)])
+DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS([dummy-pmd], [(non-consecutive NUMA nodes)])
 
 m4_define([DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS_VID_ARP],
-  [AT_SETUP([dpif-netdev - partial hw offload with arp vlan id packet modifications - $1])
+  [AT_SETUP([dpif-netdev - partial hw offload with arp vlan id packet modifications - $1 $2])
    OVS_VSWITCHD_START(
      [add-port br0 p1 -- \
       set interface p1 type=$1 ofport_request=1 options:pcap=p1.pcap options:ifindex=1102 -- \
       set bridge br0 datapath-type=dummy \
                      other-config:datapath-id=1234 fail-mode=secure], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
+      [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
    AT_CHECK([ovs-appctl vlog/set dpif:file:dbg dpif_netdev:file:dbg netdev_dummy:file:dbg])
 
    AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:hw-offload=true])
@@ -591,8 +598,9 @@  arp,in_port=ANY,dl_vlan=11,dl_vlan_pcp=7,vlan_tci1=0x0000,dl_src=00:06:07:08:09:
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS_VID_ARP([dummy])
-DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS_VID_ARP([dummy-pmd])
+DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS_VID_ARP([dummy], [])
+DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS_VID_ARP([dummy-pmd], [(consecutive NUMA nodes)])
+DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS_VID_ARP([dummy-pmd], [(non-consecutive NUMA nodes)])
 
 AT_SETUP([dpif-netdev - check dpctl/add-flow in_port exact match])
 OVS_VSWITCHD_START(
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 24bbd884c..0e2bc485e 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -8121,13 +8121,14 @@  dummy@br1
 OVS_VSWITCHD_STOP
 AT_CLEANUP
 
-AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
-OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy], [], [],
-                   [--dummy-numa="0,0,0,0,1,1,1,1"])
-add_pmd_of_ports br0 1 2
-add_of_ports br1 3
-
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(dummy-pmd: \).*)/\1<cleared>)/'], [0], [dnl
+m4_define([OFPROTO_DPIF_APPCTL_SHOW],
+  [AT_SETUP([ofproto-dpif - ovs-appctl dpif/show $1])
+   OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy], [], [],
+     [m4_if([$1], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$1], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
+   add_pmd_of_ports br0 1 2
+   add_of_ports br1 3
+
+   AT_CHECK([ovs-appctl dpif/show | sed 's/\(dummy-pmd: \).*)/\1<cleared>)/'], [0], [dnl
 dummy@ovs-dummy: hit:0 missed:0
   br0:
     br0 65534/100: (dummy-internal)
@@ -8137,51 +8138,58 @@  dummy@ovs-dummy: hit:0 missed:0
     br1 65534/101: (dummy-internal)
     p3 3/3: (dummy)
 ])
-OVS_VSWITCHD_STOP
-AT_CLEANUP
+   OVS_VSWITCHD_STOP
+   AT_CLEANUP])
+
+OFPROTO_DPIF_APPCTL_SHOW([(consecutive NUMA nodes)])
+OFPROTO_DPIF_APPCTL_SHOW([(non-consecutive NUMA nodes)])
 
-AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
-# bump max-idle to avoid the flows being reclaimed behind us
-OVS_VSWITCHD_START([add-br br1 -- \
+m4_define([OFPROTO_DPIF_APPCTL_DUMP_FLOWS],
+  [AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows $1])
+   # bump max-idle to avoid the flows being reclaimed behind us
+   OVS_VSWITCHD_START([add-br br1 -- \
                     set bridge br1 datapath-type=dummy fail-mode=secure -- \
                     set Open_vSwitch . other_config:max-idle=10000], [], [],
-                    [--dummy-numa="0,0,0,0,1,1,1,1"])
-add_of_ports br0 1
-add_pmd_of_ports br0 2
-add_of_ports br1 3
+     [m4_if([$1], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$1], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])
+   add_of_ports br0 1
+   add_pmd_of_ports br0 2
+   add_of_ports br1 3
 
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
-AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
-ovs-appctl revalidator/wait
-AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
+   AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
+   AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
+   AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
+   ovs-appctl revalidator/wait
+   AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
 recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
 recirc_id(0),in_port(2),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
 ])
 
-AT_CHECK([ovs-appctl dpif/dump-flows br1 | strip_ufid | strip_used | sort], [0], [dnl
+   AT_CHECK([ovs-appctl dpif/dump-flows br1 | strip_ufid | strip_used | sort], [0], [dnl
 recirc_id(0),in_port(3),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
 ])
 
-AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | strip_ufid | strip_used | sort], [0], [dnl
+   AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | strip_ufid | strip_used | sort], [0], [dnl
 skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(p1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
 skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(p2),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=0/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
 ])
 
-AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | strip_ufid | strip_used | sort], [0], [dnl
+   AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | strip_ufid | strip_used | sort], [0], [dnl
 skb_priority(0/0),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),recirc_id(0),dp_hash(0/0),in_port(p3),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
 ])
 
-OVS_VSWITCHD_STOP
-AT_CLEANUP
+   OVS_VSWITCHD_STOP
+   AT_CLEANUP])
+
+OFPROTO_DPIF_APPCTL_DUMP_FLOWS([(consecutive NUMA nodes)])
+OFPROTO_DPIF_APPCTL_DUMP_FLOWS([(non-consecutive NUMA nodes)])
 
 m4_define([OFPROTO_DPIF_GET_FLOW],
-  [AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow$1])
+  [AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow$1 $2])
 
    OVS_VSWITCHD_START([add-br br1 -- \
                        set bridge br1 datapath-type=dummy fail-mode=secure -- \
                        set Open_vSwitch . other_config:max-idle=10000], [], [],
-                       [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
+                       [m4_if([$1], [], [], [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])])
 
    func=`printf '%s_' "$1" | cut -c 4-`
    add_${func}of_ports br0 1 2
@@ -8198,8 +8206,9 @@  recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), p
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-OFPROTO_DPIF_GET_FLOW([])
-OFPROTO_DPIF_GET_FLOW([ - pmd])
+OFPROTO_DPIF_GET_FLOW([], [])
+OFPROTO_DPIF_GET_FLOW([ - pmd], [(consecutive NUMA nodes)])
+OFPROTO_DPIF_GET_FLOW([ - pmd], [(non-consecutive NUMA nodes)])
 
 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
 OVS_VSWITCHD_START([dnl
@@ -8512,8 +8521,9 @@  OVS_VSWITCHD_STOP
 AT_CLEANUP
 
 m4_define([OFPROTO_DPIF_MEGAFLOW_NORMAL],
-  [AT_SETUP([ofproto-dpif megaflow - normal$1])
-   OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
+  [AT_SETUP([ofproto-dpif megaflow - normal$1 $2])
+   OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [],
+     [m4_if([$1], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$1], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])])])
    AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
    func=`printf '%s_' "$1" | cut -c 4-`
    add_${func}of_ports br0 1 2
@@ -8528,8 +8538,9 @@  recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-OFPROTO_DPIF_MEGAFLOW_NORMAL([])
-OFPROTO_DPIF_MEGAFLOW_NORMAL([ - pmd])
+OFPROTO_DPIF_MEGAFLOW_NORMAL([], [])
+OFPROTO_DPIF_MEGAFLOW_NORMAL([ - pmd], [(consecutive NUMA nodes)])
+OFPROTO_DPIF_MEGAFLOW_NORMAL([ - pmd], [(non-consecutive NUMA nodes)])
 
 AT_SETUP([ofproto-dpif megaflow - mpls])
 OVS_VSWITCHD_START
@@ -8587,13 +8598,15 @@  CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
 AT_CLEANUP
 
 m4_define([OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND],
-  [AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding - $1])
+  [AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding - $1 $2])
    OVS_VSWITCHD_START(
      [add-port br0 p1 -- set Interface p1 type=$1 ofport_request=1 -- \
       add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
       set interface p2 type=$1 ofport_request=2 -- \
       set interface p3 type=$1 ofport_request=3], [], [],
-      [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
+      [m4_if([$1], [dummy-pmd],
+        [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"], [])],
+        [])])
    AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
 ])
    AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
@@ -8609,8 +8622,9 @@  recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy])
-OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy-pmd])
+OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy], [])
+OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy-pmd], [(consecutive NUMA nodes)])
+OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy-pmd], [(non-consecutive NUMA nodes)])
 
 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
 OVS_VSWITCHD_START(
@@ -8938,8 +8952,9 @@  OVS_VSWITCHD_STOP
 AT_CLEANUP
 
 m4_define([OFPROTO_DPIF_MEGAFLOW_DISABLED],
-  [AT_SETUP([ofproto-dpif megaflow - disabled$1])
-   OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
+  [AT_SETUP([ofproto-dpif megaflow - disabled$1 $2])
+   OVS_VSWITCHD_START([], [], [],
+     [m4_if([$1], [], [], [m4_if([$2], [(consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,1,1,1,1"], [$2], [(non-consecutive NUMA nodes)], [--dummy-numa="0,0,0,0,8,8,8,8"])])])
    AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
    func=`printf '%s_' "$1" | cut -c 4-`
    add_${func}of_ports br0 1 2
@@ -8972,8 +8987,9 @@  skb_priority(0),skb_mark(0),ct_state(0/0xff),ct_zone(0),ct_mark(0),ct_label(0),r
    OVS_VSWITCHD_STOP
    AT_CLEANUP])
 
-OFPROTO_DPIF_MEGAFLOW_DISABLED([])
-OFPROTO_DPIF_MEGAFLOW_DISABLED([ - pmd])
+OFPROTO_DPIF_MEGAFLOW_DISABLED([], [])
+OFPROTO_DPIF_MEGAFLOW_DISABLED([ - pmd], [(consecutive NUMA nodes)])
+OFPROTO_DPIF_MEGAFLOW_DISABLED([ - pmd], [(non-consecutive NUMA nodes)])
 
 AT_SETUP([ofproto-dpif - datapath port number change])
 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
diff --git a/tests/pmd.at b/tests/pmd.at
index cc5371d5a..dd7a3c778 100644
--- a/tests/pmd.at
+++ b/tests/pmd.at
@@ -357,83 +357,87 @@  icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10
 OVS_VSWITCHD_STOP
 AT_CLEANUP
 
-AT_SETUP([PMD - change numa node])
-OVS_VSWITCHD_START(
-  [add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=2 -- \
-   add-port br0 p2 -- set Interface p2 type=dummy-pmd ofport_request=2 options:n_rxq=2 -- \
-   set Open_vSwitch . other_config:pmd-cpu-mask=3
-], [], [], [--dummy-numa 0,1])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
-
-AT_CHECK([ovs-ofctl add-flow br0 action=controller])
-
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
+m4_define([PMD_CHANGE_NUMA_NODE],
+  [AT_SETUP([PMD - change numa node - $1])
+   OVS_VSWITCHD_START(
+     [add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=2 -- \
+      add-port br0 p2 -- set Interface p2 type=dummy-pmd ofport_request=2 options:n_rxq=2 -- \
+      set Open_vSwitch . other_config:pmd-cpu-mask=3
+], [], [], [--dummy-numa 0,$2])
+   AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
+
+   AT_CHECK([ovs-ofctl add-flow br0 action=controller])
+
+   AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
 p1 0 0 0
 p1 1 0 0
 p2 0 0 0
 p2 1 0 0
 ])
 
-AT_CAPTURE_FILE([ofctl_monitor.log])
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
+   AT_CAPTURE_FILE([ofctl_monitor.log])
+   AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
 
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
+   AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
+   OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
+   OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
 
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
+   AT_CHECK([cat ofctl_monitor.log], [0], [dnl
 NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
 icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
 ])
 
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
+   AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
 
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 --qid 1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
+   AT_CHECK([ovs-appctl netdev-dummy/receive p2 --qid 1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
+   OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
+   OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
 
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
+   AT_CHECK([cat ofctl_monitor.log], [0], [dnl
 NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered)
 icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
 ])
 
-AT_CHECK([ovs-vsctl set Interface p2 options:numa_id=1])
+   AT_CHECK([ovs-vsctl set Interface p2 options:numa_id=$2])
 
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
+   AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
 p1 0 0 0
 p1 1 0 0
-p2 0 1 1
-p2 1 1 1
+p2 0 $2 1
+p2 1 $2 1
 ])
 
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
+   AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
 
-AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
+   AT_CHECK([ovs-appctl netdev-dummy/receive p1 --qid 1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
+   OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
+   OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
 
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
+   AT_CHECK([cat ofctl_monitor.log], [0], [dnl
 NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=1 (via action) data_len=106 (unbuffered)
 icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
 ])
 
-AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
+   AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
 
-AT_CHECK([ovs-appctl netdev-dummy/receive p2 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
+   AT_CHECK([ovs-appctl netdev-dummy/receive p2 --qid 0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
 
-OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
-OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
+   OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 2])
+   OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
 
-AT_CHECK([cat ofctl_monitor.log], [0], [dnl
+   AT_CHECK([cat ofctl_monitor.log], [0], [dnl
 NXT_PACKET_IN2 (xid=0x0): cookie=0x0 total_len=106 in_port=2 (via action) data_len=106 (unbuffered)
 icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 icmp_csum:13fc
 ])
 
-OVS_VSWITCHD_STOP
-AT_CLEANUP
+   OVS_VSWITCHD_STOP
+   AT_CLEANUP])
+
+PMD_CHANGE_NUMA_NODE([consecutive NUMA nodes], [1])
+PMD_CHANGE_NUMA_NODE([non-consecutive NUMA nodes], [8])
 
 AT_SETUP([PMD - non pmd device])
 OVS_VSWITCHD_START(
@@ -582,61 +586,65 @@  p1 3 0 2
 OVS_VSWITCHD_STOP(["/dpif_netdev|WARN|There is no PMD thread on core/d"])
 AT_CLEANUP
 
-AT_SETUP([PMD - rxq affinity - NUMA])
-OVS_VSWITCHD_START(
-  [], [], [], [--dummy-numa 0,0,0,1,1])
-AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
+m4_define([PMD_RXQ_AFFINITY_NUMA],
+  [AT_SETUP([PMD - rxq affinity - $1])
+   OVS_VSWITCHD_START(
+     [], [], [], [--dummy-numa 0,0,0,$2,$2])
+   AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
 
-AT_CHECK([ovs-ofctl add-flow br0 actions=controller])
+   AT_CHECK([ovs-ofctl add-flow br0 actions=controller])
 
-AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=7e])
+   AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=7e])
 
-AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=2 options:numa_id=0 other_config:pmd-rxq-affinity="0:1,1:2"])
+   AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy-pmd ofport_request=1 options:n_rxq=2 options:numa_id=0 other_config:pmd-rxq-affinity="0:1,1:2"])
 
 dnl The rxqs should be on the requested cores.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
+   AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
 p1 0 0 1
 p1 1 0 2
 ])
 
-AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity="0:3,1:4"])
+   AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity="0:3,1:4"])
 
 dnl We moved the queues to different numa node. Expecting threads on
-dnl NUMA node 1 to be created.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 1 3
-p1 1 1 4
+dnl the second NUMA node to be created.
+   AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
+p1 0 $2 3
+p1 1 $2 4
 ])
 
-AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity="0:3,1:1"])
+   AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity="0:3,1:1"])
 
 dnl Queues splitted between NUMA nodes.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
-p1 0 1 3
+   AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show], [0], [dnl
+p1 0 $2 3
 p1 1 0 1
 ])
 
-AT_CHECK([ovs-vsctl remove Interface p1 other_config pmd-rxq-affinity])
+   AT_CHECK([ovs-vsctl remove Interface p1 other_config pmd-rxq-affinity])
 
 dnl We removed the rxq-affinity request.  dpif-netdev should assign queues
 dnl in a round robin fashion.  We just make sure that every rxq is being
 dnl polled again.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show | cut -f 1,2 -d ' ' | sort], [0], [dnl
+   AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show | cut -f 1,2 -d ' ' | sort], [0], [dnl
 p1 0
 p1 1
 ])
 
-AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity='0:3'])
+   AT_CHECK([ovs-vsctl set Interface p1 other_config:pmd-rxq-affinity='0:3'])
 
-dnl We explicitly requesting NUMA node 1 for queue 0.
+dnl We explicitly request the second NUMA node for queue 0.
 dnl Queue 1 should be polled by thread from NUMA node 0.
-AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show | cut -f 1,2,3 -d ' '], [0], [dnl
-p1 0 1
+   AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | parse_pmd_rxq_show | cut -f 1,2,3 -d ' '], [0], [dnl
+p1 0 $2
 p1 1 0
 ])
 
-OVS_VSWITCHD_STOP
-AT_CLEANUP
+   OVS_VSWITCHD_STOP
+   AT_CLEANUP])
+
+PMD_RXQ_AFFINITY_NUMA([consecutive NUMA nodes], [1])
+PMD_RXQ_AFFINITY_NUMA([non-consecutive NUMA nodes], [8])
 
 AT_SETUP([PMD - monitor threads])
 OVS_VSWITCHD_START(