Hello Nathan,

I think you are referring only to the values that are set in the creation
of the "max_link_branch" of the property tree. In one version of the code
(the one you highlighted at [1]) has only the branch called "link_max_rate"
and this one is created and set to either the PCIE max rate or the 10G max
rate with the following statements

    _tree->create<double>(mb_path / "link_max_rate").set(X300_MAX_RATE_PCIE);
//L396
_tree->create<double>(mb_path / "link_max_rate").set(X300_MAX_RATE_10GIGE);
//L462

then, depending on the FPGA image that is loaded, this same branch is set
to different values for the max rate, including the 1G Ethernet:

    _tree->access<double>("/mboards/"+boost::lexical_cast<std::string>(mb_index)
/ "link_max_rate").set(X300_MAX_RATE_1GIGE); //L1140

For the other version (highlighted at [2]), however, this last assignment
is done a little bit differently, but keeping the same logic [2.a].

Now, it is not clear to me if your question raises an unexpected behavior
of if you are only asking about the logic behind scenes. I mean, are
retrieving this value using different FPGA images and always getting the
10G maximum link rate? or if you are only asking about the how this is done
in the code? On a quick view, the branch value is being set to the correct
max rate depending on the FPGA image that you are loading into the device,
which is the same logic in the two mentioned versions.

Regards,
-Nicolas

[1]
https://github.com/EttusResearch/uhd/blob/6a72c16ee909af95b6965f26fb588a29485ef414/host/lib/usrp/x300/x300_impl.cpp
[2]
https://github.com/EttusResearch/uhd/blob/7ac01c7f979aab8fac5e62f596ff0af52cedec40/host/lib/usrp/x300/x300_impl.cpp
[2.a]
https://github.com/EttusResearch/uhd/blob/7ac01c7f979aab8fac5e62f596ff0af52cedec40/host/lib/usrp/x300/x300_impl.cpp#L1202

On Fri, Jul 28, 2017 at 1:03 AM, Perelman, Nathan via USRP-users <
usrp-users@lists.ettus.com> wrote:

> I had been looking at /mboards/0/link_max_rate to determine if an X300 was
> connected via 10 GigE or 1 GigE. However it seems like sometime between
> when that was implemented for the X300 ( https://github.com/
> EttusResearch/uhd/commit/6a72c16ee909af95b6965f26fb588a29485ef414 ) and
> now ( https://github.com/EttusResearch/uhd/blob/
> 7ac01c7f979aab8fac5e62f596ff0af52cedec40/host/lib/usrp/x300/
> x300_impl.cpp#L676 ) that was changed to always return the 10 G rate even
> when connected via 1 G. Is there another way to determine how an X300 is
> connected?
>
> -Nathan
>
> _______________________________________________
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
>
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to