aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_cli.c
AgeCommit message (Collapse)AuthorFilesLines
2017-07-01devices: show interface rx-placement displays the wrong information (VPP-894)Steven1-1/+3
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>
2017-06-21Introduce default rx mode for device driversDamjan Marion1-6/+12
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>
2017-06-16Add missing barrier sync to rx placement infra codeDamjan Marion1-1/+3
Change-Id: I25ccf8260dbe7e1550aee3904a688fc135ce1f03 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10device: Add callback for set interface rx-modeSteven1-18/+54
- 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>
2017-05-02Add interface rx mode commands, unify rx mode and placement CLIDamjan Marion1-0/+238
Change-Id: Ib506c3e9d66170f29e3266ad6dc4d32b829befba Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-27vnet: update help message for intfc stateRay Kinsella1-1/+1
Add useful help information on set interface state. Change-Id: Ibcdcea2849ccaee4cc72bf38d79102beb0d4be11 Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
2017-03-29Coverity Error: logically dead code in IP unnumbered CLINeale Ranns1-4/+0
Change-Id: Id3398bd4b7a56c168aaab37942b92715e19d4025 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-26Rename "show interfaces" -> "show interface"Dave Barach1-2/+2
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>
2017-03-18Check change in unnumbered setting before updating IP enabled stateNeale Ranns1-4/+15
Change-Id: I6424a083ec889961ba4d0cd1df8348f20436be14 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-17Attached hostsNeale Ranns1-0/+12
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>
2017-03-07CLI: hide deleted interfacesEyal Bari1-2/+3
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>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+1165
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>