From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id 021AC682C for ; Tue, 29 Apr 2014 16:16:13 +0200 (CEST) Received: by mail-wi0-f170.google.com with SMTP id bs8so7094597wib.1 for ; Tue, 29 Apr 2014 07:16:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=otUZc1IGZ6BSM5G11nK8tUs+lzSbllWvX1B4oXBoIQM=; b=f3u8vfFnQGUTwsGA9rjng5Cd/+Zbxr7pDCPkSgsGWVVvxTUBVWorN+0F1ShIOg7NXa aPVlL/FCY4xPWEHHSD5TzJ3NFmqhKoiQrUZ2zOyoRMqbkkjWozD9o3R9S5Pdwox2A/0h 7UJepTMoEYSvc/yFcx5arhOCgUjBBiSTB4Ymp9JjhUbac2iZ/eEhWvyJc3oQ4kgoxGdR V5JWAIqcnTAZ/2gBkXvgZIi6pGxgoSaE1z690FJ24wyq4XWYLOavofsoyNbn2aPFROVt 2OqrIsrc9/6gZ+U04DCC/y5WxiyAbN+qzl98aDr58PL+egU6cNKYa23ND1Ibzso7bjD6 T6hQ== X-Gm-Message-State: ALoCoQncH444c6sxyI91sik2L5B4CJan32kst3VaqFMxFYvogCsJpquBhkgJgWQRhZZ+o874RHVi X-Received: by 10.180.8.66 with SMTP id p2mr20790436wia.37.1398780976298; Tue, 29 Apr 2014 07:16:16 -0700 (PDT) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id be3sm31310335wjc.5.2014.04.29.07.16.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Apr 2014 07:16:15 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Tue, 29 Apr 2014 16:16:03 +0200 Message-Id: <1398780963-3694-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH] kni: fix build for debian kernel 3.2 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 14:16:14 -0000 Following debian kernel headers upgrade to 3.2.57-3, pci capability accessors have been backported (upstream commit 8c0d3a02c1309eb6112d2e7c8172e8ceb26ecfca, ("PCI: Add accessors for PCI Express Capability", v3.7-rc1)). It results in the same compilation error as redhat 6.x. However, there is no clear way to determine we are building on a debian kernel. So, rather than determine if we are building on a distribution kernel, look at PCI_EXP_LNKSTA2 that appeared in this upstream commit. Signed-off-by: David Marchand --- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index d2f65ab..19df483 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3691,8 +3691,7 @@ static inline u8 pci_pcie_type(struct pci_dev *pdev) #define ptp_clock_register(caps, args...) ptp_clock_register(caps) -#if !(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(11,3,0)) && \ - !(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,5)) +#ifndef PCI_EXP_LNKSTA2 int __kc_pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val); #define pcie_capability_read_word(d,p,v) __kc_pcie_capability_read_word(d,p,v) int __kc_pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val); @@ -3709,8 +3708,7 @@ static inline int pcie_capability_clear_word(struct pci_dev *dev, int pos, { return __kc_pcie_capability_clear_and_set_word(dev, pos, clear, 0); } -#endif /* !(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(11,3,0)) && \ - !(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,5)) */ +#endif /* !PCI_EXP_LNKSTA2 */ #if (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(11,3,0)) #define USE_CONST_DEV_UC_CHAR -- 1.7.10.4