diff mbox

[ovs-dev] datapath: remove HAVE_MAC_RAW

Message ID CAKohpom47a21Ee_LFDu9o6uo4i5FLCiE=wjj6HvBdWmU0UONkA@mail.gmail.com
State New
Headers show

Commit Message

Viresh Kumar Aug. 27, 2013, 10:51 a.m. UTC
On 26 August 2013 21:59, Jesse Gross <jesse@nicira.com> wrote:

> This is compatibility code for older kernels so by definition it
> doesn't exist in current kernels. You can't just remove it.

My mistake :(

Will something like this makes sense? This was changed in 2.6.22 by
following patch:
b0e380b [SK_BUFF]: unions of just one member don't get anything done, kill them

-------x----------------x------------

Comments

Jesse Gross Aug. 28, 2013, 12:07 a.m. UTC | #1
On Tue, Aug 27, 2013 at 3:51 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 26 August 2013 21:59, Jesse Gross <jesse@nicira.com> wrote:
>
>> This is compatibility code for older kernels so by definition it
>> doesn't exist in current kernels. You can't just remove it.
>
> My mistake :(
>
> Will something like this makes sense? This was changed in 2.6.22 by
> following patch:
> b0e380b [SK_BUFF]: unions of just one member don't get anything done, kill them

I suspect that this is just some unrelated key word that was added to
skbuff.h for the RT kernels. I think the best solution would be to
just tighten up the grep expression since that is simpler and clearer
than adding version checks as well.
diff mbox

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index 73ee5ce..d6ac6af 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -238,8 +238,13 @@  AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   # quoting rules.
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [[[^@]]proto_data_valid],
                   [OVS_DEFINE([HAVE_PROTO_DATA_VALID])])
-  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [raw],
-                  [OVS_DEFINE([HAVE_MAC_RAW])])
+  # Applicable only for kernels <= 2.6.21
+  if test "$version" -le 2 && test "$patchlevel" -le 6; then
+         if test "$version.$patchlevel" != 2.6 || test "$sublevel" -le 21; then
+              OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [raw],
+                              [OVS_DEFINE([HAVE_MAC_RAW])])
+          fi
+  fi
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_dst(],
                   [OVS_DEFINE([HAVE_SKB_DST_ACCESSOR_FUNCS])])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h],