Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update eBPF/compilation instructions v2 #10560

Closed

Conversation

lukashino
Copy link
Contributor

Follow-up of #10182

Link to Redmine tickets:

Describe changes:
v2

  • remove recommended configure parameters

v1

  • small edit in eBPF instructions to prefer libbpf-dev package to the cloning&compilation
  • porting changes from the improved version of installation instructions that got merged into master-6.0.x

@lukashino lukashino added the typo/doc update No code change : only doc or typo fixes label Mar 2, 2024
@lukashino lukashino self-assigned this Mar 2, 2024
@lukashino lukashino requested a review from jufajardini as a code owner March 2, 2024 13:48
@@ -100,6 +99,11 @@ Now, you can build and install the library ::
sudo make install_headers
sudo ldconfig

You may miss some i386 headers (as eBPF is not x86_64 and some included headers
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what you're saying here ... may miss some i386 headers (as eBPF is not x86_64).

Does may miss mean will miss or may or may not?

Suggest "If your platform is x86_64, install architecture specific headers``

Copy link
Contributor Author

@lukashino lukashino Mar 2, 2024

Choose a reason for hiding this comment

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

I derived this from the original doc. The original docs also mention Some i386 headers will also be needed as eBPF is not x86_64 and some included headers are architecture specific. In your suggested version, by architecure-specific headers I would assume that I need to install x86_64 headers and not i386.

With that may miss I wanted to say that it might be possible that the compilation will complain about missing i386 headers - I actually didn't need any of that but left it there just to be sure...

Copy link
Contributor

@jufajardini jufajardini Mar 6, 2024

Choose a reason for hiding this comment

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

Would:
"As eBPF is not x86_64, your installation might miss some i386 headers that are architecture-specific.::"
Work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I honestly think we don't need this here at all unless you can think of some scenario where we might.
Do you have any opinion on this @victorjulien @jasonish

Copy link
Member

Choose a reason for hiding this comment

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

I'm not familiar enough with this to comment. I do know I just have to install the ebpf-devel packages on RHEL based systems to build with ebpf support, but that might not cover the individual ebpf programs.

Copy link

codecov bot commented Mar 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.67%. Comparing base (6d0e11e) to head (5c13ec7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10560      +/-   ##
==========================================
+ Coverage   78.40%   82.67%   +4.26%     
==========================================
  Files         922      922              
  Lines      246779   246969     +190     
==========================================
+ Hits       193488   204179   +10691     
+ Misses      53291    42790   -10501     
Flag Coverage Δ
fuzzcorpus 64.04% <ø> (+0.13%) ⬆️
suricata-verify 61.70% <ø> (?)
unittests 62.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Comment on lines +74 to +76
sudo apt-get install build-essential cargo cbindgen git libjansson-dev \
libpcap-dev libpcre2-dev libtool libyaml-dev make \
pkg-config rustc zlib1g-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that this doesn't list either gcc or clang, which are indicated as required in a paragraph that was removed. Is that alright?

Copy link
Member

Choose a reason for hiding this comment

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

I think its a bit of an Ubuntu'ism to just install build-essential to get all that stuff rather than breaking it out.

@@ -140,34 +113,54 @@ one of the following ways::

Minimal::

# Installed Rust and cargo as indicated above
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove this part?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because there is no guide for Rust and Cargo install above this. It has been moved to the bottom of the guide in case rustc and cargo is not part of the package manager.

Copy link
Member

Choose a reason for hiding this comment

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

Do we know if this is the case for any distros or OSs? And could it be reduced to a single line, a link to Rust install page? This would most likely be a rare type install that we probably shouldn't try to cover.

@lukashino
Copy link
Contributor Author

Anyway, created a new PR summarizing all the changes - #10614

@lukashino lukashino closed this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typo/doc update No code change : only doc or typo fixes
Development

Successfully merging this pull request may close these issues.

4 participants