-----Original Message----- > Date: Wed, 17 Jan 2018 10:18:46 -0800 > From: Yongseok Koh <ys...@mellanox.com> > To: wenzhuo...@intel.com, jingjing...@intel.com > CC: dev@dpdk.org, Yongseok Koh <ys...@mellanox.com> > Subject: [dpdk-dev] [PATCH v2] app/testpmd: make txonly mode generate > multiple flows > X-Mailer: git-send-email 2.11.0 > > Testpmd can generate multiple flows without taking much cost and this could > be a simple traffic generator for developer's quick tests. IP destination > address is varied.
Useful feature. > > Signed-off-by: Yongseok Koh <ys...@mellanox.com> > --- > > v2: > * Add detailed explanation in a comment. > > app/test-pmd/txonly.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c > index 1f08b6ed3..253cf2385 100644 > --- a/app/test-pmd/txonly.c > +++ b/app/test-pmd/txonly.c > @@ -44,7 +44,7 @@ > #define UDP_DST_PORT 1024 > > #define IP_SRC_ADDR ((192U << 24) | (168 << 16) | (0 << 8) | 1) > -#define IP_DST_ADDR ((192U << 24) | (168 << 16) | (0 << 8) | 2) > +#define IP_DST_ADDR ((192U << 24) | (168 << 16)) > > #define IP_DEFTTL 64 /* from RFC 1340. */ > #define IP_VERSION 0x40 > @@ -52,6 +52,7 @@ > #define IP_VHL_DEF (IP_VERSION | IP_HDRLEN) > > static struct ipv4_hdr pkt_ip_hdr; /**< IP header of transmitted packets. > */ > +static __thread uint8_t ip_var; /**< IP address variation */ Use RTE_DECLARE_PER_LCORE instead of __thread