sflow: replace VAPI with DLAPI 83/42283/2
authorPim van Pelt <[email protected]>
Sat, 25 Jan 2025 11:49:20 +0000 (12:49 +0100)
committerDave Wallace <[email protected]>
Thu, 30 Jan 2025 18:49:54 +0000 (18:49 +0000)
commitb68c1f26137692278ed7d335fd0e217a30331b99
tree5499323af6746eeda43303f7878ce0b222a1d9c9
parent82cd81ade65e0e29f8e1a908c0b92aa0d6895aaf
sflow: replace VAPI with DLAPI

Remove the requirement to coordinate between linux-cp and sflow at
build time via cmake. Also, remove 350 lines of awkward thread-forking
VAPI code. Replace it with a dynamically retrieved function from the
linux-cp plugin, called lcp_itf_pair_get_vif_index_by_phy().

Remove build inhibit based on Netlink headers, and only inhibit the
build for FreeBSD. This plugin can now run regardless of Linux CP
being built or loaded, and then return VPP ifIndex numbers instead.

Also, fix a flaky test where non-ephemeral source ports throw off
packet captures.

Type: improvement
Change-Id: I5486742fa0e343e382630a22672a05fe3dcf7836
Signed-off-by: [email protected]
Signed-off-by: [email protected]
(cherry picked from commit f1467f6be578088586abad1cc2c96038d8247794)
src/plugins/linux-cp/lcp_interface.c
src/plugins/sflow/CMakeLists.txt
src/plugins/sflow/sflow.c
src/plugins/sflow/sflow.h
src/plugins/sflow/sflow_common.h
src/plugins/sflow/sflow_dlapi.h [new file with mode: 0644]
src/plugins/sflow/sflow_psample.c
src/plugins/sflow/sflow_vapi.c [deleted file]
src/plugins/sflow/sflow_vapi.h [deleted file]
test/test_sflow.py