* [dts] [PATCH V1 0/1] framework/pktgen: add tester port mapping @ 2020-02-25 7:43 yufengmx 2020-02-25 7:43 ` [dts] [PATCH V1 1/1] " yufengmx 0 siblings, 1 reply; 3+ messages in thread From: yufengmx @ 2020-02-25 7:43 UTC (permalink / raw) To: dts, lihongx.ma, zhaoyan.chen; +Cc: yufengmx Since tester port scanning work flow change, non-functional port mapping config will be ignored. Add tester port mapping if no port in ports info. yufengmx (1): framework/pktgen: add tester port mapping framework/tester.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.21.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH V1 1/1] framework/pktgen: add tester port mapping 2020-02-25 7:43 [dts] [PATCH V1 0/1] framework/pktgen: add tester port mapping yufengmx @ 2020-02-25 7:43 ` yufengmx 2020-02-25 9:07 ` Tu, Lijuan 0 siblings, 1 reply; 3+ messages in thread From: yufengmx @ 2020-02-25 7:43 UTC (permalink / raw) To: dts, lihongx.ma, zhaoyan.chen; +Cc: yufengmx Since tester port scanning work flow change, non-functional port mapping config will be ignored. Add tester port mapping if no port in ports info. Signed-off-by: yufengmx <yufengx.mo@intel.com> --- framework/tester.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/framework/tester.py b/framework/tester.py index a858081..6e92847 100644 --- a/framework/tester.py +++ b/framework/tester.py @@ -366,6 +366,7 @@ class Tester(Crb): ''' packet generator port setting Currently, trex run on tester node ''' + new_ports_info = [] pktgen_ports_info = self.pktgen.get_ports() for pktgen_port_info in pktgen_ports_info: pktgen_port_type = pktgen_port_info['type'] @@ -383,6 +384,22 @@ class Tester(Crb): port_info['type'] = pktgen_port_type port_info['mac'] = pktgen_mac break + # Since tester port scanning work flow change, non-functional port + # mapping config will be ignored. Add tester port mapping if no + # port in ports info + else: + addr_array = pktgen_pci.split(':') + port = GetNicObj(self, addr_array[0], addr_array[1], addr_array[2]) + new_ports_info.append({ + 'port': port, + 'intf': pktgen_port_name, + 'type': pktgen_port_type, + 'pci': pktgen_pci, + 'mac': pktgen_mac, + 'ipv4': None, + 'ipv6': None }) + if new_ports_info: + self.ports_info = self.ports_info + new_ports_info def scan_ports(self): """ -- 2.21.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1 1/1] framework/pktgen: add tester port mapping 2020-02-25 7:43 ` [dts] [PATCH V1 1/1] " yufengmx @ 2020-02-25 9:07 ` Tu, Lijuan 0 siblings, 0 replies; 3+ messages in thread From: Tu, Lijuan @ 2020-02-25 9:07 UTC (permalink / raw) To: Mo, YufengX, dts, Ma, LihongX, Chen, Zhaoyan; +Cc: Mo, YufengX Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx > Sent: Tuesday, February 25, 2020 3:43 PM > To: dts@dpdk.org; Ma, LihongX <lihongx.ma@intel.com>; Chen, Zhaoyan > <zhaoyan.chen@intel.com> > Cc: Mo, YufengX <yufengx.mo@intel.com> > Subject: [dts] [PATCH V1 1/1] framework/pktgen: add tester port mapping > > > Since tester port scanning work flow change, non-functional port mapping > config will be ignored. > Add tester port mapping if no port in ports info. > > Signed-off-by: yufengmx <yufengx.mo@intel.com> > --- > framework/tester.py | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/framework/tester.py b/framework/tester.py index > a858081..6e92847 100644 > --- a/framework/tester.py > +++ b/framework/tester.py > @@ -366,6 +366,7 @@ class Tester(Crb): > ''' packet generator port setting > Currently, trex run on tester node > ''' > + new_ports_info = [] > pktgen_ports_info = self.pktgen.get_ports() > for pktgen_port_info in pktgen_ports_info: > pktgen_port_type = pktgen_port_info['type'] @@ -383,6 +384,22 @@ > class Tester(Crb): > port_info['type'] = pktgen_port_type > port_info['mac'] = pktgen_mac > break > + # Since tester port scanning work flow change, non-functional port > + # mapping config will be ignored. Add tester port mapping if no > + # port in ports info > + else: > + addr_array = pktgen_pci.split(':') > + port = GetNicObj(self, addr_array[0], addr_array[1], addr_array[2]) > + new_ports_info.append({ > + 'port': port, > + 'intf': pktgen_port_name, > + 'type': pktgen_port_type, > + 'pci': pktgen_pci, > + 'mac': pktgen_mac, > + 'ipv4': None, > + 'ipv6': None }) > + if new_ports_info: > + self.ports_info = self.ports_info + new_ports_info > > def scan_ports(self): > """ > -- > 2.21.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-25 9:07 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-02-25 7:43 [dts] [PATCH V1 0/1] framework/pktgen: add tester port mapping yufengmx 2020-02-25 7:43 ` [dts] [PATCH V1 1/1] " yufengmx 2020-02-25 9:07 ` 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).