From: Jeff Garzik <jeff@garzik.org>
To: Colin McCabe <cmccabe@alumni.cmu.edu>
Cc: Project Hail List <hail-devel@vger.kernel.org>,
Pete Zaitcev <zaitcev@redhat.com>
Subject: Re: [PATCHv2] cld: use XDR for all messages
Date: Wed, 20 Jan 2010 20:38:39 -0500 [thread overview]
Message-ID: <4B57B01F.5080903@garzik.org> (raw)
In-Reply-To: <1263577788-2081-1-git-send-email-cmccabe@alumni.cmu.edu>
On 01/15/2010 12:49 PM, Colin McCabe wrote:
> This patch moves CLD from using manual data serialization to using XDR (via
> rpcgen). Both the packet header and the message body are now serialized and
> deserialized using XDR. This makes it easy to have a variable-length packet
> header, as well as a variable-length message body.
>
> This patch introduces a minor libcldc API change in struct cldc_call_opts.
>
> v2 changes:
> * Added __cld prefix to functions in cld_fmt.c
>
> * When decoding CMT_GET messages, we should store the payload in the
> session structure, rather than in cldc_call_opts.
>
> * Got rid of pkt_is_first, pkt_is_last, in favor of a flags-based approach.
>
> * Killed CLD_MAX_PKT_MSG. It's more efficient to only allocate as much space
> as you need, rather than always allocating space for 128 packets in a message.
>
> * Created CLD_MAX_PAYLOAD_SZ to mean the maximum size of the data that can be
> sent with GET or PUT. This is different (and smaller than!) the maximum
> message size.
>
> * automake: Add cld_msg_rpc.h to BUILT_SOURCES
>
> * automake: Add lib dir to INCLUDES
>
> * automake: "make clean" now deletes XDR build products
>
> Signed-off-by: Colin McCabe<cmccabe@alumni.cmu.edu>
> ---
> .gitignore | 4 +
> include/Makefile.am | 2 +-
> include/cld_common.h | 10 +
> include/cld_fmt.h | 89 +++++
> include/cld_msg.h | 252 -------------
> include/cldc.h | 36 +-
> lib/Makefile.am | 19 +-
> lib/cld_fmt.c | 193 ++++++++++
> lib/cld_msg_rpc.x | 218 +++++++++++
> lib/cldc.c | 966 +++++++++++++++++++++---------------------------
> lib/common.c | 6 +-
> server/Makefile.am | 9 +-
> server/cld.h | 97 ++++--
> server/cldb.h | 2 +-
> server/msg.c | 304 ++++++----------
> server/server.c | 743 ++++++++++++++++++++-----------------
> server/session.c | 396 ++++++++++-----------
> test/Makefile.am | 5 +-
> test/load-file-event.c | 14 +-
> test/save-file-event.c | 2 -
> tools/cldcli.c | 22 +-
> 21 files changed, 1777 insertions(+), 1612 deletions(-)
> create mode 100644 include/cld_fmt.h
> delete mode 100644 include/cld_msg.h
> create mode 100644 lib/cld_fmt.c
> create mode 100644 lib/cld_msg_rpc.x
Looking good... we are definitely getting closer.
Currently, it still does not pass "make distcheck", which presages a lot
of installation problems. Notably,
#include <lib/cld_msg_rpc.h>
is not consistent with the rest of the headers, producing things such as
"make distcheck" build breakage:
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../lib -I.. -I../../include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -g -O2 -MT cldc.lo -MD -MP -MF .deps/cldc.Tpo -c ../../lib/cldc.c -fPIC -DPIC -o .libs/cldc.o
> In file included from ../../lib/cldc.c:37:
> ../../include/cldc.h:26:29: error: lib/cld_msg_rpc.h: No such file or directory
You will either need to move the header to $cld/include/ or update
INCLUDES in various */Makefile.am files to reference $(top_srcdir)/lib
(which I see you actually did, in a few cases).
Also, it would be nice if this did not introduce warnings. A big point
with the testsuite, and minor point with compiler warnings, is that --
more than anything else -- we do not want to introduce regressions.
Jeff
next prev parent reply other threads:[~2010-01-21 1:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 17:49 [PATCHv2] cld: use XDR for all messages Colin McCabe
2010-01-21 1:38 ` Jeff Garzik [this message]
2010-01-21 2:38 ` Colin McCabe
2010-01-26 21:22 ` Colin McCabe
2010-01-26 22:11 ` Jeff Garzik
2010-01-26 23:47 ` Colin McCabe
2010-01-29 7:01 ` Jeff Garzik
2010-01-30 1:01 ` Colin McCabe
2010-02-03 6:35 ` [PATCH] " Jeff Garzik
2010-02-03 21:45 ` Colin McCabe
2010-02-05 9:51 ` Jeff Garzik
2010-02-05 0:59 ` Jeff Garzik
2010-02-05 4:14 ` Pete Zaitcev
2010-02-05 6:06 ` Jeff Garzik
2010-02-05 7:16 ` Pete Zaitcev
2010-02-05 9:48 ` Jeff Garzik
2010-02-05 18:49 ` Colin McCabe
2010-02-09 9:20 ` Jeff Garzik
2010-02-09 9:38 ` Jeff Garzik
2010-02-09 15:47 ` Pete Zaitcev
2010-02-09 23:13 ` Pete Zaitcev
2010-02-09 23:21 ` Jeff Garzik
2010-02-10 0:21 ` Pete Zaitcev
2010-02-10 1:33 ` Jeff Garzik
2010-02-10 2:27 ` Colin McCabe
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=4B57B01F.5080903@garzik.org \
--to=jeff@garzik.org \
--cc=cmccabe@alumni.cmu.edu \
--cc=hail-devel@vger.kernel.org \
--cc=zaitcev@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.