Re: allocating 14KB memory per packet compression/decompression resultsin vm_fault

From: David S. Madole (david_at_madole.net)
Date: 11/03/05

  • Next message: Chuck Swiger: "Re: allocating 14KB memory per packet compression/decompression results in vm_fault"
    To: "kamal kc" <kamal_ckk@yahoo.com>, "freebsd" <freebsd-net@freebsd.org>
    Date: Wed, 2 Nov 2005 22:40:55 -0500
    
    

    From: "kamal kc" <kamal_ckk@yahoo.com>
    >
    > i am trying to compress/decompress ip packets.
    > for this i have implemented the adaptive lzw compression.
    > i put the code in the ip_output.c and do my compression/decompression
    > just before the if_output() function call so that i won't interfere
    > with
    > the ip processing of the kernel.

    I don't have an answer for you, but I'm curious what you are doing that
    makes it better than the IPComp compression that is already available in
    IPSEC?

    If it's just LZW versus LZ77, have you considered merely extending the
    existing IPSEC implementation with just the additional protocol option?

    It seems like it would be better than reinventing the wheel -- you would
    have the advantage of the existing security policy framework to select
    what and how to encrypt as well as a working example of how to do it in
    the LZ77 code that's already there.

    If you do need to do something truly one-off and unique, I have found
    that writing it as a userland process and hanging it off a divert socket
    is an easy way to manipulate IP packets. It's not as efficient as putting
    it in the kernel, but it's a heck of a lot easier to write and debug and
    it's independent of kernel versions and other changes. You also get the
    benefit of being able to use ipfw rules to determine what gets processed
    rather than rolling your own configuration mechanism.

    David

    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Chuck Swiger: "Re: allocating 14KB memory per packet compression/decompression results in vm_fault"

    Relevant Pages

    • [RFC] LZO de/compression support - take 6
      ... Following compares this kernel port vs original miniLZO code: ... Compression: 41.8412 usec ... The LZO library is free software; ... GNU General Public License for more details. ...
      (Linux-Kernel)
    • [RFC] LZO de/compression support - take 5
      ... Can anyone do timing measurement in kernel space only. ... This file is part of the LZO real-time data compression library. ... The LZO library is free software; ... GNU General Public License for more details. ...
      (Linux-Kernel)
    • Re: Using compression from kernel mode...
      ... Remove all CRT header files from the compression algorithm source code. ... Test performance with compression in the kernel. ... re-architect the driver to interface with a user-mode application ...
      (microsoft.public.development.device.drivers)
    • Re: [PATCH] Add LZO1X compression support to the kernel
      ... it`s pretty useful because it`s and a damn fast and damn cpu friendly compression alorithm. ... seems, they have also done porting it to the kernel, so there is probably choice between two implemetations to merge. ... but, from a user-perspective, lzo is really portable and seems to be a rock solid compression scheme. ... This is based on the standard userspace lzo library, ...
      (Linux-Kernel)
    • Re: reiser4 plugins
      ... >>That just means the zip plugin has to be more carefully written than I ... >>Remember that zip, at least, would not be in the kernel. ... > Doesn't matter if it is zip of some other compression, ... Can't trust the kernel at all if root is malicious. ...
      (Linux-Kernel)