linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitriy Bogdanov <d.bogdanov@yadro.com>
To: Mike Christie <michael.christie@oracle.com>,
	Martin Petersen <martin.petersen@oracle.com>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux@yadro.com" <linux@yadro.com>,
	Nilesh Javali <njavali@marvell.com>, Chris Boot <bootc@bootc.net>,
	Bart Van Assche <bvanassche@acm.org>,
	"Michael Cyr" <mikecyr@linux.ibm.com>,
	Felipe Balbi <balbi@kernel.org>,
	Roman Bolshakov <r.bolshakov@yadro.com>
Subject: RE: [PATCH v2 1/7] target: core: add common tpg/enable attribute
Date: Mon, 22 Mar 2021 17:55:38 +0000	[thread overview]
Message-ID: <85469d8f09a240ab8760534a771a7d0d@yadro.com> (raw)
In-Reply-To: <d8d1e9c2-4cd7-3f41-8545-99549b0704d4@oracle.com>

Hi Mike,

Thank you for the comments.

> > +	if (tf->tf_ops->fabric_enable_tpg)
> > +		for (i = 0; core_tpg_base_enable_attrs[i]; i++)
> > +			attrs[i] = core_tpg_base_enable_attrs[i];
> > +	if (tf->tf_ops->tfc_tpg_base_attrs)
> > +		for (k = 0; tf->tf_ops->tfc_tpg_base_attrs[k]; k++, i++)

> If fabric_enable_tpg is not set then I think i is the value from above when we did the tfc_tpg_base_attrs loop to calculate the total len needed for the kzalloc.
Yes, you are right, will fix it.

> > +			attrs[i] = tf->tf_ops->tfc_tpg_base_attrs[k];
> > +	attrs[i] = NULL;

> If fabric_enable_tpg and tfc_tpg_base_attrs attrs is not set then i is not initialized.
Yes, you are right, will fix it.

> I'm guessing you guys do more testing with tcm_qla. Maybe also do a quick target creation test with iscsi and loop to hit some of the different combos.
Shame on me. I did tests for v1 and believed that v2 also works because of trivial changes. I will test each version before submission in the future.

BR,
 Dmitry

  reply	other threads:[~2021-03-22 17:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22  8:05 [PATCH v2 0/7] target: make tpg/enable attribute Dmitry Bogdanov
2021-03-22  8:05 ` [PATCH v2 1/7] target: core: add common " Dmitry Bogdanov
2021-03-22 17:35   ` Mike Christie
2021-03-22 17:55     ` Dmitriy Bogdanov [this message]
2021-03-24 21:51   ` Konstantin Shelekhin
2021-03-22  8:05 ` [PATCH v2 2/7] target: iscsi: replace enable attr to ops.enable Dmitry Bogdanov
2021-03-22 17:43   ` Mike Christie
2021-03-22  8:05 ` [PATCH v2 3/7] target: qla2xx: " Dmitry Bogdanov
2021-03-22  8:05 ` [PATCH v2 4/7] target: sbp: " Dmitry Bogdanov
2021-03-22  8:05 ` [PATCH v2 5/7] target: srpt " Dmitry Bogdanov
2021-03-22  8:05 ` [PATCH v2 6/7] target: ibm_vscsi: " Dmitry Bogdanov
2021-03-22  8:05 ` [PATCH v2 7/7] target: usb: " Dmitry Bogdanov
2021-03-22 14:49 ` [PATCH v2 0/7] target: make tpg/enable attribute Himanshu Madhani

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=85469d8f09a240ab8760534a771a7d0d@yadro.com \
    --to=d.bogdanov@yadro.com \
    --cc=balbi@kernel.org \
    --cc=bootc@bootc.net \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=mikecyr@linux.ibm.com \
    --cc=njavali@marvell.com \
    --cc=r.bolshakov@yadro.com \
    --cc=target-devel@vger.kernel.org \
    /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).