summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-05-15 02:13:37 -0700
committerOle Trøan <otroan@employees.org>2019-05-28 13:30:44 +0000
commit50f0ac0f097e5495da1f2b1816106e3d420ff34b (patch)
treed10ae0385fc10b7da97b2a24f8dea3882f6d702d /test/vpp_papi_provider.py
parent9080096f7c548415fc4d5354c7e582a3eda1a5ed (diff)
Punt: socket register for exception dispatched/punted packets based on reason
- add to the Punt API to allow different descriptions of the desired packets: UDP or exceptions - move the punt nodes into punt_node.c - improve tests (test that the correct packets are punted to the registered socket) Change-Id: I1a133dec88106874993cba1f5a439cd26b2fef72 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py23
1 files changed, 5 insertions, 18 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index f32a5a848a3..ec98e1db754 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -109,10 +109,6 @@ defaultmapping = {
'policer_add_del': {'is_add': 1, 'conform_action_type': 1, },
'proxy_arp_add_del': {'is_add': 1, },
'proxy_arp_intfc_enable_disable': {'is_enable': 1, },
- 'punt_socket_register': {'protocol': 17, 'header_version': 1,
- 'is_ip4': 1, },
- 'punt_socket_deregister': {'protocol': 17, 'is_ip4': 1, },
- 'punt_socket_dump': {'is_ip6': 1, },
'set_ip_flow_hash': {'src': 1, 'dst': 1, 'sport': 1, 'dport': 1,
'proto': 1, },
'set_ipfix_exporter': {'collector_port': 4739, },
@@ -1954,27 +1950,18 @@ class VppPapiProvider(object):
'namespace_id': namespace_id,
'namespace_id_len': len(namespace_id)})
- def punt_socket_register(self, port, pathname, protocol=0x11,
- header_version=1, is_ip4=1):
+ def punt_socket_register(self, reg, pathname,
+ header_version=1):
""" Register punt socket """
return self.api(self.papi.punt_socket_register,
{'header_version': header_version,
- 'punt': {'ipv': is_ip4,
- 'l4_protocol': protocol,
- 'l4_port': port},
+ 'punt': reg,
'pathname': pathname})
- def punt_socket_deregister(self, port, protocol=0x11, is_ip4=1):
+ def punt_socket_deregister(self, reg):
""" Unregister punt socket """
return self.api(self.papi.punt_socket_deregister,
- {'punt': {'ipv': is_ip4,
- 'l4_protocol': protocol,
- 'l4_port': port}})
-
- def punt_socket_dump(self, is_ip6=1):
- """ Dump punt socket"""
- return self.api(self.papi.punt_socket_dump,
- {'is_ipv6': is_ip6})
+ {'punt': reg})
def gbp_endpoint_add(self, sw_if_index, ips, mac, sclass, flags,
tun_src, tun_dst):