Compare commits
36 Commits
v24.02-rc2
...
v17.01.1
Author | SHA1 | Date | |
---|---|---|---|
|
8099e90346 | ||
|
e7dcee4027 | ||
|
32dfd77df0 | ||
|
149745f95e | ||
|
0debfb1fa2 | ||
|
e23472662c | ||
|
43c9c959ff | ||
|
88d9b3be0e | ||
|
e5bf04dc3c | ||
|
4831dc5ddf | ||
|
cd111b2228 | ||
|
7067350c41 | ||
|
fa87080d31 | ||
|
78aab80634 | ||
|
7104f93c75 | ||
|
12713c70fc | ||
|
1b3d4ded5f | ||
|
cd8a22ae1f | ||
|
df44cc846f | ||
|
257d5e25bf | ||
|
bf2fcad04a | ||
|
2d7e16330f | ||
|
ee85bfabc9 | ||
|
b95a916dc3 | ||
|
235c64f067 | ||
|
cdffe06bab | ||
|
35dc387354 | ||
|
c48b58a216 | ||
|
856ab8aca3 | ||
|
81c09d03d8 | ||
|
b4f2525866 | ||
|
800429ddef | ||
|
e4e9fbbb7c | ||
|
fe7cdfa629 | ||
|
e73d0a3aab | ||
|
436b319354 |
@ -2,3 +2,4 @@
|
||||
host=gerrit.fd.io
|
||||
port=29418
|
||||
project=vpp
|
||||
defaultbranch=stable/1701
|
||||
|
2
Makefile
2
Makefile
@ -157,8 +157,8 @@ ifeq ($(OS_ID),ubuntu)
|
||||
ifeq ($(OS_VERSION_ID),14.04)
|
||||
@sudo -E apt-get $(CONFIRM) $(FORCE) install software-properties-common
|
||||
@sudo -E add-apt-repository ppa:openjdk-r/ppa $(CONFIRM)
|
||||
@sudo -E apt-get update
|
||||
endif
|
||||
@sudo -E apt-get update
|
||||
@sudo -E apt-get $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
|
||||
else ifneq ("$(wildcard /etc/redhat-release)","")
|
||||
@sudo yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
|
||||
|
82
RELEASE.md
82
RELEASE.md
@ -1,20 +1,100 @@
|
||||
# Release Notes {#release_notes}
|
||||
|
||||
* @subpage release_notes_17011
|
||||
* @subpage release_notes_1701
|
||||
* @subpage release_notes_1609
|
||||
* @subpage release_notes_1606
|
||||
|
||||
@page release_notes_17011 Release notes for VPP 17.01.1
|
||||
|
||||
This is bug fix release.
|
||||
|
||||
For the full list of fixed issues please reffer to:
|
||||
- fd.io [JIRA](https://jira.fd.io)
|
||||
- git [commit log](https://git.fd.io/vpp/log/?h=stable/1701)
|
||||
|
||||
@page release_notes_1701 Release notes for VPP 17.01
|
||||
|
||||
@note This release was for a while known as 16.12.
|
||||
@todo Release 17.01 needs release notes.
|
||||
|
||||
## Features
|
||||
|
||||
- [Integrated November 2016 DPDK release](http://www.dpdk.org/doc/guides/rel_notes/release_16_11.html)
|
||||
|
||||
- Complete rework of Forwarding Information Base (FIB)
|
||||
|
||||
- Performance Improvements
|
||||
- Improvements in DPDK input and output nodes
|
||||
- Improvements in L2 path
|
||||
- Improvmeents in IPv4 lookup node
|
||||
|
||||
- Feature Arcs Improvements
|
||||
- Consolidation of the code
|
||||
- New feature arcs
|
||||
- device-input
|
||||
- interface-output
|
||||
|
||||
- DPDK Cryptodev Support
|
||||
- Software and Hardware Crypto Support
|
||||
|
||||
- DPDK HQoS support
|
||||
|
||||
- Simple Port Analyzer (SPAN)
|
||||
|
||||
- Bidirectional Forwarding Detection
|
||||
- Basic implementation
|
||||
|
||||
- IPFIX Improvements
|
||||
|
||||
- L2 GRE over IPSec tunnels
|
||||
|
||||
- Link Layer Discovery Protocol (LLDP)
|
||||
|
||||
- Vhost-user Improvements
|
||||
- Performance Improvements
|
||||
- Multiqueue
|
||||
- Reconnect
|
||||
|
||||
- LISP Enhancements
|
||||
- Source/Dest control plane support
|
||||
- L2 over LISP and GRE
|
||||
- Map-Register/Map-Notify/RLOC-probing support
|
||||
- L2 API improvements, overall code hardening
|
||||
|
||||
- Plugins:
|
||||
- New: ACL
|
||||
- New: Flow per Packet
|
||||
- Improved: SNAT
|
||||
- Mutlithreading
|
||||
- Flow export
|
||||
|
||||
- Doxygen Enhancements
|
||||
|
||||
- Luajit API bindings
|
||||
|
||||
- API Refactoring
|
||||
- file split
|
||||
- message signatures
|
||||
|
||||
- Python and Scapy based unit testing infrastructure
|
||||
- Infrastructure
|
||||
- Various tests
|
||||
|
||||
- Packet Generator improvements
|
||||
|
||||
- TUN/TAP jumbo frames support
|
||||
|
||||
- Other various bug fixes and improvements
|
||||
|
||||
## Known issues
|
||||
|
||||
For the full list of issues please reffer to fd.io [JIRA](https://jira.fd.io).
|
||||
|
||||
## Issues fixed
|
||||
|
||||
For the full list of fixed issues please reffer to:
|
||||
- fd.io [JIRA](https://jira.fd.io)
|
||||
- git [commit log](https://git.fd.io/vpp/log/?h=stable/1701)
|
||||
|
||||
@page release_notes_1609 Release notes for VPP 16.09
|
||||
|
||||
|
5
build-root/deb/debian/vpp-python-api.postinst
Normal file
5
build-root/deb/debian/vpp-python-api.postinst
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# after installing python-api files
|
||||
python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
easy_install --install-dir=$python2_sitedir -z $python2_sitedir/vpp_papi/vpp_papi-*.egg
|
8
build-root/deb/debian/vpp-python-api.prerm
Normal file
8
build-root/deb/debian/vpp-python-api.prerm
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# before removing python-api files
|
||||
python2_sitedir=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
easy_install --install-dir=$python2_sitedir -mxNq vpp_papi
|
||||
|
||||
# the egg has been copied during install
|
||||
rm $python2_sitedir/vpp_papi-*.egg
|
@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo oper-161218
|
||||
echo oper-rls1701-170115
|
||||
|
@ -50,5 +50,5 @@ fi
|
||||
echo ${TAG}-${ADD}${CMT:+~${CMT}}${BLD}
|
||||
fi
|
||||
else
|
||||
echo ${TAG}
|
||||
echo ${TAG}-release
|
||||
fi
|
||||
|
54
build-root/vagrant/Vagrantfile
vendored
54
build-root/vagrant/Vagrantfile
vendored
@ -3,21 +3,29 @@
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
|
||||
# Pick the right distro and bootstrap, default is ubuntu1404
|
||||
distro = ( ENV['VPP_VAGRANT_DISTRO'] || "ubuntu1404")
|
||||
# Pick the right distro and bootstrap, default is ubuntu1604
|
||||
distro = ( ENV['VPP_VAGRANT_DISTRO'] || "ubuntu1604")
|
||||
if distro == 'centos7'
|
||||
config.vm.box = "puppetlabs/centos-7.2-64-nocm"
|
||||
config.ssh.insert_key = false
|
||||
else
|
||||
elsif distro == 'ubuntu1404'
|
||||
config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
|
||||
else
|
||||
config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm"
|
||||
end
|
||||
config.vm.box_check_update = false
|
||||
|
||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"update.sh")
|
||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"build.sh"), :args => "/vpp vagrant"
|
||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"install.sh"), :args => "/vpp"
|
||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clearinterfaces.sh")
|
||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"run.sh")
|
||||
|
||||
post_build = ( ENV['VPP_VAGRANT_POST_BUILD'] )
|
||||
if post_build == "test"
|
||||
config.vm.provision "shell", inline: "echo Testing VPP; cd /vpp; make test"
|
||||
elsif post_build == "install"
|
||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"install.sh"), :args => "/vpp"
|
||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clearinterfaces.sh")
|
||||
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"run.sh")
|
||||
end
|
||||
|
||||
# Add .gnupg dir in so folks can sign patches
|
||||
# Note, as gnupg puts socket files in that dir, we have
|
||||
@ -61,27 +69,31 @@ Vagrant.configure(2) do |config|
|
||||
vmram=(ENV['VPP_VAGRANT_VMRAM'] || 4096)
|
||||
|
||||
config.ssh.forward_agent = true
|
||||
|
||||
config.vm.synced_folder "../../", "/vpp", type: "rsync",
|
||||
rsync__auto: false,
|
||||
rsync__exclude: [
|
||||
"build-root/build*/",
|
||||
"build-root/install*/",
|
||||
"build-root/images*/",
|
||||
"build-root/*.deb",
|
||||
"build-root/*.rpm",
|
||||
"build-root/*.changes",
|
||||
"build-root/python",
|
||||
"build-root/deb/debian/*.dkms",
|
||||
"build-root/deb/debian/*.install",
|
||||
"build-root/deb/debian/changes",
|
||||
"build-root/tools"]
|
||||
config.ssh.forward_x11 = true
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.customize ["modifyvm", :id, "--ioapic", "on"]
|
||||
vb.memory = "#{vmram}"
|
||||
vb.cpus = "#{vmcpu}"
|
||||
|
||||
# rsync the vpp directory if provision hasn't happened yet
|
||||
unless File.exist? (".vagrant/machines/default/virtualbox/action_provision")
|
||||
config.vm.synced_folder "../../", "/vpp", type: "rsync",
|
||||
rsync__auto: false,
|
||||
rsync__exclude: [
|
||||
"build-root/build*/",
|
||||
"build-root/install*/",
|
||||
"build-root/images*/",
|
||||
"build-root/*.deb",
|
||||
"build-root/*.rpm",
|
||||
"build-root/*.changes",
|
||||
"build-root/python",
|
||||
"build-root/deb/debian/*.dkms",
|
||||
"build-root/deb/debian/*.install",
|
||||
"build-root/deb/debian/changes",
|
||||
"build-root/tools"]
|
||||
end
|
||||
|
||||
#support for the SSE4.x instruction is required in some versions of VB.
|
||||
vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.1", "1"]
|
||||
vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.2", "1"]
|
||||
|
@ -11,12 +11,13 @@ elif [ -f /etc/redhat-release ];then
|
||||
DISTRIB_DESCRIPTION=`lsb_release -sd`
|
||||
fi
|
||||
|
||||
if [ $DISTRIB_ID == "Ubuntu" ]; then
|
||||
start vpp
|
||||
elif [ $DISTRIB_ID == "CentOS" ]; then
|
||||
if [ $DISTRIB_ID == "CentOS" ]; then
|
||||
# Install uio-pci-generic
|
||||
modprobe uio_pci_generic
|
||||
|
||||
# Start vpp
|
||||
fi
|
||||
echo "Starting VPP..."
|
||||
if [ $DISTRIB_ID == "Ubuntu" ] && [ $DISTRIB_CODENAME = "trusty" ] ; then
|
||||
start vpp
|
||||
else
|
||||
service vpp start
|
||||
fi
|
||||
|
@ -40,7 +40,7 @@ if [ $DISTRIB_ID == "Ubuntu" ]; then
|
||||
update-alternatives --install /bin/sh sh /bin/bash 100
|
||||
|
||||
# Install useful but non-mandatory tools
|
||||
apt-get install -y emacs git-review gdb gdbserver
|
||||
apt-get install -y emacs x11-utils git-review gdb gdbserver
|
||||
elif [ $DISTRIB_ID == "CentOS" ]; then
|
||||
# Standard update + upgrade dance
|
||||
yum check-update
|
||||
|
@ -52,7 +52,7 @@ SUFFIXES = .api.h .api .api.json
|
||||
apidir = $(prefix)/acl
|
||||
api_DATA = acl/acl.api.json
|
||||
|
||||
noinst_HEADERS = \
|
||||
nobase_include_HEADERS = \
|
||||
acl/acl_all_api_h.h \
|
||||
acl/acl_msg_enum.h \
|
||||
acl/acl.api.h
|
||||
@ -68,7 +68,7 @@ install-data-hook:
|
||||
# Java code generation
|
||||
#
|
||||
jvpp_registry_root = ../../vpp-api/java
|
||||
jvpp_registry_version = 17.01
|
||||
jvpp_registry_version = 17.01.1
|
||||
jacl_jarfile = jvpp-acl-$(PACKAGE_VERSION).jar
|
||||
jvpp_package_dir = io/fd/vpp/jvpp/acl
|
||||
jvpp_root = acl/jvpp
|
||||
|
@ -1044,6 +1044,7 @@ typedef struct
|
||||
u8 prefix_len;
|
||||
u32 count;
|
||||
u32 table_index;
|
||||
u32 arp_table_index;
|
||||
} macip_match_type_t;
|
||||
|
||||
static u32
|
||||
@ -1127,6 +1128,34 @@ macip_create_classify_tables (acl_main_t * am, u32 macip_acl_index)
|
||||
vec_sort_with_function (mvec, match_type_compare);
|
||||
/* Create the classifier tables */
|
||||
last_table = ~0;
|
||||
/* First add ARP tables */
|
||||
vec_foreach (mt, mvec)
|
||||
{
|
||||
int mask_len;
|
||||
int is6 = mt->is_ipv6;
|
||||
|
||||
mt->arp_table_index = ~0;
|
||||
if (!is6)
|
||||
{
|
||||
memset (mask, 0, sizeof (mask));
|
||||
memcpy (&mask[6], mt->mac_mask, 6);
|
||||
memset (&mask[12], 0xff, 2); /* ethernet protocol */
|
||||
memcpy (&mask[14 + 8], mt->mac_mask, 6);
|
||||
|
||||
for (i = 0; i < (mt->prefix_len / 8); i++)
|
||||
mask[14 + 14 + i] = 0xff;
|
||||
if (mt->prefix_len % 8)
|
||||
mask[14 + 14 + (mt->prefix_len / 8)] = 0xff - ((1 << (8 - mt->prefix_len % 8)) - 1);
|
||||
|
||||
mask_len = ((14 + 14 + ((mt->prefix_len+7) / 8) +
|
||||
(sizeof (u32x4)-1))/sizeof(u32x4)) * sizeof (u32x4);
|
||||
acl_classify_add_del_table_small (cm, mask, mask_len, last_table,
|
||||
(~0 == last_table) ? 0 : ~0, &mt->arp_table_index,
|
||||
1);
|
||||
last_table = mt->arp_table_index;
|
||||
}
|
||||
}
|
||||
/* Now add IP[46] tables */
|
||||
vec_foreach (mt, mvec)
|
||||
{
|
||||
int mask_len;
|
||||
@ -1167,13 +1196,18 @@ macip_create_classify_tables (acl_main_t * am, u32 macip_acl_index)
|
||||
int l3_src_offs = get_l3_src_offset(is6);
|
||||
memset (mask, 0, sizeof (mask));
|
||||
memcpy (&mask[6], a->rules[i].src_mac, 6);
|
||||
memset (&mask[12], 0xff, 2); /* ethernet protocol */
|
||||
if (is6)
|
||||
{
|
||||
memcpy (&mask[l3_src_offs], &a->rules[i].src_ip_addr.ip6, 16);
|
||||
mask[12] = 0x86;
|
||||
mask[13] = 0xdd;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy (&mask[l3_src_offs], &a->rules[i].src_ip_addr.ip4, 4);
|
||||
mask[12] = 0x08;
|
||||
mask[13] = 0x00;
|
||||
}
|
||||
match_type_index =
|
||||
macip_find_match_type (mvec, a->rules[i].src_mac_mask,
|
||||
@ -1183,6 +1217,19 @@ macip_create_classify_tables (acl_main_t * am, u32 macip_acl_index)
|
||||
vnet_classify_add_del_session (cm, mvec[match_type_index].table_index,
|
||||
mask, a->rules[i].is_permit ? ~0 : 0, i,
|
||||
0, action, metadata, 1);
|
||||
/* add ARP table entry too */
|
||||
if (!is6 && (mvec[match_type_index].arp_table_index != ~0))
|
||||
{
|
||||
memset (mask, 0, sizeof (mask));
|
||||
memcpy (&mask[6], a->rules[i].src_mac, 6);
|
||||
mask[12] = 0x08;
|
||||
mask[13] = 0x06;
|
||||
memcpy (&mask[14 + 8], a->rules[i].src_mac, 6);
|
||||
memcpy (&mask[14 + 14], &a->rules[i].src_ip_addr.ip4, 4);
|
||||
vnet_classify_add_del_session (cm, mvec[match_type_index].arp_table_index,
|
||||
mask, a->rules[i].is_permit ? ~0 : 0, i,
|
||||
0, action, metadata, 1);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1853,7 +1900,11 @@ acl_setup_nodes (void)
|
||||
|
||||
feat_bitmap_init_next_nodes (vm, acl_in_node.index, L2INPUT_N_FEAT,
|
||||
l2input_get_feat_names (),
|
||||
am->acl_in_node_input_next_node_index);
|
||||
am->acl_in_node_feat_next_node_index);
|
||||
|
||||
feat_bitmap_init_next_nodes (vm, acl_out_node.index, L2OUTPUT_N_FEAT,
|
||||
l2output_get_feat_names (),
|
||||
am->acl_out_node_feat_next_node_index);
|
||||
|
||||
memset (&am->acl_in_ip4_match_next[0], 0,
|
||||
sizeof (am->acl_in_ip4_match_next));
|
||||
|
@ -123,9 +123,8 @@ typedef struct {
|
||||
u32 l2_output_classify_next_acl;
|
||||
|
||||
/* next node indices for feature bitmap */
|
||||
u32 acl_in_node_input_next_node_index[32];
|
||||
/* the respective thing for the output feature */
|
||||
l2_output_next_nodes_st acl_out_output_next_nodes;
|
||||
u32 acl_in_node_feat_next_node_index[32];
|
||||
u32 acl_out_node_feat_next_node_index[32];
|
||||
|
||||
/* ACL match actions (must be coherent across in/out ACLs to next indices (can differ) */
|
||||
|
||||
|
@ -44,10 +44,18 @@ l2sess_vlib_plugin_register (vlib_main_t * vm, void* hh,
|
||||
}
|
||||
|
||||
void
|
||||
l2sess_init_next_features_input (vlib_main_t * vm, l2sess_main_t * sm)
|
||||
l2sess_init_next_features (vlib_main_t * vm, l2sess_main_t * sm)
|
||||
{
|
||||
#define _(node_name, node_var, is_out, is_ip6, is_track) \
|
||||
if (!is_out) feat_bitmap_init_next_nodes(vm, node_var.index, L2INPUT_N_FEAT, l2input_get_feat_names (), sm->node_var ## _input_next_node_index);
|
||||
#define _(node_name, node_var, is_out, is_ip6, is_track) \
|
||||
if (is_out) \
|
||||
feat_bitmap_init_next_nodes(vm, node_var.index, L2OUTPUT_N_FEAT, \
|
||||
l2output_get_feat_names (), \
|
||||
sm->node_var ## _feat_next_node_index); \
|
||||
else \
|
||||
feat_bitmap_init_next_nodes(vm, node_var.index, L2INPUT_N_FEAT, \
|
||||
l2input_get_feat_names (), \
|
||||
sm->node_var ## _feat_next_node_index);
|
||||
|
||||
foreach_l2sess_node
|
||||
#undef _
|
||||
}
|
||||
@ -75,7 +83,7 @@ l2sess_setup_nodes (void)
|
||||
vlib_main_t *vm = vlib_get_main ();
|
||||
l2sess_main_t *sm = &l2sess_main;
|
||||
|
||||
l2sess_init_next_features_input (vm, sm);
|
||||
l2sess_init_next_features (vm, sm);
|
||||
|
||||
l2sess_add_our_next_nodes (vm, sm, (u8 *) "l2-input-classify", 0);
|
||||
l2sess_add_our_next_nodes (vm, sm, (u8 *) "l2-output-classify", 1);
|
||||
|
@ -95,8 +95,7 @@ typedef struct {
|
||||
* on whether the node is an input or output one.
|
||||
*/
|
||||
#define _(node_name, node_var, is_out, is_ip6, is_track) \
|
||||
u32 node_var ## _input_next_node_index[32]; \
|
||||
l2_output_next_nodes_st node_var ## _next_nodes;
|
||||
u32 node_var ## _feat_next_node_index[32];
|
||||
foreach_l2sess_node
|
||||
#undef _
|
||||
l2_output_next_nodes_st output_next_nodes;
|
||||
|
@ -526,13 +526,13 @@ check_idle_sessions (l2sess_main_t * sm, u32 sw_if_index, u64 now)
|
||||
|
||||
static uword
|
||||
l2sess_node_fn (vlib_main_t * vm,
|
||||
vlib_node_runtime_t * node, vlib_frame_t * frame)
|
||||
vlib_node_runtime_t * node, vlib_frame_t * frame,
|
||||
int node_is_out, int node_is_ip6, int node_is_track,
|
||||
u32 *feat_next_node_index)
|
||||
{
|
||||
u32 n_left_from, *from, *to_next;
|
||||
l2sess_next_t next_index;
|
||||
u32 pkts_swapped = 0;
|
||||
u32 cached_sw_if_index = (u32) ~ 0;
|
||||
u32 cached_next_index = (u32) ~ 0;
|
||||
u32 feature_bitmap0;
|
||||
u32 trace_flags0;
|
||||
|
||||
@ -570,45 +570,19 @@ l2sess_node_fn (vlib_main_t * vm,
|
||||
//en0 = vlib_buffer_get_current (b0);
|
||||
|
||||
/*
|
||||
* The non-boilerplate is in the block below.
|
||||
* Note first a magic macro block that sets up the behavior qualifiers:
|
||||
* node_is_out : 1 = is output, 0 = is input
|
||||
* node_is_ip6 : 1 = is ip6, 0 = is ip4
|
||||
* node_is_track : 1 = is a state tracking node, 0 - is a session addition node
|
||||
*
|
||||
* Subsequently the code adjusts its behavior depending on these variables.
|
||||
* It's most probably not great performance wise but much easier to work with.
|
||||
*
|
||||
* The below code adjust the behavior according to these parameters.
|
||||
*/
|
||||
{
|
||||
int node_is_out = -1;
|
||||
CLIB_UNUSED (int node_is_ip6) = -1;
|
||||
CLIB_UNUSED (int node_is_track) = -1;
|
||||
u32 node_index = 0;
|
||||
u32 session_tables[2] = { ~0, ~0 };
|
||||
u32 session_nexts[2] = { ~0, ~0 };
|
||||
l2_output_next_nodes_st *next_nodes = 0;
|
||||
u32 *input_feat_next_node_index;
|
||||
u8 l4_proto;
|
||||
u64 now = clib_cpu_time_now ();
|
||||
|
||||
/*
|
||||
* Set the variables according to which of the 8 nodes we are.
|
||||
* Hopefully the compiler is smart enough to eliminate the extraneous.
|
||||
*/
|
||||
#define _(node_name, node_var, is_out, is_ip6, is_track) \
|
||||
if(node_var.index == node->node_index) \
|
||||
{ \
|
||||
node_is_out = is_out; \
|
||||
node_is_ip6 = is_ip6; \
|
||||
node_is_track = is_track; \
|
||||
node_index = node_var.index; \
|
||||
next_nodes = &sm->node_var ## _next_nodes; \
|
||||
input_feat_next_node_index = sm->node_var ## _input_next_node_index; \
|
||||
}
|
||||
foreach_l2sess_node
|
||||
#undef _
|
||||
trace_flags0 = 0;
|
||||
trace_flags0 = 0;
|
||||
if (node_is_out)
|
||||
{
|
||||
sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_TX];
|
||||
@ -715,38 +689,8 @@ if(node_var.index == node->node_index) \
|
||||
check_idle_sessions (sm, sw_if_index0, now);
|
||||
}
|
||||
|
||||
if (node_is_out)
|
||||
{
|
||||
if (feature_bitmap0)
|
||||
{
|
||||
trace_flags0 |= 0x10;
|
||||
}
|
||||
if (sw_if_index0 == cached_sw_if_index)
|
||||
{
|
||||
trace_flags0 |= 0x20;
|
||||
}
|
||||
l2_output_dispatch (sm->vlib_main,
|
||||
sm->vnet_main,
|
||||
node,
|
||||
node_index,
|
||||
&cached_sw_if_index,
|
||||
&cached_next_index,
|
||||
next_nodes,
|
||||
b0, sw_if_index0, feature_bitmap0,
|
||||
&next0);
|
||||
trace_flags0 |= 2;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
next0 =
|
||||
feat_bitmap_get_next_node_index (input_feat_next_node_index,
|
||||
next0 = feat_bitmap_get_next_node_index (feat_next_node_index,
|
||||
feature_bitmap0);
|
||||
trace_flags0 |= 4;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (next0 >= node->n_next_nodes)
|
||||
{
|
||||
@ -795,7 +739,10 @@ node_var ## node_fn (vlib_main_t * vm, \
|
||||
vlib_node_runtime_t * node, \
|
||||
vlib_frame_t * frame) \
|
||||
{ \
|
||||
return l2sess_node_fn(vm, node, frame); \
|
||||
l2sess_main_t *sm = &l2sess_main; \
|
||||
return l2sess_node_fn(vm, node, frame, \
|
||||
is_out, is_ip6, is_track, \
|
||||
sm->node_var ## _feat_next_node_index); \
|
||||
} \
|
||||
VLIB_REGISTER_NODE (node_var) = { \
|
||||
.function = node_var ## node_fn, \
|
||||
|
@ -73,7 +73,7 @@ acl_in_node_fn (vlib_main_t * vm,
|
||||
u32 feature_bitmap0;
|
||||
u32 trace_bitmap = 0;
|
||||
u32 *input_feat_next_node_index =
|
||||
acl_main.acl_in_node_input_next_node_index;
|
||||
acl_main.acl_in_node_feat_next_node_index;
|
||||
|
||||
from = vlib_frame_vector_args (frame);
|
||||
n_left_from = frame->n_vectors;
|
||||
|
@ -68,13 +68,12 @@ acl_out_node_fn (vlib_main_t * vm,
|
||||
vlib_node_runtime_t * node, vlib_frame_t * frame)
|
||||
{
|
||||
acl_main_t *am = &acl_main;
|
||||
l2_output_next_nodes_st *next_nodes = &am->acl_out_output_next_nodes;
|
||||
u32 *output_feat_next_node_index =
|
||||
am->acl_out_node_feat_next_node_index;
|
||||
u32 n_left_from, *from, *to_next;
|
||||
acl_out_next_t next_index;
|
||||
u32 pkts_acl_checked = 0;
|
||||
u32 feature_bitmap0;
|
||||
u32 cached_sw_if_index = (u32) ~ 0;
|
||||
u32 cached_next_index = (u32) ~ 0;
|
||||
u32 match_acl_index = ~0;
|
||||
u32 match_rule_index = ~0;
|
||||
u32 trace_bitmap = 0;
|
||||
@ -119,14 +118,9 @@ acl_out_node_fn (vlib_main_t * vm,
|
||||
}
|
||||
if (next0 == ~0)
|
||||
{
|
||||
l2_output_dispatch (vm,
|
||||
am->vnet_main,
|
||||
node,
|
||||
acl_out_node.index,
|
||||
&cached_sw_if_index,
|
||||
&cached_next_index,
|
||||
next_nodes,
|
||||
b0, sw_if_index0, feature_bitmap0, &next0);
|
||||
next0 =
|
||||
feat_bitmap_get_next_node_index (output_feat_next_node_index,
|
||||
feature_bitmap0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
AC_INIT(acl_plugin, 1.0)
|
||||
AC_INIT(acl_plugin, 17.01.1)
|
||||
AC_CONFIG_MACRO_DIR([../../vpp-api/java/m4])
|
||||
LT_INIT
|
||||
AM_INIT_AUTOMAKE
|
||||
|
@ -17,20 +17,8 @@ AM_CFLAGS = -Wall
|
||||
AM_LDFLAGS = -module -shared -avoid-version
|
||||
|
||||
########################################
|
||||
# iOAM Proof of Transit
|
||||
# iOAM APIs
|
||||
########################################
|
||||
|
||||
ioam_pot_plugin_la_SOURCES = \
|
||||
ioam/lib-pot/pot_util.c \
|
||||
ioam/encap/ip6_ioam_pot.c \
|
||||
ioam/lib-pot/pot_util.h \
|
||||
ioam/lib-pot/math64.h \
|
||||
ioam/lib-pot/pot_api.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
ioam/lib-pot/pot.api.h \
|
||||
ioam/lib-pot/pot.api.json
|
||||
|
||||
SUFFIXES = .api.h .api
|
||||
|
||||
%.api.h: %.api
|
||||
@ -39,129 +27,135 @@ SUFFIXES = .api.h .api
|
||||
| vppapigen --input - --output $@ --show-name $@
|
||||
|
||||
%.api.json: %.api
|
||||
@echo " JSON APIGEN " $@ ; \
|
||||
@echo " JSON APIGEN " $@ ; \
|
||||
mkdir -p `dirname $@` ; \
|
||||
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
|
||||
$(CC) $(CPPFLAGS) -E -P -C -x c $^ \
|
||||
| vppapigen --input - --json $@
|
||||
|
||||
apidir = $(prefix)/ioam/
|
||||
api_DATA = \
|
||||
ioam/lib-pot/pot.api.json \
|
||||
api_DATA = \
|
||||
ioam/lib-pot/pot.api.json \
|
||||
ioam/lib-trace/trace.api.json \
|
||||
ioam/export/ioam_export.api.json
|
||||
|
||||
noinst_HEADERS = \
|
||||
ioam/lib-pot/pot_all_api_h.h \
|
||||
ioam/lib-pot/pot_msg_enum.h \
|
||||
ioam/lib-pot/pot.api.h \
|
||||
ioam/lib-pot/pot_util.h \
|
||||
ioam/lib-pot/math64.h
|
||||
########################################
|
||||
# iOAM Proof of Transit
|
||||
########################################
|
||||
|
||||
ioam_pot_test_plugin_la_SOURCES = \
|
||||
IOAM_POT_SRC = \
|
||||
ioam/lib-pot/pot_util.c \
|
||||
ioam/encap/ip6_ioam_pot.c \
|
||||
ioam/lib-pot/pot_util.h \
|
||||
ioam/lib-pot/math64.h \
|
||||
ioam/lib-pot/pot_api.c
|
||||
|
||||
IOAM_POT_BUILT_SRC = \
|
||||
ioam/lib-pot/pot.api.h \
|
||||
ioam/lib-pot/pot.api.json
|
||||
|
||||
IOAM_POT_NOINST_HDR = \
|
||||
ioam/lib-pot/pot_all_api_h.h \
|
||||
ioam/lib-pot/pot_msg_enum.h \
|
||||
ioam/lib-pot/pot.api.h \
|
||||
ioam/lib-pot/pot_util.h \
|
||||
ioam/lib-pot/math64.h
|
||||
|
||||
ioam_pot_test_plugin_la_SOURCES = \
|
||||
ioam/lib-pot/pot_test.c \
|
||||
ioam/lib-pot/pot_plugin.api.h
|
||||
|
||||
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
|
||||
vpppluginsdir = ${libdir}/vpp_plugins
|
||||
|
||||
vppapitestplugins_LTLIBRARIES = ioam_pot_test_plugin.la
|
||||
vppplugins_LTLIBRARIES = ioam_pot_plugin.la
|
||||
|
||||
########################################
|
||||
# iOAM trace export for IPv6
|
||||
########################################
|
||||
|
||||
ioam_export_plugin_la_SOURCES = \
|
||||
ioam/export/ioam_export.c \
|
||||
ioam/export/node.c \
|
||||
ioam/export/ioam_export.api.h \
|
||||
ioam/export/ioam_export_thread.c
|
||||
IOAM_EXPORT_SRC = \
|
||||
ioam/export/ioam_export.c \
|
||||
ioam/export/node.c \
|
||||
ioam/export/ioam_export.api.h \
|
||||
ioam/export/ioam_export_thread.c
|
||||
|
||||
BUILT_SOURCES += \
|
||||
IOAM_EXPORT_BUILT_SRC = \
|
||||
ioam/export/ioam_export.api.h \
|
||||
ioam/export/ioam_export.api.json
|
||||
|
||||
noinst_HEADERS += \
|
||||
ioam/export/ioam_export_all_api_h.h \
|
||||
ioam/export/ioam_export_msg_enum.h \
|
||||
ioam/export/ioam_export.api.h
|
||||
IOAM_EXPORT_NOINST_HDR = \
|
||||
ioam/export/ioam_export_all_api_h.h \
|
||||
ioam/export/ioam_export_msg_enum.h \
|
||||
ioam/export/ioam_export.api.h
|
||||
|
||||
ioam_export_test_plugin_la_SOURCES = \
|
||||
ioam/export/ioam_export_test.c \
|
||||
ioam/export/ioam_export_plugin.api.h
|
||||
ioam_export_test_plugin_la_SOURCES = \
|
||||
ioam/export/ioam_export_test.c \
|
||||
ioam/export/ioam_export_plugin.api.h
|
||||
|
||||
vppapitestplugins_LTLIBRARIES += ioam_export_test_plugin.la
|
||||
vppplugins_LTLIBRARIES += ioam_export_plugin.la
|
||||
|
||||
########################################
|
||||
# iOAM Trace
|
||||
########################################
|
||||
libioam_trace_plugin_la_SOURCES = \
|
||||
IOAM_TRACE_SRC = \
|
||||
ioam/lib-trace/trace_util.c \
|
||||
ioam/encap/ip6_ioam_trace.c \
|
||||
ioam/lib-trace/trace_util.h \
|
||||
ioam/lib-trace/trace_api.c
|
||||
|
||||
BUILT_SOURCES += \
|
||||
IOAM_TRACE_BUILT_SRC = \
|
||||
ioam/lib-trace/trace.api.h \
|
||||
ioam/lib-trace/trace.api.json
|
||||
|
||||
noinst_HEADERS += \
|
||||
IOAM_TRACE_NOINST_HDR = \
|
||||
ioam/export/ioam_export_all_api_h.h \
|
||||
ioam/lib-trace/trace_all_api_h.h \
|
||||
ioam/lib-trace/trace_msg_enum.h \
|
||||
ioam/lib-trace/trace.api.h \
|
||||
ioam/lib-trace/trace_all_api_h.h \
|
||||
ioam/lib-trace/trace_msg_enum.h \
|
||||
ioam/lib-trace/trace.api.h \
|
||||
ioam/lib-trace/trace_util.h
|
||||
|
||||
ioam_trace_test_plugin_la_SOURCES = \
|
||||
ioam/lib-trace/trace_test.c \
|
||||
ioam/lib-trace/trace_test.c \
|
||||
ioam/lib-trace/trace_plugin.api.h
|
||||
|
||||
vppapitestplugins_LTLIBRARIES += ioam_trace_test_plugin.la
|
||||
vppplugins_LTLIBRARIES += libioam_trace_plugin.la
|
||||
|
||||
########################################
|
||||
# VxLAN-GPE
|
||||
########################################
|
||||
libioam_vxlan_gpe_plugin_la_SOURCES = \
|
||||
ioam/lib-vxlan-gpe/ioam_encap.c \
|
||||
ioam/lib-vxlan-gpe/ioam_decap.c \
|
||||
ioam/lib-vxlan-gpe/ioam_transit.c \
|
||||
ioam/lib-vxlan-gpe/ioam_pop.c \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_api.c \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_node.c \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h\
|
||||
IOAM_VXLAN_GPE_SRC = \
|
||||
ioam/lib-vxlan-gpe/ioam_encap.c \
|
||||
ioam/lib-vxlan-gpe/ioam_decap.c \
|
||||
ioam/lib-vxlan-gpe/ioam_transit.c \
|
||||
ioam/lib-vxlan-gpe/ioam_pop.c \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_api.c \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_node.c \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c
|
||||
|
||||
BUILT_SOURCES += \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe.api.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe.api.json \
|
||||
IOAM_VXLAN_GPE_BUILT_SRC = \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe.api.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe.api.json \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.json
|
||||
|
||||
noinst_HEADERS += \
|
||||
ioam/export/ioam_export_all_api_h.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_all_api_h.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_msg_enum.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe.api.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam_util.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam_packet.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h \
|
||||
IOAM_VXLAN_GPE_NOINST_HDR = \
|
||||
ioam/export/ioam_export_all_api_h.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_all_api_h.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_msg_enum.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe.api.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam_util.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam_packet.h \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h
|
||||
|
||||
ioam_vxlan_gpe_test_plugin_la_SOURCES = \
|
||||
ioam_vxlan_gpe_test_plugin_la_SOURCES = \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_test.c \
|
||||
ioam/lib-vxlan-gpe/vxlan_gpe_plugin.api.h
|
||||
|
||||
libioam_vxlan_gpe_plugin_la_LIBADD = libioam_trace_plugin.la
|
||||
|
||||
vppapitestplugins_LTLIBRARIES += ioam_vxlan_gpe_test_plugin.la
|
||||
vppplugins_LTLIBRARIES += libioam_vxlan_gpe_plugin.la
|
||||
|
||||
vxlan_gpe_ioam_export_test_plugin_la_SOURCES = \
|
||||
ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c \
|
||||
@ -170,31 +164,58 @@ vxlan_gpe_ioam_export_test_plugin_la_SOURCES = \
|
||||
vppapitestplugins_LTLIBRARIES += vxlan_gpe_ioam_export_test_plugin.la
|
||||
|
||||
########################################
|
||||
# iOAM E2E plugin
|
||||
# iOAM E2E
|
||||
########################################
|
||||
|
||||
ioam_e2e_plugin_la_SOURCES = \
|
||||
IOAM_E2E_SRC = \
|
||||
ioam/encap/ip6_ioam_e2e.c \
|
||||
ioam/encap/ip6_ioam_seqno.c \
|
||||
ioam/encap/ip6_ioam_seqno_analyse.c
|
||||
|
||||
noinst_HEADERS += \
|
||||
ioam/encap/ip6_ioam_e2e.h \
|
||||
IOAM_E2E_BUILT_SRC = \
|
||||
ioam/encap/ip6_ioam_e2e.h \
|
||||
ioam/encap/ip6_ioam_seqno.h
|
||||
|
||||
vppplugins_LTLIBRARIES += ioam_e2e_plugin.la
|
||||
########################################
|
||||
# iOAM plugins
|
||||
########################################
|
||||
|
||||
vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins
|
||||
vpppluginsdir = ${libdir}/vpp_plugins
|
||||
|
||||
ioam_plugin_la_SOURCES = \
|
||||
$(IOAM_POT_SRC) \
|
||||
$(IOAM_EXPORT_SRC) \
|
||||
$(IOAM_TRACE_SRC) \
|
||||
$(IOAM_VXLAN_GPE_SRC) \
|
||||
$(IOAM_E2E_SRC)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(IOAM_POT_BUILT_SRC) \
|
||||
$(IOAM_EXPORT_BUILT_SRC) \
|
||||
$(IOAM_TRACE_BUILT_SRC) \
|
||||
$(IOAM_VXLAN_GPE_BUILT_SRC) \
|
||||
$(IOAM_E2E_BUILT_SRC)
|
||||
|
||||
noinst_HEADERS = \
|
||||
$(IOAM_POT_NOINST_HDR) \
|
||||
$(IOAM_EXPORT_NOINST_HDR) \
|
||||
$(IOAM_TRACE_NOINST_HDR) \
|
||||
$(IOAM_VXLAN_GPE_NOINST_HDR) \
|
||||
$(IOAM_E2E_NOINST_HDR)
|
||||
|
||||
vppplugins_LTLIBRARIES = ioam_plugin.la
|
||||
|
||||
# Remove *.la files
|
||||
install-data-hook:
|
||||
@(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES))
|
||||
@(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES))
|
||||
|
||||
|
||||
#
|
||||
# Java code generation
|
||||
#
|
||||
jvpp_registry_root = ../../vpp-api/java
|
||||
jvpp_registry_version = 17.01
|
||||
jvpp_registry_version = 17.01.1
|
||||
jioam_trace_jarfile = jvpp-ioam-trace-$(PACKAGE_VERSION).jar
|
||||
jvpp_trace_package_dir = io/fd/vpp/jvpp/ioamtrace
|
||||
jvpp_root = ioam/jvpp
|
||||
|
@ -1,4 +1,4 @@
|
||||
AC_INIT(ioam_plugin, 1.0)
|
||||
AC_INIT(ioam_plugin, 17.01.1)
|
||||
LT_INIT
|
||||
AC_CONFIG_MACRO_DIR([../../vpp-api/java/m4])
|
||||
AM_INIT_AUTOMAKE
|
||||
|
@ -25,8 +25,6 @@
|
||||
#include <vppinfra/elog.h>
|
||||
|
||||
#include <vnet/ip/ip6_hop_by_hop.h>
|
||||
#include <vnet/plugin/plugin.h>
|
||||
|
||||
#include "ip6_ioam_e2e.h"
|
||||
|
||||
ioam_e2e_main_t ioam_e2e_main;
|
||||
@ -166,23 +164,6 @@ VLIB_CLI_COMMAND (ioam_show_e2e_cmd, static) = {
|
||||
.function = ioam_show_e2e_cmd_fn,
|
||||
};
|
||||
|
||||
/*
|
||||
* This routine exists to convince the vlib plugin framework that
|
||||
* we haven't accidentally copied a random .dll into the plugin directory.
|
||||
*
|
||||
* Also collects global variable pointers passed from the vpp engine
|
||||
*/
|
||||
clib_error_t *
|
||||
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
|
||||
int from_early_init)
|
||||
{
|
||||
clib_error_t * error = 0;
|
||||
|
||||
ioam_e2e_main.vlib_main = vm;
|
||||
ioam_e2e_main.vnet_main = h->vnet_main;
|
||||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
* Init handler E2E headet handling.
|
||||
* Init hanlder registers encap, decap, trace and Rewrite handlers.
|
||||
@ -222,6 +203,9 @@ ioam_e2e_init (vlib_main_t * vm)
|
||||
"HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE Flow handler failed"));
|
||||
}
|
||||
|
||||
ioam_e2e_main.vlib_main = vm;
|
||||
ioam_e2e_main.vnet_main = vnet_get_main();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <vppinfra/hash.h>
|
||||
#include <vppinfra/error.h>
|
||||
#include <vppinfra/elog.h>
|
||||
#include <vnet/plugin/plugin.h>
|
||||
|
||||
#include <ioam/lib-trace/trace_util.h>
|
||||
|
||||
@ -348,6 +349,18 @@ VLIB_CLI_COMMAND (ip6_show_ioam_trace_cmd, static) = {
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/*
|
||||
* This routine exists to convince the vlib plugin framework that
|
||||
* we haven't accidentally copied a random .dll into the plugin directory.
|
||||
*
|
||||
* Also collects global variable pointers passed from the vpp engine
|
||||
*/
|
||||
clib_error_t *
|
||||
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
|
||||
int from_early_init)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static clib_error_t *
|
||||
ip6_hop_by_hop_ioam_trace_init (vlib_main_t * vm)
|
||||
|
@ -76,7 +76,8 @@ typedef struct
|
||||
ioam_export_main_t ioam_export_main;
|
||||
ioam_export_main_t vxlan_gpe_ioam_export_main;
|
||||
|
||||
vlib_node_registration_t export_node;
|
||||
extern vlib_node_registration_t export_node;
|
||||
extern vlib_node_registration_t vxlan_export_node;
|
||||
|
||||
#define DEFAULT_EXPORT_SIZE (3 * CLIB_CACHE_LINE_BYTES)
|
||||
/*
|
||||
|
@ -92,7 +92,7 @@ vxlan_gpe_ioam_export_enable_disable (ioam_export_main_t * em,
|
||||
ip4_address_t * src_address)
|
||||
{
|
||||
vlib_main_t *vm = em->vlib_main;
|
||||
u32 node_index = export_node.index;
|
||||
u32 node_index = vxlan_export_node.index;
|
||||
vlib_node_t *vxlan_gpe_decap_ioam_node = NULL;
|
||||
|
||||
if (is_disable == 0)
|
||||
|
@ -40,7 +40,7 @@ format_export_trace (u8 * s, va_list * args)
|
||||
return s;
|
||||
}
|
||||
|
||||
vlib_node_registration_t export_node;
|
||||
vlib_node_registration_t vxlan_export_node;
|
||||
|
||||
#define foreach_export_error \
|
||||
_(RECORDED, "Packets recorded for export")
|
||||
@ -137,7 +137,7 @@ vxlan_gpe_export_node_fn (vlib_main_t * vm,
|
||||
* Node for VXLAN-GPE export
|
||||
*/
|
||||
/* *INDENT-OFF* */
|
||||
VLIB_REGISTER_NODE (export_node) =
|
||||
VLIB_REGISTER_NODE (vxlan_export_node) =
|
||||
{
|
||||
.function = vxlan_gpe_export_node_fn,
|
||||
.name = "vxlan-gpe-ioam-export",
|
||||
|
@ -81,26 +81,6 @@ do { \
|
||||
#define foreach_ioam_export_plugin_api_msg \
|
||||
_(IOAM_EXPORT_IP6_ENABLE_DISABLE, ioam_export_ip6_enable_disable)
|
||||
|
||||
/*
|
||||
* This routine exists to convince the vlib plugin framework that
|
||||
* we haven't accidentally copied a random .dll into the plugin directory.
|
||||
*
|
||||
* Also collects global variable pointers passed from the vpp engine
|
||||
*/
|
||||
|
||||
clib_error_t *
|
||||
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
|
||||
int from_early_init)
|
||||
{
|
||||
ioam_export_main_t *em = &ioam_export_main;
|
||||
clib_error_t *error = 0;
|
||||
|
||||
em->vlib_main = vm;
|
||||
em->vnet_main = h->vnet_main;
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Action function shared between message handler and debug CLI */
|
||||
|
||||
int
|
||||
@ -250,6 +230,9 @@ ioam_export_init (vlib_main_t * vm)
|
||||
u32 node_index = export_node.index;
|
||||
vlib_node_t *ip6_hbyh_node = NULL;
|
||||
|
||||
em->vlib_main = vm;
|
||||
em->vnet_main = vnet_get_main ();
|
||||
|
||||
name = format (0, "ioam_export_%08x%c", api_version, 0);
|
||||
|
||||
/* Ask for a correctly-sized block of API message decode slots */
|
||||
|
@ -213,26 +213,6 @@ static void vl_api_pot_profile_del_t_handler
|
||||
REPLY_MACRO(VL_API_POT_PROFILE_DEL_REPLY);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This routine exists to convince the vlib plugin framework that
|
||||
* we haven't accidentally copied a random .dll into the plugin directory.
|
||||
*
|
||||
* Also collects global variable pointers passed from the vpp engine
|
||||
*/
|
||||
|
||||
clib_error_t *
|
||||
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
|
||||
int from_early_init)
|
||||
{
|
||||
pot_main_t * sm = &pot_main;
|
||||
clib_error_t * error = 0;
|
||||
|
||||
sm->vlib_main = vm;
|
||||
sm->vnet_main = h->vnet_main;
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Set up the API message handling tables */
|
||||
static clib_error_t *
|
||||
pot_plugin_api_hookup (vlib_main_t *vm)
|
||||
@ -273,6 +253,10 @@ static clib_error_t * pot_init (vlib_main_t * vm)
|
||||
|
||||
bzero(sm, sizeof(pot_main));
|
||||
(void)pot_util_init();
|
||||
|
||||
sm->vlib_main = vm;
|
||||
sm->vnet_main = vnet_get_main();
|
||||
|
||||
name = format (0, "ioam_pot_%08x%c", api_version, 0);
|
||||
|
||||
/* Ask for a correctly-sized block of API message decode slots */
|
||||
|
@ -165,25 +165,6 @@ static void vl_api_trace_profile_show_config_t_handler
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This routine exists to convince the vlib plugin framework that
|
||||
* we haven't accidentally copied a random .dll into the plugin directory.
|
||||
*
|
||||
* Also collects global variable pointers passed from the vpp engine
|
||||
*/
|
||||
|
||||
clib_error_t *
|
||||
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
|
||||
int from_early_init)
|
||||
{
|
||||
trace_main_t *sm = &trace_main;
|
||||
clib_error_t *error = 0;
|
||||
|
||||
sm->vlib_main = vm;
|
||||
sm->vnet_main = h->vnet_main;
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Set up the API message handling tables */
|
||||
static clib_error_t *
|
||||
trace_plugin_api_hookup (vlib_main_t * vm)
|
||||
@ -225,6 +206,10 @@ trace_init (vlib_main_t * vm)
|
||||
|
||||
bzero (sm, sizeof (trace_main));
|
||||
(void) trace_util_init ();
|
||||
|
||||
sm->vlib_main = vm;
|
||||
sm->vnet_main = vnet_get_main ();
|
||||
|
||||
name = format (0, "ioam_trace_%08x%c", api_version, 0);
|
||||
|
||||
/* Ask for a correctly-sized block of API message decode slots */
|
||||
|
@ -284,28 +284,6 @@ static void vl_api_vxlan_gpe_ioam_transit_disable_t_handler
|
||||
VXLAN_GPE_REPLY_MACRO (VL_API_VXLAN_GPE_IOAM_TRANSIT_DISABLE_REPLY);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This routine exists to convince the vlib plugin framework that
|
||||
* we haven't accidentally copied a random .dll into the plugin directory.
|
||||
*
|
||||
* Also collects global variable pointers passed from the vpp engine
|
||||
*/
|
||||
|
||||
clib_error_t *
|
||||
vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
|
||||
int from_early_init)
|
||||
{
|
||||
vxlan_gpe_ioam_main_t *sm = &vxlan_gpe_ioam_main;
|
||||
clib_error_t *error = 0;
|
||||
|
||||
sm->vlib_main = vm;
|
||||
sm->vnet_main = h->vnet_main;
|
||||
sm->unix_time_0 = (u32) time (0); /* Store starting time */
|
||||
sm->vlib_time_0 = vlib_time_now (vm);
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Set up the API message handling tables */
|
||||
static clib_error_t *
|
||||
vxlan_gpe_plugin_api_hookup (vlib_main_t * vm)
|
||||
@ -337,6 +315,11 @@ vxlan_gpe_init (vlib_main_t * vm)
|
||||
vlib_node_t *vxlan_gpe_decap_node = NULL;
|
||||
uword next_node = 0;
|
||||
|
||||
sm->vlib_main = vm;
|
||||
sm->vnet_main = vnet_get_main ();
|
||||
sm->unix_time_0 = (u32) time (0); /* Store starting time */
|
||||
sm->vlib_time_0 = vlib_time_now (vm);
|
||||
|
||||
name = format (0, "ioam_vxlan_gpe_%08x%c", api_version, 0);
|
||||
|
||||
/* Ask for a correctly-sized block of API message decode slots */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user