Compare commits

...

36 Commits

Author SHA1 Message Date
Damjan Marion
8099e90346 Bump to 17.01.1 Release
Change-Id: I023400208df277df6713303452e7089720792214
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-02 20:22:13 +01:00
Andrew Yourtchenko
e7dcee4027 Ensure sw_if_index to node mapping for L2 output path is only done via l2output_main.next_nodes
Before this commit, several output features that happen to be the
last in the list of features to be executed, send the packets directly
to <interfaceName>-output. To do this, they use l2_output_dispatch,
which builds a list of sw_if_index to next index mappings.

When interfaces are deleted and the new interfaces are created,
these mappings become stale, and cause the packets being sent to wrong
interface output nodes.

This patch (thanks John Lo for the brilliant idea!) adds a feature node "output",
whose sole purpose is dispatching the packets to the correct interface output
nodes. To do that, it uses the l2output_main.next_nodes, which is already
taken care of for the case of the sw_if_index reuse, so this makes the dependent
features all work correctly.

Since this changes the packet path, for the features that were always the last ones
it has triggered a side problem of the output feat_next_node_index not being properly
initalized. These two users are l2-output-classify node and the output nodes belonging
to the acl-plugin.

For the first one the less invasive fix is just to initialize that field.
For the acl-plugin nodes, rewrite the affected part of the code to use
feat_bitmap_get_next_node_index since this is essentially what the conditional
in l2_output_dispatch does, and fix the compiler warnings generated.

Change-Id: If44457b1c1c3e197b78470c08555720d0872c6e5
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-03-02 18:57:47 +01:00
Andrew Yourtchenko
32dfd77df0 Clean up the L2 interface configs when creating the interfaces
Without the cleanup in the L2 input/output configs,
the creation of an interface with sw_if_index belonging
to a previously deleted interface will use the stale
vlan tag push-pop configuration from that interface,
resulting in loss of connectivity when the host receives
tagged packets but expects untagged ones.

Change-Id: Ic186390ef3a41277f57847ed2962848b98379092
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-02-27 21:06:20 +01:00
Dave Wallace
149745f95e Update default Vagrant box to Ubuntu 16.04, VPP-616
- Hand merge of ed0e49c5 and 46f133d5 into stable/1701

Change-Id: Ib7260f07d22e546c6a92fb713b61b7e5edf247c9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-02-14 15:57:03 +00:00
Keith Burns (alagalah)
0debfb1fa2 Plugin Makefiles did not install headers - VPP-631
Change-Id: I9f6fd1a63a9dfa2d2aa386cf0a3c2479525bbcec
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-02-09 14:47:26 -08:00
Steven
e23472662c vhost-user: fix missing speculative enqueue unwind
Running trex in a VM with a bad config, trex sent a bogus pack from
the VM to the Virtual interface. It caused a crash.

Change-Id: I64d0197b444265553ab4c24f21e6a962e89cb587
Signed-off-by: Steven <sluong@cisco.com>
2017-02-03 20:56:35 +01:00
Dave Wallace
43c9c959ff Fix make test scapy python patch issue, VPP-615
Change-Id: I1e6798905f0049c793224a2c880f3b2cfadcf1e7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 6f692d6e5a8ffc920a728372ef773199bc5466c0)
2017-02-03 14:21:41 +00:00
Ed Warnicke
88d9b3be0e Fix issue with apt-get update not being run on Ubuntu 16.04
Change-Id: Ic05b86c4ea9b62afbf03a2a36c4a2ef45f5c140b
Signed-off-by: Ed Warnicke <eaw@cisco.com>
(cherry picked from commit eb82e7f27c6f8fe84838e6e2914579825c455632)
2017-02-02 02:22:41 +00:00
Pavel Kotucek
e5bf04dc3c span: tx functionality
span-output (tx) was enabled on wrong arc_name

Change-Id: Ic21dfaec35c975de79abec66421b353637ac9394
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-01-26 16:02:37 +01:00
Wojciech Dec
4831dc5ddf Fix PAPI async response
Previous changes forgot to return the decoded result

