Date: Sat, 1 Nov 2008 19:08:43 -0500 From: "Biks N" <freebsd.dev@gmail.com> To: freebsd-hackers@freebsd.org Subject: Need to optimize cutstom kernel hacks Message-ID: <50cd4e5f0811011708t1f4fc665u592602d5085a6d56@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, To get started with FreeBSD kernel, I have been working on IP Packet compression. After numerous crashes and failures now everything looks good and stable. I am using kernel zlib routines to compress payload. However I think my implementation is not efficient at all. Here are the steps I am doing for compression: 1. copy Payload to empty buffer using m_copydata() function 2. call deflateInit2 () for deflate initialization 3. call deflate() for actual compression 4. copy the compressed data in buffer back to Payload I have to go through all above 4 steps for each packet! I think it will be lot faster and efficient if: * Somehow get away with deflateinit2() each time for each packet. * I can get to Payload pointer without using m_copydata() so that I don't need to copy data back and forth. Looking for your valuable suggestions and tips :) Bikrant
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50cd4e5f0811011708t1f4fc665u592602d5085a6d56>