* [dts] [PATCH V1 1/4] [next]config/nic_single_core_perf: fix file format issue
2019-07-29 1:48 [dts] [PATCH V1 0/4] dts: update suite nic_single_core_perf and ports config yufengmx
@ 2019-07-29 1:48 ` yufengmx
2019-07-29 1:48 ` [dts] [PATCH V1 2/4] [next]config/ports: add trex format comment yufengmx
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: yufengmx @ 2019-07-29 1:48 UTC (permalink / raw)
To: dts; +Cc: yufengmx
fix nic_single_core_perf suite config file format issue.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
conf/nic_single_core_perf.cfg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/conf/nic_single_core_perf.cfg b/conf/nic_single_core_perf.cfg
index 6ecb524..fcaa097 100644
--- a/conf/nic_single_core_perf.cfg
+++ b/conf/nic_single_core_perf.cfg
@@ -39,5 +39,5 @@ expected_throughput = {
'fortville_25g': {64: {512: 0.00, 2048: 0.00}},
'ConnectX4_LX_MT4117': {'40G': {64: {128: 0.00, 256: 0.00, 512: 0.00, 2048: 0.00}},
'25G': {64: {128: 0.00, 256: 0.00, 512: 0.00, 2048: 0.00}}},
- 'ConnectX5_MT4121': {64: {128: 0.00, 256: 0.00, 512: 0.00, 2048: 0.00}}
-}
+ 'ConnectX5_MT4121': {64: {128: 0.00, 256: 0.00, 512: 0.00, 2048: 0.00}}}
+
--
1.9.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH V1 2/4] [next]config/ports: add trex format comment
2019-07-29 1:48 [dts] [PATCH V1 0/4] dts: update suite nic_single_core_perf and ports config yufengmx
2019-07-29 1:48 ` [dts] [PATCH V1 1/4] [next]config/nic_single_core_perf: fix file format issue yufengmx
@ 2019-07-29 1:48 ` yufengmx
2019-08-08 5:41 ` Tu, Lijuan
2019-07-29 1:48 ` [dts] [PATCH V1 3/4] [next]framework/dut: add check condition for trex port yufengmx
2019-07-29 1:48 ` [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script yufengmx
3 siblings, 1 reply; 8+ messages in thread
From: yufengmx @ 2019-07-29 1:48 UTC (permalink / raw)
To: dts; +Cc: yufengmx
add trex format comment as TREX:x
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
conf/ports.cfg | 2 ++
1 file changed, 2 insertions(+)
diff --git a/conf/ports.cfg b/conf/ports.cfg
index 7fa7aae..1102375 100644
--- a/conf/ports.cfg
+++ b/conf/ports.cfg
@@ -4,6 +4,7 @@
# pci=Pci BDF,intf=Kernel interface;
# pci=Pci BDF,mac=Mac address,peer=Tester Pci BDF,numa=Port Numa
# pci=Pci BDF,peer=IXIA:card.port
+# pci=Pci BDF,peer=TREX:port
# pci=Pci BDF,peer=Tester Pci BDF,tp_ip=$(IP),tp_path=$({PERL_PATH);
# pci=Pci BDF,peer=Tester Pci BDF,sec_port=yes,first_port=Pci BDF;
# [VM NAME] virtual machine name; This section is for virutal scenario
@@ -14,6 +15,7 @@ ports =
pci=XX:XX.X,intf=eth0;
pci=YY:YY.Y,mac=XX:XX:XX:XX:XX:XX,peer=ZZ:ZZ.Z,numa=0;
pci=ZZ:ZZ.Y,peer=IXIA:X.Y;
+ pci=ZZ:ZZ.Y,peer=TREX:X;
pci=0000:XX:XX.X,peer=0000:ZZ:ZZ.Z,tp_ip=127.0.0.1,tp_path=/home/libertyTrailTP_322291/perl;
pci=0000:YY:YY.Y,peer=0000:ZZ:ZZ.Z,sec_port=yes,first_port=XX:XX.X;
[VM NAME]
--
1.9.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH V1 2/4] [next]config/ports: add trex format comment
2019-07-29 1:48 ` [dts] [PATCH V1 2/4] [next]config/ports: add trex format comment yufengmx
@ 2019-08-08 5:41 ` Tu, Lijuan
0 siblings, 0 replies; 8+ messages in thread
From: Tu, Lijuan @ 2019-08-08 5:41 UTC (permalink / raw)
To: Mo, YufengX, dts; +Cc: Mo, YufengX
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx
> Sent: Monday, July 29, 2019 9:49 AM
> To: dts@dpdk.org
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 2/4] [next]config/ports: add trex format comment
>
>
> add trex format comment as TREX:x
>
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
> conf/ports.cfg | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/conf/ports.cfg b/conf/ports.cfg index 7fa7aae..1102375 100644
> --- a/conf/ports.cfg
> +++ b/conf/ports.cfg
> @@ -4,6 +4,7 @@
> # pci=Pci BDF,intf=Kernel interface;
> # pci=Pci BDF,mac=Mac address,peer=Tester Pci BDF,numa=Port Numa
> # pci=Pci BDF,peer=IXIA:card.port
> +# pci=Pci BDF,peer=TREX:port
> # pci=Pci BDF,peer=Tester Pci BDF,tp_ip=$(IP),tp_path=$({PERL_PATH);
> # pci=Pci BDF,peer=Tester Pci BDF,sec_port=yes,first_port=Pci BDF;
> # [VM NAME] virtual machine name; This section is for virutal scenario @@ -
> 14,6 +15,7 @@ ports =
> pci=XX:XX.X,intf=eth0;
> pci=YY:YY.Y,mac=XX:XX:XX:XX:XX:XX,peer=ZZ:ZZ.Z,numa=0;
> pci=ZZ:ZZ.Y,peer=IXIA:X.Y;
> + pci=ZZ:ZZ.Y,peer=TREX:X;
>
> pci=0000:XX:XX.X,peer=0000:ZZ:ZZ.Z,tp_ip=127.0.0.1,tp_path=/home/libertyTr
> ailTP_322291/perl;
> pci=0000:YY:YY.Y,peer=0000:ZZ:ZZ.Z,sec_port=yes,first_port=XX:XX.X;
> [VM NAME]
> --
> 1.9.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH V1 3/4] [next]framework/dut: add check condition for trex port
2019-07-29 1:48 [dts] [PATCH V1 0/4] dts: update suite nic_single_core_perf and ports config yufengmx
2019-07-29 1:48 ` [dts] [PATCH V1 1/4] [next]config/nic_single_core_perf: fix file format issue yufengmx
2019-07-29 1:48 ` [dts] [PATCH V1 2/4] [next]config/ports: add trex format comment yufengmx
@ 2019-07-29 1:48 ` yufengmx
2019-08-08 5:41 ` Tu, Lijuan
2019-07-29 1:48 ` [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script yufengmx
3 siblings, 1 reply; 8+ messages in thread
From: yufengmx @ 2019-07-29 1:48 UTC (permalink / raw)
To: dts; +Cc: yufengmx
mapping
add check condition for trex port mapping and fix indentation issue.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
framework/dut.py | 59 ++++++++++++++++++++++++++++++--------------------------
1 file changed, 32 insertions(+), 27 deletions(-)
diff --git a/framework/dut.py b/framework/dut.py
index cc36f72..48a5326 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -937,7 +937,12 @@ class Dut(Crb):
dutpci = self.ports_info[dutPort]['pci']
if peer is not None:
for remotePort in range(len(self.tester.ports_info)):
- if self.tester.ports_info[remotePort]['pci'].lower() == peer.lower():
+ if self.tester.ports_info[remotePort]['type'].lower() == 'trex':
+ if self.tester.ports_info[remotePort]['intf'].lower() == peer.lower():
+ hits[remotePort] = True
+ self.ports_map[dutPort] = remotePort
+ break
+ elif self.tester.ports_info[remotePort]['pci'].lower() == peer.lower():
hits[remotePort] = True
self.ports_map[dutPort] = remotePort
break
@@ -959,34 +964,34 @@ class Dut(Crb):
ipv6 = self.get_ipv6_address(dutPort)
if ipv6 == "Not connected":
if self.tester.ports_info[remotePort].has_key('ipv4'):
- out = self.tester.send_ping(
- dutPort, self.tester.ports_info[remotePort]['ipv4'],
- self.get_mac_address(dutPort))
- else:
- continue
- else:
+ out = self.tester.send_ping(
+ dutPort, self.tester.ports_info[remotePort]['ipv4'],
+ self.get_mac_address(dutPort))
+ else:
+ continue
+ else:
if getattr(self, 'send_ping6', None):
- out = self.send_ping6(
- dutPort, self.tester.ports_info[remotePort]['ipv6'],
- self.get_mac_address(dutPort))
+ out = self.send_ping6(
+ dutPort, self.tester.ports_info[remotePort]['ipv6'],
+ self.get_mac_address(dutPort))
else:
- out = self.tester.send_ping6(
- remotePort, ipv6, self.get_mac_address(dutPort))
-
- if ('64 bytes from' in out):
- self.logger.info("PORT MAP: [dut %d: tester %d]" % (dutPort, remotePort))
- self.ports_map[dutPort] = remotePort
- hits[remotePort] = True
- if self.crb['IP'] == self.crb['tester IP']:
- # remove dut port act as tester port
- remove_port = self.get_port_info(remotepci)
- if remove_port is not None:
- remove.append(remove_port)
- # skip ping from those port already act as dut port
- testerPort = self.tester.get_local_index(dutpci)
- if testerPort != -1:
- hits[testerPort] = True
- break
+ out = self.tester.send_ping6(
+ remotePort, ipv6, self.get_mac_address(dutPort))
+
+ if ('64 bytes from' in out):
+ self.logger.info("PORT MAP: [dut %d: tester %d]" % (dutPort, remotePort))
+ self.ports_map[dutPort] = remotePort
+ hits[remotePort] = True
+ if self.crb['IP'] == self.crb['tester IP']:
+ # remove dut port act as tester port
+ remove_port = self.get_port_info(remotepci)
+ if remove_port is not None:
+ remove.append(remove_port)
+ # skip ping from those port already act as dut port
+ testerPort = self.tester.get_local_index(dutpci)
+ if testerPort != -1:
+ hits[testerPort] = True
+ break
for port in remove:
self.ports_info.remove(port)
--
1.9.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH V1 3/4] [next]framework/dut: add check condition for trex port
2019-07-29 1:48 ` [dts] [PATCH V1 3/4] [next]framework/dut: add check condition for trex port yufengmx
@ 2019-08-08 5:41 ` Tu, Lijuan
0 siblings, 0 replies; 8+ messages in thread
From: Tu, Lijuan @ 2019-08-08 5:41 UTC (permalink / raw)
To: Mo, YufengX, dts; +Cc: Mo, YufengX
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx
> Sent: Monday, July 29, 2019 9:49 AM
> To: dts@dpdk.org
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 3/4] [next]framework/dut: add check condition for
> trex port
>
> mapping
>
> add check condition for trex port mapping and fix indentation issue.
>
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
> framework/dut.py | 59 ++++++++++++++++++++++++++++++------------------------
> --
> 1 file changed, 32 insertions(+), 27 deletions(-)
>
> diff --git a/framework/dut.py b/framework/dut.py index cc36f72..48a5326
> 100644
> --- a/framework/dut.py
> +++ b/framework/dut.py
> @@ -937,7 +937,12 @@ class Dut(Crb):
> dutpci = self.ports_info[dutPort]['pci']
> if peer is not None:
> for remotePort in range(len(self.tester.ports_info)):
> - if self.tester.ports_info[remotePort]['pci'].lower() == peer.lower():
> + if self.tester.ports_info[remotePort]['type'].lower() == 'trex':
> + if self.tester.ports_info[remotePort]['intf'].lower() ==
> peer.lower():
> + hits[remotePort] = True
> + self.ports_map[dutPort] = remotePort
> + break
> + elif self.tester.ports_info[remotePort]['pci'].lower() ==
> peer.lower():
> hits[remotePort] = True
> self.ports_map[dutPort] = remotePort
> break
> @@ -959,34 +964,34 @@ class Dut(Crb):
> ipv6 = self.get_ipv6_address(dutPort)
> if ipv6 == "Not connected":
> if self.tester.ports_info[remotePort].has_key('ipv4'):
> - out = self.tester.send_ping(
> - dutPort,
> self.tester.ports_info[remotePort]['ipv4'],
> - self.get_mac_address(dutPort))
> - else:
> - continue
> - else:
> + out = self.tester.send_ping(
> + dutPort, self.tester.ports_info[remotePort]['ipv4'],
> + self.get_mac_address(dutPort))
> + else:
> + continue
> + else:
> if getattr(self, 'send_ping6', None):
> - out = self.send_ping6(
> - dutPort, self.tester.ports_info[remotePort]['ipv6'],
> - self.get_mac_address(dutPort))
> + out = self.send_ping6(
> + dutPort, self.tester.ports_info[remotePort]['ipv6'],
> + self.get_mac_address(dutPort))
> else:
> - out = self.tester.send_ping6(
> - remotePort, ipv6,
> self.get_mac_address(dutPort))
> -
> - if ('64 bytes from' in out):
> - self.logger.info("PORT MAP: [dut %d: tester %d]" % (dutPort,
> remotePort))
> - self.ports_map[dutPort] = remotePort
> - hits[remotePort] = True
> - if self.crb['IP'] == self.crb['tester IP']:
> - # remove dut port act as tester port
> - remove_port = self.get_port_info(remotepci)
> - if remove_port is not None:
> - remove.append(remove_port)
> - # skip ping from those port already act as dut port
> - testerPort = self.tester.get_local_index(dutpci)
> - if testerPort != -1:
> - hits[testerPort] = True
> - break
> + out = self.tester.send_ping6(
> + remotePort, ipv6,
> + self.get_mac_address(dutPort))
> +
> + if ('64 bytes from' in out):
> + self.logger.info("PORT MAP: [dut %d: tester %d]" % (dutPort,
> remotePort))
> + self.ports_map[dutPort] = remotePort
> + hits[remotePort] = True
> + if self.crb['IP'] == self.crb['tester IP']:
> + # remove dut port act as tester port
> + remove_port = self.get_port_info(remotepci)
> + if remove_port is not None:
> + remove.append(remove_port)
> + # skip ping from those port already act as dut port
> + testerPort = self.tester.get_local_index(dutpci)
> + if testerPort != -1:
> + hits[testerPort] = True
> + break
>
> for port in remove:
> self.ports_info.remove(port)
> --
> 1.9.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script.
2019-07-29 1:48 [dts] [PATCH V1 0/4] dts: update suite nic_single_core_perf and ports config yufengmx
` (2 preceding siblings ...)
2019-07-29 1:48 ` [dts] [PATCH V1 3/4] [next]framework/dut: add check condition for trex port yufengmx
@ 2019-07-29 1:48 ` yufengmx
2019-08-08 5:41 ` Tu, Lijuan
3 siblings, 1 reply; 8+ messages in thread
From: yufengmx @ 2019-07-29 1:48 UTC (permalink / raw)
To: dts; +Cc: yufengmx
update suite nic_single_core_perf with new pktgen measure_throughput input parameter definition.
for pktgen testing belongs to performance test case, change test_nic_single_core_perf to test_perf_nic_single_core.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
tests/TestSuite_nic_single_core_perf.py | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py
index 847a94c..6b530bc 100644
--- a/tests/TestSuite_nic_single_core_perf.py
+++ b/tests/TestSuite_nic_single_core_perf.py
@@ -42,6 +42,7 @@ from time import sleep
from exception import VerifyFailure
from settings import HEADER_SIZE, UPDATE_EXPECTED, load_global_setting
from pmd_output import PmdOutput
+from pktgen import TRANSMIT_CONT
from copy import deepcopy
from prettytable import PrettyTable
import rst
@@ -112,7 +113,7 @@ class TestNicSingleCorePerf(TestCase):
'Expected Throughput', 'Throughput Difference']
self.test_result = {}
- def test_nic_single_core_perf(self):
+ def test_perf_nic_single_core(self):
"""
Run nic single core performance
"""
@@ -181,8 +182,9 @@ class TestNicSingleCorePerf(TestCase):
# measure throughput
stream_ids = self.prepare_stream(frame_size)
+ traffic_opt = {'delay': self.test_duration}
_, packets_received = self.tester.pktgen.measure_throughput(
- stream_ids = stream_ids, delay = self.test_duration)
+ stream_ids, traffic_opt)
throughput = packets_received / 1000000.0
self.throughput[frame_size][nb_desc] = throughput
@@ -247,11 +249,6 @@ class TestNicSingleCorePerf(TestCase):
'''
create streams for ports, one port two streams, and configure them.
'''
- # traffic option
- options = {
- 'rate': '100%',
- }
-
# create pcap file
payload_size = frame_size - self.headers_size
self.tester.scapy_append(
@@ -271,6 +268,13 @@ class TestNicSingleCorePerf(TestCase):
# this's fine for other NIC too.
for k in range(2):
# txport -> rxport
+ pcap = '/tmp/test{}.pcap'.format(k)
+ options = {
+ 'pcap': pcap,
+ 'stream_config':{
+ 'txmode' : {},
+ 'transmit_mode': TRANSMIT_CONT,
+ 'rate': 100,}}
stream_id = self.tester.pktgen.add_stream(
txport, rxport, '/tmp/test{}.pcap'.format(k))
self.tester.pktgen.config_stream(stream_id, options)
@@ -280,7 +284,7 @@ class TestNicSingleCorePerf(TestCase):
rxport, txport, '/tmp/test{}.pcap'.format(k))
self.tester.pktgen.config_stream(stream_id, options)
stream_ids.append(stream_id)
-
+
return stream_ids
def save_result(self, data):
--
1.9.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script.
2019-07-29 1:48 ` [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script yufengmx
@ 2019-08-08 5:41 ` Tu, Lijuan
0 siblings, 0 replies; 8+ messages in thread
From: Tu, Lijuan @ 2019-08-08 5:41 UTC (permalink / raw)
To: Mo, YufengX, dts; +Cc: Mo, YufengX
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx
> Sent: Monday, July 29, 2019 9:49 AM
> To: dts@dpdk.org
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 4/4] [next]tests/nic_single_core_perf: update script.
>
>
> update suite nic_single_core_perf with new pktgen measure_throughput
> input parameter definition.
> for pktgen testing belongs to performance test case, change
> test_nic_single_core_perf to test_perf_nic_single_core.
>
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
> tests/TestSuite_nic_single_core_perf.py | 20 ++++++++++++--------
> 1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/tests/TestSuite_nic_single_core_perf.py
> b/tests/TestSuite_nic_single_core_perf.py
> index 847a94c..6b530bc 100644
> --- a/tests/TestSuite_nic_single_core_perf.py
> +++ b/tests/TestSuite_nic_single_core_perf.py
> @@ -42,6 +42,7 @@ from time import sleep from exception import
> VerifyFailure from settings import HEADER_SIZE, UPDATE_EXPECTED,
> load_global_setting from pmd_output import PmdOutput
> +from pktgen import TRANSMIT_CONT
> from copy import deepcopy
> from prettytable import PrettyTable
> import rst
> @@ -112,7 +113,7 @@ class TestNicSingleCorePerf(TestCase):
> 'Expected Throughput', 'Throughput Difference']
> self.test_result = {}
>
> - def test_nic_single_core_perf(self):
> + def test_perf_nic_single_core(self):
> """
> Run nic single core performance
> """
> @@ -181,8 +182,9 @@ class TestNicSingleCorePerf(TestCase):
>
> # measure throughput
> stream_ids = self.prepare_stream(frame_size)
> + traffic_opt = {'delay': self.test_duration}
> _, packets_received = self.tester.pktgen.measure_throughput(
> - stream_ids = stream_ids, delay = self.test_duration)
> + stream_ids, traffic_opt)
> throughput = packets_received / 1000000.0
> self.throughput[frame_size][nb_desc] = throughput
>
> @@ -247,11 +249,6 @@ class TestNicSingleCorePerf(TestCase):
> '''
> create streams for ports, one port two streams, and configure them.
> '''
> - # traffic option
> - options = {
> - 'rate': '100%',
> - }
> -
> # create pcap file
> payload_size = frame_size - self.headers_size
> self.tester.scapy_append(
> @@ -271,6 +268,13 @@ class TestNicSingleCorePerf(TestCase):
> # this's fine for other NIC too.
> for k in range(2):
> # txport -> rxport
> + pcap = '/tmp/test{}.pcap'.format(k)
> + options = {
> + 'pcap': pcap,
> + 'stream_config':{
> + 'txmode' : {},
> + 'transmit_mode': TRANSMIT_CONT,
> + 'rate': 100,}}
> stream_id = self.tester.pktgen.add_stream(
> txport, rxport, '/tmp/test{}.pcap'.format(k))
> self.tester.pktgen.config_stream(stream_id, options) @@ -280,7
> +284,7 @@ class TestNicSingleCorePerf(TestCase):
> rxport, txport, '/tmp/test{}.pcap'.format(k))
> self.tester.pktgen.config_stream(stream_id, options)
> stream_ids.append(stream_id)
> -
> +
> return stream_ids
>
> def save_result(self, data):
> --
> 1.9.3
^ permalink raw reply [flat|nested] 8+ messages in thread