Skip to content

Commit e1ac2bd

Browse files
authored
Merge pull request F-Stack#267 from zhanghaisen/issue261
fix for issue 261
2 parents c605f59 + 4e92d9b commit e1ac2bd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/ff_dpdk_if.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,12 @@ ff_dpdk_if_send(struct ff_dpdk_if_context *ctx, void *m,
13391339
}
13401340
}
13411341

1342+
if (prev != NULL) {
1343+
prev->next = cur;
1344+
}
1345+
head->nb_segs++;
1346+
1347+
prev = cur;
13421348
void *data = rte_pktmbuf_mtod(cur, void*);
13431349
int len = total > RTE_MBUF_DEFAULT_DATAROOM ? RTE_MBUF_DEFAULT_DATAROOM : total;
13441350
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,
13481354
return -1;
13491355
}
13501356

1351-
if (prev != NULL) {
1352-
prev->next = cur;
1353-
}
1354-
prev = cur;
13551357

13561358
cur->data_len = len;
13571359
off += len;
13581360
total -= len;
1359-
head->nb_segs++;
13601361
cur = NULL;
13611362
}
13621363

0 commit comments

Comments
 (0)