-
Notifications
You must be signed in to change notification settings - Fork 15
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
SDFAB-155 Allow forwarding of packet-outs like regular packets #262
Conversation
This could also help the following scenario if I understand correctly. Imaging in a 2x2, host on leaf1 trying to ping switch interface IP of leaf2. With this feature, ONOS could simply swap source and destination IP, set this flag, let the original routing logic on leaf2 push the MPLS label, and forward the packet back to leaf1. |
@charlesmcchan your understanding is correct |
Codecov Report
@@ Coverage Diff @@
## main #262 +/- ##
============================================
- Coverage 74.13% 74.12% -0.02%
- Complexity 273 360 +87
============================================
Files 18 31 +13
Lines 1875 2415 +540
Branches 153 211 +58
============================================
+ Hits 1390 1790 +400
- Misses 401 515 +114
- Partials 84 110 +26
Continue to review full report at Codecov.
|
src/main/java/org/stratumproject/fabric/tna/behaviour/FabricInterpreter.java
Outdated
Show resolved
Hide resolved
pad0_md.value = stringify(0, 1) | ||
# ether type | ||
ether_type_md = packet_out.metadata.add() | ||
ether_type_md.metadata_id = 4 | ||
ether_type_md.metadata_id = 5 |
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.
@abhilashendurthi will this require changes to the TV runner for fabric-tna? The packet-out metadata ID for ether_type
has changed from 4
to 5
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.
Yes, this will require me to change the metadata ID for padding
from 3
to 4
and metadata ID for ether_type
from 4
to 5
. Also for, do_forwarding
metadata with ID 3
, should the value be 0
in TV runner?
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.
Yes, in TV runner do_forwarding
should be 0
@pierventre @Yi-Tseng I think I have addressed all your comments, PTAL. |
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.
Looks good to me
src/main/java/org/stratumproject/fabric/tna/behaviour/FabricInterpreter.java
Outdated
Show resolved
Hide resolved
...in/java/org/stratumproject/fabric/tna/behaviour/pipeliner/ForwardingObjectiveTranslator.java
Show resolved
Hide resolved
is the TODO list updated ? |
I think so. Why do you ask? |
By default, all packet-outs are sent straight to the egress port passed as a controller packet-out metadata, bypassing the forwarding tables in the ingress pipe. With this change, the control plane can set a new packet-out metadata named
do_forwarding
to instruct the parser to forward packet-outs as regular packets.This is required to support Xn-based handover for the DT trial, where PFCP agent will send "incomplete" packet-outs for the base stations carrying "end-marker" packets. It will be up to the switch to "complete" packet-outs by selecting the right egress port, VLAN tag, setting MAC addresses, etc.
When handling
OutboundPacket
in ONOS, the pipeconf (interpreter) uses theOUTPUT
instruction with logical portTABLE
to enable forwarding. This is consistent with the OpenFlow behavior, from the spec:TODO:
do_forwarding=1