From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 512FE2BD5 for ; Tue, 17 Jul 2018 10:15:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2018 01:15:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,365,1526367600"; d="scan'208";a="240905743" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga005.jf.intel.com with ESMTP; 17 Jul 2018 01:15:54 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.124]) by IRSMSX153.ger.corp.intel.com ([169.254.9.210]) with mapi id 14.03.0319.002; Tue, 17 Jul 2018 09:15:53 +0100 From: "Pattan, Reshma" To: "Parthasarathy, JananeeX M" , "dev@dpdk.org" CC: "Horton, Remy" , "Chaitanya Babu, TalluriX" Thread-Topic: [PATCH v3] test: add sample functions for packet forwarding Thread-Index: AQHUHR45OR4kR/f7JUG8Cys0GMGqi6STEWuQ Date: Tue, 17 Jul 2018 08:15:53 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A373410@IRSMSX109.ger.corp.intel.com> References: <1531385584-24545-1-git-send-email-jananeex.m.parthasarathy@intel.com> <1531756833-947-1-git-send-email-jananeex.m.parthasarathy@intel.com> In-Reply-To: <1531756833-947-1-git-send-email-jananeex.m.parthasarathy@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] test: add sample functions for packet forwarding X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 08:15:56 -0000 Hi > -----Original Message----- > From: Parthasarathy, JananeeX M > Sent: Monday, July 16, 2018 5:01 PM > To: dev@dpdk.org > Cc: Horton, Remy ; Pattan, Reshma > ; Parthasarathy, JananeeX M > ; Chaitanya Babu, TalluriX > > Subject: [PATCH v3] test: add sample functions for packet forwarding >=20 > Add sample test functions for packet forwarding. > These can be used for unit test cases for LatencyStats and BitrateStats > libraries. >=20 > Signed-off-by: Chaitanya Babu Talluri > Reviewed-by: Reshma Pattan > --- > + */ > +/* Sample test to forward packets using virtual portids */ int > +test_packet_forward(void) > +{ > + struct rte_mbuf *pbuf[NUM_PACKETS]; > + > + mp =3D rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32, 0, > + RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id()); > + if (mp =3D=3D NULL) > + return -1; Instead of return -1 , please return TEST_FAILED, that seems to be the corr= ect way as autotest expects TEST_SUCESS or TEST_FAILED from the test result.=20 Rest of the code looks ok, I am done with the review. In next patch version= don't forget to add my Ack.=20 Acked-by: Reshma Pattan