From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 28E84A0524;
	Wed,  2 Jun 2021 16:33:21 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id A031D4069F;
	Wed,  2 Jun 2021 16:33:20 +0200 (CEST)
Received: from youngberry.canonical.com (youngberry.canonical.com
 [91.189.89.112])
 by mails.dpdk.org (Postfix) with ESMTP id 59CF440689;
 Wed,  2 Jun 2021 16:33:19 +0200 (CEST)
Received: from 055-100-000-128.ip-addr.inexio.net ([128.0.100.55]
 helo=Keschdeichel.fritz.box)
 by youngberry.canonical.com with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93)
 (envelope-from <christian.ehrhardt@canonical.com>)
 id 1loRvq-0003yX-PS; Wed, 02 Jun 2021 14:33:18 +0000
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: dev <dev@dpdk.org>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
 Christian Ehrhardt <christian.ehrhardt@canonical.com>, stable@dpdk.org
Date: Wed,  2 Jun 2021 16:33:17 +0200
Message-Id: <20210602143317.2333707-1-christian.ehrhardt@canonical.com>
X-Mailer: git-send-email 2.31.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH] kni: fix compilation on SLES15-SP3
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Like what was done for mainline kernel in commit 38ad54f3bc76 ("kni: fix
build with Linux 5.6"), a new parameter 'txqueue' has to be added to
'ndo_tx_timeout' ndo on SLES 15-SP3 kernel.

Caused by:
  commit c3bf155c40e9db722feb8a08c19efd44c12d5294
  Author: Thomas Bogendoerfer <tbogendoerfer@suse.de>
  Date:   Fri Sep 11 16:08:31 2020 +0200
      - netdev: pass the stuck queue to the timeout handler
        (jsc#SLE-13536).
      - Refresh patches.suse/sfc-move-various-functions.patch.

That is part of the SLES 5.3.18 kernel and therefore the
version we check for.

Cc: stable@dpdk.org

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
---
 kernel/linux/kni/compat.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 5f65640d5ed..70e014fd1da 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -133,7 +133,9 @@
 
 #if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE || \
 	(defined(RHEL_RELEASE_CODE) && \
-	 RHEL_RELEASE_VERSION(8, 3) <= RHEL_RELEASE_CODE)
+	 RHEL_RELEASE_VERSION(8, 3) <= RHEL_RELEASE_CODE) || \
+	(defined(CONFIG_SUSE_KERNEL) && \
+	 KERNEL_VERSION(5, 3, 18) <= LINUX_VERSION_CODE)
 #define HAVE_TX_TIMEOUT_TXQUEUE
 #endif
 
-- 
2.31.1