Re: Zerocopy implementation issues

From: David S. Miller (davem@redhat.com)
Date: Sun Apr 29 2001 - 06:32:57 EST


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/



This archive was generated by hypermail 2b29 : Mon Apr 30 2001 - 21:00:22 EST