Re: if_tap unaligned access problem

From: Luigi Rizzo (rizzo_at_icir.org)
Date: 04/28/05

  • Next message: Julian Elischer: "Re: if_tap unaligned access problem"
    Date: Thu, 28 Apr 2005 10:00:47 -0700
    To: Bruce M Simpson <bms@spc.org>
    
    

    On Thu, Apr 28, 2005 at 05:50:26PM +0100, Bruce M Simpson wrote:
    ...
    > jmg's suggestion of bringing in the NetBSD patches to allow the entire
    > network stack to be compiled with unaligned accesses (for those platforms
    > which support it) is interesting because it can simplify or eliminate
    > some of the acrobatics needed in network drivers to deal with the mbuf
    > alignment.

    very true. If a module has requirement alignments it should
    solve it by itself and not put the burden on dozens of other
    modules (i.e. device drivers) upstream. Beside being hard to
    maintain, the result leads to all sort of inefficiencies.

    E.g. some time ago when i worked on polling, i removed (only on i386)
    the aligment-bcopy from the "rl" driver. People complained that
    further up in the stack the misalgnment would cause a slowdown,
    but it turns out that the aligmnent-bcopy (which had to operate
    on unaligned data) was a lot more inefficient than the unaligned accesses
    in the upper layer, as you would end up paying the overhead for all
    packets and their entire size, instead of doing that only when
    strictly necessary.

            cheers
            luigi
    _______________________________________________
    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: Julian Elischer: "Re: if_tap unaligned access problem"