devices: vhost: fix data offset on input
[vpp.git] / src / vnet / devices / virtio / vhost_user_input.c
index ef35d23..1c3e180 100644 (file)
@@ -426,7 +426,7 @@ vhost_user_if_input (vlib_main_t * vm,
 
   /*
    * For small packets (<2kB), we will not need more than one vlib buffer
-   * per packet. In case packets are bigger, we will just yeld at some point
+   * per packet. In case packets are bigger, we will just yield at some point
    * in the loop and come back later. This is not an issue as for big packet,
    * processing cost really comes from the memory copy.
    * The assumption is that big packets will fit in 40 buffers.
@@ -559,17 +559,7 @@ vhost_user_if_input (vlib_main_t * vm,
            }
        }
 
-      if (PREDICT_TRUE (vui->is_any_layout) ||
-         (!(desc_table[desc_current].flags & VIRTQ_DESC_F_NEXT)))
-       {
-         /* ANYLAYOUT or single buffer */
-         desc_data_offset = vui->virtio_net_hdr_sz;
-       }
-      else
-       {
-         /* CSR case without ANYLAYOUT, skip 1st buffer */
-         desc_data_offset = desc_table[desc_current].len;
-       }
+      desc_data_offset = vui->virtio_net_hdr_sz;
 
       if (enable_csum)
        {