kohler / click

The Click modular router: fast modular packet processing and analysis
Other
733 stars 323 forks source link

Packages with DPDK #296

Open johnpearson555 opened 7 years ago

johnpearson555 commented 7 years ago

I am trying to get the dhcp package working with DPDK.

When I try just a userlevel configuration without DPDK, the dhcp package is found.But when I try a userlevel config with DPDK. I get an error. This is the error: requirement ‘dhcp’ not available

I am running the client example in click-packages: https://github.com/kohler/click-packages/blob/master/dhcp/conf/client.click

Do I need to change what dirs are linked when running with DPDK option? Thanks!

johnpearson555 commented 7 years ago

I also replicated this error with trying to install the sample package in click/etc/samplepackage and test configuration runs fine with userlevel click but with DPDK the package is not found.

johnpearson555 commented 7 years ago

I solved this by making them custom elements.

bcronje commented 7 years ago

Maybe you should leave the issue open as it seems there might be a valid problem?

johnpearson555 commented 7 years ago

OK. Sounds good.

tbarbette commented 7 years ago

Will look into this ;) Never tried packaging DPDK before, so it is probably valid....

tbarbette commented 7 years ago

Can you give the command you use to create the sample package? Never done that before, it will be easier...

bcronje commented 7 years ago

@tbarbette I dont think he is trying to package DPDK itself. If I understand him correctly he is trying to use one of the existing packages like DHCP or the Sample Package, and then things fail. So just install the Sample Package https://github.com/kohler/click/tree/master/etc/samplepackage running these commands:

autoconf
./configure
make
make install

And then you can require(package "sample"); inside your click config file and use the test :: SamplePackageElement; element provided by the Sample package.

@johnpearson555 correct me if my understanding is incorrect.

ahenning commented 7 years ago

This is how I understand it as well. The config runs fine without a DPDK element, but when starting click with a DPDK element added to the config, the error message occurs that the dhcp package was not found.

tbarbette commented 7 years ago

The DPKD build process is a little bit of a mess, I probably drop the "-l samplepackage" LDFLAGS or something. I'm trying to compile the package to verify that.

tbarbette commented 7 years ago

I cannot reproduce the problem. test.click :

require(package "sample");
test :: SamplePackageElement;
FromDPDKDevice(0) -> Discard

sudo CLICKPATH=etc/samplepackage/ bin/click test.click works

Any idea?

johnpearson555 commented 7 years ago

@bcronje @ahenning You are correct.

Installing the dhcp package configure, make, make install and then require(dhcp) returns "requirement ‘dhcp’ not available". Perhaps a issue with the dhcp packages in https://github.com/kohler/click-packages/blob/master/dhcp ?