aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-07-30 14:08:23 -0700
committerDave Barach <openvpp@barachs.net>2019-07-31 13:44:34 +0000
commit7e5e62bbcb9f6cc7c5ec65a3188c39e493ad9874 (patch)
treeacfb31cc26ba64543fd88677b2e36d4cb97edefc /src
parenta47a5f20a3b5bb2191d40c47fc0a9976376680c8 (diff)
vcl: fix epoll chain validation
Type:fix Change-Id: I91dfe7e0ae2e632022fbf639ca16c93f570849de Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vcl/vppcom.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index d449fb91d44..0ee1784740a 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -2187,75 +2187,75 @@ check_mq:
}
static inline void
-vep_verify_epoll_chain (vcl_worker_t * wrk, u32 vep_idx)
+vep_verify_epoll_chain (vcl_worker_t * wrk, u32 vep_handle)
{
vcl_session_t *session;
vppcom_epoll_t *vep;
- u32 sid = vep_idx;
+ u32 sh = vep_handle;
if (VPPCOM_DEBUG <= 2)
return;
- session = vcl_session_get (wrk, vep_idx);
+ session = vcl_session_get_w_handle (wrk, vep_handle);
if (PREDICT_FALSE (!session))
{
- VDBG (0, "ERROR: Invalid vep_idx (%u)!", vep_idx);
+ VDBG (0, "ERROR: Invalid vep_sh (%u)!", vep_handle);
goto done;
}
if (PREDICT_FALSE (!session->is_vep))
{
- VDBG (0, "ERROR: vep_idx (%u) is not a vep!", vep_idx);
+ VDBG (0, "ERROR: vep_sh (%u) is not a vep!", vep_handle);
goto done;
}
vep = &session->vep;
- VDBG (0, "vep_idx (%u): Dumping epoll chain\n"
+ VDBG (0, "vep_sh (%u): Dumping epoll chain\n"
"{\n"
" is_vep = %u\n"
" is_vep_session = %u\n"
- " next_sid = 0x%x (%u)\n"
- "}\n", vep_idx, session->is_vep, session->is_vep_session,
+ " next_sh = 0x%x (%u)\n"
+ "}\n", vep_handle, session->is_vep, session->is_vep_session,
vep->next_sh, vep->next_sh);
- for (sid = vep->next_sh; sid != ~0; sid = vep->next_sh)
+ for (sh = vep->next_sh; sh != ~0; sh = vep->next_sh)
{
- session = vcl_session_get (wrk, sid);
+ session = vcl_session_get_w_handle (wrk, sh);
if (PREDICT_FALSE (!session))
{
- VDBG (0, "ERROR: Invalid sid (%u)!", sid);
+ VDBG (0, "ERROR: Invalid sh (%u)!", sh);
goto done;
}
if (PREDICT_FALSE (session->is_vep))
{
- VDBG (0, "ERROR: sid (%u) is a vep!", vep_idx);
+ VDBG (0, "ERROR: sh (%u) is a vep!", vep_handle);
}
else if (PREDICT_FALSE (!session->is_vep_session))
{
- VDBG (0, "ERROR: session (%u) is not a vep session!", sid);
+ VDBG (0, "ERROR: sh (%u) is not a vep session handle!", sh);
goto done;
}
vep = &session->vep;
- if (PREDICT_FALSE (vep->vep_sh != vep_idx))
- VDBG (0, "ERROR: session (%u) vep_idx (%u) != vep_idx (%u)!",
- sid, session->vep.vep_sh, vep_idx);
+ if (PREDICT_FALSE (vep->vep_sh != vep_handle))
+ VDBG (0, "ERROR: session (%u) vep_sh (%u) != vep_sh (%u)!",
+ sh, session->vep.vep_sh, vep_handle);
if (session->is_vep_session)
{
- VDBG (0, "vep_idx[%u]: sid 0x%x (%u)\n"
+ VDBG (0, "vep_sh[%u]: sh 0x%x (%u)\n"
"{\n"
- " next_sid = 0x%x (%u)\n"
- " prev_sid = 0x%x (%u)\n"
- " vep_idx = 0x%x (%u)\n"
+ " next_sh = 0x%x (%u)\n"
+ " prev_sh = 0x%x (%u)\n"
+ " vep_sh = 0x%x (%u)\n"
" ev.events = 0x%x\n"
" ev.data.u64 = 0x%llx\n"
" et_mask = 0x%x\n"
"}\n",
- vep_idx, sid, sid, vep->next_sh, vep->next_sh, vep->prev_sh,
+ vep_handle, sh, sh, vep->next_sh, vep->next_sh, vep->prev_sh,
vep->prev_sh, vep->vep_sh, vep->vep_sh, vep->ev.events,
vep->ev.data.u64, vep->et_mask);
}
}
done:
- VDBG (0, "vep_idx (%u): Dump complete!\n", vep_idx);
+ VDBG (0, "vep_sh (%u): Dump complete!\n", vep_handle);
}
int