All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
@ 2020-04-05 23:13 Bart Van Assche
  2020-04-06  7:39 ` Daniel Wagner
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bart Van Assche @ 2020-04-05 23:13 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Bart Van Assche, Nilesh Javali, Himanshu Madhani,
	Quinn Tran, Martin Wilck, Daniel Wagner, Roman Bolshakov

This patch fixes the following Coverity complaint without changing any
functionality:

CID 337793 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
suspicious_sizeof: Passing argument ha->fcp_prio_cfg of type
struct qla_fcp_prio_cfg * and argument 32768UL to function memset is
suspicious because a multiple of sizeof (struct qla_fcp_prio_cfg) /*48*/
is expected.

memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE);

Cc: Nilesh Javali <njavali@marvell.com>
Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qla2xxx/qla_fw.h | 3 ++-
 drivers/scsi/qla2xxx/qla_os.c | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index f9bad5bd7198..647e67c6ba5e 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -2217,8 +2217,9 @@ struct qla_fcp_prio_cfg {
 #define FCP_PRIO_ATTR_PERSIST   0x2
 	uint8_t  reserved;      /* Reserved for future use          */
 #define FCP_PRIO_CFG_HDR_SIZE   0x10
-	struct qla_fcp_prio_entry entry[1];     /* fcp priority entries  */
+	struct qla_fcp_prio_entry entry[1023]; /* fcp priority entries  */
 #define FCP_PRIO_CFG_ENTRY_SIZE 0x20
+	uint8_t  reserved2[16];
 };
 
 #define FCP_PRIO_CFG_SIZE       (32*1024) /* fcp prio data per port*/
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index d9072ea7c42b..784f3e553f15 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -7840,6 +7840,7 @@ qla2x00_module_init(void)
 	BUILD_BUG_ON(sizeof(struct vf_evfp_entry_24xx) != 56);
 	BUILD_BUG_ON(sizeof(struct qla_flt_region) != 16);
 	BUILD_BUG_ON(sizeof(struct qla_flt_header) != 8);
+	BUILD_BUG_ON(sizeof(struct qla_fcp_prio_cfg) != FCP_PRIO_CFG_SIZE);
 
 	/* Allocate cache for SRBs. */
 	srb_cachep = kmem_cache_create("qla2xxx_srbs", sizeof(srb_t), 0,

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
  2020-04-05 23:13 [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE Bart Van Assche
@ 2020-04-06  7:39 ` Daniel Wagner
  2020-04-06 14:54 ` Himanshu Madhani
  2020-04-13 15:30 ` Roman Bolshakov
  2 siblings, 0 replies; 8+ messages in thread
From: Daniel Wagner @ 2020-04-06  7:39 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, James E . J . Bottomley, linux-scsi,
	Nilesh Javali, Himanshu Madhani, Quinn Tran, Martin Wilck,
	Roman Bolshakov

Hi Bart,

On Sun, Apr 05, 2020 at 04:13:39PM -0700, Bart Van Assche wrote:
> This patch fixes the following Coverity complaint without changing any
> functionality:
> 
> CID 337793 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
> suspicious_sizeof: Passing argument ha->fcp_prio_cfg of type
> struct qla_fcp_prio_cfg * and argument 32768UL to function memset is
> suspicious because a multiple of sizeof (struct qla_fcp_prio_cfg) /*48*/
> is expected.
> 
> memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE);
> 
> Cc: Nilesh Javali <njavali@marvell.com>
> Cc: Himanshu Madhani <hmadhani@marvell.com>
> Cc: Quinn Tran <qutran@marvell.com>
> Cc: Martin Wilck <mwilck@suse.com>
> Cc: Daniel Wagner <dwagner@suse.de>
> Cc: Roman Bolshakov <r.bolshakov@yadro.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Looks good to me.

