From a3cbdf481b30eca98dad24735d8e52ed18d3c7db Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 14 Dec 2017 12:39:34 -0800 Subject: mpm: xports: Amend protocol for request/commit xport, add allocation Reviewed-by: Trung Tran --- mpm/python/usrp_mpm/periph_manager/base.py | 11 +++++++++++ mpm/python/usrp_mpm/xports/xportmgr_udp.py | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'mpm') diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py index d75d56aa1..4e9ccda1f 100644 --- a/mpm/python/usrp_mpm/periph_manager/base.py +++ b/mpm/python/usrp_mpm/periph_manager/base.py @@ -645,6 +645,17 @@ class PeriphManagerBase(object): from device to UHD) - tx_mtu: In bytes, the max size TX packets can have (TX means going from UHD to device) + - allocation: This is an integer value which represents a score of + how much bandwidth is used. Note: Currently does not + have any unit, is just a counter. Higher numbers mean + higher utilization. RX means device to UHD, for + example, committing an RX streamer would increase this + value. + This key is optional, MPM does not have to provide it. + + Note: The dictionary may include other keys which should be ignored, + or at the very least, kept intact. commit_xport() might be requiring + them. """ raise NotImplementedError("request_xport() not implemented.") diff --git a/mpm/python/usrp_mpm/xports/xportmgr_udp.py b/mpm/python/usrp_mpm/xports/xportmgr_udp.py index edd20a629..48f6b5cf2 100644 --- a/mpm/python/usrp_mpm/xports/xportmgr_udp.py +++ b/mpm/python/usrp_mpm/xports/xportmgr_udp.py @@ -177,7 +177,8 @@ class XportMgrUDP(object): 'type': 'UDP', 'ipv4': str(iface_info['ip_addr']), 'port': str(self.chdr_port), - 'send_sid': str(sid) + 'send_sid': str(sid), + 'allocation': '0', } for _, iface_info in iteritems(self._chdr_ifaces) ] -- cgit v1.2.3