aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
AgeCommit message (Expand)AuthorFilesLines
2018-04-04dpdk:fix checksum handling of l2 interfacesEyal Bari1-17/+19
2018-03-30dpdk: fix crash due to incorrect xd->flags value with slave's link togglingSteve Shin1-2/+5
2018-03-26plugins: dpdk: ipsec: fix l3 offsetSzymon Sliwa1-2/+1
2018-03-22VPP-1204: Fix coverity warningDave Barach1-2/+5
2018-03-14vlib: internal buffer manager reworkDamjan Marion1-30/+18
2018-03-14Prevent calling rte_eth_xstats_get not initialized devSzymon Sliwa1-0/+2
2018-03-11dpdk-input node packet trace intermittent on IP forwading pathJohn Lo1-36/+37
2018-03-09Coordinate known Ethernet speeds with Linux kernel and DPDKLee Roberts3-0/+43
2018-03-09dpdk: move DPDK vfio hack to dpdk pluginDamjan Marion1-2/+67
2018-03-05vlib: vfio code reworkDamjan Marion1-1/+3
2018-02-26vnet: add 25G interface speed flagDamjan Marion1-0/+6
2018-02-25Fix bug in dpdk_crypto_session_disposal()Matthew Smith1-0/+2
2018-02-24Fix crypto session deletion crashMatthew Smith1-6/+9
2018-02-23Disable scatter-gather for ENAMatthew Smith1-0/+1
2018-02-19dpdk: Fix MTU calc for NICs that support mtu<9216Nitin Saxena1-34/+66
2018-02-15dpdk: add support for DPDK 18.02, deprecate 17.08Damjan Marion4-24/+0
2018-02-12dpdk:fix trace to follow feature arcEyal Bari3-87/+66
2018-02-07Refactor vlib_buffer flagsDamjan Marion3-16/+6
2018-02-01dpdk:fix typo in prefetch sequenceEyal Bari1-2/+2
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
2018-01-18VPP-1122 dpdk/ipsec: fix transport mode pkt lenRadu Nicolau1-3/+7
2018-01-09Patch ENA PMD to skip setting tx flags in rx pathMatthew Smith1-1/+1
2017-12-16dpdk: unset ETH_TXQ_FLAGS_NOXSUMS only for selected PMDsDamjan Marion1-5/+8
2017-12-14pci: auto-detect right vfio/uio driverDamjan Marion1-1/+1
2017-12-14Enable AWS ENA PMDMatthew Smith3-1/+13
2017-12-09vlib: PCI rework to support VFIODamjan Marion1-9/+23
2017-12-05dpdk/ipsec: multiple fixesSergio Gonzalez Monroy5-105/+126
2017-12-05dpdk:remove duplicate codeEyal Bari1-11/+8
2017-12-04dpdk: remove unused "use_rss" flagEyal Bari2-7/+0
2017-12-04dpdk: remove duplicate functionEyal Bari1-32/+1
2017-12-04dpdk: remove unused cached eth input nodeEyal Bari2-10/+0
2017-11-28net/virtio: support modern device idGabriel Ganne1-1/+3
2017-11-27dpdk: fix issue when tx offload stops working after MTU changeDamjan Marion2-19/+4
2017-11-27dpdk: fix trajectory compilationFlorin Coras1-1/+1
2017-11-27vlib: make vlib_buffer_alloc inline functionDamjan Marion1-73/+11
2017-11-24dpdk: enable tx checksum offloads as default, add disable knobDamjan Marion2-2/+11
2017-11-24dpdk: avoid false sharing of dpdk_buffer_per_thread_dataDamjan Marion1-0/+1
2017-11-23dpdk: prefetch both cachelines during buffer freeDamjan Marion1-1/+1
2017-11-22dpdk: fix potential crash in buffer free functionDamjan Marion1-18/+49
2017-11-21dpdk: add l2_hdr_offset and l3_hdr_offset in vlib_buffer_tDamjan Marion3-60/+60
2017-11-20dpdk: add support for DPDK 17.11Damjan Marion10-174/+45
2017-11-16dpdk: add additional data to TX traceDamjan Marion3-2/+9
2017-11-16dpdk/ipsec: use physmem when creating poolsSergio Gonzalez Monroy3-84/+116
2017-11-14Fix typos in configure.ac and dpdk/buffer.cDamjan Marion1-8/+8
2017-11-13dpdk: introduce AVX512 variants of node functionsDamjan Marion3-60/+98
2017-11-11dpdk: optimize buffer alloc/freeDamjan Marion1-49/+118
2017-11-01dpdk/ipsec: align memorySergio Gonzalez Monroy2-5/+7
2017-11-01dpdk/ipsec: fix digest physical addressSergio Gonzalez Monroy3-7/+7
2017-10-25vlib: add support for multiple buffer poolsDamjan Marion5-11/+29
2017-10-24Add extern to *_main global variable declarations in header files.Dave Wallace4-2/+5
ss="sa">u"tags"] # Test name does not contain thread count. subparts = test_part.split(u"c-", 1) if len(subparts) < 2 or subparts[0][-2:-1] != u"-": # Physical core count not detected, assume it is a TRex test. if u"--" not in test_part: raise RuntimeError(f"Cores not found for {subparts}") short_name = test_part.split(u"--", 1)[1] else: short_name = subparts[1] # Add threads to test_part. core_part = subparts[0][-1] + u"c" for tag in tags: tag = tag.lower() if len(tag) == 4 and core_part == tag[2:] and tag[1] == u"t": test_part = test_part.replace(f"-{core_part}-", f"-{tag}-") break else: raise RuntimeError(f"Threads not found for {test_part} tags {tags}") # For long name we need NIC model, which is only in suite name. last_suite_part = suite_part.split(u".")[-1] # Short name happens to be the suffix we want to ignore. prefix_part = last_suite_part.split(short_name)[0] # Also remove the trailing dash. prefix_part = prefix_part[:-1] # Throw away possible link prefix such as "1n1l-". nic_code = prefix_part.split(u"-", 1)[-1] nic_short = Constants.NIC_CODE_TO_SHORT_NAME[nic_code] long_name = f"{nic_short}-{test_part}" # Set test type. test_type = _detect_test_type(data) data[u"test_type"] = test_type # Remove trailing test type from names (if present). short_name = short_name.split(f"-{test_type}")[0] long_name = long_name.split(f"-{test_type}")[0] # Store names. data[u"test_name_short"] = short_name data[u"test_name_long"] = long_name def _detect_test_type(data): """Return test_type, as inferred from robot test tags. :param data: Raw data, perhaps some fields converted into info data already. :type data: dict :returns: The inferred test type value. :rtype: str :raises RuntimeError: If the test tags does not contain expected values. """ tags = data[u"tags"] # First 5 options are specific for VPP tests. if u"DEVICETEST" in tags: test_type = u"device" elif u"LDP_NGINX" in tags: test_type = u"vsap" elif u"HOSTSTACK" in tags: test_type = u"hoststack" elif u"GSO_TRUE" in tags or u"GSO_FALSE" in tags: test_type = u"gso" elif u"RECONF" in tags: test_type = u"reconf" # The remaining 3 options could also apply to DPDK and TRex tests. elif u"SOAK" in tags: test_type = u"soak" elif u"NDRPDR" in tags: test_type = u"ndrpdr" elif u"MRR" in tags: test_type = u"mrr" else: raise RuntimeError(f"Unable to infer test type from tags: {tags}") return test_type def _convert_to_info_in_memory(data): """Perform all changes needed for processing of data, return new data. Data is assumed to be valid for raw schema, so no exceptions are expected. The original argument object is not edited, a new copy is created for edits and returned, because there is no easy way to sort keys in-place. :param data: The whole composite object to filter and enhance. :type data: dict :returns: New object with the edited content. :rtype: dict """ data = copy.deepcopy(data) # Drop any SSH log items. data[u"log"] = list() # Duration is computed for every file. start_float = dateutil.parser.parse(data[u"start_time"]).timestamp() end_float = dateutil.parser.parse(data[u"end_time"]).timestamp() data[u"duration"] = end_float - start_float # Reorder impotant fields to the top. sorted_data = dict(version=data.pop(u"version")) sorted_data[u"duration"] = data.pop(u"duration") sorted_data[u"start_time"] = data.pop(u"start_time") sorted_data[u"end_time"] = data.pop(u"end_time") sorted_data.update(data) data = sorted_data # TODO: Do we care about the order of subsequently added fields? # Convert status into a boolean. status = data.pop(u"status", None) if status is not None: data[u"passed"] = (status == u"PASS") if data[u"passed"]: # Also truncate success test messages. data[u"message"] = u"" # Replace raw names with processed ones, set test_id and test_type. _process_test_name(data) # The rest is only relevant for test case outputs. if u"result" not in data: return data result_node = data[u"result"] result_type = result_node[u"type"] if result_type == u"unknown": # Device or something else not supported. return data # More processing depending on result type. TODO: Separate functions? # Compute avg and stdev for mrr. if result_type == u"mrr": rate_node = result_node[u"receive_rate"][u"rate"] stats = AvgStdevStats.for_runs(rate_node[u"values"]) rate_node[u"avg"] = stats.avg rate_node[u"stdev"] = stats.stdev # Multiple processing steps for ndrpdr. if result_type != u"ndrpdr": return data # Filter out invalid latencies. for which_key in (u"latency_forward", u"latency_reverse"): if which_key not in result_node: # Probably just an unidir test. continue for load in (u"pdr_0", u"pdr_10", u"pdr_50", u"pdr_90"): if result_node[which_key][load][u"max"] <= 0: # One invalid number is enough to remove all loads. break else: # No break means all numbers are ok, nothing to do here. continue # Break happened, something is invalid, remove all loads. result_node.pop(which_key) return data def _merge_into_suite_info_file(teardown_info_path): """Move setup and teardown data into a singe file, remove old files. The caller has to confirm the argument is correct, e.g. ending in "/teardown.info.json". :param teardown_info_path: Local filesystem path to teardown info file. :type teardown_info_path: str :returns: Local filesystem path to newly created suite info file. :rtype: str """ # Manual right replace: https://stackoverflow.com/a/9943875 setup_info_path = u"setup".join(teardown_info_path.rsplit(u"teardown", 1)) with open(teardown_info_path, u"rt", encoding="utf-8") as file_in: teardown_data = json.load(file_in) # Transforming setup data into suite data. with open(setup_info_path, u"rt", encoding="utf-8") as file_in: suite_data = json.load(file_in) end_time = teardown_data[u"end_time"] suite_data[u"end_time"] = end_time start_float = dateutil.parser.parse(suite_data[u"start_time"]).timestamp() end_float = dateutil.parser.parse(suite_data[u"end_time"]).timestamp() suite_data[u"duration"] = end_float - start_float setup_log = suite_data.pop(u"log") suite_data[u"setup_log"] = setup_log suite_data[u"teardown_log"] = teardown_data[u"log"] suite_info_path = u"suite".join(teardown_info_path.rsplit(u"teardown", 1)) with open(suite_info_path, u"xt", encoding="utf-8") as file_out: json.dump(suite_data, file_out, indent=1) # We moved everything useful from temporary setup/teardown info files. os.remove(setup_info_path) os.remove(teardown_info_path) return suite_info_path def convert_content_to_info(from_raw_path): """Read raw output, perform filtering, add derivatves, write info output. Directory path is created if missing. When processing teardown, create also suite output using setup info. :param from_raw_path: Local filesystem path to read raw JSON data from. :type from_raw_path: str :returns: Local filesystem path to written info JSON file. :rtype: str :raises RuntimeError: If path or content do not match expectations. """ to_info_path = _raw_to_info_path(from_raw_path) with open(from_raw_path, u"rt", encoding="utf-8") as file_in: data = json.load(file_in) data = _convert_to_info_in_memory(data) with open(to_info_path, u"xt", encoding="utf-8") as file_out: json.dump(data, file_out, indent=1) if to_info_path.endswith(u"/teardown.info.json"): to_info_path = _merge_into_suite_info_file(to_info_path) # TODO: Return both paths for validation? return to_info_path