aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
AgeCommit message (Collapse)AuthorFilesLines
2018-12-22ethernet-input tagged packets optimizationsDamjan Marion1-269/+474
Change-Id: I21bdd8982d5f357590af8a2a0219bdebbaee4e74 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-12-18PAPI: Add MACAddress object wrapper for vl_api_mac_address_tOle Troan3-16/+7
Change the definition of vl_api_mac_address_t to an aliased type. Change-Id: I1434f316d0fad6a099592f39bceeb8faeaf1d134 Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-26Add a feature arc consistency checkDave Barach1-0/+1
Verify that last node in the computed feature order matches reality. This check doesn't make sense in all cases, so we skip it if the newly-added vnet_feature_arc_registration_t ".last_in_arc" datum is a NULL pointer. Change-Id: Ia99c3e2b2da2e4780a7d5bc71670c5742a66fef2 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-26Remove unused argument from eth_identify_subint(...)Damjan Marion2-4/+2
Change-Id: I0e89fbc51f30325655c4e9d0104aceb3ead3b16f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-21VPP-1309: fixed crash when listing ip arp after removing interfacePavel Kotucek1-0/+24
Change-Id: I8f88214eab0535573863f31d2c21e2239a811921 Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-11-21ethernet-input: fix assert in l2 modeDamjan Marion1-9/+24
Change-Id: I3befc762694e7c6d6847c361a144f72547038ba1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-20ethernet-input optimizationsDamjan Marion3-22/+533
Change-Id: I4ec7750ef58363bd8966a16a2baeec6db18b7e9e Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-18mac_address_t: size to 6 bytes so it represents wire formatNeale Ranns1-7/+15
Change-Id: I4d6b505a2b1e0cb960a4145796351ad1bc7e860d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach2-23/+25
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-1/+1
Typically we have scalar_size == 0, so it doesn't matter but vlib_frame_args was providing pointer to scalar frame data, not vector data. To avoid future confusion function is renamed to vlib_frame_scalar_args(...) Change-Id: I48b75523b46d487feea24f3f3cb10c528dde516f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-07GBP Endpoint LearningNeale Ranns1-0/+13
Learning GBP endpoints over vxlan-gbp tunnels Change-Id: I1db9fda5a16802d9ad8b4efd4e475614f3b21502 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-11-06BD ARP entry use common API typesNeale Ranns1-5/+13
Change-Id: I29f20dbaf2c2d735faff297cee552ed648f6f61b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-05Genric API types format/unformat support for VAT and custom dumpNeale Ranns4-13/+21
Change-Id: I8bc3a991f0ede0605d78b51ba609fbe5889513f2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-02arp:add error counters for all failure casesEyal Bari1-3/+3
Change-Id: Ided6c661edc9e2035fd7b472c312e2380d3f9c0b Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-3/+3
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-12vnet: complete the fix for l3_hdr_offset calculation for single loop ↵Andrew Yourtchenko1-1/+1
fastpass case (VPP-1444) 20e6d36b has moved the calculation of the l3_hdr_offset into the determine_next_node() function, with the assumption that the current_data in the buffer is at the L3 header. This is not the case for the single loop fastpath, where the vlib_buffer_advance() call is made after the call to determine_next_node(), as a day1 behavior. As a result - that path incorrectly sets the l3_hdr_offset. Solution: move the vlib_buffer_advance() call to before determine_next_node() Change-Id: Id5eaa084c43fb6564f8239df4a0b3dc0412b15de Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 376414f4c3f53af44da4e82ee5d0b1843b291f8e)
2018-10-09vnet: ethernet-input incorrectly sets l3_hdr_offset in some casesAndrew Yourtchenko1-26/+26
The issue surfaced when developing the tap GSO code, with an iteration where output path is reliant on vnet_buffer (b0)->l3_hdr_offset being set correctly in the input path, during performance testing. Adding a workaround in the TX path shows that the issue surfaces only for relatively few packets during the test (about 100 out of 600000). Analysis shows the issue arises if the ethernet-input is handling two untagged packets with different sw_if_index values - then the accelerated path punts to slow path, before the setting of the l2.l2_len values is done, thus resulting in them being 0, and l3_hdr_offset being the same as l2_hdr_offset, wreaking havoc on TX path. The solution is to move the l2_hdr_offset calculation into a place where it is done for all the packets, and move the l3_hdr_offset calculation into the determine_next_node() function - as that function is also the one setting the special-case l2.l2_len value for tagged packets and moving the current_data for the L2 case. Change-Id: If728c7715e011930c1887691188c98055bddde67 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-05On interface deletion - make sure any vlan qinq table is clearedJohn Lo1-0/+2
Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c Signed-off-by: John Lo <loj@cisco.com>
2018-10-02Enabled untagged vs default functionalityMike Bly2-6/+5
Removed 0-tags attribute for default-sub-if config Moved default-sub-if check before untagged Change-Id: I68043445aa2f79846e0743567b9015257fd87f8d Signed-off-by: Mike Bly <mbly@ciena.com>
2018-09-25L2 BD: introduce a BD interface on which to send UU packetsNeale Ranns1-1/+2
Change-Id: I21ad6b04c19c8735d057174b1f260a59f2812241 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-25dpdk: show pluggable info in 'show hardware'Damjan Marion2-19/+48
module: id SFP/SFP+/SFP28, compatibility: 40g_active_cable vendor: Amphenol, part NDCCGF-I202 revision: C, serial: APF1711202351C, date code: 170318 cable length: 2m Change-Id: Ife35607b4f078f7b56737fe066ad4cbd247a7504 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-24ARP: don't use RPC for requests initiated from the main threadNeale Ranns2-114/+87
Change-Id: If833680149eb33db6adc836c5330f350042869f4 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-14Revert "L2-input: use vlib_buffer_enqueue_to_next"John Lo1-3/+3
The patch did not improve single input link performance and degrade performance with multiple input links. This reverts commit b1232555e91b286feab5667b5a22f29aa8e96626. Change-Id: Ib9336a2e0610088b9145a43cacbdadb52dabd522 Signed-off-by: John Lo <loj@cisco.com>
2018-09-13L2-input: use vlib_buffer_enqueue_to_nextNeale Ranns1-3/+3
use the same trick as l2-ouput to group the processing of packets on the same interface. Change-Id: Ib2a6a1b5f362372936197f5bb2fdd0fe9439226b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-12fix missing extern in vnet/ethernet/node.cDamjan Marion1-1/+1
Change-Id: Idabdd1112ba7e390a7b14a83cc7fbd198c8754df Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-10new multiversioning on ethernet input nodesDamjan Marion1-34/+16
Change-Id: I1aa196756b3ff4969b8ff2f117778d2cd87d6dd5 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-08L2 BVI/FIB: Update L2 FIB table when BVI's MAC changesNeale Ranns2-1/+15
also some moving of l2 headers to reduce dependencies Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-06eth_mac_equal takes const pointersNeale Ranns1-1/+1
Change-Id: I5a47d30d783dcf000e3ca2bcdc46e7d93654cc37 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-05Add missing API MAC address encode implementationNeale Ranns1-0/+1
Change-Id: I4cb073f23a7f24f0fc16f2eda8b869dbe657f71b Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-31Fix typoDave Barach1-1/+1
Change-Id: Iadf4ce27f56400b669b80f2e718b6d4330c949a5 Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-08-31Introduce a mac_address_t on the API and in VPPNeale Ranns6-2/+236
Change-Id: I05d6c2cb5d34de469eb050e4ee10dc6b954c986d Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-22Consolidate the [un]format_mac_address implementationsNeale Ranns2-0/+15
Change-Id: Ic4c42c5610a827234e6582501f0ddcba47aa34ee Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-30FIB: return entry prefix by const reference to avoid the copyNeale Ranns1-7/+8
Change-Id: I09b8406168df4b6b28df3ede24ee839681be0195 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-21Loopback tx: support multiple tx intfcs per frameDave Barach1-153/+197
Can happen if code bypasses the per-interface output node, and dispatches packets directly to the tx node. Switch to vlib_get_buffers(...) ... vlib_buffer_enqueue_to_next (...), quad/single loop coding pattern. Change-Id: Ic0e5d3b9748230f4e545a54186e6e64e7a782bb1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-20IP directed broadcastNeale Ranns1-0/+9
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-20QoS: marking and recording for MPLS and VLANNeale Ranns1-0/+8
Change-Id: Icec79aa9039d5d7835d311fde0b7c1a0c76c9eb1 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-19Remove unused argument to vlib_feature_nextDamjan Marion1-3/+3
Change-Id: Ieb8b53977fc8484c19780941e232ee072b667de3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-17loopback:fix delete to check interface classEyal Bari1-13/+6
Change-Id: Ia563b279e85b5da93f79db5a2a4d9b8c04f5be99 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-15VPP-1341: fix loopback interface graph arcsDave Barach1-50/+173
Remove broken special case from l2_input.c:set_int_l2_mode(), which turns out to confuse the graph dispatch engine. The loopback TX function needs to push packets to either ethernet-input or to l2-input, based on bridge / BVI configuration. Rather than overloading a single graph arc - and making vain attempts to reconfigure it - create both arcs and use the correct one. Rewrote the loopback tx function as an idosyncratic multi-arch quad/single loop fn. Change-Id: I15b56ce641d90a11e7b3c7d23859f40e168dd7b2 Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-14Improve IP4 ARP and IP6 ND Events Notificationv18.10-rc0John Lo1-10/+25
For L2 ARP termination, use both brodcast ARP request and reply packets to provide MAC/IP binding events. For IP4/IP6 neighbor adress resolution, send resolution events if there is an address resolution attemp with a static neighbor entry where both IP and MAC matches. This allow probe of an IP neighbor with a static entry to confirm it is responding with a reply matching that of the static entry. Change-Id: Iffb923bb5aea3f9021436735d5ca06e7b24f966f Signed-off-by: John Lo <loj@cisco.com>
2018-07-11avoid using thread local storage for thread indexDamjan Marion2-2/+2
It is cheaper to get thread index from vlib_main_t if available... Change-Id: I4582e160d06d9d7fccdc54271912f0635da79b50 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-07PipesNeale Ranns2-3/+15
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-25Add checks for bad ARP request packets in arp-termination nodeJohn Lo1-12/+9
Check ARP request packet with bad requester MAC/IP address and drop these packets. Also removed useless VRRP check in the node. Change-Id: I2c8a774d291928eb623b3a515f1edf7e338fa760 Signed-off-by: John Lo <loj@cisco.com>
2018-06-19Check get packet template allocation failure (VPP-1321)John Lo1-0/+6
After calling vlib_packet_template_get_packet(), make sure packet buffer is allocated before using it. Change-Id: Idb5199f4e2c9596137b2101e502d611f474a6ffe Signed-off-by: John Lo <loj@cisco.com>
2018-06-11MTU: Software interface / Per-protocol MTU supportOle Troan1-3/+1
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-08Gratuitous ARP packet handlingNeale Ranns1-8/+33
only learn from a GARP packet if it is an update to an existing entry. Change-Id: I4c1b59cfedb911466e5e4c9756cf53a6676e1909 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-07Revert "Allow arp-input node to learn IPv4 neighbors from GARP packets"John Lo1-5/+0
This reverts commit d018870d1b02109fc8b328446f15312fdd2fcd11. Change-Id: I700ade7a25ae5ed72cfed586e50b02492a4f11de Signed-off-by: John Lo <loj@cisco.com>
2018-06-07Allow arp-input node to learn IPv4 neighbors from GARP packetsJohn Lo1-0/+5
Change-Id: I86019f4ff9b0c8c633638fa23341d8ce49099ba6 Signed-off-by: John Lo <loj@cisco.com>
2018-06-05bond: send gratuitous arp when the active slave went down in active-backup modeSteven2-14/+16
- Modify the API send_ip6_na and send_ip4_garp to take sw_if_index instead of vnet_hw_interface_t and add call to build_ethernet_rewrite to support subinterface/vlan - Add code to bonding driver to send an event to bond_process when the first interface becomes active or when the active interface is down - Create a bond_process to walk the interface and the corresponding subinterfaces to send garp/ip6_na when an event is received. - Minor cleanup in bonding/node.c Note: dpdk bonding driver does not send garp/ip6_na for subinterfaces. There is no attempt to fix it here. But the infra is now done and should be easy to add the support. Change-Id: If3ecc4cd0fb3051330f7fa11ca0dab3e18557ce1 Signed-off-by: Steven <sluong@cisco.com>
2018-05-28Fix IP neighbor/arp pool full and static entry handlingJohn Lo1-69/+69
Move handling of IP neighbor pool full into main thread on entry creation and make sure static entriesare not deleted for reuse. Fix IPv6 neighbor handling on interface down and up so that static entries are not deleted. Change-Id: I073794949a41a5b86201e519ebe479febfc506c8 Signed-off-by: John Lo <loj@cisco.com>