From: "Steve Wise" <swise@opengridcomputing.com>
To: 'Or Gerlitz' <gerlitz.or@gmail.com>,
"'Nicholas A. Bellinger'" <nab@linux-iscsi.org>
Cc: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org,
kxie@chelsio.com, indranil@chelsio.com,
'Varun Prakash' <varun@chelsio.com>
Subject: RE: [PATCH v3 13/13] cxgbit: add files for cxgbit.ko
Date: Wed, 25 May 2016 12:40:46 -0500 [thread overview]
Message-ID: <011401d1b6ac$917ea000$b47be000$@opengridcomputing.com> (raw)
In-Reply-To: <CAJ3xEMjE3pfz7+QKMUheH9P+xyvj81qbCtbod0mBi7pUspMRXg@mail.gmail.com>
> From: Or Gerlitz [mailto:gerlitz.or@gmail.com]
>
> On Tue, May 24, 2016 at 9:40 AM, Nicholas A. Bellinger
> <nab@linux-iscsi.org> wrote:
> > Hi Or & Co,
> > On Wed, 2016-05-18 at 14:45 +0300, Or Gerlitz wrote:
> >> On Sat, Apr 30, 2016 at 6:54 PM, Or Gerlitz <gerlitz.or@gmail.com> wrote:
> >> > On Tue, Apr 19, 2016 at 9:30 PM, Varun Prakash <varun@chelsio.com> wrote:
> >> >> cxgbit.h - This file contains data structure
> >> >> definitions for cxgbit.ko.
> >> >>
> >> >> cxgbit_lro.h - This file contains data structure
> >> >> definitions for LRO support.
> >> >>
> >> >> cxgbit_main.c - This file contains code for
> >> >> registering with iscsi target transport and
> >> >> cxgb4 driver.
> >> >>
> >> >> cxgbit_cm.c - This file contains code for
> >> >> connection management.
> >> >>
> >> >> cxgbit_target.c - This file contains code
> >> >> for processing iSCSI PDU.
> >> >>
> >> >> cxgbit_ddp.c - This file contains code for
> >> >> Direct Data Placement.
> >> >
> >> > Wait,
> >> >
> >> > You are adding many K's LOCs to handle things like CM (connection
> >> > management), DDP and LRO. But your upstream solution must be using CM
> >> > and DDP (and LRO as well) for the HW offloaded initiator side as well,
> >> > not to mention the iWARP side of things.
> >> >
> >> > There must be some way to refactor things instead of repeating the
> >> > same bits over and over, thoughts?
>
> >> The author haven't responded... where that this stands from your point of view?
>
> > For an initial merge, I don't have an objection to this series wrt
> > drivers/target/iscsi/* improvements + prerequisites, and new standalone
> > cxgbit iscsit_transport driver.
> >
> > That said, there are areas between cxgbi + cxgbit code that can be made
> > common as you've pointed out. The Cheliso folks have mentioned off-list
> > that cxgbi as-is in mainline does not support LRO, and that the majority
> > of DDP logic is shared between initiator + target.
> >
> > Are there specific pieces of logic in DDP or iWARP for cxgb* that you'd
> > like to see Varun + Co pursue as common code in v4.8+..?
>
> Hi Nic,
>
> As I wrote above, I have good reasons to believe that there are few K
> LOCs of duplication
> between this series to the chelsio hw iscsi initiator or the chelsio
> iwarp driver or both (triple).
>
> Ys, I'd like to see a public response from Varun and Co on this valid
> reviewer comment
> before you proceed with this series, makes sense? There's no point to
> duplicate the same
> code in the kernel again and again. **Even** if there's one
> duplication now, we don't want
> another one.
>
> Or.
Hey Or and Nicholas,
I've been staying out of this directly due to my workload. But I will now
take a look at where and how we can refactor to reduce the code duplication.
Here are some thoughts with a quick glance:
DDP is not used by iWARP. DDP is for direct placement attempt on a TCP
streaming mode connection. RDMA has its own way of doing this that doesn’t
utilize the same HW resources. So I would say that the DDP usage could be
refactored such that there is a set of helper functions to do the common
logic, like managing page pod adapter resources. An example would be
cxgb4i.c:ddp_ppod_write_idata(), and cxgbit_ppod_write_idata() from patch
13.
Connection Management (CM) can definitely be refactored to share helper
functions for setting up/tearing down TCP connections. But the iWARP logic
is very different from iscsi once the TCP connection is setup and the
connection moved into RDMA mode. So the sharing of logic would be in
sending various CPL messages to the adapter to connect/accept/close/abort
connections. Having said that, the initiator and target wouldn't share a
lot by virtue of the initiator only doing active side connection setup, and
the target only doing passive side connection setup. So refactor would be
common services that iw_cxgb4, cxgbi4, and cxgbit all use. An example
would be: iw_cxgb4/cm.c:send_connect(), and cxgb4i.c/send_act_open_req().
I didn't look at LRO at this point.
Anyway, none of these are particularly difficult, but will require
significant effort and time. The current cxgbit series has had a lot of
internal review and testing by the Chelsio iscsi team, and it would be great
if this refactoring can be deferred with the promise that we will get it
done for the 4.8 merge window. Thoughts?
Steve.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-05-25 17:40 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 18:30 [PATCH v3 00/13] Chelsio iSCSI target offload driver Varun Prakash
2016-04-19 18:30 ` [PATCH v3 01/13] iscsi-target: add int (*iscsit_xmit_pdu)() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 02/13] iscsi-target: add void (*iscsit_release_cmd)() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 03/13] iscsi-target: add void (*iscsit_get_rx_pdu)() Varun Prakash
2016-08-09 3:19 ` Andy Grover
2016-08-13 16:56 ` Varun Prakash
2016-04-19 18:30 ` [PATCH v3 04/13] iscsi-target: split iscsi_target_rx_thread() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 05/13] iscsi-target: add int (*iscsit_validate_params)() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 06/13] iscsi-target: add void (*iscsit_get_r2t_ttt)() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 07/13] iscsi-target: move iscsit_thread_check_cpumask() Varun Prakash
2016-04-19 18:30 ` [PATCH v3 08/13] iscsi-target: use conn_transport->transport_type in text rsp Varun Prakash
2016-04-19 18:30 ` [PATCH v3 09/13] iscsi-target: add new offload transport type Varun Prakash
2016-04-19 18:30 ` [PATCH v3 10/13] iscsi-target: clear tx_thread_active Varun Prakash
2016-04-19 18:30 ` [PATCH v3 11/13] iscsi-target: call complete on conn_logout_comp Varun Prakash
2016-04-19 18:30 ` [PATCH v3 12/13] iscsi-target: export symbols Varun Prakash
2016-04-19 18:30 ` [PATCH v3 13/13] cxgbit: add files for cxgbit.ko Varun Prakash
2016-04-30 15:54 ` Or Gerlitz
2016-05-18 11:45 ` Or Gerlitz
2016-05-24 6:40 ` Nicholas A. Bellinger
2016-05-25 15:04 ` Or Gerlitz
2016-05-25 17:40 ` Steve Wise [this message]
2016-05-25 20:41 ` Or Gerlitz
2016-05-26 4:55 ` Nicholas A. Bellinger
2016-05-26 18:58 ` Varun Prakash
2016-07-05 21:24 ` Or Gerlitz
2016-07-06 17:17 ` Varun Prakash
2016-07-07 7:54 ` Or Gerlitz
2016-07-08 18:03 ` Varun Prakash
2016-07-08 18:36 ` Steve Wise
2016-07-12 7:53 ` Or Gerlitz
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='011401d1b6ac$917ea000$b47be000$@opengridcomputing.com' \
--to=swise@opengridcomputing.com \
--cc=gerlitz.or@gmail.com \
--cc=indranil@chelsio.com \
--cc=kxie@chelsio.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=target-devel@vger.kernel.org \
--cc=varun@chelsio.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;
as well as URLs for NNTP newsgroup(s).