diff options
author | Neale Ranns <nranns@cisco.com> | 2019-07-31 02:48:02 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-07-31 16:17:36 +0000 |
commit | 83832e7ced8be8b7de394415feaba70c32e3c38d (patch) | |
tree | b9269e9f5cff694fa39cc26b5c25cb81828e1435 /test/ext | |
parent | b504777e7f1c9728e65b874284b4dfd39359c8a8 (diff) |
qos: Store function
Type: feature
store: write a QoS value into the buffer meta-data
record: Extract a QoS value from a packet header and store it.
mark: Make a change to the content of a packet header by writing a stored
QoS value
Change-Id: I07d1e87dd1ca90d40ac1ae1774fee1b272cab83f
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/ext')
-rw-r--r-- | test/ext/vom_test.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ext/vom_test.cpp b/test/ext/vom_test.cpp index 6b6a1d7dab0..fa9ecdafe80 100644 --- a/test/ext/vom_test.cpp +++ b/test/ext/vom_test.cpp @@ -84,6 +84,8 @@ #include "vom/qos_map_cmds.hpp" #include "vom/qos_record.hpp" #include "vom/qos_record_cmds.hpp" +#include "vom/qos_store.hpp" +#include "vom/qos_store_cmds.hpp" using namespace boost; using namespace VOM; @@ -508,6 +510,14 @@ public: { rc = handle_derived<QoS::record_cmds::delete_cmd>(f_exp, f_act); } + else if (typeid(*f_exp) == typeid(QoS::store_cmds::create_cmd)) + { + rc = handle_derived<QoS::store_cmds::create_cmd>(f_exp, f_act); + } + else if (typeid(*f_exp) == typeid(QoS::store_cmds::delete_cmd)) + { + rc = handle_derived<QoS::store_cmds::delete_cmd>(f_exp, f_act); + } else if (typeid(*f_exp) == typeid(QoS::map_cmds::create_cmd)) { rc = handle_derived<QoS::map_cmds::create_cmd>(f_exp, f_act); @@ -2251,16 +2261,24 @@ BOOST_AUTO_TEST_CASE(test_qos) { ADD_EXPECT(QoS::record_cmds::create_cmd(hw_qr, hw_ifh.data(), QoS::source_t::IP)); TRY_CHECK_RC(OM::write(albert, *qr)); + QoS::store *qs = new QoS::store(itf, QoS::source_t::IP, 55); + HW::item<bool> hw_qs(true, rc_t::OK); + ADD_EXPECT(QoS::store_cmds::create_cmd(hw_qs, hw_ifh.data(), QoS::source_t::IP, 55)); + TRY_CHECK_RC(OM::write(albert, *qs)); + QoS::mark *qm = new QoS::mark(itf, qem, QoS::source_t::IP); HW::item<bool> hw_qm(true, rc_t::OK); ADD_EXPECT(QoS::mark_cmds::create_cmd(hw_qm, hw_ifh.data(), 1, QoS::source_t::IP)); TRY_CHECK_RC(OM::write(albert, *qm)); + STRICT_ORDER_OFF(); delete qr; delete qm; + delete qs; ADD_EXPECT(QoS::mark_cmds::delete_cmd(hw_qm, hw_ifh.data(), QoS::source_t::IP)); ADD_EXPECT(QoS::map_cmds::delete_cmd(hw_qem, 1)); ADD_EXPECT(QoS::record_cmds::delete_cmd(hw_qr, hw_ifh.data(), QoS::source_t::IP)); + ADD_EXPECT(QoS::store_cmds::delete_cmd(hw_qs, hw_ifh.data(), QoS::source_t::IP)); ADD_EXPECT(interface_cmds::state_change_cmd(hw_as_down, hw_ifh)); ADD_EXPECT(interface_cmds::af_packet_delete_cmd(hw_ifh, itf_name)); TRY_CHECK(OM::remove(albert)); |