aboutsummaryrefslogtreecommitdiffstats
path: root/mpm
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-12-01 16:14:11 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:58 -0800
commit87dbcd9f1a5b2b464c27af56c3a91ab00f66c441 (patch)
tree62ccd5be210d94862071aecda5ec3e667b036148 /mpm
parenta927a364c5b07387be3a849b74546b98ba84db84 (diff)
downloaduhd-87dbcd9f1a5b2b464c27af56c3a91ab00f66c441.tar.gz
uhd-87dbcd9f1a5b2b464c27af56c3a91ab00f66c441.tar.bz2
uhd-87dbcd9f1a5b2b464c27af56c3a91ab00f66c441.zip
mpmd: Refactor MPM transport architecture, use managers
This splits up the transport code in mpmd_impl across multiple classes to properly leverage the request_xport/commit_xport API in MPM. Different types of transport (UDP, liberio) use their own distinct classes, which are generated dynamically on request. This is a true refactoring despite the large amount of changes; there are no functional differences. Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com> Reviewed-By: Trung Tran <trung.tran@ettus.com> Reviewed-By: Ashish Chaudhari <ashish.chaudhari@ettus.com>
Diffstat (limited to 'mpm')
-rw-r--r--mpm/python/usrp_mpm/xports/xportmgr_udp.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/xports/xportmgr_udp.py b/mpm/python/usrp_mpm/xports/xportmgr_udp.py
index 0a7f19ffc..edd20a629 100644
--- a/mpm/python/usrp_mpm/xports/xportmgr_udp.py
+++ b/mpm/python/usrp_mpm/xports/xportmgr_udp.py
@@ -70,12 +70,19 @@ class XportMgrUDP(object):
After calling this, _chdr_ifaces and _eth_dispatchers are in sync.
"""
+ ifaces_to_remove = [
+ x for x in self._eth_dispatchers.keys()
+ if x not in self._chdr_ifaces
+ ]
+ for iface in ifaces_to_remove:
+ self._eth_dispatchers.pop(iface)
for iface in self._chdr_ifaces:
if iface not in self._eth_dispatchers:
self._eth_dispatchers[iface] = \
EthDispatcherTable(self.iface_config[iface]['label'])
- for ifname, table in iteritems(self._eth_dispatchers):
- table.set_ipv4_addr(self._chdr_ifaces[ifname]['ip_addr'])
+ self._eth_dispatchers[iface].set_ipv4_addr(
+ self._chdr_ifaces[iface]['ip_addr']
+ )
def init(self, args):
"""