api review: update field descriptions#419
Conversation
|
NOTE: I remove most of the comments that were before a struct in the API types files. Here is a sample output: The generated output is a concatenation of the To keep it clear and consistent, removed the comment for the struct and left the comments for the parameter. |
ce3889a to
8ba6c9b
Compare
|
@Billy99, this pull request is now in conflict and requires a rebase. |
8ba6c9b to
8d64911
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #419 +/- ##
===========================
===========================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // has allocated an sk_buff. TCX is newer implementation of TC with enhanced | ||
| // performance and better support for running multiple programs on a given | ||
| // network device. This makes TC useful for packet classification actions. |
There was a problem hiding this comment.
I suggest you delete the blurb about TCX here. It's stated below in the TCX section.
|
@Billy99, this pull request is now in conflict and requires a rebase. |
| // links is optional and is the list of hook points to which the KProbe program | ||
| // should be attached. The eBPF program is loaded in kernel memory when the BPF | ||
| // Application CRD is created and the selected Kubernetes nodes are active. The | ||
| // eBPF program will not be triggered until the program has also been attached | ||
| // to a hook point described in this list. Items may be added or removed from | ||
| // the list at any point, causing the eBPF program to be attached or detached. | ||
| // |
There was a problem hiding this comment.
Can this be a general statement made in the bpf application CRDs that applies to all program types rather than repeat it for each type? I suggested some additional explanation for Fentry and Fexit that explain how they are a little different, but the general statement still applies to them.
There was a problem hiding this comment.
As a general comment, I think that all of the details for each program type should be described on the attributes of the associated *AttachInfo structure and not anywhere else.
anfredette
left a comment
There was a problem hiding this comment.
I'm done reviewing everything. I just have a few suggestions.
apis/v1alpha1/shared_types.go
Outdated
| // For a ClusterBpfApplicationState instance or a BpfApplicationState instance, | ||
| // conditions contains the summary state for all eBPF programs defined in the | ||
| // instance for a given Kubernetes nodes. | ||
| // +patchMergeKey=type |
There was a problem hiding this comment.
There is now a BpfApplicationStateConditionType for the state objects.
anfredette
left a comment
There was a problem hiding this comment.
I'm done reviewing. I just made a few suggestions. If you choose to use them, some apply accross multiple program types.
a151584 to
deb93ca
Compare
everettraven
left a comment
There was a problem hiding this comment.
Did a quick pass and have some comments
| // offset is optional and the value is added to the address of the hook point | ||
| // function. |
There was a problem hiding this comment.
What does this mean to a user? I'm still not sure why a user would care to set this
There was a problem hiding this comment.
eBPF programs can be used to debug kernel code without having to recompile and reload the kernel. So maybe some want to attach a probe somewhere later in a given kernel function other than at the start of the function, maybe after some 'if" check to determine if that is why a function is returning early or something, the offset lets them attach at a given offset in the code. The user has to know what they are doing here. We are just a wrap to what the kernel is exposing, so we are also exposing it.
| // from 0 to 1000 where lower values have higher precedence. | ||
| // priority is required and determines the execution order of the TC program | ||
| // relative to other TC programs attached to the same hook point. It must be a | ||
| // value between 0 and 1000, where lower values indicate higher precedence. |
There was a problem hiding this comment.
Am I allowed to set the same priority for multiple programs?
There was a problem hiding this comment.
Yes, updated text to that effect.
| // UnSpec, OK, ReClassify, Shot, Pipe, Stolen, Queued, Repeat, ReDirect, | ||
| // Trap and DispatcherReturn |
| // proceedOn is optional and allows the user to call other XDP programs in a | ||
| // chain, or not call the next program in a chain based on the exit code of | ||
| // an XDP program. Allowed values are: | ||
| // Aborted, Drop, Pass, TX, ReDirect and DispatcherReturn |
deb93ca to
ddc2a5b
Compare
ddc2a5b to
3f285c0
Compare
rework shell check task
As part of the API review, a comment was made to improve the description of all fields. This commit makes a pass at the ClusterBpfApplication, BpfApplication, ClusterBpfApplicationState and BpfApplicationState CRD fields. Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
3f285c0 to
9be77a2
Compare
|
The force push above was just a rebase. |
anfredette
left a comment
There was a problem hiding this comment.
Overall, this looks great. Thanks for doing this @Billy99.
I made a few final tweaks myself and pushed another commit.
Signed-off-by: Andre Fredette <afredette@redhat.com>
a7d8eea to
4e2b3e7
Compare
As part of the API review, a comment was made to improve the description of all fields. This commit makes a pass at the ClusterBpfApplication, BpfApplication, ClusterBpfApplicationState and BpfApplicationState CRD fields.
The description fields are most easily seen using the
kubectl explaincommand. For example:The following gist collects all the
kubectl explainoutput:https://gist.github.com/Billy99/b871e60f04944d4b03c9c0106d2c8a43