diff mbox series

[ovs-dev] Execute the DPIF_OP_FLOW_PUT action after the slowpath packet is sent

Message ID 5eb89ed2.6b88.17b3342feb0.Coremail.liyang_12921@163.com
State Not Applicable
Headers show
Series [ovs-dev] Execute the DPIF_OP_FLOW_PUT action after the slowpath packet is sent | expand

Checks

Context Check Description
ovsrobot/apply-robot fail apply and check: fail

Commit Message

liyang_12921 Aug. 11, 2021, 3:30 a.m. UTC
We encountered a problem when using ovs to provide forwarding for vm. A process in the vm frequently uploads files to the NOS server, and the tcp sessons of uploading is often reset by NOS server. Through packet capture, we found that when the session is reset, the packets sent by the vm are always out of order, and reset packet is sent only when the ack packet of the three-way handshake is out of order. Note that the ack packet of the three-way handshake is the first packet of ct table with ct_state is -new.


We use skb_tracer to trace the sending order of packets in client host, then we find that after DPIF_OP_FLOW_PUT action and before the slow path packets were sent, some subsequent packets directly match the datapath flow and were sent.


After discovering the above problems, we made a simple change to the code,make DPIF_OP_FLOW_PUT action be executed after the slowpath packets were sent. The reset never happened again after this.


However, I am not sure whether this change will bring other problems. Who can help give an accurate assessment:
1) What was the reason for this design that execute the DPIF_OP_FLOW_PUT action first?
2) Whether this change will cause other problems?If not, can we merge this change into the master? In this way, the out-of-order packets can be effectively avoided.






             op->ukey = NULL;
@@ -1610,6 +1601,15 @@ handle_upcalls(struct udpif *udpif, struct upcall *upcalls,
             op->dop.execute.mtu = upcall->mru;
             op->dop.execute.skb_hash = upcall->skb_hash;
         }
+
+        if (should_install_flow(udpif, upcall)) {
+            struct udpif_key *ukey = upcall->ukey;
+
+            if (ukey_install(udpif, ukey)) {
+                upcall->ukey_persists = true;
+                put_op_init(&ops[n_ops++], ukey, DPIF_FP_CREATE);
+            }
+        }
     }


     /* Execute batch. */


| |
liyang_12921
|
|
liyang_12921@163.com
|
签名由网易邮箱大师定制
diff mbox series

Patch

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 05ff8cd72..63214def6 100755
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1586,15 +1586,6 @@  handle_upcalls(struct udpif *udpif, struct upcall *upcalls,
         const struct dp_packet *packet = upcall->packet;
         struct ukey_op *op;


-        if (should_install_flow(udpif, upcall)) {
-            struct udpif_key *ukey = upcall->ukey;
-
-            if (ukey_install(udpif, ukey)) {
-                upcall->ukey_persists = true;
-                put_op_init(&ops[n_ops++], ukey, DPIF_FP_CREATE);
-            }
-        }
-
         if (upcall->odp_actions.size) {
             op = &ops[n_ops++];