Re: mbuf_outbound_finalize() reports packet length is less than mbuf length
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=az082uWuLMPH3UurqyK4BElVB/NiNPQkqFdj53+YxG0=; b=qBEujhno77rv0p0ev/p6ZZDyU2f8vpv/MoldmrzTcSfCWgjZI62Dti4cP1f+8KVBfj UI5vq7Nsx7H+uqIu6g/pD5lcIOapcOMPw7md3V8M2BLCrxPY9La40B/v0C5uj9yvmIor koaTOmc0SMlHmg8kFn565mF/7n7u7MZx060Hw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=IPbiZqSIW+d8602xgKwMfb7u/G0hJhacgrh9FnvOK+7zeVeXu0Rcx1JGpnBqxxcAIo GcNGWz7LFfEVRwSM6MUMxIM4EF/vMbkR45W5KekNpG+gVWa3l7VNyAJuFnKstQvfO3VB iEmYxGuxK9mz0Rvce+4Jq8sAwfaYiNolEw58U=
Well, an mbuf_pullup() + a byte swap will work ...
I think the problems with mbuf_pullup() make this solution impractical since I'd need to pull up the remainder of the packet into the first mbuf. Drew was on this thread "mbuf_pullup() practically useless..." http://lists.apple.com/archives/darwin-kernel/2007/Aug/msg00109.html I was hoping for a little while that just pulling in the first few bytes of the ip header and then letting in_delayed_cksum_offset() defragment the ip header would help, but I think in_delayed_cksum_offset() is broken in that case as well. I'm not sure if code in ip_output.c is linkable from my nke, but the data types (e.g. struct mbuf is typedef'ed as __mbuf) are still hidden. I've filed a radar bug for this problem, so maybe outbound_finalize() will be usable in Snow Leopard! -Brendan On Mon, Jul 27, 2009 at 1:08 PM, Kevin Brock<apple@kevin.com> wrote:
Brendan Creane wrote:
This problem combined with mbuf_outbound_finalize() inability to handle host-order ip length field in earlier versions (xnu-792.13.8 or older) means the function is pretty much useless.
Well, an mbuf_pullup() + a byte swap will work, and avoids having to do stuff with the checksum offload pieces. I seem to recall that some of the pieces that need to be manipulated weren't reachable using standard KPI's and structure definitions, although that may have changed recently as well. In our case we really need to make sure that we're not doing much with 'nonstandard' APIs.
The problems with that function do seem to keep building up though :-(
Kevin
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Brendan Creane