Change-Id: I4eb27802eb2672532d856d9b9671ef806374bcd0
Signed-off-by: Wojciech Dec <wdec@cisco.com>
2017-01-24 17:38:51 +01:00
Damjan Marion
cd111b2228 Fix plugin version numbers
Change-Id: Ie485e9dfa04747b5e4ba93fdeabc5802dc001d31
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-20 21:58:02 +01:00
Gabriel Ganne
7067350c41 vpp-python-api deb packaging - use easy_install to install the python api
(cherry picked from commit 5a68debd8173a487dbd67b3e574d962308c91bcc)

Change-Id: Iabad73d6092b4561ba9d4d22a057bb5871d850a6
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2017-01-20 20:29:21 +00:00
Damjan Marion
fa87080d31 Fix issue in rpm versioning for release builds
Change-Id: I851d472c0838d56ca571f9f9e3ca412ac2107c4e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-20 19:09:22 +01:00
Damjan Marion
78aab80634 Release notes for release 17.01
Change-Id: I99c0898bb0cb99e1b2a28463245031e74afd401b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-20 16:22:03 +00:00
Ole Troan
7104f93c75 Python API: Missing locking of results data structure.
The wrong assumption that the GIL combined with CPython's "mostly"
thread safe assurance does not hold. The combination of a slow
event handler for notification and calling the API at the same
time let to contention on the results data structure.

Added suitable locking.

Also added an atexit() to attempt a VPP disconnect on shutdown.

Also: lots more comments, docstrings, duplicated code removed.
Some of the problem here was a disagreement between caller
and author as to how the API should be used; the comments should
help.

Change-Id: I0cb7d0026db660ec141425c5ad474f14bacea36e
Signed-off-by: Ole Troan <ot@cisco.com>
Co-Authored-By: Ian Wells <iawells@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2017-01-20 01:49:04 +01:00
Filip Tehlar
12713c70fc LISP: Fix fwd adding, VPP-607
Change-Id: Ie48209ba6d9aab0c5cfbd7b3cce4114cf88f952c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-18 18:16:22 +00:00
Wojciech Dec
1b3d4ded5f Fix crash on deleting activated vhost-user - VPP-603
Vhost-user pool getting freed prematurely

Change-Id: I90b70889d2e5a01203dc7679583b7c9eff65a374
Signed-off-by: Wojciech Dec <wdec@cisco.com>
2017-01-18 17:40:55 +00:00
Jan Gelety
cd8a22ae1f Update CSIT tests 161218 -> rls1701-170115
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I00c83fa1db7006f600207306d320628ed3075854
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-01-17 17:45:12 +01:00
Neale Ranns
df44cc846f DHCPv6 Proxy; fix crash when DHCPv6 prxy is not configured and client packet is received
Change-Id: I0250acdee803545b8923549e2099863a95544691
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-16 19:23:11 +00:00
Neale Ranns
257d5e25bf Account for pool realloc when importing FIB entries during VRF export
Change-Id: I8ec6d53fa9c0790f85802663f70a6b3630239f8d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-10 18:13:41 +01:00
Neale Ranns
bf2fcad04a Fix ARP on unnumbered interfaces (VPP-583)
Change-Id: Iea1e2c31c016c3bb6344f73173d082a2c548ffee
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-09 20:58:37 +00:00
Neale Ranns
2d7e16330f Fix disable ip6 interface (VPP-584)
Change-Id: I73e966f9afe866e7215fc2e57daecc4531381d92
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-01-09 15:27:55 +01:00
Eyal Bari
ee85bfabc9 Added basic tests for multicast vxlan tunnels
unicast flood test - test headend replication
multicast flood test - test flooding when a multicast vxlan tunnel is present in BD
multicast receive test - verify that multicast packet are received on their
   corresponding unicast tunnels and that unmatched packets are dropped

all tests run after adding and removing 200 mcast tunnels to test stability

Change-Id: Ia05108c39ac35096a5b633cf52480a9ba87c14df
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit c4aaee11468aa5ed7af01d0747d912493cff002d)
2017-01-08 21:07:20 +00:00
Dave Barach
b95a916dc3 Fix uninitialized stack local, VPP-581
Sporadically messes up the client message allocation ring, by setting
c->message_bounce[msg_id] non-zero. A day-1 bug, made blatantly
obvious by the python API language binding for no particular reason.

