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

Allow running simple_switch with custom arguments #75

Open
dush-t opened this issue May 23, 2020 · 2 comments
Open

Allow running simple_switch with custom arguments #75

dush-t opened this issue May 23, 2020 · 2 comments

Comments

@dush-t
Copy link

dush-t commented May 23, 2020

When I run my program using p4, it runs with this command -

simple_switch -i 1@s1-eth1 -i 2@s1-eth2 --thrift-port 9090 --nanolog ipc:///tmp/bm-0-log.ipc --device-id 0 monitor.json --debugger --log-console

I would like to pass an additional argument in this command (the --notification-addr argument). I cannot find any way to do this in the documentation.

@antoninbas
Copy link
Member

I'm not too familiar with this repo, but you will probably need to do the following:

Note that the filename you provide with --notification-addr will be located inside the docker container IIRC, so if you want to access it from the machine which is running the container, you will need to update the volume mounts for the container accordingly (https://github.com/p4lang/p4app/blob/master/p4app#L55).

Depending on what you are trying to do, it may be better not to use p4app and run the different components yourself (bmv2, p4c).

@mmisamor
Copy link

mmisamor commented Jun 11, 2021

I modified the p4_mininet.py file but it doesn't make any effect. I think that when the docker image is built there is installed internally another p4app files, so it doesn't take the changes into account... The folder container_name:/scripts in the current container should be updated with the new scripts (for example the p4_mininet.py script or others). I would like to modify the IP host address, the interface name and the Mac address but I couldn't do it.

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