patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: stable@dpdk.org, ferruh.yigit@intel.com
Cc: bluca@debian.org, Kevin Traynor <ktraynor@redhat.com>
Subject: [dpdk-stable] [PATCH 18.11 1/2] kni: fix ethtool dev_open build error
Date: Fri,  5 Jun 2020 19:11:28 +0100	[thread overview]
Message-ID: <20200605181129.14809-2-ktraynor@redhat.com> (raw)
In-Reply-To: <20200605181129.14809-1-ktraynor@redhat.com>

Build error about dev_open() arguments similar to
commit 5c97df1243da ("kni: fix build for dev_open in Linux 5.0")
seen when building with RHEL 8.2 and ethtool enabled.

kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c:
In function ‘ixgbe_diag_test’:
kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c:1748:4:
error: too few arguments to function ‘dev_open’
    dev_open(netdev);
    ^~~~~~~~
kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c:18:
./include/linux/netdevice.h:2795:5: note: declared here
 int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
     ^~~~~~~~

This is because Linux kernel
commit 00f54e68924e ("net: core: dev: Add extack argument to dev_open()")
is backported to RHEL/CentOS since 8.1.

Extend the fix in
commit 5c97df1243da ("kni: fix build for dev_open in Linux 5.0")
to cover RHEL/CentOS 8.1 onwards.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 kernel/linux/kni/ethtool/igb/kcompat.h   | 6 ++++--
 kernel/linux/kni/ethtool/ixgbe/kcompat.h | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 964317508d..adab05aa8a 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3948,8 +3948,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #endif
 
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) \
+	|| (defined(RHEL_RELEASE_CODE) \
+	   && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1))))
 #define dev_open(x) dev_open(x, NULL)
 #define HAVE_NDO_BRIDGE_SETLINK_EXTACK
-#endif /* >= 5.0.0 */
+#endif /* >= 5.0.0 or >= RHEL/CentOS 8.1 */
 
 #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) )
diff --git a/kernel/linux/kni/ethtool/ixgbe/kcompat.h b/kernel/linux/kni/ethtool/ixgbe/kcompat.h
index e1671e91a9..73e2c3fb96 100644
--- a/kernel/linux/kni/ethtool/ixgbe/kcompat.h
+++ b/kernel/linux/kni/ethtool/ixgbe/kcompat.h
@@ -3132,7 +3132,9 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev)
 #endif /* >= 3.16.0 */
 
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) \
+	|| (defined(RHEL_RELEASE_CODE) \
+	   && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1))))
 #define dev_open(x) dev_open(x, NULL)
-#endif /* >= 5.0.0 */
+#endif /* >= 5.0.0 or >= RHEL/CentOS 8.1 */
 
 /*
-- 
2.21.3


  reply	other threads:[~2020-06-05 18:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 18:11 [dpdk-stable] [PATCH 18.11 0/2] fix ethtool build on RHEL/CentOS Kevin Traynor
2020-06-05 18:11 ` Kevin Traynor [this message]
2020-06-05 18:11 ` [dpdk-stable] [PATCH 18.11 2/2] kni: fix ethtool pointer type build error Kevin Traynor
2020-06-08  7:58 ` [dpdk-stable] [PATCH 18.11 0/2] fix ethtool build on RHEL/CentOS Luca Boccassi
2020-06-10 14:48   ` 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=20200605181129.14809-2-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=bluca@debian.org \
    --cc=ferruh.yigit@intel.com \
    --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).