From: Bart Van Assche <bvanassche@acm.org>
To: Hannes Reinecke <hare@suse.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
linux-scsi@vger.kernel.org, Johannes Thumshirn <jth@kernel.org>,
Chad Dupuis <chad.dupuis@qlogic.com>
Subject: Re: [PATCH 00/22] FCoE VN2VN fixes
Date: Sat, 6 Aug 2016 17:12:33 -0700 [thread overview]
Message-ID: <51f8558c-2e3f-7274-ba3f-4ea29eb42624@acm.org> (raw)
In-Reply-To: <9c092661-141b-f6bc-a8dc-872faaf128b4@suse.de>
On 08/05/16 09:16, Hannes Reinecke wrote:
> On 08/05/2016 05:33 PM, Bart Van Assche wrote:
>> On 08/05/2016 12:43 AM, Hannes Reinecke wrote:
>>> On 08/04/2016 04:59 PM, Bart Van Assche wrote:
>>>> On 08/03/16 06:13, Hannes Reinecke wrote:
>>>>> As usual, comments and reviews are welcome.
>>>>
>>>> Great work :-) Have you been testing these patches against the LIO FCoE
>>>> target driver? In that case you might need to port the following patch
>>>> to LIO, a patch that fixes a subtle data corruption issue:
>>>> https://sourceforge.net/p/scst/svn/4969.
>>>>
>>> Indeed I have. With this patchset I've managed to run FCoE over virtio
>>> with LIO running on the host. Quite cool, methinks :-)
>>>
>>> And indeed, your patch seem to be helping with the issues I've seen
>>> (mysterious out-of-order frames and wireshark complaining about invalid
>>> frames).
>>> Still a bit hackish, though. Can't we move the data destructor into the
>>> skb itself and not free the data in the target core?
>>
>> Hello Hannes,
>>
>> Several LIO drivers already support sending data asynchronously to the
>> initiator, e.g. the ib_srpt and qla2x00t drivers. These drivers avoid
>> that struct se_cmd and its data buffer are freed before sending finished
>> by passing the TARGET_SCF_ACK_KREF flag to target_submit_cmd_map_sgls()
>> and by calling target_put_sess_cmd() after the data transfer has
>> finished. Since the tcm_fc driver already specifies TARGET_SCF_ACK_KREF
>> when submitting commands to the LIO core I think what's needed to make
>> use_sg=1 safe in the tcm_fc driver is for use_sg=1 to move the
>> target_put_sess_cmd() call from ft_queue_status() into a callback
>> function that is called when transmitting data has finished. Maybe the
>> SKBTX_DEV_ZEROCOPY flag can be used to make the network stack invoke an
>> appropriate callback function. See e.g. xenvif_zerocopy_callback() in
>> the xen-netback driver.
>>
> Well, Johannes and me looked into that a bit closer; there actually _is_
> a destructor callback in the sk_buff, so in theory we could hook into
> that. However, I'm not sure if that's working as intended; the FCoE
> stack does a lot of skb_clone(), and my setup even more so (tcm_fc over
> vlan over veth over bridge over tap into the guest).
> So it's anyones guess at which point of the chain the original data will
> be freed. And whether the 'netdev' point still points to tcm_fcs netdev ...
> Debugging continues.
Hi Hannes,
Does it really matter that the FCoE skb's get cloned? skb_clone()
increases skb_shinfo(skb)->dataref. skb_release_data() only calls the
skb destructor if skb_shinfo(skb)->dataref reaches zero. I think this
means even if an skb gets cloned that the destructor is only called
after the skb data has been sent.
Bart.
prev parent reply other threads:[~2016-08-07 1:09 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 13:13 [PATCH 00/22] FCoE VN2VN fixes Hannes Reinecke
2016-08-03 13:13 ` [PATCH 01/22] libfc: Revisit kref handling Hannes Reinecke
2016-08-04 10:59 ` Johannes Thumshirn
2016-08-18 14:43 ` Chad Dupuis
2016-08-03 13:13 ` [PATCH 02/22] libfc: additional debugging messages Hannes Reinecke
2016-08-03 17:33 ` Bart Van Assche
2016-08-04 6:05 ` Hannes Reinecke
2016-08-04 11:02 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 03/22] fcoe: FIP debugging Hannes Reinecke
2016-08-03 17:36 ` Bart Van Assche
2016-08-04 6:07 ` Hannes Reinecke
2016-08-04 11:09 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 04/22] libfc: spurious I/O error under high load Hannes Reinecke
2016-08-04 11:15 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 05/22] libfc: Do not attempt to login if the port is already started Hannes Reinecke
2016-08-04 11:18 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 06/22] libfc: Debug PRLI failures Hannes Reinecke
2016-08-04 11:21 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 07/22] fcoe: filter out frames from invalid vlans Hannes Reinecke
2016-08-04 11:35 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 08/22] fcoe: make R_A_TOV and E_D_TOV configurable Hannes Reinecke
2016-08-04 11:52 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 09/22] libfc: use configured lport R_A_TOV when sending exchange Hannes Reinecke
2016-08-04 12:04 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 10/22] libfc: use configured e_d_tov for remote port state retries Hannes Reinecke
2016-08-04 12:08 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 11/22] fcoe: inhibit writing invalid values into the 'enabled' attribute Hannes Reinecke
2016-08-03 17:25 ` Bart Van Assche
2016-08-04 6:02 ` Hannes Reinecke
2016-08-03 13:13 ` [PATCH 12/22] libfc: don't fail sequence abort for completed exchanges Hannes Reinecke
2016-08-04 13:29 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 13/22] libfc: do not overwrite DID_TIME_OUT status Hannes Reinecke
2016-08-04 13:30 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 14/22] libfc: use error code for fc_rport_error() Hannes Reinecke
2016-08-04 13:40 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 15/22] libfc: frame alloc failure messages Hannes Reinecke
2016-08-04 13:45 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 16/22] fc: add missing ELS explanation values Hannes Reinecke
2016-08-04 13:54 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 17/22] libfc: Send LS_RJT responses on frame allocation failure Hannes Reinecke
2016-08-04 13:58 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 18/22] libfc: don't advance state machine for incoming FLOGI Hannes Reinecke
2016-08-04 13:59 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 19/22] libfc: Implement RTV responder Hannes Reinecke
2016-08-04 14:03 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 20/22] libfc: Do not drop out-of-order frames Hannes Reinecke
2016-08-04 14:03 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 21/22] libfc: reset timeout on queue full Hannes Reinecke
2016-08-04 14:08 ` Johannes Thumshirn
2016-08-03 13:13 ` [PATCH 22/22] fcoe: set default TC priority Hannes Reinecke
2016-08-03 13:38 ` kbuild test robot
2016-08-04 14:59 ` [PATCH 00/22] FCoE VN2VN fixes Bart Van Assche
2016-08-05 7:43 ` Hannes Reinecke
2016-08-05 15:33 ` Bart Van Assche
2016-08-05 16:16 ` Hannes Reinecke
2016-08-07 0:12 ` Bart Van Assche [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=51f8558c-2e3f-7274-ba3f-4ea29eb42624@acm.org \
--to=bvanassche@acm.org \
--cc=chad.dupuis@qlogic.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jth@kernel.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;
as well as URLs for NNTP newsgroup(s).