VPP-1408: Fix bug that wrong tx fifo drop in buffer chains flow of dgram mode 72/14572/7
authorshubing guo <guo.shubing@zte.com.cn>
Thu, 30 Aug 2018 05:29:49 +0000 (13:29 +0800)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 31 Aug 2018 01:37:35 +0000 (01:37 +0000)
-- Not drop session dgram hdr when to drop processed udp message from tx fifo

Change-Id: Id5ce5780817041bca05011f7b9b53e97a6d78da4
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
src/vnet/session/session_node.c

index fcb3a3d..2c425ab 100644 (file)
@@ -307,7 +307,10 @@ session_tx_fifo_chain_tail (vlib_main_t * vm, session_tx_context_t * ctx,
 
              hdr->data_offset += n_bytes_read;
              if (hdr->data_offset == hdr->data_length)
-               svm_fifo_dequeue_drop (f, hdr->data_length);
+               {
+                 u32 offset = hdr->data_length + SESSION_CONN_HDR_LEN;
+                 svm_fifo_dequeue_drop (f, offset);
+               }
            }
          else
            n_bytes_read = svm_fifo_dequeue_nowait (ctx->s->server_tx_fifo,