aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorPaul David <paul.david@ettus.com>2016-05-09 10:16:08 -0700
committerMartin Braun <martin.braun@ettus.com>2016-05-13 11:52:35 -0700
commit905acdd7b3b96381d0de2da2c40a2014510b31cb (patch)
treeeb448ab76656e88308164107de57b1ea52da0d95 /host/lib
parent07eaf13365e18c4a2e1b98d82ca7e0ed33b219fe (diff)
downloaduhd-905acdd7b3b96381d0de2da2c40a2014510b31cb.tar.gz
uhd-905acdd7b3b96381d0de2da2c40a2014510b31cb.tar.bz2
uhd-905acdd7b3b96381d0de2da2c40a2014510b31cb.zip
x300: Fixed false link capacity warning and cleaned up some code
- Fixed an issue where 10GE on the HGS image presented a false warning for the link capacity - Removed some unnecessary variables after cleanup
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp16
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp2
2 files changed, 7 insertions, 11 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 399d640c3..c3ebcd5eb 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -712,10 +712,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
////////////////////////////////////////////////////////////////////
// determine routing based on address match
////////////////////////////////////////////////////////////////////
- mb.router_dst_here = X300_XB_DST_E0; //some default if eeprom not match
- if (mb.xport_path == "nirio") {
- mb.router_dst_here = X300_XB_DST_PCI;
- } else {
+ if (mb.xport_path != "nirio") {
// Discover ethernet interfaces
mb.discover_eth(mb_eeprom, eth_addrs);
}
@@ -1242,7 +1239,6 @@ x300_impl::both_xports_t x300_impl::make_transport(
config.router_addr_there = X300_DEVICE_THERE;
config.dst_prefix = prefix;
config.router_dst_there = destination;
- config.router_dst_here = mb.router_dst_here;
// Choose the endpoint based on the destination
size_t endpoint = 0;
@@ -1305,13 +1301,15 @@ x300_impl::both_xports_t x300_impl::make_transport(
fs_path mboard_path = fs_path("/mboards/"+boost::lexical_cast<std::string>(mb_index) / "link_max_rate");
if (mb.loaded_fpga_image.substr(0,2) == "HG") {
- if (mb.router_dst_here == X300_XB_DST_E0) {
+ size_t max_link_rate = 0;
+ if (config.iface_index == X300_IFACE_ETH0) {
eth_data_rec_frame_size = X300_1GE_DATA_FRAME_MAX_SIZE;
- _tree->access<double>(mboard_path).set(X300_MAX_RATE_1GIGE);
- } else if (mb.router_dst_here == X300_XB_DST_E1) {
+ max_link_rate += X300_MAX_RATE_1GIGE;
+ } else if (config.iface_index == X300_IFACE_ETH1) {
eth_data_rec_frame_size = X300_10GE_DATA_FRAME_MAX_SIZE;
- _tree->access<double>(mboard_path).set(X300_MAX_RATE_10GIGE);
+ max_link_rate += X300_MAX_RATE_10GIGE;
}
+ _tree->access<double>(mboard_path).set(max_link_rate);
} else if (mb.loaded_fpga_image.substr(0,2) == "XG") {
eth_data_rec_frame_size = X300_10GE_DATA_FRAME_MAX_SIZE;
size_t max_link_rate = X300_MAX_RATE_10GIGE;
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index f7e33ec70..b5bbbe136 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -227,7 +227,6 @@ private:
bool initialization_done;
uhd::task::sptr claimer_task;
std::string xport_path;
- int router_dst_here;
std::vector<x300_eth_conn_t> eth_conns;
@@ -312,7 +311,6 @@ private:
boost::uint8_t router_addr_there;
boost::uint8_t dst_prefix; //2bits
boost::uint8_t router_dst_there;
- boost::uint8_t router_dst_here;
x300_eth_iface_t iface_index;
};
boost::uint32_t allocate_sid(mboard_members_t &mb, const sid_config_t &config);