From: Stephen Hemminger <shemminger@vyatta.com>
To: Octavian Purdila <opurdila@ixiacom.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC] [PATCH] ip: skip IP checksum for skbs with CHECKSUM_UNNECESSARY set
Date: Fri, 22 Aug 2008 18:33:20 -0400 [thread overview]
Message-ID: <20080822183320.1d8fbe34@speedy> (raw)
In-Reply-To: <200808222224.32311.opurdila@ixiacom.com>
On Fri, 22 Aug 2008 22:24:31 +0300
Octavian Purdila <opurdila@ixiacom.com> wrote:
>
> We are working on a completely in hardware LRO implementation and this patch
> would simplify the hardware implementation. Is this acceptable?
>
> --- a/net/ipv4/ip_input.c
> +++ b/net/ipv4/ip_input.c
> @@ -415,7 +415,8 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
>
> iph = ip_hdr(skb);
>
> - if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
> + if (!skb_csum_unnecessary(skb) &&
> + unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
> goto inhdr_error;
>
> len = ntohs(iph->tot_len);
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
The overhead of the additional conditional might outweigh any benefit.
next prev parent reply other threads:[~2008-08-22 22:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-22 19:24 [RFC] [PATCH] ip: skip IP checksum for skbs with CHECKSUM_UNNECESSARY set Octavian Purdila
2008-08-22 22:33 ` Stephen Hemminger [this message]
2008-08-23 0:36 ` David Miller
2008-08-23 1:59 ` Stephen Hemminger
2008-08-23 5:15 ` Herbert Xu
2008-08-23 9:58 ` Octavian Purdila
2008-08-22 22:53 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080822183320.1d8fbe34@speedy \
--to=shemminger@vyatta.com \
--cc=netdev@vger.kernel.org \
--cc=opurdila@ixiacom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox