aboutsummaryrefslogtreecommitdiffstats
path: root/app/test-pmd/txonly.c
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-12-08 14:07:29 +0100
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-12-12 15:41:56 +0100
commit3d9b72106bd664b1267533e7278ff817f942e3c6 (patch)
tree52a6964f40e029d55d73bc18208971eff2297891 /app/test-pmd/txonly.c
parenta83862b166241910d0474f801cb2e6afa4c6875b (diff)
Imported Upstream version 16.11
Change-Id: I1944c65ddc88a9ad70f8c0eb6731552b84fbcb77 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'app/test-pmd/txonly.c')
-rw-r--r--app/test-pmd/txonly.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 11fd681d..8513a062 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -56,7 +56,6 @@
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
-#include <rte_ring.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
@@ -223,6 +222,14 @@ pkt_burst_transmit(struct fwd_stream *fs)
return;
break;
}
+
+ /*
+ * Using raw alloc is good to improve performance,
+ * but some consumers may use the headroom and so
+ * decrement data_off. We need to make sure it is
+ * reset to default value.
+ */
+ rte_pktmbuf_reset_headroom(pkt);
pkt->data_len = tx_pkt_seg_lengths[0];
pkt_seg = pkt;
if (tx_pkt_split == TX_PKT_SPLIT_RND)