Merge pull request #267 from zhanghaisen/issue261

fix for issue 261
This commit is contained in:
johnjiang 2018-08-20 16:35:53 +08:00 committed by GitHub
commit e1ac2bde78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -1339,6 +1339,12 @@ ff_dpdk_if_send(struct ff_dpdk_if_context *ctx, void *m,
}
}
if (prev != NULL) {
prev->next = cur;
}
head->nb_segs++;
prev = cur;
void *data = rte_pktmbuf_mtod(cur, void*);
int len = total > RTE_MBUF_DEFAULT_DATAROOM ? RTE_MBUF_DEFAULT_DATAROOM : total;
int ret = ff_mbuf_copydata(m, data, off, len);
@ -1348,15 +1354,10 @@ ff_dpdk_if_send(struct ff_dpdk_if_context *ctx, void *m,
return -1;
}
if (prev != NULL) {
prev->next = cur;
}
prev = cur;
cur->data_len = len;
off += len;
total -= len;
head->nb_segs++;
cur = NULL;
}