Skip to content

VPP: T7175: Added sflow plugin to build - #962

Merged
dmbaturin merged 4 commits into
vyos:currentfrom
ServerForge:current
Jul 22, 2025
Merged

VPP: T7175: Added sflow plugin to build#962
dmbaturin merged 4 commits into
vyos:currentfrom
ServerForge:current

Conversation

@ServerForge

@ServerForge ServerForge commented May 12, 2025

Copy link
Copy Markdown
Contributor

Change summary

Added the VPP-Sflow plugin to the build.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T7175

Related PR(s)

vyos-legacy/vyos-vpp#32
vyos/vyos-1x#4504

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Added Sflow plugin to VPP build.
@github-actions

github-actions Bot commented May 12, 2025

Copy link
Copy Markdown


PR title does not match the required format

@github-actions github-actions Bot added the current VyOS rolling release label May 12, 2025
@ServerForge ServerForge changed the title VPP: T7175 Added sflow plugin to build VPP: T7175: Added sflow plugin to build May 12, 2025
Comment thread scripts/package-build/vpp/package.toml Outdated
@sever-sever
sever-sever requested review from dmbaturin and zdc May 13, 2025 08:39
Added Sflow plugin to VPP build.

@sever-sever sever-sever left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include sFlow plugin to VPP binary

Comment thread scripts/package-build/vpp/package.toml Outdated
@github-actions

github-actions Bot commented Jul 18, 2025

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sever-sever

Copy link
Copy Markdown
Member

@ServerForge do you see the message regarding CLA? As the CI CLA Check does not pass. It cannot be merged until agreed/sign.
You should write in the comment. If you agree

I have read the CLA Document and I hereby sign the CLA

@ServerForge

Copy link
Copy Markdown
Contributor Author

I don't usually get notifications for bot replies.

I have read the CLA Document and I hereby sign the CLA

@evgsentrium

evgsentrium commented Jul 21, 2025

Copy link
Copy Markdown
Member

I don't usually get notifications for bot replies.

I have read the CLA Document and I hereby sign the CLA

@ServerForge it must be a separate comment that contains only this phrase without quotes "I have read the CLA Document and I hereby sign the CLA"

@ServerForge

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

lemeshovich added a commit to vyos/vyos-cla-signatures that referenced this pull request Jul 21, 2025

@c-po c-po left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional plugin build commands look sane.

@dmbaturin
dmbaturin merged commit 1155ae7 into vyos:current Jul 22, 2025
7 of 10 checks passed
@dmbaturin

Copy link
Copy Markdown
Member

@ServerForge Thanks!

@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels Jul 22, 2025
@sever-sever

Copy link
Copy Markdown
Member

@ServerForge after merging the VPP binary cannot build

