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 46B97A04C0 for ; Fri, 25 Sep 2020 15:01:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3BED91C227; Fri, 25 Sep 2020 15:01:33 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id D860C1C227 for ; Fri, 25 Sep 2020 15:01:31 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601038891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bykMShVRIg9uM143msBTM/2fHyWgxNGs7tXSGnX4KD4=; b=bsqWIBZNuxjC5fXyhkIQE47URHBvdiCL5UlW0xm9wgQcdwtnPGXwbKZV6iYaQNwRIzFqhW NhyNAitTYh3v2A1eAtwPKJ71eldswE85la2N7LJA6luUe1xVVQTjHYjts8QGbQKRHb9YTT QGGbzBe7+iWe1bTJW3ykDeY5ctEUdbw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-251-PCTWSBY7P5-7LbkbnbEkBg-1; Fri, 25 Sep 2020 09:01:29 -0400 X-MC-Unique: PCTWSBY7P5-7LbkbnbEkBg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2DE9D80F057; Fri, 25 Sep 2020 13:01:28 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.37.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 993275D9F1; Fri, 25 Sep 2020 13:01:25 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: Abhishek.Marathe@microsoft.com, bluca@debian.org, Kevin Traynor Date: Fri, 25 Sep 2020 14:01:12 +0100 Message-Id: <20200925130113.13877-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-stable] [PATCH 18.11 1/2] kni: fix build error on openSUSE 15.2 - pci clearing X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Similar to commit 8c70f4af0f40 ("kni: fix ethtool build error on kernel 5.7") openSUSE LEAP 15.2 also needs to use the new pci_aer_clear_nonfatal_status() function instead of pci_cleanup_aer_uncorrect_error_status(). Add macros for openSUSE 15.2 and extend compatibility. Reported-by: Abhishek Marathe Signed-off-by: Kevin Traynor --- kernel/linux/kni/compat.h | 5 ++++- kernel/linux/kni/ethtool/igb/kcompat.h | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 3c3855dcfa..bf5e6e2b17 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -15,5 +15,8 @@ #endif #ifdef CONFIG_SUSE_KERNEL -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 18)) +/* SLES15 SP2 is 5.3.18 based */ +#define SLE_VERSION_CODE SLE_VERSION(15, 2, 0) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57)) /* SLES12SP3 is at least 4.4.57+ based */ #define SLE_VERSION_CODE SLE_VERSION(12, 3, 0) diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h index f74038b3eb..459fda3dad 100644 --- a/kernel/linux/kni/ethtool/igb/kcompat.h +++ b/kernel/linux/kni/ethtool/igb/kcompat.h @@ -685,5 +685,8 @@ struct _kc_ethtool_pauseparam { #endif #ifdef CONFIG_SUSE_KERNEL -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 18)) +/* SLES15 SP2 is 5.3.18 based */ +#define SLE_VERSION_CODE SLE_VERSION(15, 2, 0) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57)) /* SLES12SP3 is at least 4.4.57+ based */ #define SLE_VERSION_CODE SLE_VERSION(12, 3, 0) @@ -3965,5 +3968,6 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) +#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) \ + || (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(15, 2, 0))) #define pci_cleanup_aer_uncorrect_error_status \ pci_aer_clear_nonfatal_status -- 2.26.2