Change-Id: I11084dd884622e7b44bdabb922466c4d07138235
Signed-off-by: Dave Barach <dave@barachs.net>
2017-01-05 10:04:30 -05:00
Neale Ranns
235c64f067 FIB memory leaks (VPP-578)
1) vec_free the fe_srcs of a fib_entry_t when the fib_entry_t is itself reed
2) in the load-balance fixup if a drop path is required add this to a new vector of next-hops 'fixed_nhs'. This vector is managed by the load-balance function. The caller continues to manage its own set. The function is now const implying that the caller is safe to assume the next-hops do not change.

Change-Id: I0f29203ee16b9a270f40edf237488fa99ba65320
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-01-04 18:36:46 +00:00
Eyal Bari
cdffe06bab vxlan fix mcast tunnel delete
Change-Id: I15f7ff1e957718e808bfad811895deaacb85d2a3
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-01-03 20:48:11 +01:00
Filip Tehlar
35dc387354 LISP: fix EID addition (VPP-577)
Change-Id: I32f61ab89598a7911df3d0d8f45de1302af8aa6a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-03 18:23:19 +00:00
Filip Tehlar
c48b58a216 LISP: fix fwd entry addition (VPP-576)
Change-Id: Ibdc9ad21cc53cf0a6d571a3f913038d61d9282a1
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-01-03 18:23:11 +00:00
Andrew Yourtchenko
856ab8aca3 VPP-574: fix the MACIP ACLs blocking ARP traffic
The initial assumption was that the MACIP ACL classifier tables would be applied
after the classification of the traffic based on the ethertype, it turned out
to be untrue, but the fix in the code did not happen.

Add the ethertype to the mask, and the logic to create the ACL classifier tables
permitting the ARP ethertype with the correct payload.

Change-Id: I70236a8a723970c662ddaef6bc9fce93d2e630c1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-01-03 15:48:39 +00:00
Andrew Yourtchenko
81c09d03d8 VPP-574: fix VPP hang during security group configuration on a suspended VM
The unix connect() in vhost-user driver in VPP is blocking, and
a non-expedient accept() on the other side causes the entire VPP to hang.

Solution: set the nonblocking flag for the socket fd before calling
connect(), and set the socket back to blocking after the accept() succeeds.

Change-Id: I2d535ea9b95a92922d305d79a8d860062c95faf4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-01-03 15:15:27 +00:00
Matus Fabian
b4f2525866 SNAT: fix out2in ICMP worker lookup
Change-Id: Ifce17a450a06c26670d474b0f774f2504843f221
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-01-03 05:07:54 -08:00
Vengada
800429ddef ioam: fix Coverity warning (VPP-570)
Fix Coverity warning of uninitialized variable.
Initialize outer_fib_index to zero (vxlan_gpe_test.c)

Change-Id: If39d48c3906784c43c5af3e9e01ed9a5d5631d6e
Signed-off-by: Vengada <venggovi@cisco.com>
2017-01-02 10:13:43 +00:00
AkshayaNadahalli
e4e9fbbb7c Merging all ioam plugin libraries to single library
Change-Id: I33a646ba45848c7400df4271e4933e28e62c9ad7
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
2016-12-24 14:11:36 +00:00
Matus Fabian
fe7cdfa629 SNAT: fix 'show snat verbose' bug - format vector as %v
Change-Id: Ia829da43a273c89dee47b32250ab032d992193cd
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-23 12:04:26 +00:00
Matus Fabian
e73d0a3aab SNAT: Remove the oldest translation fix (VPP-568)
Fixed bug and add test.

Change-Id: I60fbec48abd9d9cb86be1bd1cdbb7d16f9f93c3e
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-22 02:46:27 -08:00
Damjan Marion
436b319354 Change default branch in .gitreview
Change-Id: I061e4e59698407c9f96930d578cafd552c717861
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-21 19:01:43 +01:00
66 changed files with 1039 additions and 548 deletions

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/1701

View File

@ -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)

View File

@ -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

View 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

View 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

View File

@ -1,2 +1,2 @@
#!/bin/sh
echo oper-161218
echo oper-rls1701-170115

View File

@ -50,5 +50,5 @@ fi
echo ${TAG}-${ADD}${CMT:+~${CMT}}${BLD}
fi
else
echo ${TAG}
echo ${TAG}-release
fi

View File

@ -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"]

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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));

View File

@ -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) */

View File

@ -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);

View File

@ -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;

View File

@ -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, \

View File

@ -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;

View File

@ -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);
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);
}

View File

@ -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)

View File

@ -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)
/*

View File

@ -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)

View File

@ -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",

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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