aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Expand)AuthorFilesLines
2019-10-16session: increase max ctrl msg sizeFlorin Coras3-2/+13
2019-10-16tcp: avoid head retransmit if scoreboard has no holesFlorin Coras2-3/+2
2019-10-16bonding: graph node running after bond-input in feature arc may crashSteven Luong2-3/+42
2019-10-16flow: Add 'drop' and 'redirect-to-queue' actions supportChenmin Sun1-0/+5
2019-10-16fib: fix use-after-free for interface adj removalBenoît Ganne1-0/+3
2019-10-16session: fix use-after-freeBenoît Ganne1-1/+1
2019-10-15ipip: fix typos in short_helpIgnas Bacius1-3/+3
2019-10-14gso: Add gso feature arcMohsin Kazmi9-377/+1051
2019-10-14ping: Move to pluginMohsin Kazmi6-1370/+11
2019-10-14fib: recursive calculation leads to delegate pool reallocNeale Ranns1-4/+14
2019-10-12tls: allow disconnects from main threadFlorin Coras1-1/+4
2019-10-11lisp: fix dangling references to bihash tablesDave Barach1-6/+26
2019-10-11tcp: refactor flags into cfg and conn flagsFlorin Coras4-31/+89
2019-10-11ip: reassembly: trace ip headers over worker handoffsKlement Sekera5-27/+87
2019-10-11ip: RD-CP API incorrect reply codeNeale Ranns1-1/+1
2019-10-11bonding: feature arc may not be enabled for the slave interfaceSteven Luong1-2/+2
2019-10-10tcp: improve pacing after idle send periodsFlorin Coras6-76/+124
2019-10-10tcp: retry lost retransmitsFlorin Coras7-155/+205
2019-10-10ip: fix clang debug compilationBenoît Ganne1-3/+1
2019-10-10session: fix typos & cert_key store initNathan Skrzypczak2-6/+4
2019-10-10tcp: custom checksum calculations for Ipv4/Ipv6Srikanth A6-122/+194
2019-10-10tcp: fix tso not work in single buffer issueSimon Zhang2-6/+9
2019-10-10sr: fix deleting an SR l2 steering policyAhmed Abdelsalam1-3/+7
2019-10-10geneve: API cleanupJakub Grajciar2-32/+31
2019-10-09session: avoid old io dispatch if no slots left to sendRyujiro Shibuya1-2/+3
2019-10-09map: use ip6-full-reassembly instead of own codeKlement Sekera4-0/+70
2019-10-09interface: dump the interface device typeMohsin Kazmi2-0/+8
2019-10-09ip: fix coverity warningKlement Sekera1-3/+7
2019-10-09interface: callback to manage extra MAC addressesMatthew Smith6-1/+256
2019-10-09mpls: support fragmentation of mpls output packetRajesh Goel6-16/+120
2019-10-09ip: only install IPv6 prefixes in FIB when the interface is upNeale Ranns1-39/+36
2019-10-09fib: P2P interfaces do not need specific multicast adjacenciesNeale Ranns1-3/+18
2019-10-09hsa: use crypto_engine_type_t for TLSNathan Skrzypczak3-18/+18
2019-10-09session: Add certificate storeNathan Skrzypczak9-56/+305
2019-10-08tcp: rate sample for persist segmentsFlorin Coras1-0/+6
2019-10-08hsa: make vpp_echo use mq instead of bapiNathan Skrzypczak1-0/+2
2019-10-08session: add is_migrating flagNathan Skrzypczak2-0/+2
2019-10-07ip: remove dead code in ip6-svrKlement Sekera1-27/+0
2019-10-07devices: vhost not reading packets from vringSteven Luong2-0/+25
2019-10-07dhcp: Move to pluginNeale Ranns26-10785/+0
2019-10-07mactime: add a "top" command to watch device statsDave Barach1-1/+3
2019-10-07ip: add tracing for ipv6 frag headersKlement Sekera1-0/+24
2019-10-07ip: reassembly add missing gotoKlement Sekera1-0/+1
2019-10-07ip: reassembly remove dead codeKlement Sekera1-8/+0
2019-10-07dhcp: API return code fixNeale Ranns1-2/+2
2019-10-07ip: MFIB CLI fix for parsing path flagsNeale Ranns2-3/+4
2019-10-06bonding: traffic traversing the wrong interfaceSteven Luong1-0/+1
2019-10-06ip: Fix IP unnumbered dump of one interfaceNeale Ranns1-1/+1
2019-10-04ip: fix use-after-free in IPv6 SLAAC expirationBenoît Ganne1-3/+11
2019-10-03misc: add "maxframe" and "rate" to packet-generator cli.Christian E. Hopps3-5/+13
] table_lst = list() for test in data[job][build].keys(): if data[job][build][test]["parent"] in suite_name: row_lst = list() for column in table["columns"]: try: col_data = str(data[job][build][test][column["data"]. split(" ")[1]]).replace('"', '""') if column["data"].split(" ")[1] in ("vat-history", "show-run"): col_data = replace(col_data, " |br| ", "", maxreplace=1) col_data = " |prein| {0} |preout| ".\ format(col_data[:-5]) row_lst.append('"{0}"'.format(col_data)) except KeyError: row_lst.append("No data") table_lst.append(row_lst) # Write the data to file if table_lst: file_name = "{0}_{1}{2}".format(table["output-file"], suite_name, table["output-file-ext"]) logging.info(" Writing file: '{}'".format(file_name)) with open(file_name, "w") as file_handler: file_handler.write(",".join(header) + "\n") for item in table_lst: file_handler.write(",".join(item) + "\n") logging.info(" Done.") def table_performance_improvements(table, input_data): """Generate the table(s) with algorithm: table_performance_improvements specified in the specification file. :param table: Table to generate. :param input_data: Data to process. :type table: pandas.Series :type input_data: InputData """ def _write_line_to_file(file_handler, data): """Write a line to the .csv file. :param file_handler: File handler for the csv file. It must be open for writing text. :param data: Item to be written to the file. :type file_handler: BinaryIO :type data: list """ line_lst = list() for item in data: if isinstance(item["data"], str): line_lst.append(item["data"]) elif isinstance(item["data"], float): line_lst.append("{:.1f}".format(item["data"])) file_handler.write(",".join(line_lst) + "\n") logging.info(" Generating the table {0} ...". format(table.get("title", ""))) # Read the template file_name = table.get("template", None) if file_name: try: tmpl = _read_csv_template(file_name) except PresentationError: logging.error(" The template '{0}' does not exist. Skipping the " "table.".format(file_name)) return None else: logging.error("The template is not defined. Skipping the table.") return None # Transform the data data = input_data.filter_data(table) # Prepare the header of the tables header = list() for column in table["columns"]: header.append(column["title"]) # Generate the data for the table according to the model in the table # specification tbl_lst = list() for tmpl_item in tmpl: tbl_item = list() for column in table["columns"]: cmd = column["data"].split(" ")[0] args = column["data"].split(" ")[1:] if cmd == "template": try: val = float(tmpl_item[int(args[0])]) except ValueError: val = tmpl_item[int(args[0])] tbl_item.append({"data": val}) elif cmd == "data": job = args[0] operation = args[1] data_lst = list() for build in data[job]: try: data_lst.append(float(build[tmpl_item[0]]["throughput"] ["value"]) / 1000000) except (KeyError, TypeError): # No data, ignore pass if data_lst: tbl_item.append({"data": eval(operation)(data_lst)}) elif cmd == "operation": operation = args[0] nr1 = tbl_item[int(args[1])]["data"] nr2 = tbl_item[int(args[2])]["data"] if nr1 and nr2: tbl_item.append({"data": eval(operation)(nr1, nr2)}) else: tbl_item.append({"data": None}) else: logging.error("Not supported command {0}. Skipping the table.". format(cmd)) return None tbl_lst.append(tbl_item) # Sort the table according to the relative change tbl_lst.sort(key=lambda rel: rel[-1]["data"], reverse=True) # Create the tables and write them to the files file_names = [ "{0}_ndr_top{1}".format(table["output-file"], table["output-file-ext"]), "{0}_pdr_top{1}".format(table["output-file"], table["output-file-ext"]), "{0}_ndr_low{1}".format(table["output-file"], table["output-file-ext"]), "{0}_pdr_low{1}".format(table["output-file"], table["output-file-ext"]) ] for file_name in file_names: logging.info(" Writing the file '{0}'".format(file_name)) with open(file_name, "w") as file_handler: file_handler.write(",".join(header) + "\n") for item in tbl_lst: if "ndr_top" in file_name \ and "ndr" in item[1]["data"] \ and item[-1]["data"] >= 10: _write_line_to_file(file_handler, item) elif "pdr_top" in file_name \ and "pdr" in item[1]["data"] \ and item[-1]["data"] >= 10: _write_line_to_file(file_handler, item) elif "ndr_low" in file_name \ and "ndr" in item[1]["data"] \ and item[-1]["data"] < 10: _write_line_to_file(file_handler, item) elif "pdr_low" in file_name \ and "pdr" in item[1]["data"] \ and item[-1]["data"] < 10: _write_line_to_file(file_handler, item) logging.info(" Done.") def _read_csv_template(file_name): """Read the template from a .csv file. :param file_name: Name / full path / relative path of the file to read. :type file_name: str :returns: Data from the template as list (lines) of lists (items on line). :rtype: list :raises: PresentationError if it is not possible to read the file. """ try: with open(file_name, 'r') as csv_file: tmpl_data = list() for line in csv_file: tmpl_data.append(line[:-1].split(",")) return tmpl_data except IOError as err: raise PresentationError(str(err), level="ERROR")