From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Or Gerlitz <ogerlitz@mellanox.com>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Amir Vadai <amirv@mellanox.com>,
Tal Alon <talal@mellanox.com>,
Hadar Har-Zion <hadarh@mellanox.com>,
Majd Dibbiny <majd@mellanox.com>,
Eran Ben Elisha <eranbe@mellanox.com>
Subject: Re: [PATCH net 3/4] IB/mlx4: Saturate RoCE port PMA counters in case of overflow
Date: Wed, 18 Mar 2015 17:36:31 +0300 [thread overview]
Message-ID: <55098D6F.7040008@cogentembedded.com> (raw)
In-Reply-To: <1426688693-18980-4-git-send-email-ogerlitz@mellanox.com>
Hello.
On 3/18/2015 5:24 PM, Or Gerlitz wrote:
> From: Majd Dibbiny <majd@mellanox.com>
> For RoCE ports, we set the u32 PMA values based on u64 HCA counters. In case of
> overflow, according to the IB spec, we have to saturate a counter to its
> max value, do that.
> Fixes: c37791349cc7 ('IB/mlx4: Support PMA counters for IBoE')
> Signed-off-by: Majd Dibbiny <majd@mellanox.com>
> Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
> Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> ---
> drivers/infiniband/hw/mlx4/mad.c | 23 +++++++++++++++++++----
> 1 files changed, 19 insertions(+), 4 deletions(-)
> diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
> index c761971..40850f1 100644
> --- a/drivers/infiniband/hw/mlx4/mad.c
> +++ b/drivers/infiniband/hw/mlx4/mad.c
> @@ -64,6 +64,17 @@ enum {
> #define GUID_TBL_BLK_NUM_ENTRIES 8
> #define GUID_TBL_BLK_SIZE (GUID_TBL_ENTRY_SIZE * GUID_TBL_BLK_NUM_ENTRIES)
>
> +#define MAX_BE32 0xffffffffULL
> +#define MAX_BE16 0xffffUL
Aren't U{16|32}_MAX from <linux/kernel.h> good enough?
And I'm not seeing wheer MAX_BE16 is used...
[...]
WBR, Sergei
next prev parent reply other threads:[~2015-03-18 14:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 14:24 [PATCH net 0/4] mlx4 driver fixes for 4.0-rc Or Gerlitz
2015-03-18 14:24 ` [PATCH net 1/4] IB/mlx4: Verify net device validity on port change event Or Gerlitz
2015-03-18 14:24 ` [PATCH net 2/4] net/mlx4_en: Fix off-by-one in ethtool statistics display Or Gerlitz
2015-03-18 14:24 ` [PATCH net 3/4] IB/mlx4: Saturate RoCE port PMA counters in case of overflow Or Gerlitz
2015-03-18 14:36 ` Sergei Shtylyov [this message]
2015-03-18 14:44 ` Or Gerlitz
2015-03-18 14:24 ` [PATCH net 4/4] net/mlx4_en: Set statistics bitmap at port init Or Gerlitz
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=55098D6F.7040008@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=amirv@mellanox.com \
--cc=davem@davemloft.net \
--cc=eranbe@mellanox.com \
--cc=hadarh@mellanox.com \
--cc=majd@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=talal@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).