[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7305639d-36a2-4cb2-ae79-204d5bfc2a9d@exht2.ad.emulex.com>
Date: Thu, 14 Jun 2012 21:58:06 -0700
From: <Sarveshwar.Bandi@...lex.Com>
To: <bhutchings@...arflare.com>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<Vasundhara.Volam@...lex.Com>
Subject: RE: [PATCH 3/3] be2net: Increase statistics structure size for
skyhawk.
Ben,
No, Buffer overrun doesn’t happen. The present NIC controller DMAs only as much information for which memory is
allocated. The next version of controller will fail the request if sufficient memory is not available.
Thanks,
Sarvesh
-----Original Message-----
From: Ben Hutchings [mailto:bhutchings@...arflare.com]
Sent: Friday, June 15, 2012 12:20 AM
To: Bandi,Sarveshwar
Cc: davem@...emloft.net; netdev@...r.kernel.org; Vasundhara, Volam
Subject: Re: [PATCH 3/3] be2net: Increase statistics structure size for skyhawk.
On Thu, 2012-06-14 at 11:21 +0530, sarveshwar.bandi@...lex.com wrote:
> From: Vasundhara Volam <vasundhara.volam@...lex.com>
>
> Increasing the hardware statistics structure to accomodate statistics for skyhawk.
>
> Signed-off-by: Vasundhara Volam <vasundhara.volam@...lex.com>
> ---
> drivers/net/ethernet/emulex/benet/be_cmds.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h
> b/drivers/net/ethernet/emulex/benet/be_cmds.h
> index 2f6bb06..3c938f5 100644
> --- a/drivers/net/ethernet/emulex/benet/be_cmds.h
> +++ b/drivers/net/ethernet/emulex/benet/be_cmds.h
> @@ -1566,7 +1566,7 @@ struct be_hw_stats_v1 {
> u32 rsvd0[BE_TXP_SW_SZ];
> struct be_erx_stats_v1 erx;
> struct be_pmem_stats pmem;
> - u32 rsvd1[3];
> + u32 rsvd1[18];
> };
>
> struct be_cmd_req_get_stats_v1 {
Doesn't this merit a 'struct be_hw_stats_v2'?
Does this mean that the driver wasn't currently allocating enough memory for the structure, and could that result in a buffer overrun? If so then this fix would need to go into 3.5 and 3.4.y as well.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Powered by blists - more mailing lists