aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_impl.hpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-02 14:48:11 -0800
committerJosh Blum <josh@joshknows.com>2010-03-02 14:48:11 -0800
commit13bd67b4949a91df5e6696e708c935266b14c502 (patch)
tree40c9ebfd46636307c4537980b7ee116556e7ca17 /host/lib/usrp/usrp2/usrp2_impl.hpp
parent451067295399e357d73c9bfdeef5f2ad040e0243 (diff)
downloaduhd-13bd67b4949a91df5e6696e708c935266b14c502.tar.gz
uhd-13bd67b4949a91df5e6696e708c935266b14c502.tar.bz2
uhd-13bd67b4949a91df5e6696e708c935266b14c502.zip
The net common is too slow in usrp2 firmware to figure out if its vrt data.
Added a custom function to tell if a packet is vrt data, seems to be feeding fast enough at this rate... Fixed some buffer size calculation logic.
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.hpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 43f32c6e6..037aed477 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -108,7 +108,12 @@ private:
uhd::dict<uint32_t, size_t> _tx_stream_id_to_packet_seq;
uhd::dict<uint32_t, size_t> _rx_stream_id_to_packet_seq;
static const size_t _mtu = 1500; //FIXME we have no idea
- static const size_t _max_samples_per_packet = _mtu/sizeof(uint32_t);
+ static const size_t _max_samples_per_packet =
+ _mtu/sizeof(uint32_t) -
+ USRP2_HOST_RX_VRT_HEADER_WORDS32 -
+ USRP2_HOST_RX_VRT_TRAILER_WORDS32 -
+ ((2 + 14 + 20 + 8)/sizeof(uint32_t)) //size of headers (pad, eth, ip, udp)
+ ;
uint32_t _tmp_send_mem[_mtu/sizeof(uint32_t)];
uint32_t _tmp_recv_mem[_mtu/sizeof(uint32_t)];
uint32_t _spillover_mem[_mtu/sizeof(uint32_t)];