Reviewed-by: Daniel Wagner <dwagner@suse.de>

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
  2020-04-05 23:13 [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE Bart Van Assche
  2020-04-06  7:39 ` Daniel Wagner
@ 2020-04-06 14:54 ` Himanshu Madhani
  2020-04-13 15:30 ` Roman Bolshakov
  2 siblings, 0 replies; 8+ messages in thread
From: Himanshu Madhani @ 2020-04-06 14:54 UTC (permalink / raw)
  To: Bart Van Assche, Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Nilesh Javali, Himanshu Madhani, Quinn Tran,
	Martin Wilck, Daniel Wagner, Roman Bolshakov

On 4/5/20 6:13 PM, Bart Van Assche wrote:
> This patch fixes the following Coverity complaint without changing any
> functionality:
> 
> CID 337793 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
> suspicious_sizeof: Passing argument ha->fcp_prio_cfg of type
> struct qla_fcp_prio_cfg * and argument 32768UL to function memset is
> suspicious because a multiple of sizeof (struct qla_fcp_prio_cfg) /*48*/
> is expected.
> 
> memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE);
> 
> Cc: Nilesh Javali <njavali@marvell.com>
> Cc: Himanshu Madhani <hmadhani@marvell.com>
> Cc: Quinn Tran <qutran@marvell.com>
> Cc: Martin Wilck <mwilck@suse.com>
> Cc: Daniel Wagner <dwagner@suse.de>
> Cc: Roman Bolshakov <r.bolshakov@yadro.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>   drivers/scsi/qla2xxx/qla_fw.h | 3 ++-
>   drivers/scsi/qla2xxx/qla_os.c | 1 +
>   2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
> index f9bad5bd7198..647e67c6ba5e 100644
> --- a/drivers/scsi/qla2xxx/qla_fw.h
> +++ b/drivers/scsi/qla2xxx/qla_fw.h
> @@ -2217,8 +2217,9 @@ struct qla_fcp_prio_cfg {
>   #define FCP_PRIO_ATTR_PERSIST   0x2
>   	uint8_t  reserved;      /* Reserved for future use          */
>   #define FCP_PRIO_CFG_HDR_SIZE   0x10
> -	struct qla_fcp_prio_entry entry[1];     /* fcp priority entries  */
> +	struct qla_fcp_prio_entry entry[1023]; /* fcp priority entries  */
>   #define FCP_PRIO_CFG_ENTRY_SIZE 0x20
> +	uint8_t  reserved2[16];
>   };
>   
>   #define FCP_PRIO_CFG_SIZE       (32*1024) /* fcp prio data per port*/
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index d9072ea7c42b..784f3e553f15 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -7840,6 +7840,7 @@ qla2x00_module_init(void)
>   	BUILD_BUG_ON(sizeof(struct vf_evfp_entry_24xx) != 56);
>   	BUILD_BUG_ON(sizeof(struct qla_flt_region) != 16);
>   	BUILD_BUG_ON(sizeof(struct qla_flt_header) != 8);
> +	BUILD_BUG_ON(sizeof(struct qla_fcp_prio_cfg) != FCP_PRIO_CFG_SIZE);
>   
>   	/* Allocate cache for SRBs. */
>   	srb_cachep = kmem_cache_create("qla2xxx_srbs", sizeof(srb_t), 0,
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

-- 
Himanshu

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
  2020-04-05 23:13 [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE Bart Van Assche
  2020-04-06  7:39 ` Daniel Wagner
  2020-04-06 14:54 ` Himanshu Madhani
@ 2020-04-13 15:30 ` Roman Bolshakov
  2020-04-14  2:24   ` Martin K. Petersen
  2020-04-14  3:56   ` Bart Van Assche
  2 siblings, 2 replies; 8+ messages in thread
From: Roman Bolshakov @ 2020-04-13 15:30 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, James E . J . Bottomley, linux-scsi,
	Nilesh Javali, Himanshu Madhani, Quinn Tran, Martin Wilck,
	Daniel Wagner

On Sun, Apr 05, 2020 at 04:13:39PM -0700, Bart Van Assche wrote:
> This patch fixes the following Coverity complaint without changing any
> functionality:
> 
> CID 337793 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
> suspicious_sizeof: Passing argument ha->fcp_prio_cfg of type
> struct qla_fcp_prio_cfg * and argument 32768UL to function memset is
> suspicious because a multiple of sizeof (struct qla_fcp_prio_cfg) /*48*/
> is expected.
> 
> memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE);
> 
> ---
>  drivers/scsi/qla2xxx/qla_fw.h | 3 ++-
>  drivers/scsi/qla2xxx/qla_os.c | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
> index f9bad5bd7198..647e67c6ba5e 100644
> --- a/drivers/scsi/qla2xxx/qla_fw.h
> +++ b/drivers/scsi/qla2xxx/qla_fw.h
> @@ -2217,8 +2217,9 @@ struct qla_fcp_prio_cfg {
>  #define FCP_PRIO_ATTR_PERSIST   0x2
>  	uint8_t  reserved;      /* Reserved for future use          */
>  #define FCP_PRIO_CFG_HDR_SIZE   0x10
> -	struct qla_fcp_prio_entry entry[1];     /* fcp priority entries  */
> +	struct qla_fcp_prio_entry entry[1023]; /* fcp priority entries  */
>  #define FCP_PRIO_CFG_ENTRY_SIZE 0x20
> +	uint8_t  reserved2[16];
>  };
>  
>  #define FCP_PRIO_CFG_SIZE       (32*1024) /* fcp prio data per port*/

