* [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters
@ 2020-01-21 3:02 xu,hailin
2020-01-21 3:02 ` [dts] [PATCH V1 2/2] tests/flow_classify_softnic:add create_eal_parameters xu,hailin
2020-01-21 7:51 ` [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters Tu, Lijuan
0 siblings, 2 replies; 3+ messages in thread
From: xu,hailin @ 2020-01-21 3:02 UTC (permalink / raw)
To: dts; +Cc: xu,hailin
Signed-off-by: xu,hailin <hailinx.xu@intel.com>
---
tests/TestSuite_flow_classify.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/TestSuite_flow_classify.py b/tests/TestSuite_flow_classify.py
index 7f6eba5..2853f5d 100644
--- a/tests/TestSuite_flow_classify.py
+++ b/tests/TestSuite_flow_classify.py
@@ -247,7 +247,6 @@ class TestFlowClassify(TestCase):
pkt.config_layer(layer, pkt_layers[layer])
pkt.pktgen.pkt.show()
streams.append(pkt.pktgen.pkt)
-
return streams
def send_packet_by_scapy(self, config):
@@ -304,8 +303,9 @@ class TestFlowClassify(TestCase):
if not self.is_existed_on_crb(rule_config):
raise VerifyFailure("rules file doesn't existed")
core = "1S/1C/1T"
- option = r" -c {0} -n 4 --file-prefix=test -- --rule_ipv4={1}".format(
- self.get_cores_mask(core), rule_config)
+ eal_params = self.dut.create_eal_parameters()
+ #option = r" -c {0} - n 4 --file-prefix=test {1} -- --rule_ipv4={2}".format(self.get_cores_mask(core),eal_params,rule_config)
+ option = r" {0} -- --rule_ipv4={1}".format(eal_params,rule_config)
prompt = 'table_entry_delete succeeded'
cmd = [' '.join([self.flow_classify, option]), prompt, 30]
output = self.d_console(cmd)
@@ -355,6 +355,7 @@ class TestFlowClassify(TestCase):
# begin traffic checking
self.logger.info("begin traffic ... ")
method_name = 'send_packet_by_' + pktgen_name
+ print('pktname is %s'% pktgen_name)
pkt_gen_func = getattr(self, 'send_packet_by_' + pktgen_name)
if pkt_gen_func:
result = pkt_gen_func(ports_topo)
@@ -435,6 +436,7 @@ class TestFlowClassify(TestCase):
# close flow_classify
self.close_flow_classify()
except Exception as e:
+ print(e)
# close flow_classify
self.close_flow_classify()
msg = 'failed to run traffic'
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V1 2/2] tests/flow_classify_softnic:add create_eal_parameters
2020-01-21 3:02 [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters xu,hailin
@ 2020-01-21 3:02 ` xu,hailin
2020-01-21 7:51 ` [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters Tu, Lijuan
1 sibling, 0 replies; 3+ messages in thread
From: xu,hailin @ 2020-01-21 3:02 UTC (permalink / raw)
To: dts; +Cc: xu,hailin
Signed-off-by: xu,hailin <hailinx.xu@intel.com>
---
tests/TestSuite_flow_classify_softnic.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/tests/TestSuite_flow_classify_softnic.py b/tests/TestSuite_flow_classify_softnic.py
index a649a44..029e049 100644
--- a/tests/TestSuite_flow_classify_softnic.py
+++ b/tests/TestSuite_flow_classify_softnic.py
@@ -80,20 +80,18 @@ class TestFlowClassifySoftnic(TestCase):
"""
Start testpmd.
"""
+ self.cores = self.dut.get_core_list("all")
self.set_ports(filename, port_num)
TESTPMD = "./%s/app/testpmd" % self.target
cmd="cat /sys/bus/pci/devices/%s/numa_node"%self.dut_p0_pci
numa_node = int(self.dut.send_expect(cmd, "# ", 60))
cpu_id = numa_node if numa_node > 0 else 0
+ eal_params = self.dut.create_eal_parameters(cores=self.cores)
VDEV = "--vdev 'net_softnic0,firmware=./drivers/net/softnic/flow_classify_softnic/%s,cpu_id=%s,conn_port=8086'" % (filename,cpu_id)
if port_num == 4:
- DUT_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
- .format(self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci)
- cmd = "{0} -c 0x1f -s 0x10 -n 4 {1} {2} -- -i --rxq=4 --txq=4 --disable-rss --portmask=0x10".format(TESTPMD, DUT_PORTS, VDEV)
+ cmd = "{0} {1} {2} -s 0x4 -- -i --rxq=4 --txq=4 --disable-rss --portmask=0x10".format(TESTPMD, VDEV, eal_params)
elif port_num == 2:
- DUT_PORTS = " -w {0} -w {1} "\
- .format(self.dut_p0_pci, self.dut_p1_pci)
- cmd = "{0} -c 0x7 -s 0x4 -n 4 {1} {2} -- -i --rxq=2 --txq=2 --disable-rss --portmask=0x4".format(TESTPMD, DUT_PORTS, VDEV)
+ cmd = "{0} {1} {2} -s 0x4 -- -i --rxq=2 --txq=2 --disable-rss --portmask=0x4".format(TESTPMD, VDEV, eal_params)
else:
raise Exception("The number of port is wrong!")
self.dut.send_expect(cmd, "testpmd> ", 60)
@@ -162,7 +160,7 @@ class TestFlowClassifySoftnic(TestCase):
# For the [pid]+ Done tcpdump... message after killing the process
sleep(1)
self.tester.send_expect('echo "Cleaning buffer"', '# ')
- sleep(1)
+ sleep(3)
def write_pcap_file(self, pcap_file, pkts):
try:
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters
2020-01-21 3:02 [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters xu,hailin
2020-01-21 3:02 ` [dts] [PATCH V1 2/2] tests/flow_classify_softnic:add create_eal_parameters xu,hailin
@ 2020-01-21 7:51 ` Tu, Lijuan
1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-01-21 7:51 UTC (permalink / raw)
To: Xu, HailinX, dts; +Cc: Xu, HailinX
Applied the series.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,hailin
> Sent: Tuesday, January 21, 2020 11:02 AM
> To: dts@dpdk.org
> Cc: Xu, HailinX <hailinx.xu@intel.com>
> Subject: [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters
>
> Signed-off-by: xu,hailin <hailinx.xu@intel.com>
> ---
> tests/TestSuite_flow_classify.py | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/tests/TestSuite_flow_classify.py b/tests/TestSuite_flow_classify.py
> index 7f6eba5..2853f5d 100644
> --- a/tests/TestSuite_flow_classify.py
> +++ b/tests/TestSuite_flow_classify.py
> @@ -247,7 +247,6 @@ class TestFlowClassify(TestCase):
> pkt.config_layer(layer, pkt_layers[layer])
> pkt.pktgen.pkt.show()
> streams.append(pkt.pktgen.pkt)
> -
> return streams
>
> def send_packet_by_scapy(self, config):
> @@ -304,8 +303,9 @@ class TestFlowClassify(TestCase):
> if not self.is_existed_on_crb(rule_config):
> raise VerifyFailure("rules file doesn't existed")
> core = "1S/1C/1T"
> - option = r" -c {0} -n 4 --file-prefix=test -- --rule_ipv4={1}".format(
> - self.get_cores_mask(core), rule_config)
> + eal_params = self.dut.create_eal_parameters()
> + #option = r" -c {0} - n 4 --file-prefix=test {1} -- --
> rule_ipv4={2}".format(self.get_cores_mask(core),eal_params,rule_config)
> + option = r" {0} --
> + --rule_ipv4={1}".format(eal_params,rule_config)
> prompt = 'table_entry_delete succeeded'
> cmd = [' '.join([self.flow_classify, option]), prompt, 30]
> output = self.d_console(cmd)
> @@ -355,6 +355,7 @@ class TestFlowClassify(TestCase):
> # begin traffic checking
> self.logger.info("begin traffic ... ")
> method_name = 'send_packet_by_' + pktgen_name
> + print('pktname is %s'% pktgen_name)
> pkt_gen_func = getattr(self, 'send_packet_by_' + pktgen_name)
> if pkt_gen_func:
> result = pkt_gen_func(ports_topo) @@ -435,6 +436,7 @@ class
> TestFlowClassify(TestCase):
> # close flow_classify
> self.close_flow_classify()
> except Exception as e:
> + print(e)
> # close flow_classify
> self.close_flow_classify()
> msg = 'failed to run traffic'
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-21 7:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21 3:02 [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters xu,hailin
2020-01-21 3:02 ` [dts] [PATCH V1 2/2] tests/flow_classify_softnic:add create_eal_parameters xu,hailin
2020-01-21 7:51 ` [dts] [PATCH V1 1/2] tests/flow_classify:add create_eal_parameters Tu, Lijuan
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).