From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 0B1C43237 for ; Thu, 26 Jul 2018 12:02:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 03:02:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,404,1526367600"; d="scan'208";a="77981982" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.86]) ([10.237.220.86]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2018 03:02:24 -0700 To: Naga Suresh Somarowthu , dev@dpdk.org Cc: remy.horton@intel.com, reshma.pattan@intel.com References: <1532429671-1606-1-git-send-email-naga.sureshx.somarowthu@intel.com> <1532538360-8773-1-git-send-email-naga.sureshx.somarowthu@intel.com> <1532538360-8773-5-git-send-email-naga.sureshx.somarowthu@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Thu, 26 Jul 2018 11:02:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1532538360-8773-5-git-send-email-naga.sureshx.somarowthu@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6 4/4] test: add unit test for pdump library 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: Thu, 26 Jul 2018 10:02:26 -0000 On 25-Jul-18 6:06 PM, Naga Suresh Somarowthu wrote: > Unit test cases are added for pdump library. > Primary process will act as server, forks a child secondary process. > Secondary process acts as client. > Server will do pdump init to serve any pdump client requests. > Server will create a vdev, send/receive packets continuously > in a separate thread. > Client will create virtual rings to receive the packet dump. > Client sends pdump enable/disable requests using either port/device id. > Packet flow direction can be tx/rx/tx&rx. > In Server, appropriate pdump callbacks are triggered, > when packets are transmitted/received. > Pdump packet is copied to client rings. > > Signed-off-by: Naga Suresh Somarowthu > Reviewed-by: Reshma Pattan > --- > + > +#define QUEUE_ID 0 > +#define NUM_ITR 3 > + > +#ifdef RTE_EXEC_ENV_BSDAPP > +#define self "curproc" > +#define exe "file" > +#else > +#define self "self" > +#define exe "exe" > +#endif Why is all of this here? This looks like a copy paste from process.h > + > +/* sample test to send packets to the pdump client recursively */ > +void *send_pkts(void *port); > + > +/* Sample test to create setup for the pdump server tests */ > +int test_pdump_init(void); > + > +/* Sample test to teardown the pdump server setup */ > +int test_pdump_uninit(void); > + > +/* Sample test to run the pdump client tests */ > +int run_pdump_client_tests(void); > + > +/* Sample test to run the pdump server tests */ > +int run_pdump_server_tests(void); > + > +/* Sample test to run the pdump client and server tests based on > + * the process type > + */ > +int test_pdump(void); > + > +#endif /* _TEST_PDUMP_H_ */ > -- Thanks, Anatoly