summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib
AgeCommit message (Expand)AuthorFilesLines
2019-05-30FIB: correctly report IPv6 FIB Unicast and Multicast memory usage (VPP-1578)"Neale Ranns4-13/+26
2019-05-16init / exit function orderingDave Barach2-15/+13
2019-04-19FIB: recursion casues path reallocNeale Ranns1-1/+12
2019-04-08fixing typosJim Thompson4-11/+11
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra10-30/+30
2019-03-26FIB: do debug before remvoing last sourceNeale Ranns1-2/+2
2019-03-26ADJ: midchain delegate to performing stackingNeale Ranns1-2/+0
2019-03-22ADJ: more thorough link up checkNeale Ranns1-5/+5
2019-03-12FIB: path parsing, table-id not fib-index (VPP-1586)Neale Ranns1-1/+11
2019-03-12FIB: crash when deleting default routeNeale Ranns1-9/+0
2019-02-19VPP-1568:when entry src cover change, recursive-loop fib still can not work.mu.duojiao1-0/+9
2019-02-15FIB: pass a copy the walk contextNeale Ranns1-1/+3
2019-02-07IPSEC: no second lookup after tunnel encapNeale Ranns1-1/+3
2019-01-24add "Mtrie mheap usage" in "show ip fib memory"Lollita Liu1-2/+9
2019-01-07VOM: mroutesNeale Ranns1-0/+4
2018-12-24FIB: adj src assert fix part 2Neale Ranns1-1/+8
2018-12-23FIB: remove assert from adj srcNeale Ranns1-1/+0
2018-12-20FIB: encode the label stack in the FIB path during table dumpNeale Ranns8-16/+134
2018-12-16IP6-MFIB: replace the radix tree with bihash (VPP-1526)Neale Ranns2-19/+22
2018-12-07FIB recusrion loop checks traverse midchain adjacenciesNeale Ranns1-2/+14
2018-12-03move [m]fib and BIER tests to unittest pluginNeale Ranns1-10551/+0
2018-10-29Fixing Exclusive dpo path issues added when via rpathVijayabhaskar Katamreddy1-4/+18
2018-10-27FIB: Sources must be keep in priority order, so re-sort after a vec_delNeale Ranns1-0/+2
2018-10-25Trivial: Cleanup missing va_ends.Paul Vinciguerra2-5/+9
2018-10-23c11 safe string handling supportDave Barach11-20/+20
2018-10-16FIB: use vlib-log for debuggingNeale Ranns11-96/+186
2018-10-16Sticky Load-balanceNeale Ranns4-16/+367
2018-10-08Adding Multipath support for exclusive DPO based fib path entries via rpathVijayabhaskar Katamreddy2-2/+16
2018-10-01Source VRF SelectNeale Ranns2-0/+34
2018-10-01mroute routers in the stats segmentNeale Ranns1-2/+2
2018-09-25FIB: recusrive paths must lock the table to prevent its deletionNeale Ranns2-0/+9
2018-09-20UDP-Encap: name counters for the stats segmentNeale Ranns1-1/+1
2018-09-20Route counters in the stats segmentNeale Ranns4-0/+31
2018-09-19GRE: fix 4o6 and 6o4 adj stackingNeale Ranns2-0/+21
2018-09-10vxlan-gbp: Add support for vxlan gbpMohsin Kazmi1-0/+2
2018-08-31FIB path CLI fix for lookup-table IDsNeale Ranns1-0/+12
2018-08-29Consolidate table->index conversion in fib-path CLI processingNeale Ranns1-1/+14
2018-08-2832/64 shmem bihash interoperabilityDave Barach1-4/+5
2018-08-27Adjacency walks protected by 'walk in progress' flagNeale Ranns1-0/+1
2018-08-27IGMP: enable command on cliNeale Ranns1-2/+1
2018-08-22IPIP and SIXRD tunnels create API needs table-IDs not fib-indexesNeale Ranns2-0/+6
2018-08-10Use IP address types on UDP encap APINeale Ranns2-0/+44
2018-07-30FIB: return entry prefix by const reference to avoid the copyNeale Ranns8-48/+31
2018-07-18Add config option to use dlmalloc instead of mheapDave Barach1-0/+8
2018-07-16Adjacency-BFD: assume BFD down on createNeale Ranns1-2/+1
2018-07-10FIB path dump: fix next-hop-table ID for recursive routesNeale Ranns2-2/+3
2018-07-09IGMP improvementsNeale Ranns1-6/+0
2018-07-04IP FIB dump - incorrect table-ID for deag pathsNeale Ranns1-1/+1
2018-07-04Remove unused members from ip4_fib_tNeale Ranns2-9/+3
2018-07-04add 'src-lookup' keyword for FIB pathsNeale Ranns1-0/+4
ost']}" with PapiSocketExecutor(node) as papi_exec: sw_if_index = papi_exec.add(cmd, **args).get_sw_if_index(err_msg) if_key = Topology.add_new_port(node, u"tap") Topology.update_interface_sw_if_index(node, if_key, sw_if_index) Topology.update_interface_name(node, if_key, tap_name) if mac is None: mac = Tap.vpp_get_tap_interface_mac(node, tap_name) Topology.update_interface_mac_address(node, if_key, mac) tap_dev_name = Tap.vpp_get_tap_dev_name(node, tap_name) Topology.update_interface_tap_dev_name(node, if_key, tap_dev_name) return sw_if_index @staticmethod def vpp_get_tap_dev_name(node, host_if_name): """Get VPP tap interface name from hardware interfaces dump. :param node: DUT node. :param host_if_name: Tap host interface name. :type node: dict :type host_if_name: str :returns: VPP tap interface dev_name. :rtype: str """ return Tap.tap_dump(node, host_if_name).get(u"dev_name") @staticmethod def vpp_get_tap_interface_mac(node, interface_name): """Get tap interface MAC address from interfaces dump. :param node: DUT node. :param interface_name: Tap interface name. :type node: dict :type interface_name: str :returns: Tap interface MAC address. :rtype: str """ return InterfaceUtil.vpp_get_interface_mac(node, interface_name) @staticmethod def tap_dump(node, name=None): """Get all TAP interface data from the given node, or data about a specific TAP interface. :param node: VPP node to get data from. :param name: Optional name of a specific TAP interface. :type node: dict :type name: str :returns: Dictionary of information about a specific TAP interface, or a List of dictionaries containing all TAP data for the given node. :rtype: dict or list """ def process_tap_dump(tap_dump): """Process tap dump. :param tap_dump: Tap interface dump. :type tap_dump: dict :returns: Processed tap interface dump. :rtype: dict """ tap_dump[u"host_mac_addr"] = str(tap_dump[u"host_mac_addr"]) tap_dump[u"host_ip4_prefix"] = str(tap_dump[u"host_ip4_prefix"]) tap_dump[u"host_ip6_prefix"] = str(tap_dump[u"host_ip6_prefix"]) tap_dump[u"tap_flags"] = tap_dump[u"tap_flags"].value \ if hasattr(tap_dump[u"tap_flags"], u"value") \ else int(tap_dump[u"tap_flags"]) tap_dump[u"host_namespace"] = None \ if tap_dump[u"host_namespace"] == u"(nil)" \ else tap_dump[u"host_namespace"] tap_dump[u"host_bridge"] = None \ if tap_dump[u"host_bridge"] == u"(nil)" \ else tap_dump[u"host_bridge"] return tap_dump cmd = u"sw_interface_tap_v2_dump" err_msg = f"Failed to get TAP dump on host {node[u'host']}" with PapiSocketExecutor(node) as papi_exec: details = papi_exec.add(cmd).get_details(err_msg) data = list() if name is None else dict() for dump in details: if name is None: data.append(process_tap_dump(dump)) elif dump.get(u"host_if_name") == name: data = process_tap_dump(dump) break logger.debug(f"TAP data:\n{data}") return data class TapFeatureMask: """Tap features utilities""" @staticmethod def create_tap_feature_mask(**kwargs): """Create tap feature mask with feature bits set according to kwargs. :param kwargs: Key-value pairs of feature names and it's state :type kwargs: dict """ tap_feature_mask = 0 if u"all" in kwargs and kwargs[u"all"] is True: for tap_feature_flag in TapFeaturesFlags: tap_feature_mask |= 1 << (tap_feature_flag.value - 1) else: for feature_name, enabled in kwargs.items(): tap_feature_name = u"TAP_API_FLAG_" + feature_name.upper() if tap_feature_name not in TapFeaturesFlags.__members__: raise ValueError(u"Unsupported tap feature flag name") if enabled: tap_feature_mask |= \ 1 << (TapFeaturesFlags[tap_feature_name].value - 1) return tap_feature_mask @staticmethod def is_feature_enabled(tap_feature_mask, tap_feature_flag): """Checks if concrete tap feature is enabled within tap_feature_mask :param tap_feature_mask: Mask of enabled tap features :param tap_feature_flag: Checked tap feature :type tap_feature_mask: int :type tap_feature_flag: TapFeaturesFlags """ feature_flag_bit = 1 << tap_feature_flag.value return (tap_feature_mask & feature_flag_bit) > 0