From 83dd47dc882421f96830fa55bd86405d1d80907f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 3 Jan 2018 15:05:48 -0800 Subject: mpmd: Allow user-overrides for MPM ports Adds two device args: discovery_port and rpc_port. Both are integers which override the respective constants. Reviewed-by: Ashish Chaudhari --- host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp') diff --git a/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp b/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp index 4d1306f82..3b02073c5 100644 --- a/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp +++ b/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp @@ -159,10 +159,14 @@ mpmd_xport_ctrl_udp::mpmd_xport_ctrl_udp( , _available_addrs(get_addrs_from_mb_args(mb_args)) , _mtu(MPMD_10GE_DATA_FRAME_MAX_SIZE) { - auto discover_mtu_for_ip = [](const std::string &ip_addr){ + const std::string mpm_discovery_port = _mb_args.get( + mpmd_impl::MPM_DISCOVERY_PORT_KEY, + std::to_string(mpmd_impl::MPM_DISCOVERY_PORT) + ); + auto discover_mtu_for_ip = [mpm_discovery_port](const std::string &ip_addr){ return discover_mtu( ip_addr, - std::to_string(mpmd_impl::MPM_DISCOVERY_PORT), + mpm_discovery_port, IP_PROTOCOL_MIN_MTU_SIZE-IP_PROTOCOL_UDP_PLUS_IP_HEADER, MPMD_10GE_DATA_FRAME_MAX_SIZE, MPMD_MTU_DISCOVERY_TIMEOUT -- cgit v1.2.3