Hi Bart,

A new constant may be introduced to define size of qla_fcp_prio_entry.
That would let to drop the magic 32 number here and allow to add one
more BUILD_BUG_ON for sizeof(struct qla_fcp_prio_entry).

Besides that,
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>

> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index d9072ea7c42b..784f3e553f15 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -7840,6 +7840,7 @@ qla2x00_module_init(void)
>  	BUILD_BUG_ON(sizeof(struct vf_evfp_entry_24xx) != 56);
>  	BUILD_BUG_ON(sizeof(struct qla_flt_region) != 16);
>  	BUILD_BUG_ON(sizeof(struct qla_flt_header) != 8);
> +	BUILD_BUG_ON(sizeof(struct qla_fcp_prio_cfg) != FCP_PRIO_CFG_SIZE);
>  
>  	/* Allocate cache for SRBs. */
>  	srb_cachep = kmem_cache_create("qla2xxx_srbs", sizeof(srb_t), 0,

Thanks,
Roman

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
  2020-04-13 15:30 ` Roman Bolshakov
@ 2020-04-14  2:24   ` Martin K. Petersen
  2020-04-14 11:49     ` Roman Bolshakov
  2020-04-14  3:56   ` Bart Van Assche
  1 sibling, 1 reply; 8+ messages in thread
From: Martin K. Petersen @ 2020-04-14  2:24 UTC (permalink / raw)
  To: Roman Bolshakov
  Cc: Bart Van Assche, Martin K . Petersen, James E . J . Bottomley,
	linux-scsi, Nilesh Javali, Himanshu Madhani, Quinn Tran,
	Martin Wilck, Daniel Wagner


Roman,

>> -	struct qla_fcp_prio_entry entry[1];     /* fcp priority entries  */
>> +	struct qla_fcp_prio_entry entry[1023]; /* fcp priority entries  */
>>  #define FCP_PRIO_CFG_ENTRY_SIZE 0x20
>> +	uint8_t  reserved2[16];
>>  };
>>  
>>  #define FCP_PRIO_CFG_SIZE       (32*1024) /* fcp prio data per port*/
>
> A new constant may be introduced to define size of qla_fcp_prio_entry.
> That would let to drop the magic 32 number here and allow to add one
> more BUILD_BUG_ON for sizeof(struct qla_fcp_prio_entry).

I agree that additional sanity testing here would be nice.

I wonder what the firmware interface says about the runt entry?

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
  2020-04-13 15:30 ` Roman Bolshakov
  2020-04-14  2:24   ` Martin K. Petersen
@ 2020-04-14  3:56   ` Bart Van Assche
  2020-04-14 11:45     ` Roman Bolshakov
  1 sibling, 1 reply; 8+ messages in thread
