- return memif_interface_tx_inline (vm, node, frame, mif, MEMIF_RING_M2S,
- mq, ptd);
+ n_left = memif_interface_tx_inline (vm, node, from, mif, MEMIF_RING_M2S,
+ mq, ptd, n_left);
+
+ clib_spinlock_unlock_if_init (&mif->lockp);
+
+ if (n_left)
+ vlib_error_count (vm, node->node_index, MEMIF_TX_ERROR_NO_FREE_SLOTS,
+ n_left);
+
+ if ((mq->ring->flags & MEMIF_RING_FLAG_MASK_INT) == 0 && mq->int_fd > -1)
+ {
+ u64 b = 1;
+ int __clib_unused r = write (mq->int_fd, &b, sizeof (b));
+ mq->int_count++;
+ }
+
+ if ((mif->flags & MEMIF_IF_FLAG_ZERO_COPY) == 0)
+ vlib_buffer_free (vm, from, frame->n_vectors);
+ else if (n_left)
+ vlib_buffer_free (vm, from + frame->n_vectors - n_left, n_left);
+
+ return frame->n_vectors - n_left;