Re: [nfsv4] Clean up for rpcrdma-version-two Read chunks

Chuck Lever <chuck.lever@oracle.com> Thu, 07 May 2020 15:57 UTC

Return-Path: <chuck.lever@oracle.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7DCAD3A0A11 for <nfsv4@ietfa.amsl.com>; Thu, 7 May 2020 08:57:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=oracle.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8zVM1CqXH4GO for <nfsv4@ietfa.amsl.com>; Thu, 7 May 2020 08:56:59 -0700 (PDT)
Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AFDAC3A0A0E for <nfsv4@ietf.org>; Thu, 7 May 2020 08:56:59 -0700 (PDT)
Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 047FrjQR154682; Thu, 7 May 2020 15:56:56 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2020-01-29; bh=Q8IT8CpxT17993ghOr8bfwWEV37mKw92prcBGWWfNvc=; b=RUrMv4elSkx/K1kLiW0/LxGCXqAixFnR8zKVGuynWDS55GkwucaUbgm5s0HFaQn7tgI9 CCMoaY0NlI1KN1HrlHkBcCLSb0Sct4flBFJJiuHrUnBqK1AVUFWug7/3BOuQqT2g8wZi xHp/CbabN8sDFzFjhRYI1eFke633pdIdRAXJxHpsm11MGH5DKDkgB6GVHdeBessfoFAf 2O+jGZ27F276D0vP4hpFO+3/x8nprGAvah4T2z0UoUCUCpxaMb5GFCje/id10Bpczehh JV/4W7XrG0gsTnXMb64pDVhLpxHDeseOKL4c3y4DP/ScwIrzH0pgkLBFyVFHFvniIKm2 Gg==
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 30usgq83te-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 May 2020 15:56:56 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 047FppI5161858; Thu, 7 May 2020 15:54:55 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 30t1raxe53-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 May 2020 15:54:55 +0000
Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 047Fsscn022570; Thu, 7 May 2020 15:54:55 GMT
Received: from anon-dhcp-153.1015granger.net (/68.61.232.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 May 2020 08:54:54 -0700
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: Chuck Lever <chuck.lever@oracle.com>
In-Reply-To: <A999AEE0-9201-4A73-AC9D-005500A32BCA@oracle.com>
Date: Thu, 07 May 2020 11:54:53 -0400
Cc: NFSv4 <nfsv4@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <96C1D634-7653-448D-88F4-2FA2821624B3@oracle.com>
References: <A999AEE0-9201-4A73-AC9D-005500A32BCA@oracle.com>
To: David Noveck <davenoveck@gmail.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070128
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070128
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/QYLpvaE_KDjX6y273kYcitYn3yA>
Subject: Re: [nfsv4] Clean up for rpcrdma-version-two Read chunks
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 07 May 2020 15:57:02 -0000

Hi Dave-

I've mocked up the proposed changes in the Editor's Copy of this document.
The changes add similar requirements for NOMSG and Reply chunks.

Here is the full text:

https://chucklever.github.io/i-d-rpcrdma-version-two/draft-ietf-nfsv4-rpcrdma-version-two.html


Here is the raw text of the new requirements:

Requirement A: the Read list must be in ascending order

Added to Section 4.3.5

   If a Responder receives a Read list whose RDMA segment position
   values do not appear in monotonically increasing order, it MUST
   discard the message without processing it and respond with an
   RDMA2_ERROR message with the rdma_xid field set to the XID of the
   malformed message and the rdma_err field set to RDMA2_ERR_BAD_XDR.
   If a Requester receives a Read list whose RDMA segment position
   values do not appear in monotonically increasing order, it MUST
   discard the message without processing it and terminate the RPC
   transaction that corresponds to the XID value in the rdma_xid
   field of the malformed message.


Requirement B: NOMSG is the only header type that can carry a PZRC or Reply chunk

Added to Section 4.4.3

   If a Responder receives an RPC-over-RDMA message that carries a
   Position Zero Read chunk and whose RDMA2_F_RESPONSE flag is clear but
   the message does not use the RDMA2_NOMSG header type, it MUST discard
   that message without processing it and respond with an RDMA2_ERROR
   message with the rdma_xid field set to the XID of the malformed
   message and the rdma_err field set to RDMA2_ERR_BAD_XDR.  When a
   Requester receives an RPC-over-RDMA message that carries a Reply
   chunk and whose RDMA2_F_RESPONSE flag is set but the message does not
   use the RDMA2_NOMSG header type, it MUST discard that message without
   processing it and terminate the RPC transaction corresponding to the
   XID value in the message's rdma_xid field.


Requirement C: A NOMSG header type with a non-empty Read list must have a PZRC

Added to Section 6.3.2

   When a Responder receives an RDMA2_NOMSG header type with a non-empty
   Read list that does not carry a Position Zero Read chunk, it MUST
   discard that message without processing it and send an RDMA2_ERROR
   message with the rdma_err field set to RDMA2_ERR_BAD_XDR.  When a
   Requester receives an RDMA2_NOMSG header type with an empty Reply
   chunk, it discards that message and terminates the RPC transaction
   represented by the XID value in the rdma_xid field of the malformed
   message.


I have not addressed this one yet:

> On May 4, 2020, at 12:13 PM, Chuck Lever <chuck.lever@oracle.com> wrote:
> 
>> RPC/RDMA v1 does not prevent or prohibit overlapping Read chunks. Is the correct
>> response ERR_CHUNK?
> 
> A protocol change would be needed to totally prevent the expression of overlapping
> Read chunks. Maybe it's a little too late to address that in RPC/RDMA version 2.
> 
> I propose that in RPC/RDMA version 2, a Responder MUST return RDMA2_ERR_BAD_XDR if
> a Requester sends a Read list with chunks whose offsets and lengths result in the
> same message byte position appearing in more than one Read chunk.

There is still a need, IMO, for the receiver to watch out for overlapping
read segments when there is more than one Read chunk in the list. As an
example:

Given an RPC Call with two normal Read chunks, each chunk has one read
segment, presented in ascending order of position:

Inline
Length: 512 bytes

Read segment A
Position: byte 32
Length: 128 bytes

Read segment B
Position: byte 144
Length: 64 bytes

Read segment B's starting position (144) is inside Read segment A.

Perhaps a way to address overlaps would be to change the segment position
value to mean the byte offset within the inline body. A value of zero
still would have the special meaning of "this chunk replaces the inline
body".


--
Chuck Lever