Return-Path: Received: from us-smtp-delivery-194.mimecast.com ([63.128.21.194]:26403 "EHLO us-smtp-delivery-194.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbdBSFgH (ORCPT ); Sun, 19 Feb 2017 00:36:07 -0500 From: Trond Myklebust To: "chuck.lever@oracle.com" CC: "anna.schumaker@netapp.com" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH v3 1/4] SUNRPC: Add generic helpers for xdr_stream encode/decode Date: Sun, 19 Feb 2017 05:36:00 +0000 Message-ID: <1487482557.70634.2.camel@primarydata.com> References: <20170218191246.32687-1-trond.myklebust@primarydata.com> <20170218191246.32687-2-trond.myklebust@primarydata.com> <0016E411-0100-4CCF-9FCF-541416C4FC1E@oracle.com> In-Reply-To: <0016E411-0100-4CCF-9FCF-541416C4FC1E@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gU2F0LCAyMDE3LTAyLTE4IGF0IDE3OjIxIC0wNTAwLCBDaHVjayBMZXZlciB3cm90ZToNCj4g PiBPbiBGZWIgMTgsIDIwMTcsIGF0IDI6MTIgUE0sIFRyb25kIE15a2xlYnVzdCA8dHJvbmQubXlr bGVidXN0QHByaW1hDQo+ID4gcnlkYXRhLmNvbT4gd3JvdGU6DQo+ID4gDQo+ID4gQWRkIHNvbWUg Z2VuZXJpYyBoZWxwZXJzIGZvciBlbmNvZGluZy9kZWNvZGluZyBvcGFxdWUgc3RydWN0dXJlcw0K PiA+IGFuZA0KPiA+IGJhc2ljIHUzMi91NjQuDQo+IA0KPiBJIGhhdmUgc29tZSByYW5kb20tdGhv dWdodHMtc2xhc2gtd2Fja3ktaWRlYXMuDQo+IA0KPiBJJ20gZ29pbmcgdG8gcGFpbnQgdGhlIGdh cmRlbiBzaGVkIGEgbGl0dGxlIHNpbmNlDQo+IHRoZXNlIGhlbHBlcnMgYXBwZWFyIHRvIGJlIGJy b2FkbHkgYXBw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