Jason, This is perhaps a long shot but I noticed that your code does not include set_thread_priority_safe() for each thread - only the main thread. Perhaps adding this will help. I realize that this does not explain why you are successful when not using the same channel.
Also, I noticed that the example tx_rx_loopback_to_file.cpp does not implement this call on the Tx thread. The Rx occurs in the main thread though for this example. However, I see in "benchmark_rate.cpp" this call is implemented for both Tx and Rx threads. Rob On Thu, Aug 17, 2017 at 6:55 PM, Jason W Zheng via USRP-users < usrp-users@lists.ettus.com> wrote: > The last thread got a little long and kind of died, so I decided to make a > new thread summarizing all the findings thus far. > > > I'm running on an x310 across dual 10 Gigabit ethernet, outfitted with > twin basic tx rx daughbords. I'm running on UHD version 3.11.0. Ideally, I > would like two simultaneous transmit and receive streams, utilizing both > channels to transmit and receive. I don't want to have to use 2 x310s for 2 > receive and transmit streams > > > When I transmit and receive at the same time on the same channel, I get a > lot of U's printed out to console signaling underflows, no matter what the > rate. *HOWEVER, if I transmit and receive on separate channels, say > tx_streamer has stream_args at channel 1 and rx_streamer has stream_args at > channel 0, it works just fine.* > > > I've attached the source code of a complete but simple program that will > hopefully demonstrate my problem. In this program, two threads are created: > a transmit thread and a receive thread. The receive thread is constantly > receiving data to a buffer and overwriting that buffer with new data. The > transmit thread is constantly transmitting 0's from a prefilled buffer. > > > If anyone has an x310 running across 10Gbps ethernet, can you compile and > run my program to test if this problem occurs not just for me? > > > Here's what we have already tested: > > - I'm running on a server system rocking two 12 core intel xeon > processors. (https://ark.intel.com/products/91767/Intel-Xeon- > Processor-E5-2650-v4-30M-Cache-2_20-GHz). My network card is the > recommended x520 da2. Someone had previously suggested NUMA to be an issue, > but I don't think this is the case as the program works when we switch to > transmitting and receiving on separate channels. > > > - I've tested only transmitting and only receiving. We can transmit at > 200MS/s across both channels and we can receive at 200MS/s across both > channels, but we cannot transmit and receive from the same channel. This > suggests our network card is working properly and we can handle the high > rate. > > > - I've tried my program on UHD 3.10.2 and the problem still occurs > > > - I've tried setting the tx_metadata waiting 2 second before transmitting. > The problem still occurs. > > > - I've tried running the example program txrx_loopback_from_file and that > works for simultaneous receive and transmit, but I have no idea why. > > > From the last point, I'm lead to believe that I am somehow calling the uhd > API wrong, but I have no idea where the error is. Any help would be greatly > appreciated. > > > Thanks, > > Jason > > > > > > > > > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > >
_______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com