From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3F51BA0535; Wed, 12 Feb 2020 18:14:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A51B71BF78; Wed, 12 Feb 2020 18:14:29 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id F0EC31BECF; Wed, 12 Feb 2020 18:14:27 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2020 09:14:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,433,1574150400"; d="scan'208";a="266742477" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by fmsmga002.fm.intel.com with ESMTP; 12 Feb 2020 09:14:25 -0800 From: Ferruh Yigit To: dev@dpdk.org Cc: Ferruh Yigit , stable@dpdk.org Date: Wed, 12 Feb 2020 17:14:24 +0000 Message-Id: <20200212171424.695556-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] kni: fix build with Linux 5.6 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" With the following Linux commit a new parameter 'txqueue' has been added to 'ndo_tx_timeout' ndo: commit 0290bd291cc0 ("netdev: pass the stuck queue to the timeout handler") The change reflected to the KNI with version check. Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- kernel/linux/kni/compat.h | 4 ++++ kernel/linux/kni/kni_net.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 7109474ec..9ee45dbf6 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -130,3 +130,7 @@ #if KERNEL_VERSION(4, 10, 0) <= LINUX_VERSION_CODE #define HAVE_IOVA_TO_KVA_MAPPING_SUPPORT #endif + +#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE +#define HAVE_TX_TIMEOUT_TXQUEUE +#endif diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 97fe85be9..c82c881a2 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c @@ -623,8 +623,13 @@ kni_net_rx(struct kni_dev *kni) /* * Deal with a transmit timeout. */ +#ifdef HAVE_TX_TIMEOUT_TXQUEUE +static void +kni_net_tx_timeout(struct net_device *dev, unsigned int txqueue) +#else static void kni_net_tx_timeout(struct net_device *dev) +#endif { pr_debug("Transmit timeout at %ld, latency %ld\n", jiffies, jiffies - dev_trans_start(dev)); -- 2.24.1