On 9/29/2021 6:36 PM, Eric Sender wrote:
Hello,

I think my issue is two fold:

    1. In order to get OVS to compile, I needed to make a few changes to the
    code. Namely, to change skb->l4_rxhash to skb->l4_hash?
       - I feel I shouldn't have needed to do that in order to compile

       2. Not sure if its related, but I found 4 errors which I have
    attached.
       - Any thoughts on those errors?


Here is a diff of the following changes I needed to make (basically a
ctrl-F replace of l4_rxhash to l4_hash.

*diff --git a/acinclude.m4 b/acinclude.m4*
index 84f344da0..b14fab8f3 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -874,7 +874,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
    OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_clear_hash])
    OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [int.skb_zerocopy(],
                    [OVS_DEFINE([HAVE_SKB_ZEROCOPY])])
-  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [u8.*l4_rxhash],
+  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [u8.*l4_hash],
                    [OVS_DEFINE([HAVE_L4_RXHASH])])
    OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_ensure_writable])
    OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_vlan_pop])


Hi Eric,

you're missing this commit:
f365b41f9dff ('compat: Fix build issue on RHEL 7.7.')

It's not in branch 2.14.  You can cherry pick it from master
or you could just update to branch 2.15.

Regards,

- Greg


*diff --git a/datapath/datapath.c b/datapath/datapath.c*
index 05c1e4274..0796c199c 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -533,7 +533,7 @@ static int queue_userspace_packet(struct datapath *dp,
struct sk_buff *skb,
  #endif

  #ifdef HAVE_L4_RXHASH
- if (skb->l4_rxhash)
+ if (skb->l4_hash)
  #else
   if (skb->l4_hash)
  #endif


*diff --git a/datapath/linux/compat/include/linux/skbuff.h*
b/datapath/linux/compat/include/linux/skbuff.h
index 6d248b3ed..328a631d8 100644
--- a/datapath/linux/compat/include/linux/skbuff.h
+++ b/datapath/linux/compat/include/linux/skbuff.h
@@ -279,7 +279,7 @@ static inline void skb_clear_hash(struct sk_buff *skb)
   skb->rxhash = 0;
  #endif
  #if defined(HAVE_L4_RXHASH) && !defined(HAVE_RHEL_OVS_HOOK)
- skb->l4_rxhash = 0;
+ skb->l4_hash = 0;
  #endif
  }
  #endif
@@ -371,7 +371,7 @@ static inline void skb_pop_mac_header(struct sk_buff
*skb)
  #ifndef HAVE_SKB_CLEAR_HASH_IF_NOT_L4
  static inline void skb_clear_hash_if_not_l4(struct sk_buff *skb)
  {
- if (!skb->l4_rxhash)
+ if (!skb->l4_hash)
   skb_clear_hash(skb);
  }
  #endif
@@ -466,7 +466,7 @@ __skb_set_hash(struct sk_buff *skb, __u32 hash, bool
is_sw, bool is_l4)
   skb->hash = hash;
  #endif
  #if defined(HAVE_L4_RXHASH)
- skb->l4_rxhash = is_l4;
+ skb->l4_hash = is_l4;
  #else
   skb->l4_hash = is_l4;
  #endif

Essentially, I needed to change all references to skb->l4_rxhash to
skb->l4_hash because of the following errors during make:

$ make
...
/root/build/datapath/linux/datapath.c: In function ‘queue_userspace_packet’:
/root/build/datapath/linux/datapath.c:536:9: error: ‘struct sk_buff’ has no
member named ‘l4_rxhash’
   if (skb->l4_rxhash)
          ^
...
make[5]: *** [/root/build/datapath/linux/datapath.o] Error 1
make[4]: *** [_module_/root/build/datapath/linux] Error 2
make[4]: Leaving directory `/usr/src/kernels/3.10.0-1160.36.2.el7.x86_64'
make[3]: *** [default] Error 2
make[3]: Leaving directory `/root/build/datapath/linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/build/datapath'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/build'
make: *** [all] Error 2


Thank you,
Eric


_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to