X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftxonly.c;h=e996f35ad0fab929c4294e5f180820d324432a6e;hb=938a184a1870bcc139b49a284ae599457e8fb8ce;hp=d2736b793ce551dbc7995d6867d393189664356d;hpb=f03723017a2a5ea421df821eb0ff9a0bfcacff4f;p=dpdk.git diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index d2736b793c..e996f35ad0 100644 --- a/app/test-pmd/txonly.c +++ b/app/test-pmd/txonly.c @@ -68,6 +68,7 @@ #include #include #include +#include #include "testpmd.h" @@ -222,6 +223,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)