CMD_RELEASE = 'p_reservation release'
CMD_RELINQUISH = 'p_reservation relinquish'
CMD_RESET = 'p_reset'
+CMD_SET_PORT_ARP_REPLY = 'p_arpreply'
+CMD_SET_PORT_ARP_V6_REPLY = 'p_arpv6reply'
+CMD_SET_PORT_PING_REPLY = 'p_pingreply'
+CMD_SET_PORT_PING_V6_REPLY = 'p_pingv6reply'
CMD_SET_PORT_TIME_LIMIT = 'p_txtimelimit'
CMD_SET_STREAM_HEADER_PROTOCOL = 'ps_headerprotocol'
CMD_SET_STREAM_ON_OFF = 'ps_enable'
command = make_port_command(CMD_RESET, self)
return self._manager.driver.ask_verify(command)
+ def set_port_arp_reply(self, on=True, v6=False):
+ """
+ Set the port arpreply value
+ :param on: Enable or disable the arp reply on the port
+ :param v6: set the value on the ip v6, disabled will set at ip v4
+ :return: Boolean True if response OK, False if error
+ """
+ command = make_port_command('{} {}'.format(
+ CMD_SET_PORT_ARP_V6_REPLY if v6 else CMD_SET_PORT_ARP_REPLY,
+ "on" if on else "off"), self)
+ return self._manager.driver.ask_verify(command)
+
+ def set_port_ping_reply(self, on=True, v6=False):
+ """
+ Set the port ping reply value
+ :param on: Enable or disable the ping reply on the port
+ :param v6: set the value on the ip v6, disabled will set at ip v4
+ :return: Boolean True if response OK, False if error
+ """
+ command = make_port_command('{} {}'.format(
+ CMD_SET_PORT_PING_V6_REPLY if v6 else CMD_SET_PORT_PING_REPLY,
+ "on" if on else "off"), self)
+ return self._manager.driver.ask_verify(command)
+
def set_port_ip(self, ip_addr, cidr, gateway, wild='255'):
"""
Set the port ip address of the specific port
:return: None
"""
stream.set_on()
- stream.set_packet_limit(packet_limit)
+ if packet_limit != -1:
+ stream.set_packet_limit(packet_limit)
+ else:
+ speed = port.get_port_speed() / 8 # convert to bytes
+ gap = port.get_inter_frame_gap()
+ pkt_size = self._params['traffic']['l2']['framesize']
+ packets = int(((speed / (pkt_size + gap)) * self._duration) *
+ (self._params['traffic']['frame_rate'] / 100))
+ stream.set_packet_limit(packets)
+
+ port.set_port_arp_reply(on=True)
+ port.set_port_arp_reply(on=True, v6=True)
+ port.set_port_ping_reply(on=True)
+ port.set_port_ping_reply(on=True, v6=True)
stream.set_rate_fraction(
10000 * self._params['traffic']['frame_rate'])
'ETHERNET VLAN IP UDP' if self._params['traffic']['vlan'][
'enabled'] else 'ETHERNET IP UDP')
stream.set_packet_length(
- 'fixed', self._params['traffic']['l2']['framesize'], 16383)
+ 'fixed', self._params['traffic']['l2']['framesize'],
+ self._params['traffic']['l2']['framesize'])
stream.set_packet_payload('incrementing', '0x00')
stream.set_payload_id(payload_id)
- port.set_port_time_limit(self._duration * 1000000)
+ port.set_port_time_limit(0)
if self._params['traffic']['l2']['framesize'] == 64:
# set micro tpld
if not self.xmanager.ports[1].traffic_on():
self._logger.error(
"Failure to start port 1. Check settings and retry.")
- sleep(self._duration)
+ sleep(self._duration + 1)
# getting results
if self._params['traffic']['bidir'] == 'True':
# need to aggregate out both ports stats and assign that data