summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.c
AgeCommit message (Expand)AuthorFilesLines
2021-08-14ip: Fix crash in ip address add on sub-int without exact-matchPim van Pelt1-0/+23
2021-07-28gre: set proper fib index for unnumbered interfaces, unset fib index before f...Stanislav Zaikin1-1/+41
2021-05-31interface: fix vnet_sw_interface_update_unnumberedDave Barach1-6/+13
2021-05-28gso: fix the error handlingMohsin Kazmi1-1/+0
2021-05-11interface: tx queue infraDamjan Marion1-2/+6
2021-05-06memif: add severity to countersOle Troan1-4/+3
2021-05-01vlib: refactor trajectory trace debug featureBenoît Ganne1-5/+0
2021-04-19interface: interface-output end node reworkDamjan Marion1-1/+19
2021-03-26vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendlyDamjan Marion1-38/+35
2021-03-11vlib: refactor node function variantsDamjan Marion1-21/+15
2021-03-10interface: fix interface-output and interface-tx multiarch selectionDamjan Marion1-4/+19
2021-02-04vlib: "revert startup multi-arch variant configuration fix for interfaces"Damjan Marion1-1/+1
2021-01-26interface: remove vnet_device_input_runtime_tMohammed Hawari1-2/+0
2021-01-25vlib: startup multi-arch variant configuration fix for interfacesRadu Nicolau1-1/+1
2021-01-21interface: rx queue infra rework, part oneDamjan Marion1-1/+11
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-13/+13
2020-11-23interface: improve loggingDamjan Marion1-4/+46
2020-11-13interface: add multiarch support for per-interface tx nodeBenoît Ganne1-2/+3
2020-10-19ip: Move the IP6 fib into ip6_[m]fib.cNeale Ranns1-1/+1
2020-10-13stats: counters data modelOle Troan1-1/+2
2020-10-08interface: shorten vnet_hw_if_rx_modeDamjan Marion1-1/+1
2020-10-08l2: input performanceNeale Ranns1-13/+0
2020-09-09interface: support configuring RSS steering queuesChenmin Sun1-0/+36
2020-07-16misc: add callback hooks and refactor pmcTom Seidenberg1-0/+4
2020-02-11misc: fix coverity warningsDave Barach1-2/+8
2019-12-19interface: Prevent bad inner-dot1q any exact-match configurationJon Loeliger1-0/+10
2019-12-04gre: Multi-point interfacesNeale Ranns1-0/+10
2019-12-04gso: remove the interface countMohsin Kazmi1-1/+0
2019-10-09interface: callback to manage extra MAC addressesMatthew Smith1-0/+42
2019-09-26misc: add vnet classify filter set supportDave Barach1-0/+1
2019-08-27interface: Remove residual dpdk bonding codeSteven Luong1-9/+0
2019-07-31vppinfra: refactor test_and_set spinlocks to use clib_spinlock_tjaszha031-4/+3
2019-06-18ipsec: ipsec-tun protectNeale Ranns1-0/+24
2019-05-13vnet: remove macro definitionsZhiyong Yang1-3/+0
2019-02-19tap gso: experimental supportAndrew Yourtchenko1-0/+6
2019-02-02Deprecate old mutliarch code, phase 1Damjan Marion1-2/+2
2018-11-08vnet: store hw interface speed in kbps instead of using flagsDamjan Marion1-2/+1
2018-10-30change mac address functions take const macNeale Ranns1-2/+2
2018-10-29interface-flags; fix coverity error found in conversionNeale Ranns1-3/+28
2018-10-27Enumify interface flagsNeale Ranns1-10/+23
2018-10-23c11 safe string handling supportDave Barach1-2/+2
2018-10-01API / CLI event-log tracingDave Barach1-121/+0
2018-09-25L2 BD: introduce a BD interface on which to send UU packetsNeale Ranns1-3/+4
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-3/+3
2018-09-08L2 BVI/FIB: Update L2 FIB table when BVI's MAC changesNeale Ranns1-2/+6
2018-08-11Multiversioning: Device (tx) function constructorMohsin Kazmi1-0/+21
2018-07-20IP directed broadcastNeale Ranns1-0/+17
2018-07-07PipesNeale Ranns1-3/+23
2018-06-15STATS: Add more hierarchy to counters.Ole Troan1-31/+13
2018-06-11MTU: Software interface / Per-protocol MTU supportOle Troan1-19/+82
n [] def run_suites(tests_dir, suites, output_dir, output_prefix='suite', **options): """Execute RF's run with parameters.""" with open('{}/{}.out'.format(output_dir, output_prefix), 'w') as out: robot.run(tests_dir, suite=[s.longname for s in suites], output='{}/{}.xml'.format(output_dir, output_prefix), debugfile='{}/{}.log'.format(output_dir, output_prefix), log=None, report=None, stdout=out, **options) def parse_outputs(output_dir): """Parse output xmls from all executed tests.""" outs = [os.path.join(output_dir, file_name) for file_name in os.listdir(output_dir) if file_name.endswith('.xml')] # pylint: disable=star-args robot.rebot(*outs, merge=True) def topology_lookup(topology_paths, topo_dir, validate): """Make topology list and validate topologies against schema :param parsed_args: topology list, is empty then scans topologies in topo_dir :param topo_dir: scan directory for topologies :param validate: if True then validate topology :return: list of topologies """ ret_topologies = [] if topology_paths: for topo in topology_paths: if os.path.exists(topo): ret_topologies.append(topo) else: print("Topology file {} doesn't exist".format(topo), file=sys.stderr) else: ret_topologies = [os.path.join(topo_dir, file_name) for file_name in os.listdir(topo_dir) if file_name.lower().endswith('.yaml')] if len(ret_topologies) == 0: print('No valid topology found', file=sys.stderr) exit(1) # validate topologies against schema exit_on_error = False for topology_name in ret_topologies: try: with open(topology_name) as file_name: yaml_obj = load(file_name) core = Core(source_file=topology_name, schema_files=yaml_obj["metadata"]["schema"]) core.validate() except PyKwalifyException as ex: print('Unable to verify topology {}, schema error: {}'.\ format(topology_name, ex), file=sys.stderr) exit_on_error = True except KeyError as ex: print('Unable to verify topology {}, key error: {}'.\ format(topology_name, ex), file=sys.stderr) exit_on_error = True except Exception as ex: print('Unable to verify topology {}, {}'.format(topology_name, ex), file=sys.stderr) exit_on_error = True if exit_on_error and validate: exit(1) return ret_topologies def main(): """Main function.""" parser = argparse.ArgumentParser(description='A test runner') parser.add_argument('-i', '--include', action='append', help='include tests with tag') parser.add_argument('-e', '--exclude', action='append', help='exclude tests with tag') parser.add_argument('-s', '--suite', action='append', help='full name of suite to run') parser.add_argument('-t', '--topology', action='append', help='topology where tests should be run') parser.add_argument('-d', '--test_dir', nargs='?', default=TESTS_DIR, help='where tests are stored') parser.add_argument('-o', '--output_dir', nargs='?', default=OUTPUTS_DIR, help='where results are stored') parser.add_argument('-L', '--loglevel', nargs='?', default='INFO', type=str, choices=['TRACE', 'DEBUG', 'INFO', 'WARN', 'NONE'], help='robot frameworks level for logging') parser.add_argument('-n', '--no_validate', action="store_false", help='Do not exit if topology validation failed') args = parser.parse_args() i = args.include or [] excl = args.exclude or [] suite_filter = args.suite or [] test_dir = args.test_dir # prepare output subdir suite_output_dir = os.path.join(args.output_dir, time.strftime('%y%m%d%H%M%S')) os.makedirs(suite_output_dir) topologies = topology_lookup(args.topology, TOPOLOGIES_DIR, args.no_validate) suite_list = get_suite_list(test_dir, include=i, exclude=excl, suite=suite_filter) # TODO: do the topology suite mapping magic # for now all tests on single topology if len(topologies) > 1: print('Multiple topologies unsupported yet', file=sys.stderr) exit(1) topology_suite_mapping = {topologies[0]: suite_list} # on all topologies, run test # TODO: run parallel for topology_path, topology_suite_list in topology_suite_mapping.items(): topology_path_variable = 'TOPOLOGY_PATH:{}'.format(topology_path) variables = [topology_path_variable] print('Runing tests on topology {}'.format(topology_path)) run_suites(test_dir, topology_suite_list, variable=variables, output_dir=suite_output_dir, output_prefix=''.join(sample(ascii_lowercase, 5)), include=i, exclude=excl, loglevel=args.loglevel) print('Parsing test results') parse_outputs(suite_output_dir) if __name__ == "__main__": main()