From: Eric Dumazet <eric.dumazet@gmail.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Neal Cardwell <ncardwell@google.com>,
netfilter-devel@vger.kernel.org,
Tom Herbert <therbert@google.com>
Subject: Re: [PATCH net] ipv4: set transport header earlier
Date: Tue, 16 Jul 2013 06:56:26 -0700 [thread overview]
Message-ID: <1373982986.10804.106.camel@edumazet-glaptop> (raw)
In-Reply-To: <51E549A0.206@cogentembedded.com>
On Tue, 2013-07-16 at 17:24 +0400, Sergei Shtylyov wrote:
> > + skb->transport_header = skb->network_header + iph->ihl*4;
>
> Spaces around * wouldn't hurt, to be consistent with the rest of the
> statement and the Linux style in common.
I am well aware of this, I chose the convention used in this function
and file.
# grep ihl net/ipv4/ip_input.c
opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
if (iph->ihl > 5 && ip_rcv_options(skb))
if (iph->ihl < 5 || iph->version != 4)
if (!pskb_may_pull(skb, iph->ihl*4))
if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
} else if (len < (iph->ihl*4))
Thanks
next prev parent reply other threads:[~2013-07-16 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 3:03 [PATCH net] ipv4: set transport header earlier Eric Dumazet
2013-07-16 13:24 ` Sergei Shtylyov
2013-07-16 13:56 ` Eric Dumazet [this message]
2013-07-16 20:00 ` 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=1373982986.10804.106.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=therbert@google.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