From dcd31bb2e56f97ed35ab2c95fd985bbbed830045 Mon Sep 17 00:00:00 2001 From: Ciro Nishiguchi Date: Fri, 9 Nov 2018 10:21:28 -0600 Subject: uhd: Add device arg to enable dual ethernet for tx UHD currently only uses a single ethernet link for tx data, even if the device is initialized with dual 10GbE links. Using both links when a DMA FIFO is present causes sequence errors due to DMA FIFO bandwidth limitations. This maintains the current default behavior but allows users to override it through a device arg "enable_tx_dual_eth". --- host/lib/usrp/x300/x300_impl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/x300/x300_impl.cpp') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 0b173beb3..d3eeeef10 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -1286,7 +1286,13 @@ uhd::both_xports_t x300_impl::make_transport( next_src_addr==0 ? x300::SRC_ADDR0 : x300::SRC_ADDR1; const uint32_t xbar_src_dst = conn.type==X300_IFACE_ETH0 ? x300::XB_DST_E0 : x300::XB_DST_E1; - if (xport_type != TX_DATA) next_src_addr = (next_src_addr + 1) % mb.eth_conns.size(); + + // Do not increment src addr for tx_data by default, using dual ethernet + // with the DMA FIFO causes sequence errors to DMA FIFO bandwidth + // limitations. + if (xport_type != TX_DATA || mb.args.get_enable_tx_dual_eth()) { + next_src_addr = (next_src_addr + 1) % mb.eth_conns.size(); + } xports.send_sid = this->allocate_sid(mb, address, xbar_src_addr, xbar_src_dst); xports.recv_sid = xports.send_sid.reversed(); -- cgit v1.2.3