+
+ if (rx_steer_flags && rx_steer_flows_num) {
+ smap_add_format(args, "rx_steering_queue", "%d", n_rxq - 1);
+ if (n_rxq > 2) {
+ smap_add_format(args, "rss_queues", "0-%d", n_rxq - 2);
} else {
- smap_add_format(args, "rx_steering_queue", "%d", n_rxq - 1);
- if (n_rxq > 2) {
- smap_add_format(args, "rss_queues", "0-%d", n_rxq - 2);
- } else {
- smap_add(args, "rss_queues", "0");
- }
+ smap_add(args, "rss_queues", "0");
}
}
diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c
index 1a54add87..fe82317d7 100644
--- a/lib/netdev-dummy.c
+++ b/lib/netdev-dummy.c
@@ -795,14 +795,25 @@ netdev_dummy_get_config(const struct netdev *dev, struct
smap *args)
dummy_packet_conn_get_config(&netdev->conn, args);
+ /* pcap, rxq_pcap and tx_pcap cannot be recovered because filenames have
+ * been discarded after opening file descriptors */
+
+ if (netdev->ol_ip_csum) {
+ smap_add_format(args, "ol_ip_csum", "%s", "true");
+ }
+
+ if (netdev->ol_ip_csum_set_good) {
+ smap_add_format(args, "ol_ip_csum_set_good", "%s", "true");
+ }
+
/* 'dummy-pmd' specific config. */
if (!netdev_is_pmd(dev)) {
goto exit;
}
- smap_add_format(args, "requested_rx_queues", "%d",
netdev->requested_n_rxq);
- smap_add_format(args, "configured_rx_queues", "%d", dev->n_rxq);
- smap_add_format(args, "requested_tx_queues", "%d",
netdev->requested_n_txq);
- smap_add_format(args, "configured_tx_queues", "%d", dev->n_txq);
+
+ smap_add_format(args, "n_rxq", "%d", netdev->requested_n_rxq);
+ smap_add_format(args, "n_txq", "%d", netdev->requested_n_txq);
+ smap_add_format(args, "numa_id", "%d", netdev->requested_numa_id);
exit:
ovs_mutex_unlock(&netdev->mutex);
diff --git a/lib/netdev-linux-private.h b/lib/netdev-linux-private.h
index 0ecf0f748..188e8438a 100644
--- a/lib/netdev-linux-private.h
+++ b/lib/netdev-linux-private.h
@@ -50,6 +50,7 @@ struct netdev_rxq_linux {
};
int netdev_linux_construct(struct netdev *);
+int netdev_linux_get_status(const struct netdev *, struct smap *);
void netdev_linux_run(const struct netdev_class *);
int get_stats_via_netlink(const struct netdev *netdev_,
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index cca340879..70521e3c7 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -3493,7 +3493,7 @@ netdev_linux_get_next_hop(const struct in_addr *host,
struct in_addr *next_hop,
return ENXIO;
}
-static int
+int
netdev_linux_get_status(const struct netdev *netdev_, struct smap *smap)
{
struct netdev_linux *netdev = netdev_linux_cast(netdev_);
@@ -3759,7 +3759,7 @@ const struct netdev_class netdev_internal_class = {
.destruct = netdev_afxdp_destruct, \
.get_stats = netdev_afxdp_get_stats, \
.get_custom_stats = netdev_afxdp_get_custom_stats, \
- .get_status = netdev_linux_get_status, \
+ .get_status = netdev_afxdp_get_status, \
.set_config = netdev_afxdp_set_config, \
.get_config = netdev_afxdp_get_config, \
.reconfigure = netdev_afxdp_reconfigure, \
diff --git a/tests/pmd.at b/tests/pmd.at
index 7bdaca9e7..df6adde6c 100644
--- a/tests/pmd.at
+++ b/tests/pmd.at
@@ -93,11 +93,11 @@ pmd thread numa_id <cleared> core_id <cleared>:
overhead: NOT AVAIL
])
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
+AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
br0:
br0 65534/100: (dummy-internal)
- p0 1/1: (dummy-pmd: configured_rx_queues=1, configured_tx_queues=<cleared>,
requested_rx_queues=1, requested_tx_queues=<cleared>)
+ p0 1/1: (dummy-pmd: n_rxq=1, n_txq=1, numa_id=0)
])
OVS_VSWITCHD_STOP
@@ -111,11 +111,11 @@ CHECK_PMD_THREADS_CREATED()
AT_CHECK([ovs-vsctl set interface p0 options:n_rxq=8])
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
+AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
br0:
br0 65534/100: (dummy-internal)
- p0 1/1: (dummy-pmd: configured_rx_queues=8, configured_tx_queues=<cleared>,
requested_rx_queues=8, requested_tx_queues=<cleared>)
+ p0 1/1: (dummy-pmd: n_rxq=8, n_txq=1, numa_id=0)
])
AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | sed SED_NUMA_CORE_PATTERN], [0], [dnl
@@ -144,11 +144,11 @@ OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0
type=dummy-pmd options:n
CHECK_CPU_DISCOVERED(2)
CHECK_PMD_THREADS_CREATED()
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
+AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
br0:
br0 65534/100: (dummy-internal)
- p0 1/1: (dummy-pmd: configured_rx_queues=8, configured_tx_queues=<cleared>,
requested_rx_queues=8, requested_tx_queues=<cleared>)
+ p0 1/1: (dummy-pmd: n_rxq=8, n_txq=1, numa_id=0)
])
AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | sed SED_NUMA_CORE_PATTERN], [0], [dnl
@@ -227,11 +227,11 @@ TMP=$(($(cat ovs-vswitchd.log | wc -l | tr -d
[[:blank:]])+1))
CHECK_CPU_DISCOVERED(4)
CHECK_PMD_THREADS_CREATED()
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
+AT_CHECK([ovs-appctl dpif/show | sed 's/\(numa_id=\)[[0-9]]*/\1<cleared>/g'],
[0], [dnl
dummy@ovs-dummy: hit:0 missed:0
br0:
br0 65534/100: (dummy-internal)
- p0 1/1: (dummy-pmd: configured_rx_queues=8, configured_tx_queues=<cleared>,
requested_rx_queues=8, requested_tx_queues=<cleared>)
+ p0 1/1: (dummy-pmd: n_rxq=8, n_txq=1, numa_id=<cleared>)
])
AT_CHECK([ovs-appctl dpif-netdev/pmd-rxq-show | sed SED_NUMA_CORE_PATTERN], [0], [dnl
@@ -436,11 +436,11 @@ AT_CHECK([ovs-vsctl set Open_vSwitch .
other_config:smc-enable=true])
sleep 1
-AT_CHECK([ovs-appctl dpif/show | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
+AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
br0:
br0 65534/100: (dummy-internal)
- p0 7/1: (dummy-pmd: configured_rx_queues=4, configured_tx_queues=<cleared>,
requested_rx_queues=4, requested_tx_queues=<cleared>)
+ p0 7/1: (dummy-pmd: n_rxq=4, n_txq=1, numa_id=0)
])
AT_CHECK([ovs-appctl dpif-netdev/pmd-stats-show | sed SED_NUMA_CORE_PATTERN | sed '/cycles/d' | grep pmd -A 12], [0], [dnl
@@ -604,8 +604,8 @@
icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10
dnl Check resetting to default number of rx queues after removal from the db.
AT_CHECK([ovs-vsctl remove interface p1 options n_rxq])
-AT_CHECK([ovs-appctl dpif/show | grep p1 | sed 's/\(tx_queues=\)[[0-9]]*/\1<cleared>/g'], [0], [dnl
- p1 1/1: (dummy-pmd: configured_rx_queues=1, configured_tx_queues=<cleared>,
requested_rx_queues=1, requested_tx_queues=<cleared>)
+AT_CHECK([ovs-appctl dpif/show | grep p1], [0], [dnl
+ p1 1/1: (dummy-pmd: n_rxq=1, n_txq=1, numa_id=0)
])
OVS_VSWITCHD_STOP
@@ -1152,7 +1152,7 @@ dummy@dp0:
lookups: hit:0 missed:0 lost:0
flows: 0
port 0: dp0 (dummy-internal)
- port 1: p1 (dummy-pmd: configured_rx_queues=1, configured_tx_queues=1,
requested_rx_queues=1, requested_tx_queues=1)
+ port 1: p1 (dummy-pmd: n_rxq=1, n_txq=1, numa_id=0)
port 2: p2 (dummy)
])
diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
index 0f58e8574..fd42aed0b 100644
--- a/tests/system-dpdk.at
+++ b/tests/system-dpdk.at
@@ -588,8 +588,9 @@ AT_CHECK([ovs-vsctl show], [], [stdout])
sleep 2
dnl Check default MTU value in the datapath
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=1500' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface phy0 mtu], [0], [dnl
+1500
+])
dnl Increase MTU value and check in the datapath
AT_CHECK([ovs-vsctl set Interface phy0 mtu_request=9000])
@@ -600,8 +601,9 @@ AT_FAIL_IF([grep "Interface phy0 does not support MTU
configuration" ovs-vswitch
dnl Fail if error is encountered during MTU setup
AT_FAIL_IF([grep "Interface phy0 MTU (9000) setup error" ovs-vswitchd.log],
[], [stdout])
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=9000' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface phy0 mtu], [0], [dnl
+9000
+])
dnl Clean up
@@ -636,14 +638,16 @@ dnl Fail if error is encountered during MTU setup
AT_FAIL_IF([grep "Interface phy0 MTU (9000) setup error" ovs-vswitchd.log],
[], [stdout])
dnl Check MTU value in the datapath
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=9000' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface phy0 mtu], [0], [dnl
+9000
+])
dnl Decrease MTU value and check in the datapath
AT_CHECK([ovs-vsctl set Interface phy0 mtu_request=2000])
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=2000' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface phy0 mtu], [0], [dnl
+2000
+])
dnl Clean up
@@ -686,16 +690,19 @@ tail -f /dev/null | dpdk-testpmd --socket-mem="$(cat
NUMA_NODE)" --no-pci\
--single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuserclient0.log
2>&1 &
OVS_WAIT_UNTIL([grep "virtio is now ready for processing" ovs-vswitchd.log])
+OVS_WAIT_UNTIL([ovs-vsctl get Interface dpdkvhostuserclient0 link_state | grep
-w up])
dnl Check default MTU value in the datapath
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=1500' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface dpdkvhostuserclient0 mtu], [0], [dnl
+1500
+])
dnl Increase MTU value and check in the datapath
AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=9000])
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=9000' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface dpdkvhostuserclient0 mtu], [0], [dnl
+9000
+])
dnl Clean up the testpmd now
pkill -f -x -9 'tail -f /dev/null'
@@ -743,16 +750,19 @@ tail -f /dev/null | dpdk-testpmd --socket-mem="$(cat
NUMA_NODE)" --no-pci\
--single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuserclient0.log
2>&1 &
OVS_WAIT_UNTIL([grep "virtio is now ready for processing" ovs-vswitchd.log])
+OVS_WAIT_UNTIL([ovs-vsctl get Interface dpdkvhostuserclient0 link_state | grep
-w up])
dnl Check MTU value in the datapath
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=9000' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface dpdkvhostuserclient0 mtu], [0], [dnl
+9000
+])
dnl Decrease MTU value and check in the datapath
AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=2000])
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=2000' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface dpdkvhostuserclient0 mtu], [0], [dnl
+2000
+])
dnl Clean up the testpmd now
pkill -f -x -9 'tail -f /dev/null'
@@ -789,8 +799,9 @@ dnl Fail if error is encountered during MTU setup
AT_FAIL_IF([grep "Interface phy0 MTU (9702) setup error" ovs-vswitchd.log],
[], [stdout])
dnl Check MTU value in the datapath
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=9702' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface phy0 mtu], [0], [dnl
+9702
+])
dnl Set MTU value above upper bound and check for error
AT_CHECK([ovs-vsctl set Interface phy0 mtu_request=9711])
@@ -830,8 +841,9 @@ dnl Fail if error is encountered during MTU setup
AT_FAIL_IF([grep "Interface phy0 MTU (68) setup error" ovs-vswitchd.log], [],
[stdout])
dnl Check MTU value in the datapath
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=68' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface phy0 mtu], [0], [dnl
+68
+])
dnl Set MTU value below lower bound and check for error
AT_CHECK([ovs-vsctl set Interface phy0 mtu_request=67])
@@ -877,10 +889,12 @@ tail -f /dev/null | dpdk-testpmd --socket-mem="$(cat
NUMA_NODE)" --no-pci\
--single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuserclient0.log
2>&1 &
OVS_WAIT_UNTIL([grep "virtio is now ready for processing" ovs-vswitchd.log])
+OVS_WAIT_UNTIL([ovs-vsctl get Interface dpdkvhostuserclient0 link_state | grep
-w up])
dnl Check MTU value in the datapath
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=9702' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface dpdkvhostuserclient0 mtu], [0], [dnl
+9702
+])
dnl Set MTU value above upper bound and check for error
AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=9711])
@@ -934,10 +948,12 @@ tail -f /dev/null | dpdk-testpmd --socket-mem="$(cat
NUMA_NODE)" --no-pci\
--single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuserclient0.log
2>&1 &
OVS_WAIT_UNTIL([grep "virtio is now ready for processing" ovs-vswitchd.log])
+OVS_WAIT_UNTIL([ovs-vsctl get Interface dpdkvhostuserclient0 link_state | grep
-w up])
dnl Check MTU value in the datapath
-AT_CHECK([ovs-appctl dpctl/show], [], [stdout])
-AT_CHECK([grep -E 'mtu=68' stdout], [], [stdout])
+AT_CHECK([ovs-vsctl get Interface dpdkvhostuserclient0 mtu], [0], [dnl
+68
+])
dnl Set MTU value below lower bound and check for error
AT_CHECK([ovs-vsctl set Interface dpdkvhostuserclient0 mtu_request=67])
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 1e2a1267d..a8037a96f 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -3789,6 +3789,18 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch
options:peer=p1 \
Maximum number of VMDq pools.
</column>
+ <column name="status" key="n_rxq">
+ Number of rx queues.
+ </column>
+
+ <column name="status" key="n_txq">
+ Number of tx queues.
+ </column>
+
+ <column name="status" key="rx_csum_offload">
+ Whether hardware has support for RX Checksum Offload or not.
+ </column>
+
<column name="status" key="if_type">
Interface type ID according to IANA ifTYPE MIB definitions.
</column>
@@ -3807,7 +3819,7 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch
options:peer=p1 \
VF representors.
</column>
- <column name="status" key="rx_steering">
+ <column name="status" key="rx-steering">
Hardware Rx queue steering policy in use.
</column>
@@ -3821,6 +3833,17 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
supported by hardware.
</column>
</group>
+
+ <group title="afxdp">
+ <p>
+ AF_XDP netdev specific interface status options.
+ </p>
+
+ <column name="status" key="xdp-mode">
+ XDP mode which was chosen.
+ </column>
+
+ </group>
</group>
<group title="Statistics">