diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-06-02 19:12:54 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:59 -0800 |
commit | 039de2841b3e96421fe0b868b7c97825b2023a66 (patch) | |
tree | 308f92891d4d9238b4fca1c029923057498f9097 /mpm/python | |
parent | 365c57b356c5814ac647233efb4a099b05a8c8e9 (diff) | |
download | uhd-039de2841b3e96421fe0b868b7c97825b2023a66.tar.gz uhd-039de2841b3e96421fe0b868b7c97825b2023a66.tar.bz2 uhd-039de2841b3e96421fe0b868b7c97825b2023a66.zip |
mpm/mpmd: Allow SID increment; more fixes for multi-usrp operation
Diffstat (limited to 'mpm/python')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/n310.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/n310.py b/mpm/python/usrp_mpm/periph_manager/n310.py index f49b6d052..7b43aec38 100644 --- a/mpm/python/usrp_mpm/periph_manager/n310.py +++ b/mpm/python/usrp_mpm/periph_manager/n310.py @@ -149,12 +149,14 @@ class n310(PeriphManagerBase): for ifname, table in iteritems(self._eth_dispatchers): table.set_ipv4_addr(self._chdr_interfaces[ifname]['ip_addr']) - def _allocate_sid(self, sender_addr, port, sid, xbar_src_addr, xbar_src_port): + def _allocate_sid(self, sender_addr, port, sid, xbar_src_addr, xbar_src_port, new_ep): """ Get the MAC address of the sender and store it in the FPGA ARP table """ mac_addr = get_mac_addr(sender_addr) - new_ep = self._available_endpoints.pop(0) + if new_ep not in self._available_endpoints: + raise RuntimeError("no more sids yo") + self._available_endpoints.remove(new_ep) if mac_addr is not None: if sender_addr not in self.sid_endpoints: self.sid_endpoints.update({sender_addr: (new_ep,)}) |