[dpdk-dev] [PATCH v2] pdump: change to use generic multi-process channel

Pattan, Reshma reshma.pattan at intel.com
Thu Apr 5 11:45:37 CEST 2018


Hi

> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan at intel.com>
> ---
> Note this patch needs this patch set:
> http://dpdk.org/dev/patchwork/patch/36814/
> v2:
>   - Update doc for deprecation of API, rte_pdump_set_socket_dir,
>     and API change for rte_pdump_init.
>   - Add notice for known incompatibility issue in doc.
>  app/pdump/main.c                       |   6 +-
>  doc/guides/rel_notes/deprecation.rst   |   4 +
>  doc/guides/rel_notes/release_18_05.rst |   7 +
>  lib/librte_pdump/Makefile              |   3 +-
>  lib/librte_pdump/rte_pdump.c           | 423 +++++----------------------------
>  lib/librte_pdump/rte_pdump.h           |   1 +
>  6 files changed, 84 insertions(+), 360 deletions(-)

>diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
> +
> 


> +
> +	/* recv client requests */
> +	if (mp_msg->len_param != sizeof(*cli_req)) {
> +		RTE_LOG(ERR, PDUMP, "failed to recv from client\n");
> +		resp->err_value = EINVAL;

	resp->err_value = -EINVAL

> -	/* save the socket in local configuration */
> -	pdump_socket_fd = socket_fd;
> +	snprintf(mp_resp.name, RTE_MP_MAX_NAME_LEN, PDUMP_MP);
> +	mp_resp.len_param = sizeof(*resp);
> +	mp_resp.num_fds = 0;
> +	if (rte_mp_reply(&mp_resp, peer) < 0)
> +		RTE_LOG(ERR, PDUMP, "failed to send to client:%s, %s:%d\n",
> +			strerror(rte_errno), __func__, __LINE__);
> 

If failed to send the reply should'nt we return -1? 

>  	return 0;
>  }
> 

>  int
> -rte_pdump_set_socket_dir(const char *path, enum rte_pdump_socktype
> type)
> +rte_pdump_set_socket_dir(const char *path __rte_unused,
> +			 enum rte_pdump_socktype type __rte_unused)
>  {

What about enum rte_pdump_socktype in header file? When to delete them?

We need to update doxygen comments in header file for rte_pdump_init and rte_pdump_uninit()? What do you say.

Thanks,
Reshma


More information about the dev mailing list