Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Offloading checksums to H/W



Hey mm

Yup exactly, that's what is written in Apple's docs but as we all have access to the kernel and overall - why on earth we should need to do this? Of course there are cases - when I change destination, metric, etc, etc. But if f.ex. I just changed packet length? Imho it's not the case for re-injection. And it actually works as expected on my test-cases - I can do whatever I want as long as I keep its destination, etc. But my case is simple I need to increase data size for say 20 bytes.

I actually managed to get some weird checksum (wrong) from H/w - I will keep you informed about my progress..

Best regards,
            Platon

On Aug 24, 2007, at 7:54 PM, mm w wrote:

Hi Platon,

If your modifications involve changes to packet header information you
must swallow the packet entirely and reinject it.

Cheers

On 8/24/07, Platon Fomichev <email@hidden> wrote:
Hi Everybody

It seems I can't figure how to correctly offload my TCP/UDP packet to
the H/W network checksumming routines. It seems rather inconvenient
that I have to add all typical checksumming code into the driver -
because neither of mbuf API can actually re-checksum the packet. As
for H/W support - I can see from the flags that my H/W supports TCP
offload but if I set tcp checksum f.ex. to zero in my Interface
filter the packet will not be checksummed later in the hardware.

Thus some questions:

1) Seems that there is no kernel API to do IP checksumming in Mac -
is it true, if not how to do it? mbuf finalize func does not do it.
2) Seems that hardware TCP/UDP checksum offload is actually missing
from Mac at all? At least it is not present on MacBook/MacBook pro.
If yes why does it advertise itself using ifnet API as capable to do
it? If I am wrong how can I check that my network adapter is actually
doing its work and how can I benefit from this in my code (I am
actively changing the packet)

Best regards,
             Platon.

On Aug 23, 2007, at 9:05 AM, JanakiRam wrote:

email@hidden

This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden
References: 
 >printf logs are not getting printed properly on system.log (From: JanakiRam <email@hidden>)
 >Offloading checksums to H/W (From: Platon Fomichev <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.