> -----Original Message-----
> From: dev <dev-boun...@dpdk.org> On Behalf Of Chenbo Xia
> Sent: Friday, December 18, 2020 3:39 PM
> To: dev@dpdk.org; tho...@monjalon.net; david.march...@redhat.com
> Cc: step...@networkplumber.org; Liang, Cunming
> <cunming.li...@intel.com>; Lu, Xiuchun <xiuchun...@intel.com>; Li, Miao
> <miao...@intel.com>; Wu, Jingjing <jingjing...@intel.com>
> Subject: [dpdk-dev] [PATCH 2/9] vfio_user: implement lifecycle related APIs
>
> This patch implements three lifecycle related APIs for vfio-user server, which
> are rte_vfio_user_register(), rte_vfio_user_unregister() and
> rte_vfio_user_start(). Socket an device management is implemented along
> with the API introduction.
>
> Signed-off-by: Chenbo Xia <chenbo....@intel.com>
> Signed-off-by: Xiuchun Lu <xiuchun...@intel.com>
> ---
> lib/librte_vfio_user/meson.build | 3 +-
> lib/librte_vfio_user/rte_vfio_user.h | 51 ++
> lib/librte_vfio_user/version.map | 6 +
> lib/librte_vfio_user/vfio_user_base.h | 4 +
> lib/librte_vfio_user/vfio_user_server.c | 690 ++++++++++++++++++++++++
> lib/librte_vfio_user/vfio_user_server.h | 55 ++
> 6 files changed, 808 insertions(+), 1 deletion(-) create mode 100644
> lib/librte_vfio_user/rte_vfio_user.h
> create mode 100644 lib/librte_vfio_user/vfio_user_server.c
> create mode 100644 lib/librte_vfio_user/vfio_user_server.h
>
<...>
> +static struct vfio_user_server_socket * find_vfio_user_socket(const
1. How about vfio_user_find_socket which is consistent with other function name?
2. According to the coding style, I think it's better to use such format:
static struct vfio_user_server_socket *
vfio_user_find_socket() {
}
And please also check all other functions.
> +char *sock_addr) {
> + uint32_t i;
> +
> + if (sock_addr == NULL)
> + return NULL;
> +
> + for (i = 0; i < vfio_ep_sock.sock_num; i++) {
> + struct vfio_user_server_socket *s = vfio_ep_sock.sock[i];
> +
> + if (!strcmp(s->sock.sock_addr, sock_addr))
> + return s;
> + }
> +
> + return NULL;
> +}
> +
<...>
> --
> 2.17.1