From c72bc56ba6d5b0457f03967a8f8d8e5602fdf14d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 7 Jul 2010 23:48:09 -0700 Subject: usrp2: moved common defined for udp mtu and implemented change. The uhp mtu is now defined in uhd_simple.hpp. The fw common code does not need to know this information. Fixed a calculation bug in the usrp2 impl code for max samples. --- host/lib/usrp/usrp2/usrp2_impl.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'host/lib/usrp/usrp2/usrp2_impl.hpp') diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index 42630a3e4..186516447 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -32,6 +32,7 @@ #include #include #include +#include //mtu #include #include @@ -106,15 +107,14 @@ public: private: uhd::otw_type_t _rx_otw_type, _tx_otw_type; - static const size_t _max_rx_bytes_per_packet = - USRP2_UDP_BYTES - - USRP2_HOST_RX_VRT_HEADER_WORDS32*sizeof(boost::uint32_t) - - USRP2_HOST_RX_VRT_TRAILER_WORDS32*sizeof(boost::uint32_t) + static const size_t _max_rx_bytes_per_packet = uhd::transport::udp_simple::mtu + - uhd::transport::vrt::max_if_hdr_words32*sizeof(boost::uint32_t) + - sizeof(uhd::transport::vrt::if_packet_info_t().tlr) //forced to have trailer + + sizeof(uhd::transport::vrt::if_packet_info_t().cid) //no class id ever used ; - static const size_t _max_tx_bytes_per_packet = - USRP2_UDP_BYTES - - uhd::transport::vrt::max_if_hdr_words32*sizeof(boost::uint32_t) - - sizeof(uhd::transport::vrt::if_packet_info_t().cid) //no class id ever used + static const size_t _max_tx_bytes_per_packet = uhd::transport::udp_simple::mtu + - uhd::transport::vrt::max_if_hdr_words32*sizeof(boost::uint32_t) + + sizeof(uhd::transport::vrt::if_packet_info_t().cid) //no class id ever used ; }; -- cgit v1.2.3