aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_vtr.c
AgeCommit message (Collapse)AuthorFilesLines
2024-03-12misc: remove GNU Indent directivesDamjan Marion1-4/+0
Type: refactor Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-07-23api: binary api cleanupDave Barach1-3/+3
Multiple API message handlers call vnet_get_sup_hw_interface(...) without checking the inbound sw_if_index. This can cause a pool_elt_at_index ASSERT in a debug image, and major disorder in a production image. Given that a number of places are coded as follows, add an "api_visible_or_null" variant of vnet_get_sup_hw_interface, which returns NULL given an invalid sw_if_index, or a hidden sw interface: - hw = vnet_get_sup_hw_interface (vnm, sw_if_index); + hw = vnet_get_sup_hw_interface_api_visible_or_null (vnm, sw_if_index); if (hw == NULL || memif_device_class.index != hw->dev_class_index) return clib_error_return (0, "not a memif interface"); Rename two existing xxx_safe functions -> xxx_or_null to make it obvious what they return. Type: fix Change-Id: I29996e8d0768fd9e0c5495bd91ff8bedcf2c5697 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-8/+10
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-1/+1
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2017-06-14ETH:fix l2_len/vlan count mismatch for > 2 tagsEyal Bari1-3/+0
l2_len was not updated for the third tag as the ethernet node retracts by the vlan count after parse_header (using ethernet_buffer_header_size) it ends up pointing before the ethernet header + some minor cleanups Change-Id: I4ccaedd33928912e5d837376f146503b27071741 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-03-07fix gcc 5.4 warning: argument to 'sizeof' in 'memcpy' call is the same ↵Gabriel Ganne1-9/+7
expression as the destination warning translates as an invalid write : sizeof(u8* b_dmac) == 8 != sizeof(eth_hdr->dst_address) == 6 ~/vpp/build-data/../src/vnet/l2/l2_vtr.c: In function 'l2pbb_get': ~/vpp/build-data/../src/vnet/l2/l2_vtr.c:734:63: error: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] ~/vpp/build-data/../src/vnet/l2/l2_vtr.c:736:63: error: argument to 'sizeof' in 'memcpy' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] update l2pbb_get to take an ethernet header instead of two u8* pointers for source and dest mac addresses. Change-Id: Ifcf1319a9e22614d57682f940e10f0420dc6fb8c Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-02-21VPP-540 : pbb tag rewrite detailsPavel Kotucek1-0/+66
Extended sw_interface_dump to provide 802.1ah (pbb) tag rewrite info if present. Extended log "l2-output" to provide raw data to display result of prospetive pbb tag rewrite. Tracing is moved after l2output_vtr to show these changes. Change-Id: I8b7cb865dc67ce21afab402cc086dac35f7c0f07 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+770
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>