-
Notifications
You must be signed in to change notification settings - Fork 390
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
OVS flows in L3Forwarding table conflict #3806
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Milestone
Comments
Wrong result trace:
Correct result trace:
|
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
May 18, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
May 18, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 19, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
May 20, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 24, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 24, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 25, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
May 25, 2022
…n in L3Forwarding Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by promoting the priority of the flow matching packets between local Pods to normal (200). In legacy flow 2, packets of Service connections with unknown destionation can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service connections sourced from local non-AntreaIPAM Pods or AntreaIPAM Pods and destined for external network are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
May 25, 2022
…n in L3Forwarding Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by promoting the priority of the flow matching packets between local Pods to normal (200). In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service or non-Service connections sourced from local non-AntreaIPAM Pods are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of Service or non-Service connections sourced from local AntreaIPAM Pods and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
May 25, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by promoting the priority of the flow matching packets between local Pods to normal (200). In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service or non-Service connections sourced from local non-AntreaIPAM Pods are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of Service or non-Service connections sourced from local AntreaIPAM Pods and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
May 25, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by promoting the priority of the flow matching packets between local Pods to normal (200). In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service or non-Service connections sourced from local non-AntreaIPAM Pods are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of Service or non-Service connections sourced from local AntreaIPAM Pods and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 26, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
May 27, 2022
Fix antrea-io#3806 Currently, in L3ForwardingTable, there are several flows like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections destined for external network. - Flow 3 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 4 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 5 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 3, and this leads the result of antrea-io#3806. In addtion, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 3, but they can be also matched by flow 2. To resolve above issue, one possible way is to add more priorities and rearrange the flows, but we don't have enough priorities. As a result, a new table L3ForwardingDefault is added. The new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,nw_dst=10.10.1.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=0 actions=resubmit(,L3ForwardingDefault) 3. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 4. table=L3ForwardingDefault, priority=210,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,resubmit(,EgressMark) 5. table=L3ForwardingDefault, priority=200,ct_mark=0x10/0x10,reg0=0x200/0x200 actions=mod_dl_dst:e6:d5:b1:dc:f3:1d,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 6. table=L3ForwardingDefault, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
Jun 6, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by promoting the priority of the flow matching packets between local Pods to normal (200). In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service or non-Service connections sourced from local non-AntreaIPAM Pods are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of Service or non-Service connections sourced from local AntreaIPAM Pods and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Jun 7, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by promoting the priority of the flow matching packets between local Pods to normal (200). In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of connections sourced from local Pods are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of connections sourced from local AntreaIPAM Pods (AntreaIPAM is enabled) and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Jun 8, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by raising the priority of the legacy flow 1 to normal (200). It is the new flow 1 now. In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service connections sourced from local Pods and destined for external Packets of connections sourced from local Pods and destined for external network are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of connections sourced from local AntreaIPAM Pods (AntreaIPAM is enabled) and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Jun 8, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by raising the priority of the legacy flow 1 to normal (200). It is the new flow 1 now. In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service connections sourced from local Pods and destined for unknown destination (external network) are matched by the new flow 5. Packets of connections sourced from local Pods and destined for external network are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of connections sourced from local AntreaIPAM Pods (AntreaIPAM is enabled) and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
gran-vmv
pushed a commit
to gran-vmv/antrea
that referenced
this issue
Jun 9, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by promoting the priority of the flow matching packets between local Pods to normal (200). In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service or non-Service connections sourced from local non-AntreaIPAM Pods are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of Service or non-Service connections sourced from local AntreaIPAM Pods and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
GraysonWu
pushed a commit
to GraysonWu/antrea
that referenced
this issue
Jun 9, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by raising the priority of the legacy flow 1 to normal (200). It is the new flow 1 now. In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service connections sourced from local Pods and destined for unknown destination (external network) are matched by the new flow 5. Packets of connections sourced from local Pods and destined for external network are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of connections sourced from local AntreaIPAM Pods (AntreaIPAM is enabled) and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
tnqn
pushed a commit
that referenced
this issue
Jun 9, 2022
…n in L3ForwardingTable (#3809) Fix #3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in #3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue #3806 is fixed by raising the priority of the legacy flow 1 to normal (200). It is the new flow 1 now. In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced from Antrea gateway are matched. Packets of connections sourced from local Pods and destined for external network are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of connections sourced from local AntreaIPAM Pods (AntreaIPAM is enabled) and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Jun 9, 2022
…n in L3ForwardingTable Fix antrea-io#3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in antrea-io#3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue antrea-io#3806 is fixed by raising the priority of the legacy flow 1 to normal (200). It is the new flow 1 now. In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service connections sourced from local Pods and destined for unknown destination (external network) are matched by the new flow 5. Packets of connections sourced from local Pods and destined for external network are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of connections sourced from local AntreaIPAM Pods (AntreaIPAM is enabled) and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
tnqn
pushed a commit
that referenced
this issue
Jun 16, 2022
…n in L3ForwardingTable (#3878) Fix #3806 Currently, when Egress and AntreaIPAM are enabled, there are several flows in L3ForwardingTable like the follows: ``` 1. table=L3Forwarding, priority=190,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x200/0x200,reg4=0/0x100000 actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg4=0x100000/0x100000 actions=resubmit(,L3DecTTL) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf actions=resubmit(,EgressMark) 5. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 6. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` - Flow 1 is used to forward the packets of non-Service connections between local Pods. - Flow 2 is used to forward the packets of Service connections sourced from local non-AntreaIPAM Pods and destined for external network Endpoint. - Flow 3 is used to forward the packets of Service connections sourced from local AntreaIPAM Pods and destined for external network Endpoint. - Flow 4 is used to forward the packets sourced from local Pods and destined for external network, and the flow is for Egress. - Flow 5 is used to forward the packets sourced from tunnel and destined for external network, and the flow is also for Egress. - Flow 6 is the default flow. `load:0x2->NXM_NX_REG0[4..7]` means `to Gateway`. For request packets sourced from a local Pod and destined for another local Pod, they are expected to be matched by flow 1, however, they can be matched by flow 4, and this leads the unexpected result in #3806. In addition, when Egress is enabled, if a local Pod accesses to a Service whose Endpoint is on external Network, the request packets are expected to be matched by flow 4, but they can be also matched by flow 2. To resolve above issues, the new flows are like the follows: ``` 1. table=L3Forwarding, priority=200,ip,reg0=0/0x200,reg8=0/0xfff,nw_dst=10.10.0.0/24 actions=resubmit(,L2ForwardingCalc) 2. table=L3Forwarding, priority=190,ct_mark=0x10/0x10,reg0=0x202/0x20f actions=mod_dl_dst:d2:35:24:7f:3a:f8,load:0x2->NXM_NX_REG0[4..7],resubmit(,L3DecTTL) 3. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x3/0xf,reg4=0/0x100000 actions=resubmit(,EgressMark) 4. table=L3Forwarding, priority=190,ct_state=-rpl+trk,ip,reg0=0x1/0xf actions=mod_dl_dst:d2:35:24:7f:3a:f8,resubmit(,EgressMark) 5. table=L3Forwarding, priority=0 actions=load:0x2->NXM_NX_REG0[4..7],resubmit(,L2ForwardingCalc) ``` Issue #3806 is fixed by raising the priority of the legacy flow 1 to normal (200). It is the new flow 1 now. In legacy flow 2, packets of Service connections with unknown destination can be either sourced from local Pods or Antrea gateway. In the new flow 2, only the packets of Service connections sourced Antrea gateway are matched. Packets of Service connections sourced from local Pods and destined for unknown destination (external network) are matched by the new flow 5. Packets of connections sourced from local Pods and destined for external network are matched by the new flow 3 (Egress is enabled) or the new flow 5 (Egress is disabled). Packets of connections sourced from local AntreaIPAM Pods (AntreaIPAM is enabled) and destined for external network are matched by the new flow 5. Other modifications: fix some stale comments. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
To Reproduce
Run ipv6-ds-e2e test. This issue should affect ipv4/ipv6/ds, but actually only ds will fail.
Expected
All cases passed.
Actual behavior
Ingress drop policy may not take effect on some Node for intra-Node traffic.
Versions:
Antrea>=1.6
Additional context
Caused by priority conflict. Below flows are used by Egress feature which enabled by default since Antrea 1.6, and they conflict with other priority=190 flows.
The text was updated successfully, but these errors were encountered: