From: imarom Date: Sun, 22 Jan 2017 14:20:45 +0000 (+0200) Subject: Merge branch 'master' into capture X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F5267%2F1;p=trex.git Merge branch 'master' into capture Signed-off-by: imarom Conflicts: scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py src/main_dpdk.cpp --- 904eacd9be1230efb7ae0ab7997ec131b588ec8a diff --cc scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py index c82d77fb,21ae42f1..f7432107 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py @@@ -2964,8 -2996,8 +2976,8 @@@ class STLClient(object) Resolves ports (ARP resolution) :parameters: - ports - for which ports to apply a unique sniffer (each port gets a unique file) + ports - which ports to resolve - retires - how many times to retry on each port (intervals of 100 milliseconds) + retries - how many times to retry on each port (intervals of 100 milliseconds) verbose - log for each request the response :raises: + :exe:'STLError' @@@ -3859,15 -3782,37 +3872,17 @@@ print(' Flow control: %s' % info['fc_supported']) print('') else: - self.set_port_attr(opts.ports, - opts.prom, - opts.link, - opts.led, - opts.flow_ctrl) + if not opts.ports: + raise STLError('No acquired ports!') + self.set_port_attr(opts.ports, + opts.prom, + opts.link, + opts.led, + opts.flow_ctrl) - + + - - @__console - def set_rx_sniffer_line (self, line): - '''Sets a port sniffer on RX channel in form of a PCAP file''' - - parser = parsing_opts.gen_parser(self, - "set_rx_sniffer", - self.set_rx_sniffer_line.__doc__, - parsing_opts.PORT_LIST_WITH_ALL, - parsing_opts.OUTPUT_FILENAME, - parsing_opts.LIMIT) - - opts = parser.parse_args(line.split(), default_ports = self.get_acquired_ports(), verify_acquired = True) - if not opts: - return opts - - self.set_rx_sniffer(opts.ports, opts.output_filename, opts.limit) - - return RC_OK() - - @__console def resolve_line (self, line): '''Performs a port ARP resolution''' diff --cc scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py index 654514cb,a9509ee9..31d752af --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py @@@ -908,6 -928,12 +908,10 @@@ class Port(object) def get_layer_cfg (self): return self.__attr['layer_cfg'] - def get_rx_filter_mode (self): - return self.__attr['rx_filter_mode'] + + def is_virtual(self): + return self.info.get('is_virtual') + def is_l3_mode (self): return self.get_layer_cfg()['ipv4']['state'] != 'none'