-
Notifications
You must be signed in to change notification settings - Fork 51
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
docs: add Program Types/XDP documentation #155
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for aya-rs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this 🙏 Left some comments, but I will review again later today.
docs/book/programs/xdp.md
Outdated
|
||
## What is XBP in eBPF? | ||
|
||
XBP (eXpress Data Path) is a type of eBPF program that attaches to the network interface. It allows for the processing of network packets as soon as they are received from the network driver, even before they enter the networking stack. XDP enables efficient packet filtering, manipulation and redirection at the earliest possible stage, resulting in low-latency and high-throughput. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we stick to 80-100 character limit per line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we stick to 80-100 character limit per line?
Not sure what you mean per line, you want to break to a newline after max 100 chars?
On my side I don't see the lines go further than > 100 chars, it's always around 90 chars max per line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I want to break to a new line after max 100 characters.
This exact sentence which I commented exceeds this limit and it's quite hard to read in some editors. The whole line 10 has 317 characters:
~> python3 04/30/24 13:30:49 PM
Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> len("XDP (eXpress Data Path) is a type of eBPF program that attaches to the network interface. It enables filtering, manipulation and refirection of network packets as soon as they are received from the network driver, even before they enter the Linux kernel networking stack, resulting in low latency and high throughput.")
317
We should probably introduce some markdown linter to catch stuff like that, but for now can we just split the obviously too large lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I want to break to a new line after max 100 characters.
This exact sentence which I commented exceeds this limit and it's quite hard to read in some editors. The whole line 10 has 317 characters:
~> python3 04/30/24 13:30:49 PM Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> len("XDP (eXpress Data Path) is a type of eBPF program that attaches to the network interface. It enables filtering, manipulation and refirection of network packets as soon as they are received from the network driver, even before they enter the Linux kernel networking stack, resulting in low latency and high throughput.") 317
We should probably introduce some markdown linter to catch stuff like that, but for now can we just split the obviously too large lines?
Sure, makes sense, the only thing I'm worried about is that it may be less nice to read on bigger screens or on the site directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, on a bigger screen/on the site, it would look like:
Maybe it's just me but I find it harder to read with all the line breaks here
@vadorovsky Any news? I don't mind adding the line breaks, just thought it would make sense to reconsider it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I had no idea that breaking the lines even with a single \n
makes it being rendered on the website. Let me test myself. If that's really the case, let's leave the long lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I had no idea that breaking the lines even with a single
\n
makes it being rendered on the website. Let me test myself. If that's really the case, let's leave the long lines.
my bad, I tried with <br>
for line breaks (for some reason I thought you'd also like to render those on the website), going to try with single \n
, it shouldn't render on the website.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vadorovsky indeed it doesn't change anything on the website when adding single \n
, I have added some line breaks for bigger sentences, let me know if I should change anything else 👍
Co-authored-by: Michal Rostecki <vadorovsky@protonmail.com>
Co-authored-by: Michal Rostecki <vadorovsky@protonmail.com>
Applied your reviews, also corrected some typos |
Added documentation for https://aya-rs.dev/book/programs/xdp/
Feel free to make reviews and suggest improvements.