From: Flavio Leitner <fbl@redhat.com>
To: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] ip: introduce ip_is_fragment helper inline function
Date: Mon, 20 Jun 2011 12:35:53 -0300 [thread overview]
Message-ID: <4DFF68D9.4000005@redhat.com> (raw)
In-Reply-To: <1308334091-10031-1-git-send-email-paul.gortmaker@windriver.com>
On 06/17/2011 03:08 PM, Paul Gortmaker wrote:
> There are enough instances of this:
>
> iph->frag_off & htons(IP_MF | IP_OFFSET)
>
> that a helper function is probably warranted.
>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
[...]
> diff --git a/include/net/ip.h b/include/net/ip.h
> index e9ea7c7..114a152 100644
> --- a/include/net/ip.h
> +++ b/include/net/ip.h
> @@ -250,6 +250,11 @@ int ip_decrease_ttl(struct iphdr *iph)
> return --iph->ttl;
> }
>
> +static inline int ip_is_fragment(const struct iphdr *iph)
> +{
> + return iph->frag_off & htons(IP_MF | IP_OFFSET);
> +}
> +
Do we really need 'inline' there?
fbl
prev parent reply other threads:[~2011-06-20 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 18:08 [PATCH net-next] ip: introduce ip_is_fragment helper inline function Paul Gortmaker
2011-06-17 18:19 ` Ben Hutchings
2011-06-17 18:24 ` Paul Gortmaker
2011-06-20 15:35 ` Flavio Leitner [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=4DFF68D9.4000005@redhat.com \
--to=fbl@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=paul.gortmaker@windriver.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).