aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/chdr_ctrl_xport.cpp
diff options
context:
space:
mode:
authorAlex Williams <alex.williams@ni.com>2019-08-05 21:08:44 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:36 -0800
commit0fc57b99b9163d919cc4a470b3065ab4cf1c947d (patch)
treec82d635e9d8f7d65aae3b5211392aa0029231583 /host/lib/rfnoc/chdr_ctrl_xport.cpp
parent88aac58651ed8f632137e39964b5dd580be6016a (diff)
downloaduhd-0fc57b99b9163d919cc4a470b3065ab4cf1c947d.tar.gz
uhd-0fc57b99b9163d919cc4a470b3065ab4cf1c947d.tar.bz2
uhd-0fc57b99b9163d919cc4a470b3065ab4cf1c947d.zip
rfnoc: Use link_stream_manager's mgmt_portal for all mgmt packets
Change data transports to use the mgmt_portal from the link_stream_manager. The initialization state of a device's EPIDs needs to be shared amongst all the SEP users. Otherwise, an RX transport may attempt to do a full reset of the SEP while TX is streaming (for example). TODO: The code contained here is not sufficient to handle multiple links that can access the same SEPs, as those would have different link_stream_managers, and thus, different mgmt_portal instances and views of the SEP state.
Diffstat (limited to 'host/lib/rfnoc/chdr_ctrl_xport.cpp')
-rw-r--r--host/lib/rfnoc/chdr_ctrl_xport.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/host/lib/rfnoc/chdr_ctrl_xport.cpp b/host/lib/rfnoc/chdr_ctrl_xport.cpp
index 72fe5bf7f..a6cfda0de 100644
--- a/host/lib/rfnoc/chdr_ctrl_xport.cpp
+++ b/host/lib/rfnoc/chdr_ctrl_xport.cpp
@@ -52,12 +52,8 @@ chdr_ctrl_xport::chdr_ctrl_xport(io_service::sptr io_srv,
link->release_recv_buff(std::move(buff));
};
- _ctrl_recv_if = io_srv->make_recv_client(recv_link,
- num_recv_frames,
- ctrl_recv_cb,
- send_link_if::sptr(),
- 0,
- release_cb);
+ _ctrl_recv_if = io_srv->make_recv_client(
+ recv_link, num_recv_frames, ctrl_recv_cb, send_link_if::sptr(), 0, release_cb);
uhd::transport::recv_callback_t mgmt_recv_cb = [this](frame_buff::uptr& buff,
recv_link_if* /*recv_link*/,
@@ -145,3 +141,11 @@ void chdr_ctrl_xport::release_recv_buff(frame_buff::uptr buff)
std::lock_guard<std::mutex> lock(_mutex);
_ctrl_recv_if->release_recv_buff(std::move(buff));
}
+
+/*!
+ * Get this xport's EPID
+ */
+sep_id_t chdr_ctrl_xport::get_epid() const
+{
+ return _my_epid;
+}