Age | Commit message (Collapse) | Author | Files | Lines |
|
- Fix issue in Doxy dependency check when nothing needs to be installed.
'set -e' and plain '[]' logic don't mix well.
- Fix Makefile snafu when building Doxy output for a single file.
- Include only one of vnet/vnet/buffer.c/dpdk_buffer.c in docs depending on
DPDKness. This could do with some improvement in future, eg to properly
align the pre-doxy steps with what Doxy does.
- Fix rendering of 'inline' tag in Doxygen by having it interpret
always_inline as "inline static".
- Bunch of duplicate CLI command structure names that confused docs and may
one day have caused debugging issues.
- Several other Doxygen syntax issues fixed, like documenting non-existant
parameters (usually just the wrong parameter name, typos, etc)
Change-Id: Ia8cca545e5de9f8750602bffa3c4548acc8971aa
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
As a step before Doxygen, extract CLI-related struct initializers
from the code and parse that into a summary of the CLI commands
available with the provided help text, such as it is. At the moment
this only renders this into an indexed Markdown file that Doxygen
then picks up but later we can use this information to enrich the
existing VLIB_CLI_COMMAND macro documentor as well as provide
runtime documentation to VPP that is stored on disk outside the
binary image.
Additionally support a comment block immediately prior to
VLIB_CLI_COMMAND CLI command definitions in the form /*? ... ?*/
that can be used to include long-form documentation without having
it compiled into VPP.
Examples of documenting CLI commands can be found in
vlib/vlib/unix/cli.c which, whilst not perfect, should provide a
starting point. Screen captures of sample output can be seen at
https://chrisy.flirble.org/vpp/doxy-cli-example.png and
https://chrisy.flirble.org/vpp/doxy-cli-index.png .
Next, shift the Doxygen root makefile targets to their own Makefile.
The primary reason for this is that the siphon targets do dependency
tracking which means it needs to generate those dependencies whenever
make is run; that is pointless if we're not going to generate any
documentation. This includes the package dependencies since they since
they sometimes unnecessarily interfere with the code build in some cases
at the moment; later we will look to building a Python venv to host the
Python modules we use.
One final remark: In future we may consider deprecating .long_help
in the VLIB_CLI_COMMAND structure entirely but add perhaps .usage_help.
.short_help would be reserved for a summary of the command function
and .usage_help provide the syntax of that command. These changes would
provide great semantic value to the automaticly generated CLI
documentation. I could also see having .long_help replaced by a
mechanism that reads it from disk at runtime with a rudimentary
Markdown/Doxygen filter so that we can use the same text that is used in
the published documentation.
Change-Id: I80d6fe349b47dce649fa77d21ffec0ddb45c7bbf
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Change-Id: I06ae392c7c8c3b4be7fd46560add442f42927c22
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I649a17f8fa47599faf438b2e596f53761790d10c
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Ran indent *twice*
Change-Id: If9c18b81983bb859cc8dc3b415c67cbf318fc618
Signed-off-by: Ed Warnicke <eaw@cisco.com>
|
|
Change-Id: Ifddf37db04b2ecfa7b470cd52e8eaa2211823f3d
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I283963b004ed6d91133e7e36811f75834280bbe7
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Iea6d338e60a95f7f30c10c2e751d4827e816f700
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Remove a bunch of historical SMP code that we're not using; clean up
coverity warnings as a side-effect.
Change-Id: Ic80d2f87c7fd4e654078cac23ad5ec287a1d7ffe
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Time to make the donuts
Change-Id: I528937800f7daefce19723dda0216e58d857942c
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change the default DPDK version to 16.07, and rename the indicated
patch directory. Use the native vhost-user driver.
Change-Id: Ie3d17e90e363ce86f0233b58c152de683b5d9456
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Ia4fbf4352119504e022b89d10d44a5259d94f316
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Per the TWS session...
- Some simple treatment of the contents of pool.h
- Changing some \brief commands to @brief. (will do a more
complete pass at this later.)
Change-Id: I050ee69c59c4b572ac295b5f86940b7f4c934cd9
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Change-Id: I37131f2d814a608fe9098daff83ff395f7ce99d7
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
DPDK vhost-user support is disabled due to significan changes
in the DPDK vhost-user code which are not compatible with current
VPP code.
Change-Id: I3f0d28cb75f6370282ec7e33d57cbfb77e1a3ce1
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Fix VPP startup problem where it cannot attach to a combination
of 3 Intel igb 1GE ports and 2 Intel ixgbe 10GE ports whose PCI
addresses are specified in the DPDK section of VPP startup
config file as follows:
dpdk { dev 0000:02:00.1 dev 0000:02:00.2 dev 0000:02:00.3
dev 0000:05:00.0 dev 0000:05:00.1 }
Change-Id: Ibb12f9e9a9184d00da51a49961772ac3a42a2d1d
Signed-off-by: John Lo <loj@cisco.com>
|
|
Change-Id: If6ab5f08bcdcf5e24bb8b31926894d2a56cb6c14
Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
|
|
Change-Id: If2d57a213fc2fec996db26df332910c3d2105f97
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Also enable silent rules where missing
Change-Id: Ia521886815c862b013f01df4cc18fd8a298aaaa1
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
CID 130914 Buffer not null terminated
CID 130916 Unchecked return value
CID 130938 Unchecked return value from library
CID 130939 Unchecked return value from library
CID 130940 Unchecked return value from library
CID 131042 Argument cannot be negative
CID 131222 Resource leak
CID 131223 Resource leak
CID 131334 Double close
CID 131335 Read from pointer after free
CID 131211 Resource leak
CID 131212 Resource leak
Change-Id: Idd80b91f621278e0be15911f2ed4354dbe4fc7f2
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Otherwise, e.g. the ip4/6_main_t's change size between PLATFORM=vpp
and PLATFORM=vpp_lite. That, in turn, makes it far easier to build
broken plugins.
Change-Id: Ic962d75b170eee698de29c4e29849ce73d27caad
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I57e442b1f3486c5e8caac9d2e288869ee10f37b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
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>
|