[dpdk-dev] [PATCH v6 4/4] test: add unit test for pdump library
Burakov, Anatoly
anatoly.burakov at intel.com
Thu Jul 26 12:02:23 CEST 2018
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 <naga.sureshx.somarowthu at intel.com>
> Reviewed-by: Reshma Pattan <reshma.pattan at intel.com>
> ---
<snip>
> +
> +#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
More information about the dev
mailing list