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

About bricks-shell runtime error #13

Open
shuaidonga opened this issue Mar 6, 2019 · 7 comments
Open

About bricks-shell runtime error #13

shuaidonga opened this issue Mar 6, 2019 · 7 comments

Comments

@shuaidonga
Copy link

After I installed it according to the reademe documentation.
Execute in the shell. /bricks -d /usr/local/etc/bricks-scripts/utils.lua /usr/local/etc/bricks-scripts/configs/single-threaded-setups.lua
Then execute the bricks-shell
The following error occurred
image

@ajamshed
Copy link
Contributor

ajamshed commented Mar 6, 2019

@shuaidonga,

Since you are using a remote lua shell to connect to the bricks daemon, I suggest that you type in your code as a block, e.g. lb = Brick.new("LoadBalancer", 2); lb:connect_input("eth5") in the shell. You should probably run the binary like: bricks -d -f /usr/local/etc/bricks-scripts/startup-one-thread.lua

As a start, I suggest that you try running packet-bricks as a foreground process (bricks-server [-f startup_script_file]). Your commands should eventually be written in the form of a lua function and then stored in a script (similar to functions as defined in startup-one-thread.lua.

@shuaidonga
Copy link
Author

@ajamshed ,
i am try running packet-bricks as a foreground process.Some errors occurred during runtime.
bricks> pe = PktEngine.new("e0", 1024, 1)
bricks> lb = Brick.new("LoadBalancer", 2)
bricks> lb:connect_input("eth5")
bricks> lb:connect_output("eth5{0", "eth5{1", "eth5{2", "eth5{3")
bricks> pe:link(lb)
[ lb_init(): line 66] Adding brick eth5{0 to the engine
[ promisc(): line 96] Interface eth5 is already set to promiscuous mode
673.628315 nm_open [542] NIOCREGIF failed eth5
[netmap_link_iface(): line 121] Unable to open eth5: Invalid argument
[pktengine_link_iface(): line 331] Could not link!!!
[brick_link(): line 113] Linking e0 with link eth5 with batch size: 512 and qid: -1
[netmap_create_channel(): line 746] brick: 0x7fdabf8177d0, local_desc: (nil)
673.628437 nm_open [542] NIOCREGIF failed eth5{0
[netmap_create_channel(): 771]>> ERROR!!: Can't open (nil)(netmap:eth5{0)
image

@ajamshed
Copy link
Contributor

ajamshed commented Mar 7, 2019

Are you running as root (or with sudo)?
Can you please check if example netmap applications are running fine (such as pkt-gen?

@shuaidonga
Copy link
Author

@ajamshed
I have run as root.
Netmap application running is fine.
image

@ajamshed
Copy link
Contributor

ajamshed commented Mar 7, 2019

@shuaidonga ,

Hmm.. interesting. I tested packet-bricks (FreeBSD version) just two weeks ago. I believe you are running the Linux version (based on your output log). Can you please share the following details with me:

1- Linux kernel version,
2- Netmap commit ID,
3- Network adapter specs, and
4- your lua startup script.

I will test out packet-bricks in my testbed once you have provided me the details. nm_open() is failing which means that some part of the netmap Linux API has changed since the last time I updated the code.

@shuaidonga
Copy link
Author

@ajamshed
More details are as following
1、Linux kernel version is 3.10.0-327.el7.x86_64
2、Netmap commit id is fbeeaeea43be8858be0895f19170377f06e77dd3
3、NIC information is Broadcom Corporation NetXtreme II BCM57810 10 Gigabit. NIC driver is bnx2x
4、bricks -f /usr/local/etc/bricks-scripts/startup-one-thread.lua

@ajamshed
Copy link
Contributor

ajamshed commented Mar 8, 2019

@shuaidonga ,

Does netmap support bnx2x NICs? Please read this:
https://github.com/luigirizzo/netmap/tree/master/LINUX#nic-drivers. And then this: luigirizzo/netmap#13.

Can you please verify whether you were emulating netmap with pkt-gen? Most likely packet-bricks fails at nm_open() because it is trying to create netmap pipes.

By the way, there is no netmap patch for bnx2x driver over here as well: https://github.com/luigirizzo/netmap/tree/master/LINUX/final-patches. Do you have an Intel NIC that you can try running packet-bricks with?

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

2 participants