[ovs-dev] [PATCH 2/2] datapath: Check for skb_cow_head(), not skb_cow().
Jesse Gross
jesse at nicira.com
Thu May 27 23:01:57 UTC 2010
This set looks good.
On Thu, May 27, 2010 at 3:39 PM, Ben Pfaff <blp at nicira.com> wrote:
> skb_cow() has been present since 2.6.12 or earlier, but skb_cow_head() was
> added only in 2.6.23, so we were checking for the wrong identifier here.
> ---
> acinclude.m4 | 4 ++--
> .../linux-2.6/compat-2.6/include/linux/skbuff.h | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index cabe7d3..015bf66 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -157,8 +157,8 @@ AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [
> OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h],
> [skb_copy_from_linear_data_offset],
> [OVS_DEFINE([HAVE_SKB_COPY_FROM_LINEAR_DATA_OFFSET])])
> - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_cow],
> - [OVS_DEFINE([HAVE_SKB_COW])])
> + OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_cow_head],
> + [OVS_DEFINE([HAVE_SKB_COW_HEAD])])
> OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_transport_header],
> [OVS_DEFINE([HAVE_SKBUFF_HEADER_HELPERS])])
> OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_warn_if_lro],
> diff --git a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h
> b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h
> index 5ed0e48..15acea9 100644
> --- a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h
> +++ b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h
> @@ -53,7 +53,7 @@ static inline void skb_copy_to_linear_data_offset(struct
> sk_buff *skb,
> #define NET_SKB_PAD 16
> #endif
>
> -#ifndef HAVE_SKB_COW
> +#ifndef HAVE_SKB_COW_HEAD
> static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom,
> int cloned)
> {
> @@ -74,7 +74,7 @@ static inline int skb_cow_head(struct sk_buff *skb,
> unsigned int headroom)
> {
> return __skb_cow(skb, headroom, skb_header_cloned(skb));
> }
> -#endif /* !HAVE_SKB_COW */
> +#endif /* !HAVE_SKB_COW_HEAD */
>
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
> static inline int skb_clone_writable(struct sk_buff *skb, int len)
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100527/6b19c87f/attachment-0003.html>
More information about the dev
mailing list