ovs_mutex_lock(&nonpmd_mempool_mutex);
}
+ dp_packet_batch_apply_cutlen(batch);
+
for (i = 0; i < batch->count; i++) {
int size = dp_packet_size(batch->packets[i]);
break;
}
- /* Cut the size so only the truncated size is copied. */
- size -= dp_packet_get_cutlen(batch->packets[i]);
- dp_packet_reset_cutlen(batch->packets[i]);
-
/* We have to do a copy for now */
memcpy(rte_pktmbuf_mtod(mbufs[newcnt], void *),
dp_packet_data(batch->packets[i]), size);
unsigned int temp_cnt = 0;
int cnt = batch->count;
+ dp_packet_batch_apply_cutlen(batch);
+
for (int i = 0; i < cnt; i++) {
int size = dp_packet_size(batch->packets[i]);
- size -= dp_packet_get_cutlen(batch->packets[i]);
- dp_packet_set_size(batch->packets[i], size);
-
if (OVS_UNLIKELY(size > dev->max_packet_len)) {
if (next_tx_idx != i) {
temp_cnt = i - next_tx_idx;