[SPDK] Re: DIF/DIX acceleration in SPDK

Luse, Paul E <paul.e.luse at intel.com>
Newsgroups dev.linux.lists.spdk
Message-ID <BYAPR11MB3831BB4502252F92C6C8AE18AD810@BYAPR11MB3831.namprd11.prod.outlook.com>
Thanks Shuhei! After talking to Jim some more, I think for this release we’ll get the capability into the acceleration engine but if/how we use it through the rest of the SPDK stack is likely going to require enough experimentation that next release is a better target.  I’ll let you know when the capabilities are in there as I’m totally counting on your help to help make use of it when the time comes ☺

Thx
Paul

From: 松本周平 <shuheimatsumoto(a)gmail.com>
Sent: Friday, June 12, 2020 6:45 AM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: [SPDK] Re: DIF/DIX acceleration in SPDK

Hi Paul,

Current NVMe-oF target and iSCSI target have used special SGL when reading from network or writing to network.
When reading from network, leave a metadata space per block by special SGL and then compute and fill DIF to metadata spaces.
When writing to network, compute and check DIF to metadata spaces, and then ignore a DIF space per block by special SGL.

Special SGL means that each SGL entry maps a single block and there is a metadata space between two SGL entries.

The major reason why we used special SGL was to avoid data copy between two buffers.

So, DIF check and DIF update will be helpful first.

The limitation that SGL is not supported will be acceptable first.
iSCSI target uses only a single contiguous buffer.
NVMe-oF target also can use only a single contiguous buffer by adjusting maximum IO size.


Another thing I want to share is that SPDK sock layer improved performance greatly recently, and this may conflict with
the current DIF implementation especially for the performance.

So in future, using DIF insert and DIF strip may be better for NVMe-TCP target and iSCSI target.
When NVMe-TCP target or iSCSI target use DIF insert and DIF strip, they prepare two buffers for each read or write, and copy with DIF insertion or strip.

So all DIF check, update, insert , and strip will be usable anyway.

One difficulty to emulate SGL by DSA is boundary.
To compute DIF for a single block which spans multiple SGL entries, it is necessary to compute CRC for the first partial block and then use the CRC as the seed value for the second partial block, and so on.

I don't think my feedback is enough, and so I'm fine for your any further question or feedback.

Thanks,
Shuhei

On Fri, Jun 12, 2020 at 12:46 AM Luse, Paul E <paul.e.luse(a)intel.com<mailto:paul.e.luse(a)intel.com>> wrote:
[cid:image001.gif(a)01D640C6.953CCB60]
Hi Everyone,

This is primarily for Shuhei but please feel free, anyone, to respond ☺

Adding support for Intel’s next generation offload engine is going well (Note, the feature is not available in HW yet, I’m using a simulator to do dev/test). Currently support exists, or is about to land on master, for:

Copy, fill, dual-cast, CRC32C, compare and the ability to submit batches of commands.

Currently these are only being used by a new tool in /examples/accel/perf but once they all land and I’ve added some more tests, we’ll start using them in SPDK modules – the most notable uses will be for CRC32C 9iscsi) and DIF/DIX throughout the stack.  There will be other uses (compare, fill, copy, etc) as well but those are the big ones.

