diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2017-11-17 05:08:55 -0800 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-11-17 14:39:53 +0000 |
commit | 8ac4ce8547d84c2d581f572b4f51fd34dbf1b01f (patch) | |
tree | 98e93c8cd57b551dd229ecaca9d8c2bcf86025dc /src/vpp-api/vom/hw.cpp | |
parent | ddecfb3d9f5960b69d964f9e870a6ded78a52f1f (diff) |
VOM fixes and logger improvements
Change-Id: I5e3fa5e098a8ea26dbc3d3a1dc064e3507e33d8e
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/hw.cpp')
-rw-r--r-- | src/vpp-api/vom/hw.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/src/vpp-api/vom/hw.cpp b/src/vpp-api/vom/hw.cpp index fee0e869d27..4150d5f481f 100644 --- a/src/vpp-api/vom/hw.cpp +++ b/src/vpp-api/vom/hw.cpp @@ -127,9 +127,9 @@ HW::cmd_q::write() rc_t rc = rc_t::OK; /* - * The queue is enabled, Execute each command in the queue. - * If one execution fails, abort the rest - */ + * The queue is enabled, Execute each command in the queue. + * If one execution fails, abort the rest + */ auto it = m_queue.begin(); while (it != m_queue.end()) { @@ -139,41 +139,43 @@ HW::cmd_q::write() if (m_enabled) { /* - * before we issue the command we must move it to the pending - * store - * ince a async event can be recieved before the command - * completes - */ + * before we issue the command we must move it to the pending + * store + * ince a async event can be recieved before the command + * completes + */ m_pending[c.get()] = c; rc = c->issue(m_conn); if (rc_t::INPROGRESS == rc) { /* - * this command completes asynchronously - * leave the command in the pending store - */ + * this command completes asynchronously + * leave the command in the pending store + */ } else { /* - * the command completed, remove from the pending store - */ + * the command completed, remove from the pending store + */ m_pending.erase(c.get()); if (rc_t::OK == rc) { /* - * move to the next - */ + * move to the next + */ } else { /* - * barf out without issuing the rest - */ + * barf out without issuing the rest + */ + VOM_LOG(log_level_t::ERROR) << "Failed to execute: " + << c->to_string(); break; } } } else { /* - * The HW is disabled, so set each command as succeeded - */ + * The HW is disabled, so set each command as succeeded + */ c->succeeded(); } @@ -181,8 +183,8 @@ HW::cmd_q::write() } /* - * erase all objects in the queue - */ + * erase all objects in the queue + */ m_queue.erase(m_queue.begin(), m_queue.end()); return (rc); |