app/testpmd: move header generation outside txonly loop