From: Colin McCabe Subject: Re: [PATCH] Re: [PATCHv2] cld: use XDR for all messages Date: Wed, 3 Feb 2010 13:45:59 -0800 Message-ID: <436f52801002031345v378713a5u6f731b29b2ed4bd4@mail.gmail.com> References: <1263577788-2081-1-git-send-email-cmccabe@alumni.cmu.edu> <4B57B01F.5080903@garzik.org> <436f52801001201838l450fbe09i6f2f9d2b6ceebe6d@mail.gmail.com> <436f52801001261322k4f6273ccl9f6a21f6ccb123df@mail.gmail.com> <4B5F6893.3070906@garzik.org> <436f52801001261547h16334bcn8f1635fb49915cd2@mail.gmail.com> <4B6287B1.6000305@garzik.org> <436f52801001291701u649caefdwce9dd2675d17a61d@mail.gmail.com> <4B69191F.5080905@garzik.org> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=xfBTTe6pwIBDrpVwy6ucnQQ/yqyPtt0Y0Zdehg4Oblg=; b=oNAyw7q0gejErpmq7K2xEspB1rS6SHy2egMpxu1NKAc2VqcWMEztSGN4KUP6gY5wmD LmSWPDQf2PyWmjPVZBx5S3xdrEgrQWhfy089/++KnMHBEBCxUgaq6+AcZ1Zn7qdbggcP rPM1bMWOKxbCXV82SJDTC+vUo4zB6OxC1MFdM= In-Reply-To: <4B69191F.5080905@garzik.org> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Jeff Garzik Cc: Project Hail List , Pete Zaitcev On Tue, Feb 2, 2010 at 10:35 PM, Jeff Garzik wrote: > On 01/29/2010 08:01 PM, Colin McCabe wrote: >> >> That seems reasonable. All of those functions could be looked at as >> "common." >> >> The intention was to group together a bunch of functions that were >> useful for packet formatting. Although the bulk of the formatting is >> done by XDR, there are some things that XDR doesn't do, like >> generating and checking SHA sums. cld_dump_buf and cld_pkt_hdr_to_st= r >> are purely for debugging purposes, but they seemed like something th= at >> would be generally useful for developers making packet format change= s. >> I know that they were useful to me. > > I finally pushed out several changes split off from your main XDR pat= ch, to > the upstream cld git repo. =A0It took longer than expected because I = would > make changes of my own along the way, which, each time, necessitated = a > rediff+rebuild between "current cld" working tree and "cld + xdr" wor= king > tree. > > The attached patch is what remains to be split up and committed. =A0I= have > definitely whittled it down, and along the way, moved and renamed som= e > things on my own. =A0With regards to cld_fmt.*, my main objection was= to > creating too many to-be-installed headers. =A0One more header can be = a pain > for us and for users, while one more source file in cld/lib/ is no bi= g deal. > > Thus, the intention is to eliminate cld_fmt.h (newly renamed to cld_p= kt.h) > altogether, while keeping the arrangement you created in cld_fmt.c (n= ewly > renamed to lib/pkt.c). Yeah, after I looked at the v2 patch I realized it wasn't separated out well enough. So I was working on a v3 patch series that had the following changes: 1. kill CLD_MAX_PKT_MSG and add CLD_MAX_PAYLOAD_SZ 2. reformat Makefile.am files (to one file per line for nicer diffs) 3. move cld_msg macros into cld_common 4. some style issues 5. add cld_fmt.c (now called cld_pkt.c) 6. create cldc_call_opts_get_data and switch to using it in test/ and t= ool/ 7. the big XDR changes. It looks like 2, 3, 4, 5 have already come to pass (thanks Jeff!) I just sent out #1 and another patch that is related to CLD_INODE_NAME_= MAX I think I'll send out a patch for #6 soon. > I will continue whittling down the patch until it just contains the X= DR > changes themselves. In tools/Makefile.am, I don't think you need $(top_srcdir)/lib any more, since cld_msg_rpc.h is now an installed header. Colin