From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v2] app/testpmd: make txonly mode generate multiple flows Date: Thu, 18 Jan 2018 19:25:12 +0530 Message-ID: <20180118135510.GA18814@jerin> References: <20171215211125.39177-1-yskoh@mellanox.com> <20180117181846.3565-1-yskoh@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: wenzhuo.lu@intel.com, jingjing.wu@intel.com, dev@dpdk.org To: Yongseok Koh Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0074.outbound.protection.outlook.com [104.47.41.74]) by dpdk.org (Postfix) with ESMTP id A48AD1B2E8 for ; Thu, 18 Jan 2018 14:55:46 +0100 (CET) Content-Disposition: inline In-Reply-To: <20180117181846.3565-1-yskoh@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Wed, 17 Jan 2018 10:18:46 -0800 > From: Yongseok Koh > To: wenzhuo.lu@intel.com, jingjing.wu@intel.com > CC: dev@dpdk.org, Yongseok Koh > 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 > --- > > 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