aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-08 13:01:49 -0700
committerJosh Blum <josh@joshknows.com>2010-07-08 13:01:49 -0700
commitda9d47011e02f2b18fccda00dbea0b9d9c0dc704 (patch)
tree1483f130c144acb8f89857401398b265c348cc8c /host/lib/transport
parentf6217746dce159085b9941a8fcc9f6407f7fdd5e (diff)
downloaduhd-da9d47011e02f2b18fccda00dbea0b9d9c0dc704.tar.gz
uhd-da9d47011e02f2b18fccda00dbea0b9d9c0dc704.tar.bz2
uhd-da9d47011e02f2b18fccda00dbea0b9d9c0dc704.zip
usrp2: added notes on multiple device network setup, improved warnings for buff size stuff
Diffstat (limited to 'host/lib/transport')
-rw-r--r--host/lib/transport/udp_zero_copy_asio.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/transport/udp_zero_copy_asio.cpp b/host/lib/transport/udp_zero_copy_asio.cpp
index 86ea275c1..e3f3ef5bf 100644
--- a/host/lib/transport/udp_zero_copy_asio.cpp
+++ b/host/lib/transport/udp_zero_copy_asio.cpp
@@ -155,17 +155,17 @@ template<typename Opt> static void resize_buff_helper(
else std::cout << boost::format(
"Current %s sock buff size: %d bytes"
) % name % actual_size << std::endl;
+ if (actual_size < target_size) std::cerr << boost::format(
+ "Warning:\n"
+ " The %s buffer is smaller than the requested size.\n"
+ " The minimum recommended buffer size is %d bytes.\n"
+ " See the USRP2 application notes on buffer resizing.\n"
+ ) % name % MIN_SOCK_BUFF_SIZE << std::endl;
}
//otherwise, ensure that the buffer is at least the minimum size
else if (udp_trans->get_buff_size<Opt>() < MIN_SOCK_BUFF_SIZE){
resize_buff_helper<Opt>(udp_trans, MIN_SOCK_BUFF_SIZE, name);
- if (udp_trans->get_buff_size<Opt>() < MIN_SOCK_BUFF_SIZE){
- std::cerr << boost::format(
- "Warning: the %s buffer size is smaller than the recommended size of %d bytes.\n"
- " See the USRP2 application notes on buffer resizing."
- ) % name % MIN_SOCK_BUFF_SIZE << std::endl;
- }
}
}