From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 24 Oct 1997 11:02:52 -0700 From: beto@ncube.com beto@ncube.com Subject: [9fans] convS2M improvement Topicbox-Message-UUID: 6aa87696-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19971024180252.KsdQxfSG9CT2ozkNSV_VfisM7gQjS8eaQh9oO4ct2rA@z> Hi, I've modified convS2M to avoid having to copy the data during a read reply. The idea is to set the Fcall data pointer to point to the right place within the reply message. ConvS2M starts doing it's data conversion and if the data pointer is already pointing to the right place it bypasses the copy. case Rread: SHORT(fid); SHORT(count); p++; /* pad(1) */ if (p != (uchar*)f->data) { STRING(data, f->count); } else p+=f->count; break; The server needs to know the data offset for a read reply, but some macro definitions will solve the problem. p->reply.data = (char *) p->rbp->wptr+8; With this enhancement a 9P server does not have to copy data for reads. Has something like this been done to brazil/plan9? P.S. This is not scatter/gatther but it's so simple :-)