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 2/2] kni: fix ethtool pointer type build error
Date: Fri,  5 Jun 2020 19:11:29 +0100
Message-ID: <20200605181129.14809-3-ktraynor@redhat.com> (raw)
In-Reply-To: <20200605181129.14809-1-ktraynor@redhat.com>

Build error about incompatbile-pointer-types similar to
commit 219bfcc05796 ("kni: fix build with Linux 5.1")
seen when building with RHEL 8.2 and ethtool enabled.

kernel/linux/kni/ethtool/igb/igb_main.c:2358:18:
error: initialization of ‘int (*)...
[-Werror=incompatible-pointer-types]
  .ndo_fdb_add  = igb_ndo_fdb_add,
                  ^~~~~~~~~~~~~~~

This is because Linux kernel
commit 87b0984ebfab ("net: Add extack argument to ndo_fdb_add()")
is backported to RHEL/CentOS since 8.1.

Extend the fix in
commit 219bfcc05796 ("kni: fix build with Linux 5.1")
to cover RHEL/CentOS 8.1 onwards.

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

diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index adab05aa8a..611a5b7c49 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3955,7 +3955,9 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #endif /* >= 5.0.0 or >= RHEL/CentOS 8.1 */
 
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) )
+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)) \
+	|| (defined(RHEL_RELEASE_CODE) \
+	   && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1))))
 #define HAVE_NDO_FDB_ADD_EXTACK
-#endif /* >= 5.1.0 */
+#endif /* >= 5.1.0 or >= RHEL/CentOS 8.1 */
 
 #if defined(timer_setup) && defined(from_timer)
-- 
2.21.3


  parent 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 ` [dpdk-stable] [PATCH 18.11 1/2] kni: fix ethtool dev_open build error Kevin Traynor
2020-06-05 18:11 ` Kevin Traynor [this message]
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-3-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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git