- mb0 = rte_mbuf_from_vlib_buffer (b0);
- mb1 = rte_mbuf_from_vlib_buffer (b1);
- mb2 = rte_mbuf_from_vlib_buffer (b2);
- mb3 = rte_mbuf_from_vlib_buffer (b3);
-
- if (PREDICT_FALSE (or_flags & VLIB_BUFFER_RECYCLE))
- {
- dpdk_buffer_recycle (vm, node, b0, bi0, &mb0);
- dpdk_buffer_recycle (vm, node, b1, bi1, &mb1);
- dpdk_buffer_recycle (vm, node, b2, bi2, &mb2);
- dpdk_buffer_recycle (vm, node, b3, bi3, &mb3);
-
- /* dont enqueue packets if replication failed as they must
- be sent back to recycle */
- if (PREDICT_TRUE ((b0->flags & VLIB_BUFFER_REPL_FAIL) == 0))
- tx_vector[i++ % nb_tx_desc] = mb0;
- if (PREDICT_TRUE ((b1->flags & VLIB_BUFFER_REPL_FAIL) == 0))
- tx_vector[i++ % nb_tx_desc] = mb1;
- if (PREDICT_TRUE ((b2->flags & VLIB_BUFFER_REPL_FAIL) == 0))
- tx_vector[i++ % nb_tx_desc] = mb2;
- if (PREDICT_TRUE ((b3->flags & VLIB_BUFFER_REPL_FAIL) == 0))
- tx_vector[i++ % nb_tx_desc] = mb3;
- }
- else
+ if (PREDICT_FALSE ((xd->flags & DPDK_DEVICE_FLAG_TX_OFFLOAD) &&
+ (or_flags &
+ (VNET_BUFFER_F_OFFLOAD_TCP_CKSUM
+ | VNET_BUFFER_F_OFFLOAD_IP_CKSUM
+ | VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))))