From: John Hubbard <jhubbard@nvidia.com>
To: Noa Osherovich <noaos@mellanox.com>, Leon Romanovsky <leon@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH 1/1] pyverbs: fix speed_to_str(), to handle disabled links
Date: Tue, 24 Dec 2019 17:40:15 -0800 [thread overview]
Message-ID: <6fa745c5-dc74-aae0-c3be-6564e146b068@nvidia.com> (raw)
In-Reply-To: <fefd5386-d54b-a58e-29df-91a6dd94ccf0@mellanox.com>
On 12/23/19 6:39 AM, Noa Osherovich wrote:
...
>> diff --git a/pyverbs/device.pyx b/pyverbs/device.pyx
>> index 33d133fd..cf7b75de 100755
>> --- a/pyverbs/device.pyx
>> +++ b/pyverbs/device.pyx
>> @@ -923,8 +923,8 @@ def width_to_str(width):
>>
>>
>> def speed_to_str(speed):
>> - l = {1: '2.5 Gbps', 2: '5.0 Gbps', 4: '5.0 Gbps', 8: '10.0 Gbps',
>> - 16: '14.0 Gbps', 32: '25.0 Gbps', 64: '50.0 Gbps'}
>> + l = {0: '0.0 Gbps', 1: '2.5 Gbps', 2: '5.0 Gbps', 4: '5.0 Gbps',
>> + 8: '10.0 Gbps', 16: '14.0 Gbps', 32: '25.0 Gbps', 64: '50.0 Gbps'}
>> try:
>> return '{s} ({n})'.format(s=l[speed], n=speed)
>> except KeyError:
>
> This seems OK to me. BTW, what's the reported active_width for disabled links?
> Maybe width_to_str could use a similar fix.
>
Thanks for reviewing this! The reported active_width for disabled links on my
systems is showing up the same as for active links ("4X" in this case). So I don't
think we need a fix for width_to_str().
thanks,
--
John Hubbard
NVIDIA
next prev parent reply other threads:[~2019-12-25 1:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-21 1:32 [PATCH 0/1] pyverbs: fix speed_to_str(), to handle disabled links John Hubbard
2019-12-21 1:32 ` [PATCH 1/1] " John Hubbard
2019-12-23 14:39 ` Noa Osherovich
2019-12-25 1:40 ` John Hubbard [this message]
2019-12-26 9:12 ` Leon Romanovsky
2019-12-21 10:03 ` [PATCH 0/1] " Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fa745c5-dc74-aae0-c3be-6564e146b068@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=noaos@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).