From: "jiangtao.jit" <jiangtao.jit@gmail.com>
To: "Francois Romieu" <romieu@fr.zoreil.com>
Cc: "netdev" <netdev@vger.kernel.org>
Subject: Re: problem with function vlan_get_protocol()
Date: Sun, 17 Jul 2011 16:15:51 +0800 [thread overview]
Message-ID: <201107171615491568697@gmail.com> (raw)
In-Reply-To: 201107171253127340006@gmail.com
Thanks a lot Francois
thank you for your explanation
--
jiangtao
发件人: Francois Romieu
发送时间: 2011-07-17 15:49:00
收件人: jiangtao.jit
抄送: netdev
主题: Re: problem with function vlan_get_protocol()
jiangtao.jit <jiangtao.jit@gmail.com> :
[...]
> do we need an else branch on pointer protop failed ? through the else is unlikely
>
> if (likely(protop))
> protocol = *protop;
> else
> protocol = proto;
>
> is it necessary ?
The else branch signals that skb_header_pointer uncloaked a really tiny
ethernet frame : the content of proto is not even initialized (stack
allocation), whence irrelevant. In such circumstances the default
initialization value of protocol (0) does not seem too bad.
--
Ueimor
prev parent reply other threads:[~2011-07-17 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-17 4:53 problem with function vlan_get_protocol() jiangtao.jit
2011-07-17 7:34 ` Francois Romieu
2011-07-17 8:15 ` jiangtao.jit [this message]
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=201107171615491568697@gmail.com \
--to=jiangtao.jit@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.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;
as well as URLs for NNTP newsgroup(s).