aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-08-05 01:00:19 -0700
committerNeale Ranns <nranns@cisco.com>2019-08-05 01:00:19 -0700
commit766849aa7539a80d6a5e906d13fdb7b3749b098e (patch)
tree4f266bb25a3b8e2b1321d4c9624077dc7ce953e9 /src
parent2fd3a04360f11698bcb54b9952ad0d1334e7a50a (diff)
QoS store config for the tap interfaceHEADmaster
Change-Id: I2afb963256321988cb15ea66418a6565532a6022 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/VppUplink.cpp10
-rw-r--r--src/test/VppManager_test.cpp20
2 files changed, 23 insertions, 7 deletions
diff --git a/src/VppUplink.cpp b/src/VppUplink.cpp
index fcaddf7..a14652b 100644
--- a/src/VppUplink.cpp
+++ b/src/VppUplink.cpp
@@ -24,7 +24,7 @@
#include <vom/bond_group_binding.hpp>
#include <vom/qos_mark.hpp>
#include <vom/qos_map.hpp>
-#include <vom/qos_record.hpp>
+#include <vom/qos_store.hpp>
#include "VppSpineProxy.hpp"
#include "VppUplink.hpp"
@@ -38,7 +38,7 @@ namespace VPP
/**
* THe DSCP and VLAN CoS value opflex wants for its control packets
*/
-const static u8 opflex_cp_dscp = 5;
+const static QoS::bits_t opflex_cp_dscp = 5;
static const std::string UPLINK_KEY = "__uplink__";
@@ -121,10 +121,10 @@ Uplink::configure_tap(const route::prefix_t &pfx)
VOM::OM::write(UPLINK_KEY, ipPunt);
/**
- * record the QoS bits for packets from the TAP
+ * store the QoS bits for packets from the TAP
*/
- QoS::record qr(itf, QoS::source_t::IP);
- OM::write(UPLINK_KEY, qr);
+ QoS::store qs(itf, QoS::source_t::IP, opflex_cp_dscp);
+ OM::write(UPLINK_KEY, qs);
}
void
diff --git a/src/test/VppManager_test.cpp b/src/test/VppManager_test.cpp
index 335eb5f..ea5f407 100644
--- a/src/test/VppManager_test.cpp
+++ b/src/test/VppManager_test.cpp
@@ -52,7 +52,7 @@
#include <vom/sub_interface.hpp>
#include <vom/qos_map.hpp>
#include <vom/qos_mark.hpp>
-#include <vom/qos_record.hpp>
+#include <vom/qos_store.hpp>
#include "VppManager.hpp"
#include "opflexagent/test/ModbFixture.h"
@@ -710,7 +710,23 @@ BOOST_FIXTURE_TEST_CASE(start, VppStitchedManagerFixture)
outputs[ii][jj] = 5;
}
}
- WAIT_FOR_MATCH(QoS::map(1, outputs));
+ QoS::map qem(1, outputs);
+ WAIT_FOR_MATCH(qem);
+ WAIT_FOR_MATCH(QoS::mark(v_sub, qem, QoS::source_t::IP));
+
+ /*
+ * complete the DHCP process and expect the TAP configs
+ */
+ do_dhcp();
+
+ host = boost::asio::ip::address::from_string("192.168.1.1");
+ route::prefix_t pfx(host, 24);
+ mac_address_t tap_mac("00:00:de:ad:be:ef");
+ interface *v_tap = new tap_interface("tap0",
+ interface::admin_state_t::UP,
+ pfx, tap_mac);
+ WAIT_FOR_MATCH(*v_tap);
+ WAIT_FOR_MATCH(QoS::store(*v_tap, QoS::source_t::IP, 5));
}
BOOST_FIXTURE_TEST_CASE(endpoint_group_add_del, VppStitchedManagerFixture)