DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Zeng <zengxiaoh81@gmail.com>
To: dev@dpdk.org
Cc: David Zeng <zengxhsh@cn.ibm.com>
Subject: [dpdk-dev] [PATCH] kni: fix build on RHEL8 and RHEL7.6-ALT
Date: Sat, 22 Dec 2018 00:27:33 +0800	[thread overview]
Message-ID: <1545409653-72601-2-git-send-email-zengxhsh@cn.ibm.com> (raw)
In-Reply-To: <1545409653-72601-1-git-send-email-zengxhsh@cn.ibm.com>

Signed-off-by: David Zeng <zengxhsh@cn.ibm.com>
---
 kernel/linux/kni/compat.h              | 9 ++++++++-
 kernel/linux/kni/ethtool/igb/kcompat.h | 4 +++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 5aadebb..3c575c7 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -102,8 +102,15 @@
 #undef NET_NAME_UNKNOWN
 #endif
 
+/*
+ * RHEL has two different version with different kernel version:
+ * 3.10 is for AMD, Intel, IBM POWER7 and POWER8;
+ * 4.14 is for ARM and IBM POWER9
+ */
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \
+	(LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index ae1b530..430aaba 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3930,7 +3930,9 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb,
 #endif
 
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \
+	(LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
-- 
1.8.3.1

  reply	other threads:[~2018-12-21 16:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21  6:03 [dpdk-dev] [PATCH] kni: fix build on RHEL 7.6-ALT on IBM POWER9 David Zeng
2018-12-21 14:34 ` Ferruh Yigit
2018-12-21 16:15 ` [dpdk-dev] [PATCH] kni: fix build on RHEL8 and RHEL7.6-ALT David Zeng
2018-12-21 16:15   ` David Zeng
2018-12-21 16:27     ` [dpdk-dev] " David Zeng
2018-12-21 16:27       ` David Zeng [this message]
2018-12-21 17:02         ` [dpdk-dev] [PATCH] " Ferruh Yigit
2019-01-14 13:34           ` Thomas Monjalon
2018-12-21 16:27     ` Ferruh Yigit

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=1545409653-72601-2-git-send-email-zengxhsh@cn.ibm.com \
    --to=zengxiaoh81@gmail.com \
    --cc=dev@dpdk.org \
    --cc=zengxhsh@cn.ibm.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).