I’ve just now started looking at DIF/DIX and have determined that using these within SPDK won’t be quite as straightforward as some of the others. I’ll explain what I’m thinking after briefly summering the DSA DIF/DIX functions (more detail is available in the public spec at https://software.intel.com/content/www/us/en/develop/download/intel-data-streaming-accelerator-preliminary-architecture-specification.html)

Note: there is no SGL support in any of these, all are single src and/or dst:


  *   DIF Check: The DIF Check operation computes the Data Integrity Field (DIF) on the source data and compares the computed DIF to the DIF contained in the source data.
  *   DIF Insert: The DIF Insert operation copies memory from the Source Address to the Destination Address, while computing the Data Integrity Field (DIF) on the source data and inserting the DIF into the output data.
  *   DIF Strip: The DIF Strip operation copies memory from the Source Address to the Destination Address, removing the Data Integrity Field (DIF). It optionally computes the DIF on the source data and compares the computed DIF to the DIF contained in the source data.
  *   DIF Update: The DIF Update operation copies memory from the Source Address to the Destination Address. It optionally computes the Data Integrity Field (DIF) on the source data and compares the computed DIF to the DIF contained in the data. It simultaneously computes the DIF on the source data using Destination DIF fields in the descriptor and inserts the computed DIF into the output data.

Upon initial review of the relatively complex implementation of DIF?DIX we have in SPDK I have the following observations that I’m hoping to get some feedback on:


  *   It looks like we require SGL in most if not all cases. I can go through them one by one but wanted to get an initial feel mainly from Shuhei on how lack of SGL support impacts our ability to use DIF?DIX offload w/DSA before I start adding support ☺
  *   With the exception of DIF Check, all of the DSA functions include a copy (I can only assume they figured a use case where they are moving data from a host buffer into a different memory subsystem in prep for DMA’ing to disk).  It looks like most if not all of our calculations are done on fixed buffers. I see a few copy functions in diff.c but I don’t see them used anywhere

I’m almost thinking the DSA functions are too “simple” for our current implementation but wonder if there’s some refactoring we can do to make use of them. I don’t know if the DSA CRC32C engine calculates the same exact CRC as the DIF/DIX functions but if so (I can verify) at a minum maybe use just accelerate the CRCs called from funcs within diff.c

Thoughts? We can chat in a community meeting soon too but email might be easier to get us all on the amge page first.

Thanks!!
Paul

_______________________________________________
SPDK mailing list -- spdk(a)lists.01.org<mailto:spdk(a)lists.01.org>
To unsubscribe send an email to spdk-leave(a)lists.01.org<mailto:spdk-leave(a)lists.01.org>
attachment.htm (text/html, 18.7 KB)
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"MS Gothic";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:"\@MS Gothic";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
p.gmail-m610875093099702040msolistparagraph, li.gmail-m610875093099702040msolistparagraph, div.gmail-m610875093099702040msolistparagraph
	{mso-style-name:gmail-m_610875093099702040msolistparagraph;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	color:black;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:1231846762;
	mso-list-template-ids:1037323828;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:1.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:1.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:2.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:2.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:3.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:3.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:4.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:4.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1
	{mso-list-id:1843624853;
	mso-list-template-ids:-1694211760;}
@list l1:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level2
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:1.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level3
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:1.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level4
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:2.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level5
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:2.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level6
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:3.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level7
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:3.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level8
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:4.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1:level9
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:4.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:black">Thanks Shuhei! After talking to Jim some more, I think for this release we’ll get the capability into the acceleration engine but if/how we use it through the rest of the SPDK stack is likely going to require enough
 experimentation that next release is a better target.&nbsp; I’ll let you know when the capabilities are in there as I’m totally counting on your help to help make use of it when the time comes
</span><span style="font-family:Wingdings;color:black">J</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:black">Thx<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Paul<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b>From:</b> <span style="font-family:&quot;MS Gothic&quot;">松本周平</span> &lt;[email protected]&gt;
<br>
<b>Sent:</b> Friday, June 12, 2020 6:45 AM<br>
<b>To:</b> Storage Performance Development Kit &lt;[email protected]&gt;<br>
<b>Subject:</b> [SPDK] Re: DIF/DIX acceleration in SPDK<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Paul,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Current NVMe-oF target and iSCSI target have used special SGL when reading from network or writing to network.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">When reading from network, leave a metadata space per block by special SGL and then compute and fill DIF&nbsp;to metadata spaces.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">When writing to network, compute and check DIF to metadata spaces, and then ignore a DIF space per block by special SGL.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Special SGL means that each SGL entry maps a single block and there is a metadata space between two SGL entries.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">The major reason why we used special SGL was to&nbsp;avoid data copy between two buffers.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">So, DIF check and DIF update will be helpful first.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">The limitation that SGL is not supported will be acceptable first.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">iSCSI target uses only a single contiguous buffer.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">NVMe-oF target also can use only a single contiguous buffer by adjusting maximum IO size.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Another thing I want to share is that SPDK sock layer improved performance greatly recently, and this may conflict with<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">the current DIF implementation especially for the performance.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">So in future, using DIF insert and DIF strip may be better for NVMe-TCP target and iSCSI target.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">When NVMe-TCP target or iSCSI target use DIF insert and DIF strip, they prepare two buffers for each read or write, and copy with DIF insertion or strip.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">So all DIF check, update, insert , and strip will be usable anyway.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">One difficulty to emulate SGL by DSA is boundary.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">To compute DIF for a single block which spans multiple SGL entries, it is necessary to compute CRC for the first partial block and then use the CRC as the seed value for the second partial block, and so on.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I don't think my feedback is enough, and so I'm fine for your any further question or feedback.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Shuhei<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Jun 12, 2020 at 12:46 AM Luse, Paul E &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><img border="0" width="50" height="50" style="width:.5208in;height:.5208in" id="_x0000_i1025" src="cid:[email protected]"><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Everyone,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">This is primarily for Shuhei but please feel free, anyone, to respond
<span style="font-family:Wingdings">J</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Adding support for Intel’s next generation offload engine is going well (Note, the feature is not available in HW yet, I’m using a simulator to do dev/test). Currently support exists,
 or is about to land on master, for:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Copy, fill, dual-cast, CRC32C, compare and the ability to submit batches of commands.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Currently these are only being used by a new tool in /examples/accel/perf but once they all land and I’ve added some more tests, we’ll start using them in SPDK modules – the most
 notable uses will be for CRC32C 9iscsi) and DIF/DIX throughout the stack.&nbsp; There will be other uses (compare, fill, copy, etc) as well but those are the big ones.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’ve just now started looking at DIF/DIX and have determined that using these within SPDK won’t be quite as straightforward as some of the others. I’ll explain what I’m thinking
 after briefly summering the DSA DIF/DIX functions (more detail is available in the public spec at
<a href="https://software.intel.com/content/www/us/en/develop/download/intel-data-streaming-accelerator-preliminary-architecture-specification.html" target="_blank">
https://software.intel.com/content/www/us/en/develop/download/intel-data-streaming-accelerator-preliminary-architecture-specification.html</a>)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Note: there is no SGL support in any of these, all are single src and/or dst:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<ul type="disc">
<li class="gmail-m610875093099702040msolistparagraph" style="mso-list:l1 level1 lfo1">
DIF Check: The DIF Check operation computes the Data Integrity Field (DIF) on the source data and compares the computed DIF to the DIF contained in the source data.<o:p></o:p></li><li class="gmail-m610875093099702040msolistparagraph" style="mso-list:l1 level1 lfo1">
DIF Insert: The DIF Insert operation copies memory from the Source Address to the Destination Address, while computing the Data Integrity Field (DIF) on the source data and inserting the DIF into the output data.<o:p></o:p></li><li class="gmail-m610875093099702040msolistparagraph" style="mso-list:l1 level1 lfo1">
DIF Strip: The DIF Strip operation copies memory from the Source Address to the Destination Address, removing the Data Integrity Field (DIF). It optionally computes the DIF on the source data and compares the computed DIF to the DIF contained in the source
 data.<o:p></o:p></li><li class="gmail-m610875093099702040msolistparagraph" style="mso-list:l1 level1 lfo1">
DIF Update: The DIF Update operation copies memory from the Source Address to the Destination Address. It optionally computes the Data Integrity Field (DIF) on the source data and compares the computed DIF to the DIF contained in the data. It simultaneously
 computes the DIF on the source data using Destination DIF fields in the descriptor and inserts the computed DIF into the output data.<o:p></o:p></li></ul>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Upon initial review of the relatively complex implementation of DIF?DIX we have in SPDK I have the following observations that I’m hoping to get some feedback on:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<ul type="disc">
<li class="gmail-m610875093099702040msolistparagraph" style="mso-list:l0 level1 lfo2">
It looks like we require SGL in most if not all cases. I can go through them one by one but wanted to get an initial feel mainly from Shuhei on how lack of SGL support impacts our ability to use DIF?DIX offload w/DSA before I start adding support
<span style="font-family:Wingdings">J</span><o:p></o:p></li><li class="gmail-m610875093099702040msolistparagraph" style="mso-list:l0 level1 lfo2">
With the exception of DIF Check, all of the DSA functions include a copy (I can only assume they figured a use case where they are moving data from a host buffer into a different memory subsystem in prep for DMA’ing to disk).&nbsp; It looks like most if not all
 of our calculations are done on fixed buffers. I see a few copy functions in diff.c but I don’t see them used anywhere<o:p></o:p></li></ul>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’m almost thinking the DSA functions are too “simple” for our current implementation but wonder if there’s some refactoring we can do to make use of them. I don’t know if the DSA
 CRC32C engine calculates the same exact CRC as the DIF/DIX functions but if so (I can verify) at a minum maybe use just accelerate the CRCs called from funcs within diff.c<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thoughts? We can chat in a community meeting soon too but email might be easier to get us all on the amge page first.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks!!<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Paul<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
SPDK mailing list -- <a href="mailto:[email protected]" target="_blank">[email protected]</a><br>
To unsubscribe send an email to <a href="mailto:[email protected]" target="_blank">
[email protected]</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>
image001.gif (image/gif, 92 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.