-
Notifications
You must be signed in to change notification settings - Fork 357
Add crypto extern to behavioral-model #834
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
base: main
Are you sure you want to change the base?
Changes from 21 commits
0f3bfe2
e9e1785
2847992
02c01d5
4e9d5be
fc17434
7d5a5a9
30f2879
353b462
84a43b5
fb7b8f3
e7d89e7
11f02c9
19656e2
e1fe58c
a3c273a
d32443a
9ff1f4d
c357ef5
1dc5f2c
f031ac7
3ca057f
f187058
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| crypto_SOURCES = crypto.cpp | ||
| crypto_LDADD = -lcrypto | ||
|
|
||
| CPPFLAGS += -I../../ -fPIC -shared | ||
|
|
||
| libexterncrypto.so : $(crypto_SOURCES) | ||
| g++ $(CPPFLAGS) $(crypto_SOURCES) -o libexterncrypto.so $(crypto_LDADD) | ||
|
|
||
| clean: | ||
| rm -rf libexterncrypto.so | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||||
| # ADD CRYPTO EXTERN to SIMPLE_SWITCH | ||||||
|
||||||
| # ADD CRYPTO EXTERN to SIMPLE_SWITCH | |
| # Add macsec extern to simple_switch |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not accurate. You should instead include the following instructions:
- configure bmv2 with the
--enable-modulesflag so that extern definitions can be provided at runtime - build the macsec extern as a shared library by running
makeinside this directory - when starting
simple_switch, load the shared library with--load-modules libexterncrypto.so
Please also make sure that these instructions work properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a --enable-modules as an arg to simple_switch. How do I configure it then?
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend copy-pasting the P4 extern type definition here since it's only a few lines, in case the link becomes broken in the future.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, please provide the command-line as part of this README, I think it's valuable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this extern is a bit complicated, I think we should have a simple C++ test and a
make checktarget in this Makefile to make sure that the extern definition is not broken and that encryption / decryption work properly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me think about this one and get back.