net/sock: allow net_implementation to not create a socket group
A net implementation should be allowed to not create a socket group. It would basically mean that it is not participating in polling at all. This came up during VPP integration. To enable using both types of sockets, all types are polled within socket group. There is possibility of VPP not being initalized at all (VPP process not running or failing connecting). This would result in hard requirement of VPP always running when its support is compiled into SPDK. Handling NULL here allows VPP to opt-out of this polling. Change-Id: Id3489eaba858ee64e8e8a924a6836720e84d9ad0 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/403699 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
0752574441
commit
b18e10dd22
@ -740,10 +740,11 @@ spdk_sock_group_create(void)
|
||||
|
||||
STAILQ_FOREACH_FROM(impl, &g_net_impls, link) {
|
||||
group_impl = impl->group_impl_create();
|
||||
assert(group_impl != NULL);
|
||||
STAILQ_INSERT_TAIL(&group->group_impls, group_impl, link);
|
||||
TAILQ_INIT(&group_impl->socks);
|
||||
group_impl->net_impl = impl;
|
||||
if (group_impl != NULL) {
|
||||
STAILQ_INSERT_TAIL(&group->group_impls, group_impl, link);
|
||||
TAILQ_INIT(&group_impl->socks);
|
||||
group_impl->net_impl = impl;
|
||||
}
|
||||
}
|
||||
|
||||
return group;
|
||||
|
Loading…
x
Reference in New Issue
Block a user