Skip to contentSkip to conversation

RPM for the kernel samples?

DISCUSSION Jesse Brandeburg 2 participants 7 messages Nov 2, 2021 – Nov 3, 2021

lore
Share & tools
lore
#0 lore raw

Hi there, does anyone here know if the samples/bpf directory from the kernel is built as a part of an RPM from fedora or RHEL/Centos?

In my searching I've not found anything.

I do know:
1) other directories/tooling in the kernel is already packaged as standalone RPMs
a) see kernel-tools package which packages cpupower/turbostat
b) the spec file would be substantially the same as the above
2) The tools/bpf directory already seems built as an RPM.
3) This seems very possible.

Does anyone know why I couldn't / shouldn't submit a request to Fedora to do this? I might even get the .spec file working myself just to prove the idea and give a sample?

Thanks!

#1 lore raw
Quoted 2 lines · Jesse Brandeburg

Hi there, does anyone here know if the samples/bpf directory from the kernel is built as a part of an RPM from fedora or RHEL/Centos?

It's certainly possible to build it from the existing kernel .spec file:

https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel.spec#_1046

I know we have this available as an internal package for RHEL, but I don't think we ship it anywhere. And it seems like the flag is turned off for Fedora as well.

What do you need it for? Opening an issue asking for it to be built for Fedora might be a good start; feel free to Cc me on that as well :)

-Toke

#2 lore raw
Quoted 7 lines · Toke Høiland-Jørgensen
Quoted 2 lines · Jesse Brandeburg

Hi there, does anyone here know if the samples/bpf directory from the kernel is built as a part of an RPM from fedora or RHEL/Centos?

It's certainly possible to build it from the existing kernel .spec file:

Quoted 8 lines

https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel.spec#_1046

I know we have this available as an internal package for RHEL, but I don't think we ship it anywhere. And it seems like the flag is turned off for Fedora as well.

What do you need it for? Opening an issue asking for it to be built for Fedora might be a good start; feel free to Cc me on that as well :)

Hi Toke! thanks!

I'm tired of fighting tooth and nail to get the samples compiled on my own system whenever I need them. I'd much rather there just be an already made set of executables.

We use them for testing our driver's functionality for XDP, among other things.

I'll file a bugzilla.

#3 lore raw
Quoted 14 lines · Jesse Brandeburg
Quoted 13 lines · Toke Høiland-Jørgensen
Quoted 2 lines · Jesse Brandeburg

Hi there, does anyone here know if the samples/bpf directory from the kernel is built as a part of an RPM from fedora or RHEL/Centos?

It's certainly possible to build it from the existing kernel .spec file:

https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel.spec#_1046

I know we have this available as an internal package for RHEL, but I don't think we ship it anywhere. And it seems like the flag is turned off for Fedora as well.

Quoted 8 lines
Quoted 2 lines

What do you need it for? Opening an issue asking for it to be built for Fedora might be a good start; feel free to Cc me on that as well :)

Hi Toke! thanks!

I'm tired of fighting tooth and nail to get the samples compiled on my own system whenever I need them. I'd much rather there just be an already made set of executables.

Right, makes sense. FYI we were discussing moving (some of?) the XDP samples to xdp-tools[0].

Quoted 2 lines

We use them for testing our driver's functionality for XDP, among other things.

I don't suppose you have anyone interested in working on an actual XDP test suite of some kind, would you? Like a set of "compliance tests" that lives in-tree and that any driver author can run to test their driver's XDP implementation?

Quoted 1 line

I'll file a bugzilla.

Great!

-Toke

[0] https://lore.kernel.org/r/CAJ8uoz1GP4M71E-PNScndfeTbcCG2OUg+wcoO4ZaJF5UTBiXCQ@mail.gmail.com

#4 lore raw
Quoted 19 lines · Toke Høiland-Jørgensen
Quoted 17 lines · Jesse Brandeburg
Quoted 15 lines · Toke Høiland-Jørgensen
Quoted 2 lines · Jesse Brandeburg

Hi there, does anyone here know if the samples/bpf directory from the kernel is built as a part of an RPM from fedora or RHEL/Centos?

It's certainly possible to build it from the existing kernel .spec file:

https://src.fedoraproject.org/rpms/kernel/blob/rawhide/f/kernel.spec#_1046

I know we have this available as an internal package for RHEL, but I don't think we ship it anywhere. And it seems like the flag is turned off for Fedora as well.

What do you need it for? Opening an issue asking for it to be built for Fedora might be a good start; feel free to Cc me on that as well :)

Quoted 8 lines
Quoted 5 lines

Hi Toke! thanks!

I'm tired of fighting tooth and nail to get the samples compiled on my own system whenever I need them. I'd much rather there just be an already made set of executables.

Right, makes sense. FYI we were discussing moving (some of?) the XDP samples to xdp-tools[0].

Not a bad idea, as long as compilation and use gets easier.

Quoted 8 lines
Quoted 3 lines

We use them for testing our driver's functionality for XDP, among other things.

I don't suppose you have anyone interested in working on an actual XDP test suite of some kind, would you? Like a set of "compliance tests" that lives in-tree and that any driver author can run to test their driver's XDP implementation?

Good idea! I'll ask around ;-)

Quoted 9 lines
Quoted 2 lines

I'll file a bugzilla.

Great!

-Toke

[0] https://lore.kernel.org/r/CAJ8uoz1GP4M71E-PNScndfeTbcCG2OUg+wcoO4ZaJF5UTBiXCQ@mail.gmail.com