[2570/2817] Building C object CMakeFiles/plugins/sflow/CMakeFiles/sflow_plugin.dir/sflow.c.o
FAILED: CMakeFiles/plugins/sflow/CMakeFiles/sflow_plugin.dir/sflow.c.o 
/usr/bin/ccache /usr/lib/ccache/gcc -DHAVE_FCNTL64 -D_FORTIFY_SOURCE=2 -Dsflow_plugin_EXPORTS -I/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src -I/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/build-root/build-vpp-native/vpp/CMakeFiles -I/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins -I/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/build-root/build-vpp-native/vpp/CMakeFiles/plugins -I/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/build-root/build-vpp-native/vpp/CMakeFiles/plugins/sflow -fPIC -Wno-stringop-overflow -Wno-stringop-overread -Wno-array-bounds -g -Werror -Wall -Wno-address-of-packed-member -O3 -fstack-protector -fno-common -march=corei7 -mtune=corei7-avx -fvisibility=hidden -ffunction-sections -fdata-sections -MD -MT CMakeFiles/plugins/sflow/CMakeFiles/sflow_plugin.dir/sflow.c.o -MF CMakeFiles/plugins/sflow/CMakeFiles/sflow_plugin.dir/sflow.c.o.d -o CMakeFiles/plugins/sflow/CMakeFiles/sflow_plugin.dir/sflow.c.o -c /__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c
/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c: In function ‘total_drops’:
/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c:247:8: error: unknown type name ‘clib_thread_index_t’; did you mean ‘vlib_thread_main_t’?
  247 |   for (clib_thread_index_t thread_index = 0; thread_index < smp->total_threads;
      |        ^~~~~~~~~~~~~~~~~~~
      |        vlib_thread_main_t
/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c: In function ‘read_worker_fifos’:
/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c:454:12: error: unknown type name ‘clib_thread_index_t’; did you mean ‘vlib_thread_main_t’?
  454 |       for (clib_thread_index_t thread_index = 0;
      |            ^~~~~~~~~~~~~~~~~~~
      |            vlib_thread_main_t
/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c: In function ‘read_node_counters’:
/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c:524:8: error: unknown type name ‘clib_thread_index_t’; did you mean ‘vlib_thread_main_t’?
  524 |   for (clib_thread_index_t thread_index = 0; thread_index < smp->total_threads;
      |        ^~~~~~~~~~~~~~~~~~~
      |        vlib_thread_main_t
/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c: In function ‘sflow_set_worker_sampling_state’:
/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/src/plugins/sflow/sflow.c:638:8: error: unknown type name ‘clib_thread_index_t’; did you mean ‘vlib_thread_main_t’?
  638 |   for (clib_thread_index_t thread_index = 0; thread_index < smp->total_threads;
      |        ^~~~~~~~~~~~~~~~~~~
      |        vlib_thread_main_t
[2571/2817] Building C object CMakeFiles/plugins/rdma/CMakeFiles/rdma_plugin.dir/output.c.o
[2572/2817] Building C object CMakeFiles/plugins/sflow/CMakeFiles/sflow_plugin.dir/node.c.o
[2573/2817] Building C object CMakeFiles/plugins/sflow/CMakeFiles/sflow_plugin.dir/sflow_psample.c.o
[2574/2817] Building C object CMakeFiles/plugins/rdma/CMakeFiles/rdma_plugin_icl.dir/input.c.o
[2575/2817] Building C object CMakeFiles/plugins/rdma/CMakeFiles/rdma_plugin_skx.dir/input.c.o
[2576/2817] Building C object CMakeFiles/plugins/rdma/CMakeFiles/rdma_plugin_hsw.dir/input.c.o
[2577/2817] Building C object CMakeFiles/plugins/rdma/CMakeFiles/rdma_plugin.dir/input.c.o
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:700: vpp-build] Error 1
make[1]: Leaving directory '/__w/vyos-reusable-workflows/vyos-reusable-workflows/vyos-build/scripts/package-build/vpp/vpp/build-root'
make: *** [Makefile:711: pkg-deb] Error 2
cp: cannot stat 'build-root/*.deb': No such file or directory
I: build_cmd applying patch ../patches/vpp/0001-linux-cp-add-support-for-xfrm-netlink-notifcation.patch...
error: patch failed: src/plugins/linux-cp/CMakeLists.txt:26
Applying: linux-cp: add support for xfrm netlink notifcation
error: src/plugins/linux-cp/CMakeLists.txt: patch does not apply
error: src/plugins/linux-cp/lcp_ipsec.c: already exists in index
error: src/plugins/linux-cp/lcp_xfrm.h: already exists in index
error: src/plugins/linux-cp/lcp_xfrm_nl.c: already exists in index
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 linux-cp: add support for xfrm netlink notifcation
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Failed to apply patch ../patches/vpp/0001-linux-cp-add-support-for-xfrm-netlink-notifcation.patch
I: Ensure Debian build dependencies are met
I: Tarball created: vyos-vpp-patches_current.tar.gz
I: Cleaned up build dependency packages
I: Tarball created: vpp-sflow_v1.0.01-1.tar.gz
I: Cleaned up build dependency packages
I: execute pre_build_hook for the package "vpp"
I: Tarball created: vpp_stable_2410.tar.gz
Command '# Patches for vpp should applied here
for patch in ../patches/vpp/*.patch; do
    echo "I: build_cmd applying patch $patch..."
    git -c user.email=maintainers@vyos.net -c user.name=vyos am "$patch" || { echo "Failed to apply patch $patch"; exit 1; }
done

make UNATTENDED=yes install-dep
make pkg-deb
cp build-root/*.deb ../
' returned non-zero exit status 1.
I: Source packages build failed, ignoring - building binaries only
Failed to build package vpp: Command '# Patches for vpp should applied here
for patch in ../patches/vpp/*.patch; do
    echo "I: build_cmd applying patch $patch..."
    git -c user.email=maintainers@vyos.net -c user.name=vyos am "$patch" || { echo "Failed to apply patch $patch"; exit 1; }
done

make UNATTENDED=yes install-dep
make pkg-deb
cp build-root/*.deb ../
' returned non-zero exit status 1.
I: Cleaned up build dependency packages
+ git config --global --unset-all url.https://@github.com/.insteadOf
+ cd vpp/build-root
+ sudo mkdir -p /opt/packages/current/vpp
+ sudo mv ./*.deb /opt/packages/current/vpp
mv: cannot stat './*.deb': No such file or directory
Error: Process completed with exit code 1.

@ServerForge

Copy link
Copy Markdown
Contributor Author

May want to roll it back to v0.9.02-2 instead of v1.0.01-1 since i know it did build with the original version it was submitted with.

@ServerForge

Copy link
Copy Markdown
Contributor Author

The current VPP version defined will build with v0.9.02-2 but not v1.0.01-1. v1.0.01-1 will build with stable/2506 however there seems to be a slight issue with some of the patches with the newer VPP versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

current VyOS rolling release mirror-completed

Development

Successfully merging this pull request may close these issues.

6 participants