From: Yanling Song <songyl@ramaxel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: <martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] spraid: initial commit of Ramaxel spraid driver
Date: Sat, 6 Nov 2021 08:30:40 +0000 [thread overview]
Message-ID: <20211106083040.742cec59@songyl> (raw)
In-Reply-To: <bec25e84-7c10-a97c-5adb-cdbc75888d63@acm.org>
On Fri, 5 Nov 2021 09:13:55 -0700
Bart Van Assche <bvanassche@acm.org> wrote:
> On 11/5/21 6:02 AM, Yanling Song wrote:
> > We've studied BSG and in general it can work.
> >
> > The following is our draft design, please give your comments:
> > 1. Applications from user space send commands to driver thru struct
> > sg_io_v4, the private data(used by driver) is saved in
> > sg_io_v4->request and the data length is saved in
> > sg_io_v4->request_len.
> >
> > 2. SG_IO is used in bsg_ioctl(), the following has to be set because
> > bsg_transport_check_proto() will check the fields:
> > sg_io_v4->protocol = BSG_PROTOCOL_SCSI;
> > sg_io_v4->subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT;
> >
> > Does the above match the BSG design?
>
> I think so. Sample user space code that submits to a BSG interface is
> available e.g. here:
> https://github.com/westerndigitalcorporation/ufs-utils/blob/dev/scsi_bsg_util.c
>
Thanks. We will start coding as the above discussion.
> > And one question:
> > The number of queue and queue depth are hardcoded in
> > bsg_setup_queue(). set->nr_hw_queues = 1;
> > set->queue_depth = 128;
> >
> > Any reason to do it? how about it does not match the chip's
> > capability? for example, the chip supports 8 hardware queues and
> > each queue depth is 4096?
>
> Will BSG commands be processed internally by the spraid driver or
> will these be sent to the hardware queues?
>
> If there is a need in the spraid driver for concurrent processing of
> BSG commands, feel free to make nr_hw_queues and/or queue_depth
> configurable. I recommend to do this by introducing a new structure
> (bsg_creation_params?) and by passing a pointer to that data
> structure to bsg_setup_queue().
>
We're not sure if current hardcoded queue and queue depth can meet our
requirement or not now. Will update it later.
> Thanks,
>
> Bart.
prev parent reply other threads:[~2021-11-06 8:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 3:47 [PATCH] spraid: initial commit of Ramaxel spraid driver Yanling Song
2021-09-30 5:36 ` Randy Dunlap
2021-10-01 1:03 ` Yanling Song
2021-10-01 4:15 ` Christoph Hellwig
2021-10-08 9:22 ` Yanling Song
2021-10-09 3:58 ` Bart Van Assche
2021-10-09 13:32 ` Yanling Song
2021-10-10 3:52 ` Bart Van Assche
2021-10-11 8:34 ` Yanling Song
2021-10-11 19:40 ` Bart Van Assche
2021-10-12 11:10 ` Yanling Song
2021-10-11 19:54 ` Bart Van Assche
2021-10-12 14:49 ` Yanling Song
2021-10-12 16:59 ` Bart Van Assche
2021-10-13 6:50 ` Yanling Song
2021-10-13 22:00 ` Bart Van Assche
2021-10-15 5:48 ` Yanling Song
2021-10-20 0:33 ` Yanling Song
2021-10-20 3:24 ` Bart Van Assche
2021-11-03 1:43 ` Yanling Song
2021-11-05 13:02 ` Yanling Song
2021-11-05 16:13 ` Bart Van Assche
2021-11-06 8:30 ` Yanling Song [this message]
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=20211106083040.742cec59@songyl \
--to=songyl@ramaxel.com \
--cc=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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