* [dts][PATCH V1 1/2] tests/smoke_base modify ixgbe support vf jumbo verify.
@ 2022-05-09 7:46 Weiyuan Li
2022-05-09 7:46 ` [dts][PATCH V1 2/2] tests/vf_smoke " Weiyuan Li
2022-05-10 3:31 ` [dts][PATCH V1 1/2] tests/smoke_base " Peng, Yuan
0 siblings, 2 replies; 4+ messages in thread
From: Weiyuan Li @ 2022-05-09 7:46 UTC (permalink / raw)
To: dts, yuan.peng; +Cc: Weiyuan Li
the ixgbe NIC only supports one global MTU per physical port.
So when the user sets different MTUs on PF and VF ports in one physical port,
the real MTU for all these PF and VF ports is the largest value set.
This behavior is based on the kernel driver behavior.
So, modify script supports the verification packet sent is greater than PF MTU for ixgbe driver.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
tests/smoke_base.py | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/tests/smoke_base.py b/tests/smoke_base.py
index bb49c784..4b3fe9eb 100644
--- a/tests/smoke_base.py
+++ b/tests/smoke_base.py
@@ -51,12 +51,23 @@ class SmokeTest(object):
setattr(self, name, kwargs[name])
def send_pkg_return_stats(
- self, pkt_size=COMMON_PKT_LEN, l3_src=IPV4_SRC, l3_dst=IPV4_DST, rss=False
+ self, pkt_size=COMMON_PKT_LEN, l3_src=IPV4_SRC, l3_dst=IPV4_DST, rss=False, driver=None
):
self.test_case.dut.send_expect("clear port stats all", "testpmd> ")
l3_len = pkt_size - HEADER_SIZE["eth"]
payload = pkt_size - HEADER_SIZE["eth"] - HEADER_SIZE["ip"]
hash_flag = False
+ # For ixgbe, jumbo frame is not supported. MTU is determined by pf.
+ # so, testpmd max-pkt-len=9000 don't work.
+ # Although the user can set the MTU separately on PF and VF ports,
+ # the ixgbe NIC only supports one global MTU per physical port.
+ # So when the user sets different MTUs on PF and VF ports in one physical port,
+ # the real MTU for all these PF and VF ports is the largest value set.
+ # This behavior is based on the kernel driver behavior.
+ # The packet sent is greater than PF MTU 9000, the payload equal to 8083,
+ # PF received packet MTU = payload + IP, 8083 + 20 = 9001
+ if driver == 'ixgbe':
+ payload = pkt_size - HEADER_SIZE["eth"]
if rss:
pkt = []
# generate PACKAGE_COUNT count package, the IP dst is random.
@@ -113,14 +124,14 @@ class SmokeTest(object):
return queues[0], stats
return None, stats
- def check_jumbo_frames(self):
+ def check_jumbo_frames(self, kdriver=None):
"""
The packet total size include ethernet header, ip header, and payload.
ethernet header length is 18 bytes, ip standard header length is 20 bytes.
The packet forwarded failed.
"""
pkg_size = JUMBO_FRAME_LENGTH + 1
- queues, stats = self.send_pkg_return_stats(pkg_size)
+ queues, stats = self.send_pkg_return_stats(pkg_size, driver=kdriver)
if 1 != stats["RX-errors"] and 0 != stats["TX-packets"]:
self.test_case.logger.info(
"jumbo frame: The RX[{}] or TX[{}] packet error".format(
--
2.18.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts][PATCH V1 2/2] tests/vf_smoke modify ixgbe support vf jumbo verify.
2022-05-09 7:46 [dts][PATCH V1 1/2] tests/smoke_base modify ixgbe support vf jumbo verify Weiyuan Li
@ 2022-05-09 7:46 ` Weiyuan Li
2022-05-10 2:46 ` Chen, LingliX
2022-05-10 3:31 ` [dts][PATCH V1 1/2] tests/smoke_base " Peng, Yuan
1 sibling, 1 reply; 4+ messages in thread
From: Weiyuan Li @ 2022-05-09 7:46 UTC (permalink / raw)
To: dts, yuan.peng; +Cc: Weiyuan Li
Modify script supports set PF MTU for ixgbe driver.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
tests/TestSuite_vf_smoke.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/TestSuite_vf_smoke.py b/tests/TestSuite_vf_smoke.py
index e4f0c31b..685a54a0 100644
--- a/tests/TestSuite_vf_smoke.py
+++ b/tests/TestSuite_vf_smoke.py
@@ -32,6 +32,7 @@
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
+from framework.utils import RED
from .smoke_base import (
DEFAULT_MTU_VALUE,
@@ -74,6 +75,7 @@ class TestVfSmoke(TestCase):
# generate vf
self.dut.bind_interfaces_linux(self.kdriver)
+ self.set_pf_mtu()
self.dut.generate_sriov_vfs_by_port(self.smoke_dut_ports[0], 1, self.kdriver)
self.vf_ports = self.dut.ports_info[self.smoke_dut_ports[0]]["vfs_port"]
self.verify(len(self.vf_ports) != 0, "VF create failed")
@@ -121,6 +123,12 @@ class TestVfSmoke(TestCase):
if out == "" or "No such file or directory" in out:
self.vf_launch_dpdk_app()
+ def set_pf_mtu(self):
+ self.dut.send_expect(f"ifconfig {self.pf_interface} mtu {JUMBO_FRAME_LENGTH}", "# ")
+ out = self.dut.send_expect(f"ip link show {self.pf_interface}", "# ")
+ if '9000' not in out:
+ print(RED("Please set mtu for case vf_jumbo_frames case!"))
+
def vf_launch_dpdk_app(self):
self.pmd_out.start_testpmd(cores=self.cores, ports=self.ports, param=self.param)
@@ -137,7 +145,7 @@ class TestVfSmoke(TestCase):
self.dut.send_expect("set fwd mac", "testpmd> ")
self.dut.send_expect("start", "testpmd> ")
self.pmd_out.wait_link_status_up(self.smoke_dut_ports[0])
- result = self.test_func.check_jumbo_frames()
+ result = self.test_func.check_jumbo_frames(self.kdriver)
self.verify(result, "enable disable jumbo frames failed")
def test_vf_rss(self):
--
2.18.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [dts][PATCH V1 2/2] tests/vf_smoke modify ixgbe support vf jumbo verify.
2022-05-09 7:46 ` [dts][PATCH V1 2/2] tests/vf_smoke " Weiyuan Li
@ 2022-05-10 2:46 ` Chen, LingliX
0 siblings, 0 replies; 4+ messages in thread
From: Chen, LingliX @ 2022-05-10 2:46 UTC (permalink / raw)
To: dts; +Cc: Li, WeiyuanX
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
> -----Original Message-----
> From: Weiyuan Li <weiyuanx.li@intel.com>
> Sent: Monday, May 9, 2022 3:47 PM
> To: dts@dpdk.org; Peng, Yuan <yuan.peng@intel.com>
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V1 2/2] tests/vf_smoke modify ixgbe support vf jumbo
> verify.
>
> Modify script supports set PF MTU for ixgbe driver.
>
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
> ---
Tested-by: Lingli Chen <linglix.chen@intel.com>
[-- Attachment #2: TestVfSmoke.log --]
[-- Type: application/octet-stream, Size: 12210 bytes --]
10/05/2022 10:28:22 dts:
TEST SUITE : TestVfSmoke
10/05/2022 10:28:22 dts: NIC : IXGBE_10G-82599_SFP
10/05/2022 10:28:22 dut.10.239.251.28:
10/05/2022 10:28:22 tester:
10/05/2022 10:28:22 dut.10.239.251.28: ls
10/05/2022 10:28:22 dut.10.239.251.28: ABI_VERSION app buildtoo config devtoo doc dpdk.log drivers examples kernel lib license MAINTAINERS Makefile meson.build meson_options.txt README usertoo VERSION x86_64-native-linuxapp-gcc
10/05/2022 10:28:22 dut.10.239.251.28: usertools/dpdk-devbind.py --force --bind=ixgbe 0000:af:00.0 0000:af:00.1
10/05/2022 10:28:23 dut.10.239.251.28:
10/05/2022 10:28:23 dut.10.239.251.28: ifconfig ens802f0 mtu 9000
10/05/2022 10:28:23 dut.10.239.251.28:
10/05/2022 10:28:23 dut.10.239.251.28: ip link show ens802f0
10/05/2022 10:28:23 dut.10.239.251.28: 176: ens802f0: <BROADCAST,MULTICAST> mtu 9000 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 90:e2:ba:ac:99:fc brd ff:ff:ff:ff:ff:ff
altname enp175s0f0
10/05/2022 10:28:25 dut.10.239.251.28: cat /sys/bus/pci/devices/0000\:af\:10.0/vendor
10/05/2022 10:28:25 dut.10.239.251.28: 0x8086
10/05/2022 10:28:25 dut.10.239.251.28: cat /sys/bus/pci/devices/0000\:af\:10.0/device
10/05/2022 10:28:25 dut.10.239.251.28: 0x10ed
10/05/2022 10:28:27 dut.10.239.251.28: ifconfig ens802f0 up
10/05/2022 10:28:27 dut.10.239.251.28:
10/05/2022 10:28:27 tester: ifconfig ens224f0 up
10/05/2022 10:28:27 tester:
10/05/2022 10:28:27 dut.10.239.251.28: ip link set ens802f0 vf 0 mac 00:11:22:33:44:55
10/05/2022 10:28:27 dut.10.239.251.28:
10/05/2022 10:28:29 TestVfSmoke: Test Case test_vf_jumbo_frames Begin
10/05/2022 10:28:29 dut.10.239.251.28:
10/05/2022 10:28:29 tester:
10/05/2022 10:28:29 tester: ifconfig ens224f0 mtu 9600
10/05/2022 10:28:29 tester:
10/05/2022 10:28:30 dut.10.239.251.28: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-4 -n 4 -a 0000:af:10.0 --file-prefix=dpdk_18393_20220510102803 -- -i --max-pkt-len=9000 --tx-offloads=0x8000 --rxq=4 --txq=4
10/05/2022 10:28:31 dut.10.239.251.28: EAL: Detected CPU lcores: 72
EAL: Detected NUMA nodes: 2
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/dpdk_18393_20220510102803/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: VFIO support initialized
EAL: Using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_ixgbe_vf (8086:10ed) device: 0000:af:10.0 (socket 1)
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=171456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
testpmd: create a new mbuf pool <mb_pool_1>: n=171456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.
Configuring Port 0 (socket 1)
Port 0: 00:11:22:33:44:55
Checking link statuses...
Done
10/05/2022 10:28:41 dut.10.239.251.28: set promisc all off
10/05/2022 10:28:41 dut.10.239.251.28:
10/05/2022 10:28:41 dut.10.239.251.28: show port info 0
10/05/2022 10:28:41 dut.10.239.251.28:
********************* Infos for port 0 *********************
MAC address: 00:11:22:33:44:55
Device name: 0000:af:10.0
Driver name: net_ixgbe_vf
Firmware-version: not available
Devargs:
Connect to socket: 1
memory allocation on the socket: 1
Link status: up
Link speed: 10 Gbps
Link duplex: full-duplex
Autoneg status: On
MTU: 8982
Promiscuous mode: disabled
Allmulticast mode: disabled
Maximum number of MAC addresses: 128
Maximum number of MAC addresses of hash filtering: 4096
VLAN offload:
strip off, filter off, extend off, qinq strip off
Hash key size in bytes: 40
Supported RSS offload flow types:
ipv4
ipv4-tcp
ipv4-udp
ipv6
ipv6-tcp
ipv6-udp
ipv6-ex
ipv6-tcp-ex
ipv6-udp-ex
Minimum size of RX buffer: 1024
Maximum configurable length of RX packet: 9728
Maximum configurable size of LRO aggregated packet: 0
Maximum number of VMDq pools: 64
Current number of RX queues: 4
Max possible RX queues: 4
Max possible number of RXDs per queue: 4096
Min possible number of RXDs per queue: 32
RXDs number alignment: 8
Current number of TX queues: 4
Max possible TX queues: 4
Max possible number of TXDs per queue: 4096
Min possible number of TXDs per queue: 32
TXDs number alignment: 8
Max segment number per packet: 40
Max segment number per MTU/TSO: 40
Device capabilities: 0x0( )
10/05/2022 10:28:41 dut.10.239.251.28: set verbose 3
10/05/2022 10:28:41 dut.10.239.251.28:
Change verbose level from 0 to 3
10/05/2022 10:28:41 dut.10.239.251.28: set fwd mac
10/05/2022 10:28:41 dut.10.239.251.28:
Set mac packet forwarding mode
10/05/2022 10:28:41 dut.10.239.251.28: start
10/05/2022 10:28:41 dut.10.239.251.28:
mac packet forwarding - ports=1 - cores=1 - streams=4 - NUMA support enabled, MP allocation mode: native
Logical Core 2 (socket 0) forwards packets on 4 streams:
RX P=0/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=1 (socket 1) -> TX P=0/Q=1 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=2 (socket 1) -> TX P=0/Q=2 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=3 (socket 1) -> TX P=0/Q=3 (socket 1) peer=02:00:00:00:00:00
port 0/queue 3: received 1 packets
src=90:E2:BA:AC:99:FC - dst=33:33:00:00:00:FB - type=0x86dd - length=200 - nb_segs=1 - RSS hash=0xa28c70cb - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV6 L4_UDP - sw ptype: L2_ETHER L3_IPV6 L4_UDP - l2_len=14 - l3_len=40 - l4_len=8 - Receive queue=0x3
ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
mac packet forwarding packets/burst=32
nb forwarding cores=1 - nb forwarding ports=1
port 0: RX queue number: 4 Tx queue number: 4
Rx offloads=0x80000 Tx offloads=0x8000
RX queue: 0
RX desc=512 - RX free threshold=32
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
RX Offloads=0x80000
TX queue: 0
TX desc=512 - TX free threshold=32
TX threshold registers: pthresh=32 hthresh=0 wthresh=0
TX offloads=0x8000 - TX RS bit threshold=32
10/05/2022 10:28:41 dut.10.239.251.28: show port info 0
10/05/2022 10:28:41 dut.10.239.251.28:
********************* Infos for port 0 *********************
MAC address: 00:11:22:33:44:55
Device name: 0000:af:10.0
Driver name: net_ixgbe_vf
Firmware-version: not available
Devargs:
Connect to socket: 1
memory allocation on the socket: 1
Link status: up
Link speed: 10 Gbps
Link duplex: full-duplex
Autoneg status: On
MTU: 8982
Promiscuous mode: disabled
Allmulticast mode: disabled
Maximum number of MAC addresses: 128
Maximum number of MAC addresses of hash filtering: 4096
VLAN offload:
strip off, filter off, extend off, qinq strip off
Hash key size in bytes: 40
Supported RSS offload flow types:
ipv4
ipv4-tcp
ipv4-udp
ipv6
ipv6-tcp
ipv6-udp
ipv6-ex
ipv6-tcp-ex
ipv6-udp-ex
Minimum size of RX buffer: 1024
Maximum configurable length of RX packet: 9728
Maximum configurable size of LRO aggregated packet: 0
Maximum number of VMDq pools: 64
Current number of RX queues: 4
Max possible RX queues: 4
Max possible number of RXDs per queue: 4096
Min possible number of RXDs per queue: 32
RXDs number alignment: 8
Current number of TX queues: 4
Max possible TX queues: 4
Max possible number of TXDs per queue: 4096
Min possible number of TXDs per queue: 32
TXDs number alignment: 8
Max segment number per packet: 40
Max segment number per MTU/TSO: 40
Device capabilities: 0x0( )
10/05/2022 10:28:41 dut.10.239.251.28: clear port stats all
10/05/2022 10:28:41 dut.10.239.251.28:
NIC statistics for port 0 cleared
10/05/2022 10:28:44 dut.10.239.251.28:
10/05/2022 10:28:44 dut.10.239.251.28: show port stats 0
10/05/2022 10:28:44 dut.10.239.251.28:
######################## NIC statistics for port 0 ########################
RX-packets: 0 RX-missed: 0 RX-bytes: 0
RX-errors: 0
RX-nombuf: 0
TX-packets: 0 TX-errors: 0 TX-bytes: 0
Throughput (since last show)
Rx-pps: 0 Rx-bps: 0
Tx-pps: 0 Tx-bps: 0
############################################################################
10/05/2022 10:28:44 dut.10.239.251.28: clear port stats all
10/05/2022 10:28:44 dut.10.239.251.28:
NIC statistics for port 0 cleared
10/05/2022 10:28:47 dut.10.239.251.28: port 0/queue 0: received 1 packets
src=90:E2:BA:AC:6D:F4 - dst=00:11:22:33:44:55 - type=0x0800 - length=8996 - nb_segs=5 - RSS hash=0xa4f39e70 - RSS queue=0x0 - hw ptype: L2_ETHER L3_IPV4 - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Receive queue=0x0
ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: sent 1 packets
src=00:11:22:33:44:55 - dst=02:00:00:00:00:00 - type=0x0800 - length=8996 - nb_segs=5 - hw ptype: L2_ETHER L3_IPV4 - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Send queue=0x0
ol_flags: RTE_MBUF_F_TX_L4_NO_CKSUM
10/05/2022 10:28:47 dut.10.239.251.28: show port stats 0
10/05/2022 10:28:47 dut.10.239.251.28:
######################## NIC statistics for port 0 ########################
RX-packets: 1 RX-missed: 0 RX-bytes: 8996
RX-errors: 0
RX-nombuf: 0
TX-packets: 1 TX-errors: 0 TX-bytes: 8996
Throughput (since last show)
Rx-pps: 0 Rx-bps: 26504
Tx-pps: 0 Tx-bps: 26504
############################################################################
10/05/2022 10:28:47 TestVfSmoke: Test Case test_vf_jumbo_frames Result PASSED:
10/05/2022 10:28:47 dut.10.239.251.28: stop
10/05/2022 10:28:47 dut.10.239.251.28:
Telling cores to ...
Waiting for lcores to finish...
------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 0/Queue= 0 -------
RX-packets: 1 TX-packets: 1 TX-dropped: 0
---------------------- Forward statistics for port 0 ----------------------
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 1 TX-dropped: 0 TX-total: 1
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 1 TX-dropped: 0 TX-total: 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Done.
10/05/2022 10:28:47 tester: ifconfig ens224f0 mtu 1500
10/05/2022 10:28:47 tester:
10/05/2022 10:28:47 dut.10.239.251.28: quit
10/05/2022 10:28:48 dut.10.239.251.28:
Stopping port 0...
Stopping ports...
Done
Shutting down port 0...
Closing ports...
Port 0 is closed
Done
Bye...
10/05/2022 10:28:48 dut.10.239.251.28: kill_all: called by dut and prefix list has value.
10/05/2022 10:28:49 dts:
TEST SUITE ENDED: TestVfSmoke
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [dts][PATCH V1 1/2] tests/smoke_base modify ixgbe support vf jumbo verify.
2022-05-09 7:46 [dts][PATCH V1 1/2] tests/smoke_base modify ixgbe support vf jumbo verify Weiyuan Li
2022-05-09 7:46 ` [dts][PATCH V1 2/2] tests/vf_smoke " Weiyuan Li
@ 2022-05-10 3:31 ` Peng, Yuan
1 sibling, 0 replies; 4+ messages in thread
From: Peng, Yuan @ 2022-05-10 3:31 UTC (permalink / raw)
To: Li, WeiyuanX, dts
Acked-by: Peng, Yuan <yuan.peng@intel.com>
-----Original Message-----
From: Li, WeiyuanX <weiyuanx.li@intel.com>
Sent: Monday, May 9, 2022 3:47 PM
To: dts@dpdk.org; Peng, Yuan <yuan.peng@intel.com>
Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1 1/2] tests/smoke_base modify ixgbe support vf jumbo verify.
the ixgbe NIC only supports one global MTU per physical port.
So when the user sets different MTUs on PF and VF ports in one physical port, the real MTU for all these PF and VF ports is the largest value set.
This behavior is based on the kernel driver behavior.
So, modify script supports the verification packet sent is greater than PF MTU for ixgbe driver.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-10 3:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 7:46 [dts][PATCH V1 1/2] tests/smoke_base modify ixgbe support vf jumbo verify Weiyuan Li
2022-05-09 7:46 ` [dts][PATCH V1 2/2] tests/vf_smoke " Weiyuan Li
2022-05-10 2:46 ` Chen, LingliX
2022-05-10 3:31 ` [dts][PATCH V1 1/2] tests/smoke_base " Peng, Yuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).