Skip to content
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

tutorial not working out-of-the-box #695

Open
sitilge opened this issue Feb 7, 2020 · 4 comments
Open

tutorial not working out-of-the-box #695

sitilge opened this issue Feb 7, 2020 · 4 comments

Comments

@sitilge
Copy link

sitilge commented Feb 7, 2020

Hi,
I am trying to get started with this nice project but I'm stuck in early stages. I am currently trying to follow the examples/tutorial but getting of errors. First, as I read, is due to non-matching ruby version

NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01.
Gem::Specification.default_specifications_dir called from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/bundler.rb:428.
NOTE: Gem::Specification.default_specifications_dir is deprecated; use Gem.default_specifications_dir instead. It will be removed on or after 2020-02-01.
Gem::Specification.default_specifications_dir called from /opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/bundler.rb:428.
/opt/vagrant/embedded/gems/gems/vagrant-2.2.7/plugins/kernel_v2/config/vm.rb:379: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/vagrant/embedded/gems/gems/vagrant-2.2.7/plugins/kernel_v2/config/vm_provisioner.rb:95: warning: The called method `add_config' is defined here
/opt/vagrant/embedded/gems/gems/vagrant-2.2.7/lib/vagrant/errors.rb:103: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/opt/vagrant/embedded/gems/gems/i18n-1.8.2/lib/i18n.rb:195: warning: The called method `t' is defined here

The second is that the bindports is apparently pointing to different devices, e.g. 00:08.0 as given by lspci. Is there a convenient automatic way to set the device numbers?

Finally, when running genscripts I get:

./genscripts: error while loading shared libraries: libbpf.so.0: cannot open shared object file: No such file or directory
@sitilge sitilge changed the title tutorial for beginners not working out-of-the-box tutorial not working out-of-the-box Feb 7, 2020
@gshimansky
Copy link
Contributor

gshimansky commented Feb 8, 2020

Ruby errors that you see come from vagrant. I cannot reproduce them. If you can provide reproducer maybe we will be able to help.

I don't know how to automatically generate values for virtual network card PCI ids. If they aren't correct for you, just edit line 5 in scripts.sh after you create VMs.

For the last error, if you don't want to setup BPF library, build NFF-Go with environment variable NFF_GO_NO_BPF_SUPPORT set to a nonempty value.

@aregm
Copy link
Owner

aregm commented Feb 8, 2020

@sitilge What is your Ruby and Vagrant version?

@sitilge
Copy link
Author

sitilge commented Feb 8, 2020

@sitilge What is your Ruby and Vagrant version?

Ruby version 2.7.0
Vagrant version 2.2.7

@sitilge
Copy link
Author

sitilge commented Feb 8, 2020

For the last error, if you don't want to setup BPF library, build NFF-Go with environment variable NFF_GO_NO_BPF_SUPPORT set to a nonempty value.

Yes, that was how I built NFF-Go on my local machine. But this is about the VMs generated from Vagrant file. And lines 136 - 150 contain the lines for installing libbpf and NFF-Go with BPF. But the problem is, as described, that BPF is not available on the VMs. The respective lines (136 - 150) from Vagrantfile:

echo Installing libbpf
git clone -b v0.0.4 https://github.com/libbpf/libbpf
make -C libbpf/src all
sudo make -C libbpf/src install
sudo sh -c "echo /usr/lib64 > /etc/ld.so.conf.d/usrlib64.conf"

echo Downloading and building NFF-GO framework
go get -v golang.org/x/tools/cmd/stringer
git clone -b master --recurse-submodules http://github.com/intel-go/nff-go
(cd nff-go; go mod download; make)
echo Downloading and building NFF-GO NAT example and its dependencies
go get github.com/golang/protobuf/protoc-gen-go
git clone -b master --recurse-submodules http://github.com/intel-go/nff-go-nat
(cd nff-go-nat; go mod download; . env.sh; make)
./nff-go-nat/test/httpperfserv/install-systemd-service.sh "-port 8008"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants