-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add MPLS push module #590
base: master
Are you sure you want to change the base?
Add MPLS push module #590
Conversation
Codecov Report
@@ Coverage Diff @@
## master #590 +/- ##
==========================================
+ Coverage 67.29% 67.89% +0.59%
==========================================
Files 202 205 +3
Lines 12522 12555 +33
==========================================
+ Hits 8427 8524 +97
+ Misses 4095 4031 -64
Continue to review full report at Codecov.
|
So with this design you will have an instance of the MPLS Push module for every unique label to be pushed. Which, in some instances, might be 1000's of labels. Does this really scale well in BESS to have 1000's modules and therefore 1000's of connections between modules? |
pkt->prepend(4); | ||
eth = pkt->head_data<Ethernet *>(); | ||
eth->src_addr = src_addr; | ||
eth->dst_addr = dst_addr; |
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.
To the end of keeping the scope of this module narrow, might you just copy the original ethernet header here and change the ethertype? A sequence of SetMetadata
and EtherEncap
modules downstream of this module can take care of changing the addresses if needed.
Ethernet::Address src_addr = eth->src_addr; | ||
Ethernet::Address dst_addr = eth->dst_addr; | ||
|
||
pkt->prepend(4); |
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.
All code south of here should be guarded by a check that this call to Packet::prepend()
didn't fail.
Ethernet *eth = pkt->head_data<Ethernet *>(); | ||
|
||
Ethernet::Address src_addr = eth->src_addr; | ||
Ethernet::Address dst_addr = eth->dst_addr; |
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.
Doh, sorry. Ignore my comment below. I didn't notice these lines.
@nrdmao That's a great point. At that scale probably we would want:
(3) is what some existing modules do, such as At the moment, unfortunately, the per-packet metadata approach is not quite applicable in most cases. Existing classification modules ( |
Sorry, could you rebase the branch? Due to changes in #591 there are build errors in this PR... |
No description provided.