diff options
author | Marcus Müller <marcus.mueller@ettus.com> | 2016-01-14 12:31:29 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-09-27 09:03:13 -0700 |
commit | 9798ec540a77c74036766a132e23230ccd0148cc (patch) | |
tree | 576640e73b7d004ab062a8af20e17bc280b5db17 /host/lib/usrp/x300/x300_impl.hpp | |
parent | 4b6d3db7eb5bbf729f5e4f70d6c495717874285b (diff) | |
download | uhd-9798ec540a77c74036766a132e23230ccd0148cc.tar.gz uhd-9798ec540a77c74036766a132e23230ccd0148cc.tar.bz2 uhd-9798ec540a77c74036766a132e23230ccd0148cc.zip |
Correct maximum link rates for 1GE and 10GE
Diffstat (limited to 'host/lib/usrp/x300/x300_impl.hpp')
-rw-r--r-- | host/lib/usrp/x300/x300_impl.hpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index d491e2bc0..f7dde142e 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2013-2015 Ettus Research LLC +// Copyright 2013-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -61,8 +61,8 @@ static const size_t X300_PCIE_MSG_NUM_FRAMES = 64; static const size_t X300_PCIE_MAX_CHANNELS = 6; static const size_t X300_PCIE_MAX_MUXED_XPORTS = 32; -static const size_t X300_10GE_DATA_FRAME_MAX_SIZE = 8000; //bytes -static const size_t X300_1GE_DATA_FRAME_MAX_SIZE = 1472; //bytes +static const size_t X300_10GE_DATA_FRAME_MAX_SIZE = 8000; // CHDR packet size in bytes +static const size_t X300_1GE_DATA_FRAME_MAX_SIZE = 1472; // CHDR packet size in bytes static const size_t X300_ETH_MSG_FRAME_SIZE = uhd::transport::udp_simple::mtu; //bytes static const double X300_THREAD_BUFFER_TIMEOUT = 0.1; // Time in seconds @@ -72,8 +72,14 @@ static const size_t X300_ETH_DATA_NUM_FRAMES = 32; static const double X300_DEFAULT_SYSREF_RATE = 10e6; static const size_t X300_MAX_RATE_PCIE = 800000000; // bytes/s -static const size_t X300_MAX_RATE_10GIGE = 800000000; // bytes/s -static const size_t X300_MAX_RATE_1GIGE = 100000000; // bytes/s +static const size_t X300_MAX_RATE_10GIGE = (size_t)( // bytes/s + 10e9 / 8 * // wire speed multiplied by percentage of packets that is sample data + ( float(X300_10GE_DATA_FRAME_MAX_SIZE - uhd::usrp::DEVICE3_TX_MAX_HDR_LEN) / + float(X300_10GE_DATA_FRAME_MAX_SIZE + 8 /* UDP header */ + 20 /* Ethernet header length */ ))); +static const size_t X300_MAX_RATE_1GIGE = (size_t)( // bytes/s + 10e9 / 8 * // wire speed multiplied by percentage of packets that is sample data + ( float(X300_1GE_DATA_FRAME_MAX_SIZE - uhd::usrp::DEVICE3_TX_MAX_HDR_LEN) / + float(X300_1GE_DATA_FRAME_MAX_SIZE + 8 /* UDP header */ + 20 /* Ethernet header length */ ))); #define X300_RADIO_DEST_PREFIX_TX 0 |