From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id CB6111B113 for ; Wed, 21 Nov 2018 17:46:10 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id v6so6389919wrr.12 for ; Wed, 21 Nov 2018 08:46:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Nf/WrZeefNEnbMzF3Is7Oy5MjOK4junoh9q0P4aL4cY=; b=ukUeth/UNUIk6flfgkIi7HcFtsb334C28IGj6QOUUMx1YdcoB6IX8lB15+KJQt88IC IfD4XU494xHQNo2tWehyp6kqMOM/6VU9IDVy9gBFBu04MAmPsJhZIxQ1LKlHIg1fPqdu BLVHgiQT3vaMgAYSthELsstyVcsQLmEk7yMn7cSrpvoLQ/Arkk138W/nQa6NFrRlG69F oRExgGdZ0E9wHjS9rx0d39+aXwdgWQX6WnhU6Gx4yVWh5ODSZumkVDiYN7zJgHtUDODJ Ujm5kh1KWL4cBUZjbV65SdcKFlQWRlm1SKow0XouM3ln3TjzYPe1bmz3H52khkNSGcwI aIgw== X-Gm-Message-State: AA+aEWaUejqjqIZXsqBYvpJ1dZuUBJHtTHZSFWaPvQKS/nucaY5l8QWs vtAR4mEBN4A1xqPiozd4EmGgvPpX X-Google-Smtp-Source: AFSGD/UVfZ5JEF78fs5zWz9YcyI+T7RATiT2sXOcFz44lHGPm7mL1T0iTk5FsJzFk/xkleaBGugOsQ== X-Received: by 2002:adf:d4c9:: with SMTP id w9mr6526356wrk.119.1542818770027; Wed, 21 Nov 2018 08:46:10 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id t17sm1795995wme.43.2018.11.21.08.46.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 08:46:09 -0800 (PST) From: Luca Boccassi To: stable@dpdk.org Cc: ndas@suse.de, ferruh.yigit@intel.com Date: Wed, 21 Nov 2018 16:46:00 +0000 Message-Id: <20181121164600.7169-2-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121164600.7169-1-bluca@debian.org> References: <20181121164600.7169-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 16.11 2/2] kni: fix SLE version detection 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: , X-List-Received-Date: Wed, 21 Nov 2018 16:46:10 -0000 From: Nirmoy Das [ backported from upstream commit d8bc68bcd214b24f0db585a194662588a67a4f81 ] detect SLE version reverse chronologically as ">=" is being used. Fixes: 2972254ce163 ("kni: fix build on Suse 12 SP3") Signed-off-by: Nirmoy Das Acked-by: Ferruh Yigit --- .../linuxapp/kni/ethtool/igb/kcompat.h | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index de57b1bd2..f20205d56 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -697,22 +697,22 @@ struct _kc_ethtool_pauseparam { #define SLE_VERSION(a,b,c) KERNEL_VERSION(a,b,c) #endif #ifdef CONFIG_SUSE_KERNEL -#if ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,27) ) -/* SLES11 GA is 2.6.27 based */ -#define SLE_VERSION_CODE SLE_VERSION(11,0,0) -#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32) ) -/* SLES11 SP1 is 2.6.32 based */ -#define SLE_VERSION_CODE SLE_VERSION(11,1,0) +#if (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) +#elif ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,28) ) +/* SLES12 is at least 3.12.28+ based */ +#define SLE_VERSION_CODE SLE_VERSION(12,0,0) #elif ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,61)) && \ (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))) /* SLES11 SP3 is at least 3.0.61+ based */ #define SLE_VERSION_CODE SLE_VERSION(11,3,0) -#elif ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,28) ) -/* SLES12 is at least 3.12.28+ based */ -#define SLE_VERSION_CODE SLE_VERSION(12,0,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) +#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32) ) +/* SLES11 SP1 is 2.6.32 based */ +#define SLE_VERSION_CODE SLE_VERSION(11,1,0) +#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,27) ) +/* SLES11 GA is 2.6.27 based */ +#define SLE_VERSION_CODE SLE_VERSION(11,0,0) #endif /* LINUX_VERSION_CODE == KERNEL_VERSION(x,y,z) */ #endif /* CONFIG_SUSE_KERNEL */ #ifndef SLE_VERSION_CODE -- 2.19.1