Age | Commit message (Collapse) | Author | Files | Lines |
|
Type: feature
New callback vnet_hw_interface_add_del_mac_address().
Add or delete secondary MAC addresses on a hardware interface.
This will allow packets to be processed which have a destination
MAC address other than the primary programmed MAC address without
needing to put the device into promiscuous mode.
Change-Id: I6beecbcb8932fc1fe45b567f76fa3706feefae2c
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
|
|
Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I79b216d2499df143f53977e5b70382f6f887e0bc
|
|
Use a single vnet_pcap_t in vlib_global_main, specifically to support
unified tracing
Update sphinx docs, doxygen tags
Type: refactor
Ticket: VPP-1776
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id15d41a596712968c0714cef1bd2cd5bc9cbdd55
|
|
The 9af7e2e87e used a comparison that fd is >= 0 to check that
the pcap needs closing. While the pcap_close() function does
reset the file descriptor to -1, the freshly initialized structure
has it equal to 0.
This causes the VPP to close stdin if the packets are being seen
on pg interface without the capture file being opened.
This triggers the vpp attempting to read from STDIN
(another bug), which results in running out of memory.
Change-Id: I11d61422701500a9b3e0dd52d59383f297d57f54
Type: fix
Fixes: 9af7e2e87e
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
|
|
See .../src/vnet/classify/trace_classify.h for the business end
of the scheme.
It would be best to hash pkts, prefetch buckets, and do the primary
table lookups two at a time. The inline as given works, but perf
tuning will be required. "At least it works..."
Add "classify filter" debug cli, for example:
classify filter mask l3 ip4 src dst \
match l3 ip4 dst 192.168.2.10 src 192.168.1.10
Add "pcap rx | tx trace ... filter" to use the current classify filter chain
Patch includes sphinx documentation and doxygen tags.
Next step: device-driver integration
Type: feature
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I05b1358a769f61e6d32470e0c87058f640486b26
|
|
Separate debug CLI arg parsing from the underlying action
function. Fixes a number of subtle ordering dependencies, and will
allow us to add a binary API to control the feature at some point in
the future.
Type: refactor
Ticket: VPP-1770
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id0dbeda06dad20e756c941c691e2088ce3c50ec7
|
|
when use pcap cli to capture pcakets into two files rx01.pcap && rx02.pcap,
the first time:
1)pcap rx trace on max 100 intfc any file rx01.pcap
2)......the process of capture data to buffer......
3)pcap rx trace off
the second time:
4)pcap rx trace on max 100 intfc any file rx02.pcap
5)......the process of capture data to buffer......
6)pcap rx trace off
the pcap_write function bug in this two lines
pm->n_packets_captured = 0;
if (pm->n_packets_captured >= pm->n_packets_to_capture) referring to calling pcap_close()
will result in that the twice pcap cli both writes the packets
into rx01.pcap, but nothing into rx02.pcap. Beside, the rx02.pcap
file will not be created.
solution: separate the pcap_close() out of pcap_write()
Change-Id: Iedeb46f9cf0a4cb12449fd75a4014f95f3bb3fa8
Signed-off-by: Jack Xu <jack.c.xu@ericsson.com>
|
|
Provide default packet_to_capture value. Display interface name
correctly for "pcap tx/rx trace status".
Type: fix
Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I7064d0dbea236a9aff68bba7fbaf2c4a73b16c6f
Signed-off-by: John Lo <loj@cisco.com>
|
|
leak-check { <any-debug-cli-command-and-args> }
Hint: "set term history off" or you'll have to sort through a bunch of
bogus leaks related to the debug cli history mechanism.
Cleaned up a set of reported leaks in the "show interface" command. At
some point, we thought about making a per-thread vlib_mains vector,
but we never did that. Several interface-related CLI's maintained
local static cache vectors. Not a bad idea, but not useful as things
shook out. Removed the static vectors.
Change-Id: I756bf2721a0d91993ecfded34c79da406f30a548
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
BRIDGE_DOMAIN_DUMP, CONTROL_PING, CONTROL_PING_REPLY, and show interface CLI
Change-Id: I2927573b66bb5dd134b37ffb72af0e6676750917
Signed-off-by: Steven Luong <sluong@cisco.com>
(cherry picked from commit 15c31921a628c5500cbed2ebc588d7ddbaa970a3)
|
|
pcap rx trace on max 100 intfc tap0
then
pcap rx trace status
Displays "local0" instead of "tap0" due to a typo in
pcap_trace_command_internal(...).
Change-Id: Id2de6a24174aac24d9051b7404f01edc806a6573
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Ia2be56e198c960788430705b356170f8cc12c450
Signed-off-by: Jack Xu <jack.c.xu@ericsson.com>
|
|
Moved code to the ethernet input node, and the interface output
path(s). Since we no longer skip ethernet-input, there's no reason
for device drivers to know anything about pcap rx tracing, etc.
Change-Id: I08d32fb1b90cbee1bd4f609837d533e047b36fa4
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I15ff191ee8724a3354c074db590472db05e0652e
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Before
------
DBGvpp# sh int rx-mode
sh int rx-mode
Thread 1 (vpp_wk_0^@):
node vmxnet3-input:
vmxnet3-0/b/0/0 queue 0 (polling)
Thread 2 (vpp_wk_1^@):
node vmxnet3-input:
vmxnet3-0/13/0/0 queue 0 (polling)
DBGvpp#
After
-----
DBGvpp# sh int rx-placement
sh int rx-placement
Thread 1 (vpp_wk_0):
node vmxnet3-input:
vmxnet3-0/b/0/0 queue 0 (polling)
Thread 2 (vpp_wk_1):
node vmxnet3-input:
vmxnet3-0/13/0/0 queue 0 (polling)
DBGvpp#
Change-Id: I5910d502757054c3942fac9d20c5104e95fc6b56
Signed-off-by: Steven <sluong@cisco.com>
|
|
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
|
|
Change-Id: I9228ce29e9d2fc862a2d076b4072bcdd728d6dd1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
|
|
with ip direct broadcast enable a packet to the interface's
subnet broadcast address with be sent L2 broadcast on the
interface. dissabled, it will be dropped. it is disabled by
default, which preserves current behaviour
Change-Id: If154cb92e64834e97a541b32624354348a0eafb3
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
This patch separates setting of hardware interfaec and software
interface MTU. Software MTU is L2 payload MTU (i.e. not including L2
header). Per-protocol MTU for IPv4, IPv6 and MPLS can also be set.
Currently only IP4, IP6 are enabled in adjacency / rewrite code.
Documentation in src/vnet/MTU.md
Change-Id: Iee2fd6f0bbc8210748dd8e073ab9fab87d323690
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
the ip4-dhcp-client-detect feature MUST run prior to nat44-out2in, or
inbound dhcp broadcast packets will be dropped. Certain dhcp servers
answer lease renewal dhcp-request packets with broadcast dhcp-acks, leading
to unrecoverable lease loss.
In detail, this constraint:
VNET_FEATURE_INIT (ip4_snat_out2in, static) = {
.arc_name = "ip4-unicast",
.node_name = "nat44-out2in",
.runs_after = VNET_FEATURES ("acl-plugin-in-ip4-fa"),
};
doesn't get the job done:
ip4-unicast:
[17] nat44-out2in
[23] ip4-dhcp-client-detect
[26] ip4-not-enabled
Add a proper constraint:
VNET_FEATURE_INIT (ip4_snat_out2in, static) = {
.arc_name = "ip4-unicast",
.node_name = "nat44-out2in",
.runs_after = VNET_FEATURES ("acl-plugin-in-ip4-fa",
"ip4-dhcp-client-detect"),
};
and the interface feature order is OK, at least in this regard:
ip4-unicast:
[17] ip4-dhcp-client-detect
[18] nat44-out2in
[26] ip4-not-enabled
We need to carefully audit (especially) the ip4-unicast feature arc,
which has [gasp] 37 features on it!
Change-Id: I5e749ead7ab2a25d80839a331de6261e112977ad
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
interface)"
This reverts commit 70083ee74c3141bbefb185525315f1b34497dcaa.
Reverting as this patch is causing following crash:
0: /home/damarion/cisco/vpp3/build-data/../src/vnet/devices/devices.h:131 (vnet_get_device_input_thread_index) assertion `queue_id < vec_len (hw->input_node_thread_index_by_queue)' fails
Aborted
Change-Id: Ie2a365032110b1f67be7a9d832885b9899813d39
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I98bd454a761a1032738a21edeb0fe847e801f901
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: Iae5532c3d53e208831f3b2782242d9e59d367087
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
- setting MTU on an interface updates the L3 max bytes too
- value cached in the adjacency is also updated
- MTU exceeded generates ICMP to sender
Change-Id: I343ec71d8e903b529594c4bd0543f04bc7f370b3
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
|
|
Improve "show xxx tunnel" output functions format_xxx_tunnel() for
GRE, VXLAN, VXLAN-GPE, GENEVE and GTPU tunnels to make their output
more consistent and provide better information.
Improved the output of "show int addr" to make its info more
consistent with tunnels and provide fib-index info.
Change-Id: Icd4b5b85a5bec417f8ee19afea336c770ad3b4c5
Signed-off-by: John Lo <loj@cisco.com>
|
|
Store and pass MAC address as 6 byte u8 array instead of u64 to
make MAC address handling in set interface MAC endian neutral.
The previous API handler only works for little endian.
Change-Id: Ie4ec33a840bc5122ab1f17e25977e58f3466253b
Signed-off-by: John Lo <loj@cisco.com>
|
|
Also add vat test code to test the subject API. The format is
sw_interface_set_rx_mode sw_if_index <index> [queue <id>]
<polling|nterrupt|adaptive>
Change-Id: Ib810d85d430077865bead8cc08a070f8ae478225
Signed-off-by: Steven <sluong@cisco.com>
|
|
Change-Id: I7b175d57b85e626aab00221b6dac0498aebcbeae
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
When I type in set interface rx-mode with a nonexistent queue, I got a crash with the following
traceback. It looks like the vm is NULL when vlib_node_get_runtime is called.
DBGvpp# sh int rx
Thread 0 (vpp_main):
node dpdk-input:
TenGigabitEthernet5/0/0 queue 0 (polling)
TenGigabitEthernet5/0/1 queue 0 (polling)
TenGigabitEthernet7/0/0 queue 0 (polling)
TenGigabitEthernet7/0/1 queue 0 (polling)
node vhost-user-input:
VirtualEthernet0/0/2 queue 0 (adaptive)
DBGvpp# set interface rx-mode VirtualEthernet0/0/2 queue 1 polling
Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
0x00007ffff6d4e0bc in vlib_node_get_runtime (vm=0x0, node_index=125)
at /home/sluong/vpp/build-data/../src/vlib/node_funcs.h:92
92 vlib_node_t *n = vec_elt (nm->nodes, node_index);
(gdb) where
at /home/sluong/vpp/build-data/../src/vlib/node_funcs.h:92
at /home/sluong/vpp/build-data/../src/vlib/node_funcs.h:112
vnm=0x6f0fa0 <vnet_main>, hw_if_index=7, queue_id=1, mode=0x7fffb62099e8)
at /home/sluong/vpp/build-data/../src/vnet/devices/devices.c:307
hw_if_index=7, queue_id=1, mode=VNET_HW_INTERFACE_RX_MODE_POLLING)
at /home/sluong/vpp/build-data/../src/vnet/interface_cli.c:1192
vm=0x7ffff7b9d440 <vlib_global_main>, input=0x7fffb6209ef0,
cmd=0x7fffb61d5d14)
at /home/sluong/vpp/build-data/../src/vnet/interface_cli.c:1288
vm=0x7ffff7b9d440 <vlib_global_main>,
cm=0x7ffff7b9d630 <vlib_global_main+496>, input=0x7fffb6209ef0,
parent_command_index=18)
at /home/sluong/vpp/build-data/../src/vlib/cli.c:588
vm=0x7ffff7b9d440 <vlib_global_main>,
cm=0x7ffff7b9d630 <vlib_global_main+496>, input=0x7fffb6209ef0,
parent_command_index=12)
The fix is to add a check for vec_len(hw->input_node_thread_index_by_queue)
and vec_len (hw->rx_mode_by_queue) to reject the command if the queue_id is
out of bound. While at it, I notice inputting queue_id=-1 is being interpreted
as all queues. An easy fix is to not overload the queue_id variable with -1 to
mean something else.
Change-Id: Id70ec3e7d06ccc67635e6d28ef53420bdac4a988
Signed-off-by: Steven <sluong@cisco.com>
|
|
The CLI commands were change from 'set/show interface placement' to
'set/show interface rx-placement', but the associated help text was not
updated. On the 'set interface rx-placement', some of the parameters
were renamed, which was confusing when looking at the documentation for
help.
While in the file interface_cli.c, cleaned up several other CLI
commands. There are still other commands in the file that need
addressing.
Change-Id: Ifdc357c73ad9f3362133c495217b5a6b3a411eab
Signed-off-by: Billy McFall <bmcfall@redhat.com>
|
|
Change-Id: If608bbc7f4c8b0d5c3a237098a20279e407c82d3
Signed-off-by: Eyal Bari <ebari@cisco.com>
|
|
show interface rx-placement somtimes displays the wrong interface names.
This happens when there exists subinterfaces in VPP.
The problem is due to the function show_interface_rx_placement_fn is calling
format_vnet_sw_if_index_name with hw_if_index instead of sw_if_index.
VPP has the concept of sw_if_index and hw_if_index. Each serves a different
purpose. When there is no subinterfaces, both hw_if_index and sw_if_index
may happen to have the same value. But don't count on it. When the API calls
for sw_if_index, we must pass the sw_if_index although the hw_if_index has
the same type which the compiler does not catch. Passing hw_if_index for an
API which requires sw_if_index may have an unpredictable result such as
described in the VPP-894 and sometimes it may even crash if the particular
index does not exist.
Change-Id: I76c4834f79b88a1c20684fcba64f14b2da142d77
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit bafa4d048439fdbcc0bd577e43a2784d1b89bfc5)
|
|
If interface is down and queues are not configured then we are not able
to change rx-mode. This change introducess default mode which is stored
per interface and applied if driver wants.
Change-Id: I70149c21c1530eafc148d5e4aa03fbee53dec62f
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I25ccf8260dbe7e1550aee3904a688fc135ce1f03
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
- When the interface rx-mode is changed via CLI, the corresponding device
may want to know about it and to reset the driver. This patch is to add
the callback.
- In the function vnet_hw_interface_set_rx_mode, it appears it is missing
a line
hw->rx_mode_by_queue[queue_id] = mode
because the function is checking if the new mode is the same as
hw->rx_mode_by_queue which is initialized to POLLING. So if the function is
called to change the mode to interrupt, it just returns without doing
anything. This is the check that I am talking about in the same function.
if (hw->rx_mode_by_queue[queue_id] == mode)
return 0;
Change-Id: Iaca2651c43e0ae3fda6fd8dc128e247b0851cc65
Signed-off-by: Steven <sluong@cisco.com>
|
|
Change-Id: Ib506c3e9d66170f29e3266ad6dc4d32b829befba
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Add useful help information on set interface state.
Change-Id: Ibcdcea2849ccaee4cc72bf38d79102beb0d4be11
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
|
|
Change-Id: Id3398bd4b7a56c168aaab37942b92715e19d4025
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
To line up with "show interface placement," recently added. Otherwise,
"show int" refers only to "show interface placement," which tends to
annoy the cash customers...
Change-Id: Iea9e3681aeb051e2b0e1ecbf06706d98af9a3abf
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I6424a083ec889961ba4d0cd1df8348f20436be14
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
allow this config to function:
set int ip address loop0 169.254.1.1/32 (the default GW address for attached hosts)
set int unnumbered af_packet0 use loop0 ('enable' IP on the host interface)
ip route add 192.168.1.1/32 via af_packet0 (where to find the host)
repeat for each host and host interface.
Inter-host communication is throught the /32 routes.
To allow this:
1 - attached host routes have the ATTACHED flag set, so the ARP code accepts then as legitimate sources
2 - unnumbered interfaces inherit the source address from the IP interface
Change-Id: Ib66c5f0e848c528f79372813adc3a0c11b50717f
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Added a new interface flag - HIDDEN
Indicates that the interface does not appear in CLI/API.
Added three new interface functions:
vnet_sw_interface_is_api_visible - indicates if the sw_if_index should be displayed
vnet_swif_is_api_visible - variant for sw_interface
vnet_sw_interface_is_api_valid - tests if the given if_index exists and is visible
for future use by api functions
Changed the unformat function to only accept visible interfaces
Changed vxlan to add the HIDDEN flag to deleted interfaces
This is the first part in a series to hide deleted interfaces from the API
Change-Id: Ib43cc5cf1c450856560faf4e84126eb3671038e2
Signed-off-by: Eyal Bari <ebari@cisco.com>
|
|
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23
Signed-off-by: Damjan Marion <damarion@cisco.com>
|