lkml.org 
[lkml]   [2001]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: Zerocopy implementation issues

    Russell King writes:
    > I'm doing it _NOW_, but I'm having to rotate the checksum
    > at the end if dst & 1, only to have it unrotated in an
    > inefficient manner in csum_block_*. Seems a bit of a
    > waste of CPU cycles.

    This is certainly the kind of enhancement we can make, where
    possible. No problem.

    But I currently can't see how you would apply it even
    in the net/ipv4/tcp.c:tcp_copy_to_page() case. Look:

    page_address(page) + off

    This determines whether you need to rotate at the end
    in your checksum code, right? We know pages are aligned
    so 'off' is all that is relevant for that determination.

    Later we use:

    skb->len

    to determine the behavior of csum_block_add() (to byte swap
    or not).

    There is no connection between 'off' and 'skb->len' so I
    don't see how in this case we could make use of your optimization.

    Later,
    David S. Miller
    davem@redhat.com
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:52    [W:0.028 / U:61.656 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site