sflow: replace VAPI with DLAPI 52/42252/8
authorPim van Pelt <[email protected]>
Sat, 25 Jan 2025 11:49:20 +0000 (12:49 +0100)
committerMatthew Smith <[email protected]>
Wed, 29 Jan 2025 14:13:20 +0000 (14:13 +0000)
commitf1467f6be578088586abad1cc2c96038d8247794
tree4f639544c7de80577e0660a895f011aa829f1f20
parent81996c1970b7db39f1ffe7a919bbb3a3ab9a0740
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]
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