Age | Commit message (Collapse) | Author | Files | Lines |
|
Also add an index of node names
Change-Id: Id65c2e607976d8bad73deb738035a471be077196
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Change-Id: I28616f1a89f2da95484438ec1a1db64845f15ef6
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I5e6edfd03ab41949be2c768dfe68aa824bbc1f38
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
This change-set enables plugins to add themselves to the ip4/ip6
feature subgraphs without having to modify core vpp engine code
at all. Add VNET_IP4/IP6_UNICAST/MULTICAST_FEATURE_INIT macros
which express the required ordering constraints, and off you go.
Along the way, added an implementation of Warshall's algorithm to
vppinfra; to compute the positive transitive closure of a relation. In
this case, the relation is "feature A runs before feature B."
With that in hand, ip_feature_init_cast(...) computes a partial order
across the set of configured feature subgraph nodes.
In unit-testing, we discovered VPP-145 - ip4/6 inacl wiped out
vnet_buffer(b)->ip>current_config_index, which exists in main. So, we
fixed that by moving b->trace_index, adding b->current_config_index,
and removing the ip opaque union current_config_index.
Change-Id: Iff132116f66413dc6b31ac3377198c7a32d51f48
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
- Change toplevel plugins make target. Now builds all plugins under
plugins/. (Apart from sample-plugin).
- Move sixrd code to plugins directory and make necessary changes to
make it a plugin
- Remove 6rd hooks from IP lookup code
Change-Id: I447e92e3bee240cd8de01d0abac2e1708e8c27d1
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Siblings did not work at all. Fixed by generating sibling relationships
earlier in vlib_node_main_init(). Also adding a node dynamically before
nodes were initialised failed for sibling nodes.
Change-Id: I2fb73eb33a6f5ee216f566074e18ed495e20634d
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I64f5ec5e32f200834c63ec3b304f9f20cef332a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Ic488b95b54438028940403b02a5916347c53bd05
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Verbose trace can be enabled with:
trace add dpdk-input 1 verbose
Change-Id: If58cfc561143d5a44f7d11e61d54b6835692a0e3
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
This change adds support for providing per-interface
parameters in the startup config.
Sample configuration:
dpdk {
dev default {
num-rx-queues 3
num-tx-queues 3
}
dev 0000:02:00.0 {
num-rx-queues 2
num-tx-queues 2
}
dev 0000:02:00.1
}
Change-Id: Ia7d9ae2ac9c4fd9baaa480d061a395f8a421a722
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Use the command line argument "api-segment { uid <nnn> gid <nnn> }" to
configure shared memory segment file ownership. Defaults to uid = gid
= 0. Shared-memory segments are explicitly set to 0770 mode, aka
"rwxrwx---".
Change-Id: Ic5d596b68139add61e7de6ace035c57dfd030111
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Available only in vpp_lite platform
Change-Id: I09d112af5f7f4521ec25196ecdd8c02c20eedd5f
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Ic4009cdbac67b7cd53c88079439496b9d9dfaa35
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
When re-locating our current viewport into the pager buffer we need to
verify that the new viewport is within the boundaries of the index.
This condition is considered very rare, but nontheless the check is needed.
Unfortunately I assumed the variable was signed; it is not, and the
subtraction can in some cases cause the value to be negative. This is
therefore a bonafide semantic error that may cause problems.
This patch reworks the logic to avoid having to change it to be signed.
Change-Id: I26f0747d38dcc43dd9c092d50f2489b122009e7b
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Change-Id: I1d91c9982823758059f9d6aa699982253930e7ba
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
* compiler -march= parameter is changed from native to corei7
so code is always genereted with instructions which are available
on the Nehalem microarchitecture (up to SSE4.2)
* compiler -mtune= parameter is added so code is optimized for
corei7-avx which equals to Sandy Bridge microarchitecture
* set of macros is added which allows run-time detection of available
cpu instructions (e.g. clib_cpu_supports_avx())
* set of macros is added which allows us to clone graph node funcitons
where cloned function is optmized for different microarchitecture
Those macros are using following attributes:
__attribute__((flatten))
__attribute__((target("arch=core-avx2)))
I.e. If applied to foo_node_fn() macro will generate cloned
functions foo_node_fn_avx2() and foo_node_fn_avx512() (future)
It will also generate function void * foo_node_fn_multiarch_select()
which detects available instruction set and returns pointer to the
best matching function clone.
Change-Id: I2dce0ac92a5ede95fcb56f47f3d1f3c4c040bac0
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
* adds support for VPP native PCI drivers using
standard uio_pci_generic kernel driver
* adds generic PCI interrupt callback
* splits code to generic PCI handling and linux specific
* adds new debug cli 'show pci [all]'
Change-Id: I447c2285e319e9725d70688c1b70c9dedda51fdc
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
In vnet/vnet/devices/dpdk/device.c, post 2 event data instead of
merging them into 1 u64.
Change-Id: I8b1d61b894279fb6eb57bb82a05affc14360e6b8
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
|
|
To better handle lines longer than the terminal width, re-work how
the pager collates lines. We still store each output line in a vector
or lines; additionally we index the start and end of displayable lines.
The index then becomes the data to work out what to display.
If the terminal is resized this index is rebuilt and the current page
redisplayed and an attempt made to keep the current top-of-screen line
in place.
Change-Id: Icc6f4f72dabad89682cd82be88adb03eadb7811d
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Change-Id: Icd1f8952f66d3cee027c59f3148c67f1839de306
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
- Configures Doxygen.
- Adds a source filter to do magic on our use of the preprocessor to do
constructor stuff to make Doxygen grok it better.
- Adds a convenience helper to the root Makefile.
- Adds a README.md to the root directory (and which Doxygem uses as its
"mainpage".
- Add several other documentative files.
- Currently using SVG for call graphs, though this may have a
load-time performance impact in browsers.
Change-Id: I25fc6fb5bf634319dcb36a7f0e32031921c125ac
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Since the move to line-mode the debug CLI was eating everything in the
input_vector but only processing upto the first newline. Cut-and-paste
type operations generally send a large block of input with multiple
newlines and thus all but the very first line were simply ignored.
This patch fixes that and also cleans up the difference between
input_vector and current_command which in turn removes a lot of cruft
from the keystroke parser.
Previously current_command was just the character accumulator inside the
char-by-char keystroke parser; complete commands were copied back to
input_vector (overwriting anything already in there).
Now, in char-by-char mode:
- input_vector is the stream of incoming bytes yet to be processed
- current_command is the accumulated characters of the next command to
be executed; once newline is found, it is the complete command to be
executed.
In line mode:
- input_vector and current_command are the same thing.
Change-Id: I72d21f0f3508b413879071ab186a71cef1124a2b
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
vlib_process_wait_for_event*.
A problem is easily reproducible by taking the test harness code from the commit,
and launching it in two terminals with some time overlap - the outputs will
be sent to the wrong session. This commit moves the output_function and argument
from a global structure into the process structure, thus the output_function
is not clobbered anymore and each session gets only its own output.
To ensure the callers can redirect the outputs to different destinations
(e.g. the API calls via shared memory, etc.) the existing logic
for vlib_cli_input() was retained.
To avoid the magic numbers usage in the logic that does the page-alignment
of the process stack, there are changes around the stack[] member
of vlib_process_t. Also added a compile-time assert to ensure that
the stack does indeed start on the page size multiple boundary.
Change-Id: I128680ac480735e5f214f81a884e414268e5d652
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
|
|
When cursoring through the command history in the CLI, when you reach
the end of the history (ie, back at "where you started") most CLI's
typically show a blank line. This is a visual cue that you are back
where you started.
Change-Id: I5733dbd0dcdc6deac6a0a856cfadbdb987456ec0
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
With Telnet protocol overhead, the string "xterm-256color", which is the
norm when the terminal is iTerm on a Mac, is longer than the 16 byte
lookahead overflow guard in the Telnet protocol processor.
This extends it to 24 bytes.
This guard is designed to encourage the protocol processor to quit
waiting for bytes indefinitely if those already in the buffer do not
form a complete message. Whilst this is unlikely, extending the guard
length would mean more bytes need to be received before it gives up.
Change-Id: Ibaa3d35b78bfd298fe0e4f4c6e508440f122e916
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
The stats thread was sharing the main mheap when we started at least
one worker or I/O thread, but ran on its own mheap when we started 0
worker + io threads.
Net of this change; if a VLIB_REGISTER_THREAD instance specifies a
per-thread mheap, a per-thread mheap will be provided. Otherwise,
threads share the main heap.
The stats thread now uses the main heap. Simpler is better.
Change-Id: I1fff0dd66ae8f7dfe44923f702734e2832b55b09
Signed-off-by: Dave Barach <dbarach@cisco.com>
|
|
Adds flags to the packet buffer to track the number of VLANs in
the current Ethernet frame. We use two bits to signify 0, 1 or
2 VLANs. The value 3 signififies an unknown quantity of VLANs,
which includes "three or more" which is not widely supported.
We place the bits in the vlib_buffer section; that is not the
opaque section, so that all subordinate nodes can use it.
For background, see the discussion thread at
https://lists.fd.io/pipermail/vpp-dev/2016-March/000354.html
The helper macro ethernet_buffer_header_size(buffer) uses
these bits stored in "buffer" to calculate the Ethernet header
size.
The macro ethernet_buffer_set_vlan_count(buffer, count) sets the
appropriate bit values based on the number in "count".
By current frame we are referring to the case where a packet
that arrives from the wire is carrying an encapsulated Ethernet
packet. Once decapsulated that inner packet becomes the current
frame.
There are two places where this value is set; For most Ethernet
frames this will be in the "ethernet-input" node when that node
parses the Ethernet header. The second place is whenever
vnet_update_l2_len() is used to update the layer 2 opaque data.
Typically this function is used by nodes just before they send
a packet into l2-input.
These bits are zeroed in vlib_buffer_init_for_free_list()
meaning that wherever the buffer comes from they have a reasonable
value (eg, if ip4/ip6 generates the packet.)
Primarily this VLAN counter is used by nodes below "ethernet-
input" and "l2-input" to determine where the start of the
current Ethernet header is. There is opaque data set by
"ethernet-input" storing the offset of the current Ethernet
header but, since this is opaque, it's not usable by downstream
nodes. Previously several nodes have made assumptions regarding
the location of the Ethernet header, including that it is always
at the start of the packet buffer (incorrect when we have
encapsulated packets) or that it is exactly
sizeof(ethernet_header_t) away (incorrect when we have VLAN tags.)
One notable case where this functionality is required is in
ip6_neighbor when it generates a response to a received neighbor
soliciation request; it reuses the incoming Ethernet header
in-situ and thus needs to reliably know where that header begins.
Also, at the suggestion of Dave Barach, this patch removes
definition of HGSHM bits in the buffer flags since they are
unused and unlikely to ever be.
Change-Id: I00e4b9ced5ef814a776020c395d1774aba6185b3
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Buffers output from CLI commands as it arrives and allows the terminal to
view this buffer one page at a time.
- View of the buffer is moved with space/enter/up/down/page-up/page-down/
home/end.
- At the end of the CLI command if less than one page of output was
generated then the pager is not engaged.
- 'q' to quit the pager, or scroll off the bottom.
- Pager prompt displays the current view aperture line numbers and total
number of lines buffered.
- Can be disabled at runtime with "no-cli-pager" in the unix configuration.
- The number of lines that will be stored in the buffer is limited to
prevent excessive memory use; this limit is configurable with
"cli-pager-buffer-limit" in the unix configuration.
- Both these options can also be set in the console with "set terminal
pager [on|off] [limit <lines>]".
Limitations:
- Does not yet implement a search function.
- Whilst the terminal size is detected and tracked, changing the terminal
size when the pager is being used will not cause a redraw of the page.
- Lines that wrap the right most column are not yet handled gracefully.
Change-Id: I69548c1464eff79c53e122668f25758266daf1c2
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
- Remove the '?' mechanism that previously only worked on telnet
connections in favor of a more shell-like "history" command.
The '?' approach had strange side-effects, like executing what
was already in the command buffer.
Change-Id: I043086b7f400c66c332a32dbd06ef580ecb18ee8
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
_______ _ _ _____ ___
__/ __/ _ \ (_)__ | | / / _ \/ _ \
_/ _// // / / / _ \ | |/ / ___/ ___/
/_/ /____(_)_/\___/ |___/_/ /_/
- For terminals that look like they support ANSI output the FD.io
part is colored red.
- This is only shown at the start of a debug CLI or a telnet CLI
session.
- This banner can be disabled with "cli-no-banner" in the "unix"
section of the startup config file.
Change-Id: I085b3780dcca3eae546859dbde6c1c34c8258b9f
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
A fairly comprehensive re-work of the built-in debug and telnet CLI
to add various command line editing features and to add command history
to the debug CLI.
This may seem like a large change but a good amount of it is merely
reworking the existing CLI code (which changed its indent level).
The features this patch enables include:
- Enable history in the debug CLI.
- Put both stdin and telnet connections in char-by-char mode.
- Echo from the server, not the client, for more control.
- Add a mostly no-op but fairly complete Telnet protocol processor.
- Perform control code parsing on the input byte stream to match strings
of both control codes and ANSI/VT100 escape sequences.
- Up/down keys scroll through the history (like ^P/^N).
- Do CRLF output cooking (\n -> \r\n) for connections that need it.
- Left/right cursor movements, insert/erase at cursor.
- Home/end cursor jumps.
- Jump left/right word at a time (Ctrl-left/right).
- Negotiate the terminal type from Telnet clients. (well, the code doesn’t
really negotiate, it demands it, but the client is led to believe it
was a negotiation)
- Read terminal type from TERM variable for the local debug CLI.
- Delete from cursor to end of line (^K). Delete char-right (^D/Del).
- Clear screen (^L) and repaint prompt/current command (on non-ANSI
terminals it just newlines and repaints the line).
Change-Id: Id274b56ccfd4cc8c19ddc0f478890f21f284262a
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Change-Id: Ia504ccdac1deac20f20cf7fb76f78b2d8c505474
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
For using clang as a compiler it is enough
to specify CC=clang in the make command line
Change-Id: I06f1c1d418b68768f8119de5bdc8748c51f90c02
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I026a61a943960dc52539565968a942fbd851da93
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
|
|
When loopback interface is configured as BVI, instead of changing its
output node from loopN-output to l2-input, the loopN-output node is now
kept while its next tx node is changed from ethernet-input to l2-input.
The packet setup previously done in bvi_to_l2 as part of l2-input is now
performed in the loop output node.
This change adds an extra node in the BVI output path but provides the
following improvements:
1. IP address/route created on loopback prior to it being configured as
BVI will still work properly. The requirement to (re)configure IP/route
on loopback after it is configured as BVI is removed.
2. The output stats for loopback interfaces are always provided irrespective
of their BVI configuration.
3. The loopback-BVI output stats can be batch updated outside the packet
loop in output node, instead of per packet update in l2-input node,
making l2-input node more efficient for BVI packets.
4. Restore original node property as implemented in node.c function
vlib_node_add_next_with_slot() where next node indices stored in next
slots of each node will remain unique.
5. Packet trace for BVI output includes loopN output node which provides
useful packet data.
Change-Id: I7f5bc72ef953a367363a179088210596881f9e73
Signed-off-by: John Lo <loj@cisco.com>
|
|
Change-Id: I22cb443c4bd0bf298abb6f06e8e4ca65a44a2854
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I629ef98ecd3b729d2564b3a1ba8c6039f854f86c
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
gcc version 4.9.2 (Raspbian 4.9.2-10)
Tested on Linux raspberrypi 4.4.6-v7+ #875 SMP Tue Apr 12 16:33:02 BST 2016 armv7l GNU/Linux
CPUs may be little or big endian, detect with gcc flags, not the processor architecture
Add a new flag $(PLATFORM)_uses_openssl which allows to disable the link with openssl lib.
vlib/vlib/threads.c:
startup.conf must:
- specify the heapsize as we don't have hugepages on raspbian
cpu {
main-core 3
}
heapsize 64M
Corrects in various files the assumption uword == u64 and replaces 'u64' cast with 'pointer_to_uword' and 'uword_to_pointer' where appropriate.
256 CPUs may create an OOM when testing with small memory footprint ( heapsize 64M ), allows the number of VLIB_MAX_CPUS to be set in platforms/*.mk
vppinfra/vppinfra/longjmp.S:
ARM - copy r1 (1st parameter of the setjmp call) to r0 (return value)
vppinfra/vppinfra/time.h:
On ARMv7 in AArch32 mode, we can access to a 64bit register to retreive the cycles count.
gcc on rpi only declare ARM_ARCH 6. Override this info, and check if it is possible to use 'mrrc'.
/!\ the time function will NOT work without allowing the user mode access to the PMU.
You may download the source of the kmod here:
https://github.com/christophefontaine/arm_rdtsc
Change-Id: I8142606436d9671a184133b935398427f08a8bd2
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
|
|
This is complete rework of DPDK PCI initialization. It drops
previous scheme where lspci/route/awk/sed are used and instead
sysfs is solely used for discovering Ethernet PCI devices. Criteria
for blacklisting device is changed from exsiting routing table entry
to simple interface state obtained by SIOCGIFFLAGS ioctl().
It checks for IFF_UP flag, so as long as interface is declared
up and even when carrier is down interface will be blacklisted.
Change-Id: I59961ddcf1c19c728934e7fe746f343983741bf1
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
The current mechanism for setting up arp-input and ip6-discover-neighbor
output nodes for interfaces using their interface link up/down callback
function is inefficient and has potential timing issue, as observed for
bonded interface. Now both nodes will setup output interface sw_if_index
in the the sw_if_index[VLIB_TX] field of current packet buffer and then
use the interface-ouput node to tx the packet.
One side effect is that vlib_node_add_next_with_slot() needs to be
modified to allow the same output node-id to be put at the specified
slot, even if another slot contain that same node-id already exist. This
requirement is caused by BVI support where all loopback interfaces set
up as BVIs will have the same output node-id being l2-input while, for
output-interface node, the output slot must match the hw_if_index of the
interface.
Change-Id: I18bd1d4fe9bea047018796f7b8a4d4c20ee31d6e
Signed-off-by: John Lo <loj@cisco.com>
|
|
Change-Id: I42b26c8f95c17577006f13e3419b8ccc9ef7c4f3
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
|
|
Change-Id: Idda59272a029ffcbc029f9bb167508d7bd5e6e21
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Without this, frames can be double-freed to nodes like "error-punt",
leading to buffer leaks and other problems.
Change-Id: Ie28a4f504254ee439f720dbaac7f12206cea753b
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
|
|
I noticed while mucking about with lsof that vpp
was listening on port 5000.
telnet 0 5000 revealed that it was listening for
the cli on that port.
Digging into the code, it turns out that if you
do not configure cli-listen (Example:
unix {
cli-listen localhost:5002
}
)
Then vpp is listening on the first available port
starting at port 5000 anyway. This is a simple
patch to *not* listen unless configured to do so.
Change-Id: Id7f6f4d69e0a1642d2767849a90b21f38f21ecaa
Signed-off-by: Ed Warnicke <eaw@cisco.com>
|
|
Change-Id: Ieacbfa4dbbfd13b38eaa2d37f618f212cef4e492
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: Ieb2e4043fc7bc3b4a5436a7a6aa35f573d8d4506
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I984debeffe0dce36c9e7ab963f25d862cc7550cc
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: If3fc88a35bc0b736376113a39667caea42802ea1
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Do not propagate flags into cloned vlib_next_frame_t's.
vlib_next_frame_init(...) sets nf->frame_index to ~0. If it turns out
that the original flags include VLIB_FRAME_IS_ALLOCATED, the wheels
fall off. And so on.
Change-Id: I8de18653acfcc8eb20cee36f4eb5b9e82234f21b
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
This is 1st drop of VPP native driver for linux AF_PACKET.
New CLI:
create host-interface name <host-if-name> [hw-addr <mac-address>]
References:
- Documentation/networking/packet_mmap.txt in the Linux kernel tree
- man 7 packet
Known issues:
- attaching to linux bridge doesn't work
- it is not expected to work in multicore setup
Change-Id: I1cb1c3d305f349759e90e76e25696718b73bd73d
Signed-off-by: Damjan Marion <damarion@cisco.com>
|