-
Notifications
You must be signed in to change notification settings - Fork 6
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
Miscs Minor Issues #1
Comments
I think it is more accurate to say not "we are adding", but "with your permission, we would like to add". |
I have Scapy installed on the machine, but when I run controller.py Python causes a ImportError on scapy. Any idea what's wrong?
My os.sys.path is shown below. The machine has a $USER/.local directory.
|
If you are on an Ubuntu 16.04 or 18.04 Linux machine using Python2, you probably need to do scapy has a command line executable, which you can find via |
I am using Ubuntu 16.04 because the macsec asked for this Ubuntu version to use. I have both Python 2 and Python 3 installed on the machine. |
The controller is using python2. Doing |
Python3 is messing me up since I had to install it to fix pip on the machine.
|
In that case you can try |
If nothing you do uses Python3, there should never be a reason to install Python3 in order to use pip. My open source P4 tool scripts never used or installed anything related to Python3 until recently when p4c switched to using Python3, and they worked fine. I am referring to a freshly installed Ubuntu 16.04 or 18.04 Linux system here. I have no idea if that is what you are starting with. |
I purged Python 3.5 from the machine. I have to look into pip and pip2 installs first before I can use either to install scapy. |
No matter what sequence of steps you find and document for adding an extern to behavioral-model, I plan to test that sequence of steps on a freshly installed Ubuntu Linux 16.04 machine, to ensure that it works. So you have that "safety net", if you consider it that. |
Actually, I had pip cause Traceback. So I looked up the issue and python3 and python were used to get rid of this error. This is why I had installed Python3. Sure, once I have the software working, I will document the steps. Right now, I am dealing with a problem with pip. This is why I want to uninstall pip and install it again. I have tried several uninstalls but they all failed to remove pip. I have removed Python 3.5 but some vestige remains.
|
Please add to the README.md that mininet also needed to be installed. |
Mininet is installed by the |
@hesingh You may have better fortunes if you try starting over with a freshly installed Ubuntu Linux 16.04 machine, rather than trying to repair the state of the VM you have. I know that can be a pain, but is the nature of the beast. |
Actually, during the first install Mininet was not installed and I had to install it manually. Seeing the reply to @marcohae I grepped for Mininet in .sh files and found its install. I am using google cloud and can easily delete an instance and create a new one. I just created a new one and trying the steps one more time. thanks. |
No more pip or Python issues with 2nd try because I didn't try to upgrapde pip. First, with the p4c being used by macse , the README.md does not need any extern_instances editing in basic.json. We can remove the editing text from README.md. Second, now, I fail in launching the controller_distributed for the first switch. Before this step See the failed log below.
Log of controller launch is included below.
|
I changed the controller_distributed command to use 51001 instead of 50051 as shown below and then the other controller (launched from controller directory) receives a msg and emits an error.
The other controller's log is included below with the error.
The error looks like a security certificate issue. |
The
I just tried the current version of p4c. The problem with extern_instances does not exist anymore indeed. Thanks for the tip. However, if you use that version of p4c, you need to replace I'll see if I can port everything to the newest versions of p4c, BMv2 and PI. In the meantime, you can use the p4c version that is referenced in |
I have already changed basic.p4 in my PR.for mark_to_drop(). Also, latest p4c does not compile the recirculate line of code. We can just drop the decrypted packet. Please see https://github.com/p4lang/behavioral-model/pull/834/files#diff-eabb89454dbff2d48bc9bf22126b35d3 However, I am not using latest p4c with macsec. I just ran the user-bootstrap.sh and whatever p4c it installed is being used. Thus, mark_to_drop() should use no args. I am also not sure why extern_intances does not need any edit. |
I see this error with
|
FYI, the warning message from p4c about recirculate/resubmit/clone calls that attempt to preserve metadata is just that: a warning message. It should not prevent a BMv2 JSON file from being created, if that is the only warning. It does mean that the metadata you want to be preserved might not be, when executing the resulting BMv2 JSON file. There might be bigger issues you have preventing things from working, of course. Just wanted to throw that bit of info in here. |
The warning says "recirculate with non-empty argument not supported". Not supported is not good. |
Agreed that not supported is not good. The actual fact is that the BMv2
JSON will definitely recirculate/resubmit/clone the packet. Whether or not
it preserves the specified metadata is the only part that might work, or
might not work. p4c will not tell you whether it will work, or will not
work -- the warning effectively means that part might not work.
Again, that might not be your biggest trouble. I am just giving you some
facts. Do with them what you will.
…On Wed, Dec 18, 2019 at 5:02 AM Hemant Singh ***@***.***> wrote:
The warning says "recirculate with non-empty argument not supported". Not
supported is not good.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AAA2YPMJT3KSHTRLADZFHCLQZINPHA5CNFSM4J2FB63KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHGBE7A#issuecomment-567022204>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA2YPJHRC6BVU3ZM56MJEDQZINPHANCNFSM4J2FB63A>
.
|
The
|
Oops, I saw that basic.json was not edited and the extern_instances was empty. I edited the file and now I get failure on the new json code.
|
That happens when you are trying to use an external function that does not exist. Did you copy the file |
I see, thanks. Now, I am totally operational - thanks for all the help! The only question I have is when I used the steps in README.md, I do not have to edit basic.json. This .json file already has extern_instances correct. |
I'm glad it works now. Apparently, with newer versions of p4c, editing of the compiled program is not necessary at all anymore. |
I see, thanks for the clarification on the basic.p4 file. One last thing. The crypto code is being added to latest p4c and I expect folks to test macsec using latest behavioral-model, p4c, and PI code. When you get a chance, please port the code to latest p4c, behavioral-model, and PI. Note, if you use crypto.cpp in my PR, the macsec code in simple_switch is already ported to latest behavioral-model. With latest p4c, recirculate in basic.p4 will not compile. I would consider dropping the decrypted packet. |
I'm already on it. I'll have a look at your crypto.cpp, thanks. |
@marcohae Minor edit to README.md. Please change this line from
to
Also, Please also fix this spelling: thanks. |
I've checked in an updated version that uses the newest p4c, BMv2 and PI. I also added a |
Thanks for developing this code an open-sourcing it.
https://github.com/hesingh/p4-ipv6-switch-ml/blob/master/CONTRIBUTING.md
Note, p4c uses a Apache 2.0 license.
Several folks have asked the P4 community about how to add a new extern to simple_switch and also asked for crypto extern. Seeing this repo we are adding your extern to the behavioral-model repo. Please see this PR: p4lang/behavioral-model#834
See this note from the Issue for what could help in README.md for help.
"I don't think it is necessary to give a working example that uses Mininet .
Instructions for running a single simple_switch or simple_switch_grpc process, with all command line options needed to use the new extern, should be enough. Let those who wish to use the new extern in a Mininet network figure out the changes to their own software outside of simple_switch."
Thanks.
The text was updated successfully, but these errors were encountered: