[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4DFF68D9.4000005@redhat.com>
Date: Mon, 20 Jun 2011 12:35:53 -0300
From: Flavio Leitner <fbl@...hat.com>
To: Paul Gortmaker <paul.gortmaker@...driver.com>
CC: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] ip: introduce ip_is_fragment helper inline function
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@...driver.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists