Query: How can i load a custom XDP program using CNDP #338
-
I have written a custom XDP program to filter packets for application. I made changes in the cndp code to load my program instead but I am facing a segmentation fault when trying to add entry into the map structure. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @Lakshyagour |
Beta Was this translation helpful? Give feedback.
-
@Lakshyagour You can also use the xdp map pinning support in cndp. An example is in the cndp-frr example. We use xdp-loader to load and pin maps then pass the pin paths to CNDP. |
Beta Was this translation helpful? Give feedback.
Hi @Lakshyagour
I have a patch here that I intend to clean up and make a contribution to CNDP that you can try out: https://github.com/maryamtahhan/veth-benchmark/blob/main/containerization/0001-Load-custom-bpf-program.patch you can apply it on top of git commit: 53f60b1 and see if it helps out or to spot any issues with your own patch...
I have used it with this bpf filtering propgram https://github.com/maryamtahhan/veth-benchmark/tree/main/containerization/filter-udp-to-af_xdp