From: Bart Van Assche @ 2020-04-14  3:56 UTC (permalink / raw)
  To: Roman Bolshakov
  Cc: Martin K . Petersen, James E . J . Bottomley, linux-scsi,
	Nilesh Javali, Himanshu Madhani, Quinn Tran, Martin Wilck,
	Daniel Wagner

On 2020-04-13 08:30, Roman Bolshakov wrote:
> On Sun, Apr 05, 2020 at 04:13:39PM -0700, Bart Van Assche wrote:
>> This patch fixes the following Coverity complaint without changing any
>> functionality:
>>
>> CID 337793 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
>> suspicious_sizeof: Passing argument ha->fcp_prio_cfg of type
>> struct qla_fcp_prio_cfg * and argument 32768UL to function memset is
>> suspicious because a multiple of sizeof (struct qla_fcp_prio_cfg) /*48*/
>> is expected.
>>
>> memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE);
>>
>> ---
>>  drivers/scsi/qla2xxx/qla_fw.h | 3 ++-
>>  drivers/scsi/qla2xxx/qla_os.c | 1 +
>>  2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
>> index f9bad5bd7198..647e67c6ba5e 100644
>> --- a/drivers/scsi/qla2xxx/qla_fw.h
>> +++ b/drivers/scsi/qla2xxx/qla_fw.h
>> @@ -2217,8 +2217,9 @@ struct qla_fcp_prio_cfg {
>>  #define FCP_PRIO_ATTR_PERSIST   0x2
>>  	uint8_t  reserved;      /* Reserved for future use          */
>>  #define FCP_PRIO_CFG_HDR_SIZE   0x10
>> -	struct qla_fcp_prio_entry entry[1];     /* fcp priority entries  */
>> +	struct qla_fcp_prio_entry entry[1023]; /* fcp priority entries  */
>>  #define FCP_PRIO_CFG_ENTRY_SIZE 0x20
>> +	uint8_t  reserved2[16];
>>  };
>>  
>>  #define FCP_PRIO_CFG_SIZE       (32*1024) /* fcp prio data per port*/
> 
> Hi Bart,
> 
> A new constant may be introduced to define size of qla_fcp_prio_entry.
> That would let to drop the magic 32 number here and allow to add one
> more BUILD_BUG_ON for sizeof(struct qla_fcp_prio_entry).

Hi Roman,

The constant FCP_PRIO_CFG_ENTRY_SIZE is only used once, namely in the
following code:

	len = ha->fcp_prio_cfg->num_entries * FCP_PRIO_CFG_ENTRY_SIZE;

How about removing the definition of FCP_PRIO_CFG_ENTRY_SIZE and
changing FCP_PRIO_CFG_ENTRY_SIZE in the above calculation into
sizeof(struct qla_fcp_prio_entry)?

Thanks,

Bart.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
  2020-04-14  3:56   ` Bart Van Assche
@ 2020-04-14 11:45     ` Roman Bolshakov
  0 siblings, 0 replies; 8+ messages in thread
From: Roman Bolshakov @ 2020-04-14 11:45 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Martin K . Petersen, James E . J . Bottomley, linux-scsi,
	Nilesh Javali, Himanshu Madhani, Quinn Tran, Martin Wilck,
	Daniel Wagner

