aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.c
AgeCommit message (Collapse)AuthorFilesLines
2021-01-26interface: remove vnet_device_input_runtime_tMohammed Hawari1-2/+0
Change-Id: I85a463b4ca15baf11e3eb70189f5190ba2585170 Type: refactor Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2021-01-25vlib: startup multi-arch variant configuration fix for interfacesRadu Nicolau1-1/+1
Propagate the multi-arch variant selection to interfaces. Type: fix Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Change-Id: I99c4a7896f172f0d14d2ded22a27383825529a7d
2021-01-21interface: rx queue infra rework, part oneDamjan Marion1-1/+11
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-13/+13
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-23interface: improve loggingDamjan Marion1-4/+46
Type: improvement Change-Id: I3ea180e643434dfd9c21b27082ea8a125f75b813 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-13interface: add multiarch support for per-interface tx nodeBenoît Ganne1-2/+3
Type: improvement Change-Id: Ia4ce47c0f727cf7b02294f05b94f14e788f52f30 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-10-19ip: Move the IP6 fib into ip6_[m]fib.cNeale Ranns1-1/+1
Type: improvement reduce the compile time by moving the bihash includes out of ip[46].h Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I6b9216e10aff1013071f9238b3e1ebbdd205bd80
2020-10-13stats: counters data modelOle Troan1-1/+2
This adds a new data model for counters. Specifying the errors severity and unit. A later patch will update vpp_get_stats to take advantage of this. Only the map plugin is updates as an example. New .api language: A new "counters" keyword to define counter sets. counters map { none { severity info; type counter64; units "packets"; description "valid MAP packets"; }; bad_protocol { severity error; type counter64; units "packets"; description "bad protocol"; }; }; Each counter has 4 keywords. severity, which is one of error, info or warn. A type, which is one of counter64 or gauge64. units, which is a text field using units from YANG. paths { "/err/ip4-map" "map"; "/err/ip6-map" "map"; "/err/ip4-t-map" "map"; "/err/ip6-t-map" "map"; }; A new paths keyword that maps the counter-set to a path in the stats segment KV store. Updated VPP CLI to include severity so user can see error counter severity. DBGvpp# show errors Count Node Reason Severity 13 ethernet-input no error error Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Ib2177543f49d4c3aef4d7fa72476cff2068f7771 Signed-off-by: Ole Troan <ot@cisco.com>
2020-10-08interface: shorten vnet_hw_if_rx_modeDamjan Marion1-1/+1
This is part of bigger refactor. Type: refactor Change-Id: I6fc2c0a1e2d217a70952901bcf775b8485bd3c20 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08l2: input performanceNeale Ranns1-13/+0
Type: improvement - cache the values form the BD on the input config to avoid loading - avoid the short write long read on the sequence number - use vlib_buffer_enqueue_to_next Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I33442b9104b457e4c638d26e9ad3bc965687a0bc
2020-09-09interface: support configuring RSS steering queuesChenmin Sun1-0/+36
This patch adds the RSS steering queues set interface, and it's implementation in DPDK device: /* Interface to set rss queues of the interface */ typedef clib_error_t *(vnet_interface_rss_queues_set_t) (struct vnet_main_t * vnm, struct vnet_hw_interface_t * hi, clib_bitmap_t *bitmap); This patch also introduces a command line to set the RSS queues: set interface rss queues <interface> <list <queue-list>> To display the rss queues, use "show hardware-interfaces" Below is the example to configure rss queues for interface Gig0: vpp# set interface rss queues Gig0 list 0,2,4-7 vpp# show hardware-interfaces brief Name Idx Link Hardware VirtualFunctionEthernet18/1/0 1 down VirtualFunctionEthernet18/1/0 Link speed: unknown RSS queues: 0 2 4 5 6 7 local0 0 down local0 Link speed: unknown vpp# Users can also configure the rss queues on a dpdk interface in startup.conf: dpdk { dev 0000:18:01.0 { rss-queues 0,2,5-7 } } Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I1835595a1c54016a84eabee9fd62ce137935385d
2020-07-16misc: add callback hooks and refactor pmcTom Seidenberg1-0/+4
Callbacks for monitoring and performance measurement: - Add new callback list type, with context - Add callbacks for API, CLI, and barrier sync - Modify node dispatch callback to pass plugin-specific context - Modify perfmon plugin to keep PMC samples local to the plugin - Include process nodes in dispatch callback - Pass dispatch function return value to callback Type: refactor Signed-off-by: Tom Seidenberg <tseidenb@cisco.com> Change-Id: I28b06c58490611e08d76ff5b01b2347ba2109b22
2020-02-11misc: fix coverity warningsDave Barach1-2/+8
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I6b1ea13fc83460bf4ee75cb9249d83dddaa64ded
2019-12-19interface: Prevent bad inner-dot1q any exact-match configurationJon Loeliger1-0/+10
Someone much more knowledgeable than I wrote: For L3 IP forwarding, any VLAN tags on a packet must be exact match to a sub-interface which means both outer and inner VLAN tag IDs must be exact-matched to specific values defined of that sub-interface. Without exact match on a L3 sub-interface, VPP has no mechanism to know what VLAN tags to use for packet output, such as ARP request packets or IP packets, on that sub-interface. Thus, sub-interface with "inner-dot1q any" is not an exact match sub-interface by definition since no match is present on inner tag. While in the area, fix a memory leak that would ensue on poorly configured interfaces. Change-Id: I8d17a96dbca3e3724c297ecc935ca61764e6ce2e Type: fix Signed-off-by: Jon Loeliger <jdl@netgate.com>
2019-12-04gre: Multi-point interfacesNeale Ranns1-0/+10
Type: feature Change-Id: I0129ad6ace44a50a8a3b26db8e445cd06b2b49e8 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-12-04gso: remove the interface countMohsin Kazmi1-1/+0
Type: refactor Change-Id: I51405b9d09fb6fb03d08569369fdd4e11c647908 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-10-09interface: callback to manage extra MAC addressesMatthew Smith1-0/+42
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>
2019-09-26misc: add vnet classify filter set supportDave Barach1-0/+1
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I79b216d2499df143f53977e5b70382f6f887e0bc
2019-08-27interface: Remove residual dpdk bonding codeSteven Luong1-9/+0
dpdk bonding code was removed in 19.08. However, there are still references to VNET_SW_INTERFACE_FLAG_BOND_SLAVE which was set by the already removed code. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I949a7281e6273f2733dd7532cc4a3bb4f3ce30de
2019-07-31vppinfra: refactor test_and_set spinlocks to use clib_spinlock_tjaszha031-4/+3
Spinlock performance improved when implemented with compare_and_exchange instead of test_and_set. All instances of test_and_set locks were refactored to use clib_spinlock_t when possible. Some locks e.g. ssvm synchronize between processes rather than threads, so they cannot directly use clib_spinlock_t. Type: refactor Change-Id: Ia16b5d4cd49209b2b57b8df6c94615c28b11bb60 Signed-off-by: Jason Zhang <jason.zhang2@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-06-18ipsec: ipsec-tun protectNeale Ranns1-0/+24
please consult the new tunnel proposal at: https://wiki.fd.io/view/VPP/IPSec Type: feature Change-Id: I52857fc92ae068b85f59be08bdbea1bd5932e291 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-05-13vnet: remove macro definitionsZhiyong Yang1-3/+0
These two macro definitions should be removed as enum vnet_interface_helper_flags_t has defined them. Change-Id: I31bd0ea75639d2f9a53f396ac3cf42f9fc5fbdbe Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-02-19tap gso: experimental supportAndrew Yourtchenko1-0/+6
This commit adds a "gso" parameter to existing "create tap..." CLI, and a "no-gso" parameter for the compatibility with the future, when/if defaults change. It makes use of the lowest bit of the "tap_flags" field in the API call in order to allow creation of GSO interfaces via API as well. It does the necessary syscalls to enable the GSO and checksum offload support on the kernel side and sets two flags on the interface: virtio-specific virtio_if_t.gso_enabled, and vnet_hw_interface_t.flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO. The first one, if enabled, triggers the marking of the GSO-encapsulated packets on ingress with VNET_BUFFER_F_GSO flag, and setting vnet_buffer2(b)->gso_size to the desired L4 payload size. VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO determines the egress packet processing in interface-output for such packets: When the flag is set, they are sent out almost as usual (just taking care to set the vnet header for virtio). When the flag is not enabled (the case for most interfaces), the egress path performs the re-segmentation such that the L4 payload of the transmitted packets equals gso_size. The operations in the datapath are enabled only when there is at least one GSO-compatible interface in the system - this is done by tracking the count in interface_main.gso_interface_count. This way the impact of conditional checks for the setups that do not use GSO is minimized. "show tap" CLI shows the state of the GSO flag on the interface, and the total count of GSO-enabled interfaces (which is used to enable the GSO-related processing in the packet path). This commit lacks IPv6 extension header traversal support of any kind - the L4 payload is assumed to follow the IPv6 header. Also it performs the offloads only for TCP (TSO - TCP segmentation offload). The UDP fragmentation offload (UFO) is not part of it. For debug purposes it also adds the debug CLI: "set tap gso {<interface> | sw_if_index <sw_idx>} <enable|disable>" Change-Id: Ifd562db89adcc2208094b3d1032cee8c307aaef9 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-02-02Deprecate old mutliarch code, phase 1Damjan Marion1-2/+2
It is causing compilation sloness with gcc-7 so removing it before it was originally planned. So far macros are left in the tree so we can know which nodes to convert to new multiarch code. Change-Id: Idb14622ca61fdce1eba59723b20d98715b7971e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-08vnet: store hw interface speed in kbps instead of using flagsDamjan Marion1-2/+1
Change-Id: Idd4471a3adf7023e48e85717f00c786b1dde0cca Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-30change mac address functions take const macNeale Ranns1-2/+2
Change-Id: Ia68db22b917e9af1394c00e5a6b3df134bfd1568 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-29interface-flags; fix coverity error found in conversionNeale Ranns1-3/+28
Change-Id: I2eafac4ce810fe53454b729d81161ec80d036db7 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-27Enumify interface flagsNeale Ranns1-10/+23
clang will emit a warning when the wrong enum type is passed to a function whose arguments are an enum type. free bug finding... Change-Id: I62215d8ef22c7527a31272e31f5d190e4e762e53 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-2/+2
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-01API / CLI event-log tracingDave Barach1-121/+0
Add an "elog trace [api][cli][barrier]" debug CLI command. Removed the barrier elog test command. Remove unused reliable multicast code. Change-Id: Ib3ecde901b7c49fe92b313d0087cd7e776adcdce Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-25L2 BD: introduce a BD interface on which to send UU packetsNeale Ranns1-3/+4
Change-Id: I21ad6b04c19c8735d057174b1f260a59f2812241 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-3/+3
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-08L2 BVI/FIB: Update L2 FIB table when BVI's MAC changesNeale Ranns1-2/+6
also some moving of l2 headers to reduce dependencies Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-11Multiversioning: Device (tx) function constructorMohsin Kazmi1-0/+21
Change-Id: I39f87ca161c891fb22462a23188982fef7c3243f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-07-20IP directed broadcastNeale Ranns1-0/+17
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>
2018-07-07PipesNeale Ranns1-3/+23
A pipe resembles a unix pipe. Each end of the pipe is a full VPP interface. pipes can be used for e.g. packet recirculation, inter-BD, etc. Change-Id: I185bb9fb43dd233ff45da63ac1b85ae2e1ceca16 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-15STATS: Add more hierarchy to counters.Ole Troan1-31/+13
Put error counters under node_index. /err/<node-name>/<error-name> E.g: /err/ip4-lookup/Hash table collisions /err/ip6-rewrite/Buffer allocation error Error names are not globally unique, and this allows for walking all errors for a particular node. Put interface counters under the directory /if. E.g. /if/rx Put system counters under the directory /sys. E.g. /sys/vector_rate Change-Id: I5b794d16698f61bcb2063a8cd77a7c4ae36419b8 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-11MTU: Software interface / Per-protocol MTU supportOle Troan1-19/+82
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>
2018-06-08export counters in a memfd segmentDave Barach1-0/+4
also export per-node error counters directory entries implement object types Change-Id: I8ce8e0a754e1be9de895c44ed9be6533b4ecef0f Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-03Interface Tag: memset field in VOM, clear the tag in VPP on interface deleteNeale Ranns1-0/+1
Change-Id: Id97de732b5952d5d86202e7749c9e81cf8dbed87 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-05-28itf: Fix admin up down for AF_PACKET and vhost-userMohsin Kazmi1-2/+5
Change-Id: I84327197d59c72d0d046dd2cb4071bf74af6fc28 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-05-25ARP proxy dumpsNeale Ranns1-1/+20
Change-Id: I8335ebf266becf2f42bb3f28a17dfed8d9b08f97 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-27TAP memory leaks:Neale Ranns1-1/+4
1 - use bit-map to re-use ID values and thus VLIB nodes 2 - free vrings 3 - free hw_address on HW interface delete (a HW * struct is memset on pool_get) 4 - free temporary node names during TX node setup Change-Id: Id114c8bb9c844fd4ceb02fbbeb4b511ecfeb61ce Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-18Mcast rewrite optimisationsNeale Ranns1-1/+1
hard code the address mask offsets. This are protocol specific and only used on ethernet when used at all. Change-Id: Ib1f6f33682f53254ffbb5a241a1583e65420e0c7 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-13Revert "MTU: Setting of MTU on software interface (instead of hardware ↵Damjan Marion1-49/+13
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>
2018-04-13MTU: Setting of MTU on software interface (instead of hardware interface)Ole Troan1-13/+49
Change-Id: I98bd454a761a1032738a21edeb0fe847e801f901 Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-19Use x(void) not x() in new interface stats codeNeale Ranns1-2/+2
Change-Id: Iaceaba4dc22341c631c858516b960ce97c4aa564 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-19Interface Unicast, Multicast and Broadcast stats on the APINeale Ranns1-0/+66
Change-Id: I7c75da358aff1bd0216a602a49f2909cef5d920d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-18Remove unnumbered configuration on interface deleteNeale Ranns1-0/+45
Change-Id: Iae5532c3d53e208831f3b2782242d9e59d367087 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-02-16Allow providers to override glean behaviourNeale Ranns1-1/+3
and update glean address on local interface MAC change Change-Id: I530826d60c7e9db2b0fa2d45754139d82c5ea807 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>