break;
}
- if (te == NULL) {
+ if (te == NULL || mbuf_dynfield == NULL) {
rte_errno = ENOENT;
return NULL;
}
{
struct mbuf_dynfield_elt *mbuf_dynfield;
- if (shm == NULL) {
- rte_errno = ENOENT;
- return -1;
- }
-
rte_mcfg_tailq_read_lock();
- mbuf_dynfield = __mbuf_dynfield_lookup(name);
+ if (shm == NULL && init_shared_mem() < 0)
+ mbuf_dynfield = NULL;
+ else
+ mbuf_dynfield = __mbuf_dynfield_lookup(name);
rte_mcfg_tailq_read_unlock();
- if (mbuf_dynfield == NULL) {
- rte_errno = ENOENT;
+ if (mbuf_dynfield == NULL)
return -1;
- }
if (params != NULL)
memcpy(params, &mbuf_dynfield->params, sizeof(*params));
{
struct mbuf_dynflag_elt *mbuf_dynflag;
- if (shm == NULL) {
- rte_errno = ENOENT;
- return -1;
- }
-
rte_mcfg_tailq_read_lock();
- mbuf_dynflag = __mbuf_dynflag_lookup(name);
+ if (shm == NULL && init_shared_mem() < 0)
+ mbuf_dynflag = NULL;
+ else
+ mbuf_dynflag = __mbuf_dynflag_lookup(name);
rte_mcfg_tailq_read_unlock();
- if (mbuf_dynflag == NULL) {
- rte_errno = ENOENT;
+ if (mbuf_dynflag == NULL)
return -1;
- }
if (params != NULL)
memcpy(params, &mbuf_dynflag->params, sizeof(*params));