On Mon, Apr 13, 2020 at 08:56:18PM -0700, Bart Van Assche wrote:
> On 2020-04-13 08:30, Roman Bolshakov wrote:
> > On Sun, Apr 05, 2020 at 04:13:39PM -0700, Bart Van Assche wrote:
> >> This patch fixes the following Coverity complaint without changing any
> >> functionality:
> >>
> >> CID 337793 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
> >> suspicious_sizeof: Passing argument ha->fcp_prio_cfg of type
> >> struct qla_fcp_prio_cfg * and argument 32768UL to function memset is
> >> suspicious because a multiple of sizeof (struct qla_fcp_prio_cfg) /*48*/
> >> is expected.
> >>
> >> memset(ha->fcp_prio_cfg, 0, FCP_PRIO_CFG_SIZE);
> >>
> >> ---
> >>  drivers/scsi/qla2xxx/qla_fw.h | 3 ++-
> >>  drivers/scsi/qla2xxx/qla_os.c | 1 +
> >>  2 files changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
> >> index f9bad5bd7198..647e67c6ba5e 100644
> >> --- a/drivers/scsi/qla2xxx/qla_fw.h
> >> +++ b/drivers/scsi/qla2xxx/qla_fw.h
> >> @@ -2217,8 +2217,9 @@ struct qla_fcp_prio_cfg {
> >>  #define FCP_PRIO_ATTR_PERSIST   0x2
> >>  	uint8_t  reserved;      /* Reserved for future use          */
> >>  #define FCP_PRIO_CFG_HDR_SIZE   0x10
> >> -	struct qla_fcp_prio_entry entry[1];     /* fcp priority entries  */
> >> +	struct qla_fcp_prio_entry entry[1023]; /* fcp priority entries  */
> >>  #define FCP_PRIO_CFG_ENTRY_SIZE 0x20
> >> +	uint8_t  reserved2[16];
> >>  };
> >>  
> >>  #define FCP_PRIO_CFG_SIZE       (32*1024) /* fcp prio data per port*/
> > 
> > A new constant may be introduced to define size of qla_fcp_prio_entry.
> > That would let to drop the magic 32 number here and allow to add one
> > more BUILD_BUG_ON for sizeof(struct qla_fcp_prio_entry).
> 
> The constant FCP_PRIO_CFG_ENTRY_SIZE is only used once, namely in the
> following code:
> 
> 	len = ha->fcp_prio_cfg->num_entries * FCP_PRIO_CFG_ENTRY_SIZE;
> 
> How about removing the definition of FCP_PRIO_CFG_ENTRY_SIZE and
> changing FCP_PRIO_CFG_ENTRY_SIZE in the above calculation into
> sizeof(struct qla_fcp_prio_entry)?
> 

Hi Bart,

I overlooked the FCP_PRIO_CFG_ENTRY_SIZE definition in the hunk :)
Since it's already there, we can just replace 32 with it and add
BUILD_BUG_ON using the definition.

What you propose is also reasonable if used with BUILD_BUG_ON that has
numeric literal for FCP_PRIO_CFG_ENTRY_SIZE.

Thanks,
Roman

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE
  2020-04-14  2:24   ` Martin K. Petersen
@ 2020-04-14 11:49     ` Roman Bolshakov
  0 siblings, 0 replies; 8+ messages in thread
From: Roman Bolshakov @ 2020-04-14 11:49 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Bart Van Assche, James E . J . Bottomley, linux-scsi,
	Nilesh Javali, Himanshu Madhani, Quinn Tran, Martin Wilck,
	Daniel Wagner

On Mon, Apr 13, 2020 at 10:24:37PM -0400, Martin K. Petersen wrote:
> 
> Roman,
> 
> >> -	struct qla_fcp_prio_entry entry[1];     /* fcp priority entries  */
> >> +	struct qla_fcp_prio_entry entry[1023]; /* fcp priority entries  */
> >>  #define FCP_PRIO_CFG_ENTRY_SIZE 0x20
> >> +	uint8_t  reserved2[16];
> >>  };
> >>  
> >>  #define FCP_PRIO_CFG_SIZE       (32*1024) /* fcp prio data per port*/
> >
> > A new constant may be introduced to define size of qla_fcp_prio_entry.
> > That would let to drop the magic 32 number here and allow to add one
> > more BUILD_BUG_ON for sizeof(struct qla_fcp_prio_entry).
> 
> I wonder what the firmware interface says about the runt entry?
> 

Hi Martin,

NVRAM and Option ROM contents/layout doesn't seem to be a part of the FW spec.

Roman

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-14 11:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05 23:13 [PATCH] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE Bart Van Assche
2020-04-06  7:39 ` Daniel Wagner
2020-04-06 14:54 ` Himanshu Madhani
2020-04-13 15:30 ` Roman Bolshakov
2020-04-14  2:24   ` Martin K. Petersen
2020-04-14 11:49     ` Roman Bolshakov
2020-04-14  3:56   ` Bart Van Assche
2020-04-14 11:45     ` Roman Bolshakov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.