Add bridge service#125
Merged
frisso merged 6 commits intopolycube-network:masterfrom Jun 6, 2019
Merged
Conversation
295b398 to
821c556
Compare
Contributor
mauriciovasquezbernal
left a comment
There was a problem hiding this comment.
Hello @gianlu33,
The code overall looks good to me, I some comments of things to be improved, just to summarize:
- trunk and access inside the ports are very similar to the stp case we already discussed, those objects are created automatically by the code and the user is not able to create nor delete them, additionally those objects should only exists when the port is configured in such mode, this will avoid all the checks of port mode in
PortsTrunkandPortsAccess. - there are some functions that are not used, they can be removed.
- remove this-> and unseful comments, add copyright headers.
66f157d to
2860c23
Compare
Contributor
mauriciovasquezbernal
left a comment
There was a problem hiding this comment.
Some minor details yet to fix, overall looks very good.
I'll try to do some tests in few hours/days.
06b95a7 to
7a55e89
Compare
mauriciovasquezbernal
approved these changes
May 23, 2019
Contributor
mauriciovasquezbernal
left a comment
There was a problem hiding this comment.
It looks very food to me, kudos on the work.
There are two small details that I would like to get improved.
- The
300constant is used some times in the code, this should be avoided as this is defined in the datamodel. - When the bridge is created this is possible that the code has to be compiled twice, the first one in the bridge constructor and the second one when setAgingTime. It would be nice to rework the code a little bit so it takes the correct value of the aging time from he beginning and and compiles just once.
7a55e89 to
77f7867
Compare
frisso
reviewed
May 24, 2019
frisso
reviewed
May 24, 2019
frisso
reviewed
May 24, 2019
frisso
reviewed
May 24, 2019
frisso
reviewed
May 24, 2019
frisso
reviewed
May 24, 2019
e71ced3 to
d0a56b0
Compare
d252f79 to
28539de
Compare
frisso
reviewed
May 28, 2019
frisso
reviewed
May 28, 2019
frisso
reviewed
May 28, 2019
28539de to
4aa8e85
Compare
4aa8e85 to
6aff862
Compare
f5d23f2 to
0995767
Compare
0995767 to
fcf2417
Compare
73e8ec5 to
7612729
Compare
Features: - The datapath code is regenerated automatically whenever stp is enabled or disabled, so it is not necessary to configure that parameter at the creation of the bridge. - For each port, there are one or more PortsStp instances according to the VLANs allowed for that port. - A Stp instance is created automatically, when the first PortStp instance for the same VLAN is created. - In the same way, a Stp instance is destroyed automatically, when the last PortsStp instance for the same VLAN is destroyed. - Since the management of Stp/PortsStp instances is done automatically, the user is not allowed to create/destroy manually those instances, but only to configure their parameters. - Containers Access/Trunk do not exist at the same time; if the port is configured in access mode the user can't configure trunk parameters and vice versa Signed-off-by: Gianluca Scopelliti <gianlu.1033@gmail.com>
2700bd1 to
71e8862
Compare
71e8862 to
ec9567e
Compare
ec9567e to
7b19d6b
Compare
These tests verify the correctness of the bridge. In each folder there are tests for each feature (connectivity, vlan, stp, vlan_and_stp). Signed-off-by: Gianluca Scopelliti <gianlu.1033@gmail.com>
7b19d6b to
9acc935
Compare
Add documentation for bridge, with three examples: - Connectivity - VLAN configuration - STP configuration Signed-off-by: Gianluca Scopelliti <gianlu.1033@gmail.com>
9acc935 to
f90cad6
Compare
frisso
approved these changes
Jun 6, 2019
Contributor
|
Really great, @gianlu33 (and also @mauriciovasquezbernal)! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
L2 bridge service, features: