sock: Add pointer to group from group_impl

This makes it possible to traverse from the group_impl to
the group. It hasn't been necessary so far but will be in an
upcoming change.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I2bf119461bfd5ac5c8a63a3f1f4560d32e695c75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7218
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Ben Walker 2021-03-30 13:47:18 -07:00 committed by Jim Harris
parent b77db23ef9
commit da831cf82a
2 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,7 @@ struct spdk_sock_group {
struct spdk_sock_group_impl {
struct spdk_net_impl *net_impl;
struct spdk_sock_group *group;
TAILQ_HEAD(, spdk_sock) socks;
STAILQ_ENTRY(spdk_sock_group_impl) link;
};

View File

@ -508,6 +508,7 @@ spdk_sock_group_create(void *ctx)
STAILQ_INSERT_TAIL(&group->group_impls, group_impl, link);
TAILQ_INIT(&group_impl->socks);
group_impl->net_impl = impl;
group_impl->group = group;
sock_len = sizeof(sock_opts);
spdk_sock_impl_get_opts(impl->name, &sock_opts, &sock_len);