From 0fc57b99b9163d919cc4a470b3065ab4cf1c947d Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Mon, 5 Aug 2019 21:08:44 -0700 Subject: 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. --- host/lib/rfnoc/link_stream_manager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'host/lib/rfnoc/link_stream_manager.cpp') diff --git a/host/lib/rfnoc/link_stream_manager.cpp b/host/lib/rfnoc/link_stream_manager.cpp index 6855162de..b0e864347 100644 --- a/host/lib/rfnoc/link_stream_manager.cpp +++ b/host/lib/rfnoc/link_stream_manager.cpp @@ -66,10 +66,8 @@ public: _ctrl_xport = _mb_iface.make_ctrl_transport(_my_device_id, _my_mgmt_ctrl_epid); // Create management portal using one of the child transports - _mgmt_portal = mgmt_portal::make(*_ctrl_xport, - _pkt_factory, - sep_addr_t(_my_device_id, SEP_INST_MGMT_CTRL), - _my_mgmt_ctrl_epid); + _mgmt_portal = mgmt_portal::make( + *_ctrl_xport, _pkt_factory, sep_addr_t(_my_device_id, SEP_INST_MGMT_CTRL)); } virtual ~link_stream_manager_impl() @@ -235,7 +233,8 @@ public: sep_id_t src_epid = _epid_alloc->allocate_epid(sw_epid_addr); _allocated_epids.insert(src_epid); - return _mb_iface.make_tx_data_transport({sw_epid_addr, dst_addr}, + return _mb_iface.make_tx_data_transport(*_mgmt_portal, + {sw_epid_addr, dst_addr}, {src_epid, dst_epid}, pyld_buff_fmt, mdata_buff_fmt, @@ -263,7 +262,8 @@ public: sep_id_t dst_epid = _epid_alloc->allocate_epid(sw_epid_addr); _allocated_epids.insert(dst_epid); - return _mb_iface.make_rx_data_transport({src_addr, sw_epid_addr}, + return _mb_iface.make_rx_data_transport(*_mgmt_portal, + {src_addr, sw_epid_addr}, {src_epid, dst_epid}, pyld_buff_fmt, mdata_buff_fmt, -- cgit v1.2.3