aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2022-04-12hsa: fix coverity warningFlorin Coras1-0/+1
2022-04-12hsa: vcl test client option to close only clientFlorin Coras2-2/+12
2022-04-12tcp: limit persist segment size if window availableFlorin Coras1-1/+3
2022-04-12tests: fix bihash unit test threads countJing Peng1-4/+4
2022-04-11teib: use nexthop table idBenoît Ganne1-3/+0
2022-04-11interface: fix the offloadsMohsin Kazmi1-0/+2
2022-04-11tls: fix connected notifications with no app wrkFlorin Coras2-6/+14
2022-04-11tests: fix bihash unittest error reportingJing Peng1-15/+21
2022-04-11devices: refactor fanout supportMohsin Kazmi3-27/+37
2022-04-10build: add clang-14Damjan Marion1-0/+1
2022-04-08devices: fix the offset for af-packetMohsin Kazmi1-14/+7
2022-04-08linux-cp: fix setting mtu on hardware interfacesMatthew Smith1-1/+1
2022-04-08dpdk: add multi-txq supportMohsin Kazmi4-13/+31
2022-04-08build: opensuse: remove nasm, change to clangLaszlo Kiraly3-7/+6
2022-04-08stats: fix vector overrun in expend checkDmitry Valter1-2/+2
2022-04-08vppinfra: introduce clib_perfmomDamjan Marion11-216/+530
2022-04-08vppinfra: clib_interrupt_get_next reading unallocated memoryPaul Atkins2-1/+82
2022-04-08vppinfra: add bright colors to format_tableDamjan Marion2-2/+20
2022-04-08api: Do not assert of short message lengthsNeale Ranns1-1/+0
2022-04-07tls http: run config fns after init onesFlorin Coras2-2/+2
2022-04-07tls: fix session pool realloc on acceptFlorin Coras1-0/+3
2022-04-07devices: add cli support for checksum and gso disableMohsin Kazmi5-20/+29
2022-04-06vppinfra: add vec_new_heap()Damjan Marion2-5/+15
2022-04-06devices: add cli support to disable qdisc bypassMohsin Kazmi5-12/+39
2022-04-06stats: avoid linear search for empty entryDamjan Marion3-10/+16
2022-04-06interface: unregister node counters on interface deleteDamjan Marion3-7/+21
2022-04-06vppinfra: add MAX macros for clib typesDamjan Marion1-0/+18
2022-04-06vlib: clear frame flags on freeStanislav Zaikin1-0/+2
2022-04-06build: remove nasmDamjan Marion6-52/+3
2022-04-05wireguard: prevent segfault on non-adj packetsJon Loeliger2-0/+7
2022-04-05dpdk: bump to DPDK v22.03Dastin Wilski2-1/+59
2022-04-05dpdk: macros changes for dpdk 22.03Dastin Wilski4-60/+62
2022-04-05dpdk: compatibility layer for dpdk 22.03 bumpDastin Wilski2-26/+87
2022-04-05dpdk: fix max frame sizeDamjan Marion2-11/+11
2022-04-05nat: nat44 cli bug fixFilip Varga5-42/+38
2022-04-05vppinfra: refactor address sanitizerDamjan Marion25-247/+121
2022-04-05tap: fix the coverity warningMohsin Kazmi1-1/+1
2022-04-05devices: remove redundant code af-packetMohsin Kazmi2-23/+3
2022-04-05devices: fix the received blocks countersMohsin Kazmi1-5/+4
2022-04-05crypto-openssl: use getrandom to reseed opensslBenoît Ganne1-13/+8
2022-04-05rdma: bump to rdma-core 39.1Benoît Ganne1-2/+2
2022-04-05vppinfra: use AVX512 compare for equality testingBenoît Ganne1-45/+59
2022-04-05devices: fix the coverity warnings for af-packet v3Mohsin Kazmi1-9/+14
2022-04-05build: ./configure basic cross-compilation supportDamjan Marion1-12/+38
2022-04-04vppinfra: make _vec_len() read-onlyDamjan Marion119-299/+300
2022-04-04udp: use pool safe reallocsFlorin Coras3-81/+8
2022-04-04tcp: use safe realloc poolFlorin Coras1-3/+3
2022-04-04interface api: restore order of context valueVratko Polak1-1/+2
2022-04-04tls: set client ckpair only for non-test ckpFlorin Coras1-13/+15
2022-04-04tls: null terminate openssl chiphersFlorin Coras1-2/+2
pan class="nf">query_vpp_config(self): locator = self.get_lisp_locator_dump_entry() return locator is not None def remove_vpp_config(self): self.test.vapi.lisp_add_del_locator( ls_name=self._ls_name, sw_if_index=self._sw_if_index, priority=self._priority, weight=self._weight, is_add=0) self._test.registry.register(self, self.test.logger) def object_id(self): return 'lisp-locator-%s-%d' % (self._ls_name, self._sw_if_index) class LispEIDType(object): IP4 = 0 IP6 = 1 MAC = 2 class LispKeyIdType(object): NONE = 0 SHA1 = 1 SHA256 = 2 class LispEID(object): """ Lisp endpoint identifier """ def __init__(self, eid): self.eid = eid # find out whether EID is ip4 prefix, ip6 prefix or MAC if self.eid.find("/") != -1: if self.eid.find(":") == -1: self.eid_type = LispEIDType.IP4 self.data_length = 4 else: self.eid_type = LispEIDType.IP6 self.data_length = 16 self.eid_address = self.eid.split("/")[0] self.prefix_length = int(self.eid.split("/")[1]) elif self.eid.count(":") == 5: # MAC address self.eid_type = LispEIDType.MAC self.eid_address = self.eid self.prefix_length = 0 self.data_length = 6 else: raise Exception('Unsupported EID format {!s}!'.format(eid)) @property def packed(self): if self.eid_type == LispEIDType.IP4: return socket.inet_pton(socket.AF_INET, self.eid_address) elif self.eid_type == LispEIDType.IP6: return socket.inet_pton(socket.AF_INET6, self.eid_address) elif self.eid_type == LispEIDType.MAC: return Exception('Unimplemented') raise Exception('Unknown EID type {!s}!'.format(self.eid_type)) class VppLispMapping(VppObject): """ Represents common features for remote and local LISP mapping in VPP """ def __init__(self, test, eid, vni=0, priority=1, weight=1): self._eid = LispEID(eid) self._test = test self._priority = priority self._weight = weight self._vni = vni @property def test(self): return self._test @property def vni(self): return self._vni @property def eid(self): return self._eid @property def priority(self): return self._priority @property def weight(self): return self._weight def get_lisp_mapping_dump_entry(self): return self.test.vapi.lisp_eid_table_dump( eid_set=1, prefix_length=self._eid.prefix_length, vni=self._vni, eid_type=self._eid.eid_type, eid=self._eid.packed) def query_vpp_config(self): mapping = self.get_lisp_mapping_dump_entry() return mapping def object_id(self): return 'lisp-mapping-[%s]-%s-%s-%s' % ( self.vni, self.eid, self.priority, self.weight) class VppLocalMapping(VppLispMapping): """ LISP Local mapping """ def __init__(self, test, eid, ls_name, vni=0, priority=1, weight=1, key_id=LispKeyIdType.NONE, key=''): super(VppLocalMapping, self).__init__(test, eid, vni, priority, weight) self._ls_name = ls_name self._key_id = key_id self._key = key @property def ls_name(self): return self._ls_name @property def key_id(self): return self._key_id @property def key(self): return self._key def add_vpp_config(self): self.test.vapi.lisp_add_del_local_eid( ls_name=self._ls_name, eid_type=self._eid.eid_type, eid=self._eid.packed, prefix_len=self._eid.prefix_length, vni=self._vni, key_id=self._key_id, key=self._key) self._test.registry.register(self, self.test.logger) def remove_vpp_config(self): self.test.vapi.lisp_add_del_local_eid( ls_name=self._ls_name, eid_type=self._eid.eid_type, eid=self._eid.packed, prefix_len=self._eid.prefix_length, vni=self._vni, is_add=0) def object_id(self): return 'lisp-eid-local-mapping-%s[%d]' % (self._eid, self._vni) class VppRemoteMapping(VppLispMapping): def __init__(self, test, eid, rlocs=None, vni=0, priority=1, weight=1): super(VppRemoteMapping, self).__init__(test, eid, vni, priority, weight) self._rlocs = rlocs @property def rlocs(self): return self._rlocs def add_vpp_config(self): self.test.vapi.lisp_add_del_remote_mapping( rlocs=self._rlocs, eid_type=self._eid.eid_type, eid=self._eid.packed, eid_prefix_len=self._eid.prefix_length, vni=self._vni, rlocs_num=len(self._rlocs)) self._test.registry.register(self, self.test.logger) def remove_vpp_config(self): self.test.vapi.lisp_add_del_remote_mapping( eid_type=self._eid.eid_type, eid=self._eid.packed, eid_prefix_len=self._eid.prefix_length, vni=self._vni, is_add=0, rlocs_num=0) def object_id(self): return 'lisp-eid-remote-mapping-%s[%d]' % (self._eid, self._vni) class VppLispAdjacency(VppObject): """ Represents LISP adjacency in VPP """ def __init__(self, test, leid, reid, vni=0): self._leid = LispEID(leid) self._reid = LispEID(reid) if self._leid.eid_type != self._reid.eid_type: raise Exception('remote and local EID are different types!') self._vni = vni self._test = test @property def test(self): return self._test @property def leid(self): return self._leid @property def reid(self): return self._reid @property def vni(self): return self._vni def add_vpp_config(self): self.test.vapi.lisp_add_del_adjacency( leid=self._leid.packed, reid=self._reid.packed, eid_type=self._leid.eid_type, leid_len=self._leid.prefix_length, reid_len=self._reid.prefix_length, vni=self._vni) self._test.registry.register(self, self.test.logger) @staticmethod def eid_equal(eid, eid_type, eid_data, prefix_len): if eid.eid_type != eid_type: return False if eid_type == LispEIDType.IP4 or eid_type == LispEIDType.IP6: if eid.prefix_length != prefix_len: return False if eid.packed != eid_data[0:eid.data_length]: return False return True def query_vpp_config(self): res = self.test.vapi.lisp_adjacencies_get(vni=self._vni) for adj in res.adjacencies: if self.eid_equal(self._leid, adj.eid_type, adj.leid, adj.leid_prefix_len) and \ self.eid_equal(self._reid, adj.eid_type, adj.reid, adj.reid_prefix_len): return True return False def remove_vpp_config(self): self.test.vapi.lisp_add_del_adjacency( leid=self._leid.packed, reid=self._reid.packed, eid_type=self._leid.eid_type, leid_len=self._leid.prefix_length, reid_len=self._reid.prefix_length, vni=self._vni, is_add=0) def object_id(self): return 'lisp-adjacency-%s-%s[%d]' % (self._leid, self._reid, self._vni)