From 419d7dafa5c840b8aa9f056690007164de046a1d Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Tue, 28 Jan 2020 15:50:32 -0800 Subject: mpm,mpmd: Add iface type and mtu info for UDP links This changes MTU handling for the "internal" UDP type. Because MPM echo packets will not be returned for internal NICs, use the iface's programmed MTU instead. --- mpm/python/usrp_mpm/sys_utils/net.py | 1 + mpm/python/usrp_mpm/xports/xportmgr_udp.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'mpm') diff --git a/mpm/python/usrp_mpm/sys_utils/net.py b/mpm/python/usrp_mpm/sys_utils/net.py index 56448c6c4..42eb9de62 100644 --- a/mpm/python/usrp_mpm/sys_utils/net.py +++ b/mpm/python/usrp_mpm/sys_utils/net.py @@ -71,6 +71,7 @@ def get_iface_info(ifname): 'ip_addrs': ip_addrs, 'link_speed': link_speed, 'bridge': is_bridge(link_info.get_attr('IFLA_LINKINFO')), + 'mtu': link_info.get_attr('IFLA_MTU'), } diff --git a/mpm/python/usrp_mpm/xports/xportmgr_udp.py b/mpm/python/usrp_mpm/xports/xportmgr_udp.py index 365e73e5d..e9168e898 100644 --- a/mpm/python/usrp_mpm/xports/xportmgr_udp.py +++ b/mpm/python/usrp_mpm/xports/xportmgr_udp.py @@ -186,7 +186,9 @@ class XportMgrUDP: { 'ipv4': str(iface_info['ip_addr']), 'port': str(self.chdr_port), - 'link_rate': str(int(iface_info['link_speed'] * 1e6 / 8)) + 'link_rate': str(int(iface_info['link_speed'] * 1e6 / 8)), + 'type': str(self.iface_config[iface_name]['type']), + 'mtu': str(iface_info['mtu']) } for iface_name, iface_info in iteritems(self._chdr_ifaces) ] -- cgit v1.2.3