X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FTrafficGenerator.py;h=23337b2848763c72df569d4fe03ad9207757887e;hb=11886e175ec33b81051fc996b5adef22e070f424;hp=adc95bf25264c0fde4c55d9b5c47e1419533eed8;hpb=de5e719fbd965e2f8e26b7f3a9cd597b572d7ab3;p=csit.git diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index adc95bf252..23337b2848 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -247,7 +247,6 @@ class TrafficGenerator(AbstractMeasurer): ) # TODO: pylint says disable=too-many-locals. - # A fix is developed in https://gerrit.fd.io/r/c/csit/+/22221 def initialize_traffic_generator( self, tg_node, tg_if1, tg_if2, tg_if1_adj_node, tg_if1_adj_if, tg_if2_adj_node, tg_if2_adj_if, osi_layer, tg_if1_dst_mac=None, @@ -372,7 +371,8 @@ class TrafficGenerator(AbstractMeasurer): # Configure TRex. ports = '' for port in tg_node[u"interfaces"].values(): - ports += f" {port.get(u'pci_address')}" + if u'Mellanox' not in port.get(u'model'): + ports += f" {port.get(u'pci_address')}" cmd = f"sh -c \"cd {Constants.TREX_INSTALL_DIR}/scripts/ && " \ f"./dpdk_nic_bind.py -u {ports} || true\"" @@ -1091,8 +1091,10 @@ class TrafficGenerator(AbstractMeasurer): partial_attempt_count = ctca # We do not care whether TG is slow, it should have attempted all. expected_attempt_count = self.transaction_scale - # TODO: Is there a better packet-based counter? - pass_count = self._l7_data[u"server"][u"tcp"][u"connects"] + # From TCP point of view, server/connects counts full connections, + # but we are testing NAT session so client/connects counts that + # (half connections from TCP point of view). + pass_count = self._l7_data[u"client"][u"tcp"][u"connects"] fail_count = expected_attempt_count - pass_count elif self.transaction_type == u"udp_pps": if not self.transaction_scale: