diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2019-08-21 10:51:21 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-09-09 14:29:48 +0000 |
commit | 546f955b3dad6c0866a8ba778d0cfe1ef43d81d4 (patch) | |
tree | 6113bab6ae3dec547b6cc6467b0fb8db114e7728 /src/plugins/memif/test/vpp_memif.py | |
parent | bdf3ebe358787ef240dc9fadc515dfd178dfef7b (diff) |
memif: API cleanup
Use consistent API types.
memif_create now enables zero-copy by default.
Add no_zero_copy param to memif_create which
if set, disables zero copy.
Type: refactor
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I11df8b9212c40de179ee71dc9da14039b982ede5
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/plugins/memif/test/vpp_memif.py')
-rw-r--r-- | src/plugins/memif/test/vpp_memif.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/plugins/memif/test/vpp_memif.py b/src/plugins/memif/test/vpp_memif.py index befcc2840c5..ba032c5fb6f 100644 --- a/src/plugins/memif/test/vpp_memif.py +++ b/src/plugins/memif/test/vpp_memif.py @@ -7,17 +7,6 @@ from vpp_ip import VppIpPrefix from vpp_papi import VppEnum -class MEMIF_ROLE: - MASTER = 0 - SLAVE = 1 - - -class MEMIF_MODE: - ETHERNET = 0 - IP = 1 - PUNT_INJECT = 2 - - def get_if_dump(dump, sw_if_index): for d in dump: if (d.sw_if_index == sw_if_index): @@ -127,7 +116,8 @@ class VppMemif(VppObject): return False while True: dump = self.query_vpp_config() - if dump.link_up_down == 1: + f = VppEnum.vl_api_if_status_flags_t.IF_STATUS_API_FLAG_LINK_UP + if dump.flags & f: return True self._test.sleep(step) timeout -= step |