DPDK patches and discussions
 help / color / mirror / Atom feed
From: michael.luo@intel.com
To: dev@dpdk.org
Cc: stable@dpdk.org
Subject: [dpdk-dev] [PATCH] kni: fix build on RHEL8
Date: Mon, 27 May 2019 12:02:07 +0800	[thread overview]
Message-ID: <1558929727-56647-1-git-send-email-michael.luo@intel.com> (raw)

From: Luo Gaoliang <michael.luo@intel.com>

Build error was seen on RHEL8 when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.

Build error log:
/root/kni/dpdk-19.05/kernel/linux/kni/ethtool/igb/kcompat.h:3928:25:
error: 'const struct net_device_ops' has no member named 'extended'
 #define ndo_set_vf_vlan extended.ndo_set_vf_vlan
                         ^~~~~~~~

RHEL8 defined ndo_set_vf_vlan in net_device_ops as well as the mainline kernel.

Signed-off-by: Luo Gaoliang <michael.luo@intel.com>
---
 kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 649a69c..f041a3e 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3922,7 +3922,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
      (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(12, 3, 0)) || \
      (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4)))
 #define HAVE_VF_VLAN_PROTO
-#if (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4))
+#if ((RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 /* In RHEL/Centos 7.4, the "new" version of ndo_set_vf_vlan
  * is in the struct net_device_ops_extended */
 #define ndo_set_vf_vlan extended.ndo_set_vf_vlan
-- 
2.7.4


             reply	other threads:[~2019-05-27  4:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  4:02 michael.luo [this message]
2019-05-29 21:48 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-06-04 15:00   ` Ferruh Yigit
2019-06-04 15:23     ` Kevin Traynor

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=1558929727-56647-1-git-send-email-michael.luo@intel.com \
    --to=michael.luo@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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).