[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55098D6F.7040008@cogentembedded.com>
Date: Wed, 18 Mar 2015 17:36:31 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Or Gerlitz <ogerlitz@...lanox.com>,
"David S. Miller" <davem@...emloft.net>
CC: netdev@...r.kernel.org, Amir Vadai <amirv@...lanox.com>,
Tal Alon <talal@...lanox.com>,
Hadar Har-Zion <hadarh@...lanox.com>,
Majd Dibbiny <majd@...lanox.com>,
Eran Ben Elisha <eranbe@...lanox.com>
Subject: Re: [PATCH net 3/4] IB/mlx4: Saturate RoCE port PMA counters in case
of overflow
Hello.
On 3/18/2015 5:24 PM, Or Gerlitz wrote:
> From: Majd Dibbiny <majd@...lanox.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@...lanox.com>
> Signed-off-by: Eran Ben Elisha <eranbe@...lanox.com>
> Signed-off-by: Hadar Hen Zion <hadarh@...lanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@...lanox.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists