From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by dpdk.org (Postfix) with ESMTP id 15B05AF85 for ; Tue, 15 Apr 2014 15:51:28 +0200 (CEST) Received: by mail-we0-f172.google.com with SMTP id t61so9594153wes.31 for ; Tue, 15 Apr 2014 06:51:29 -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:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=ctrbjBul9nZLLsIi3u4tb0oRZodKrJ9gZ/xU50iPftc=; b=jQgWPrNJOVVKeAaiAoE4btX7qg7icRphxR0zmuGjJSEoyIgxnaHfYWbOtWcFeX7bny XTKuvNBHsWiabiaPhcw5rTQZNKcfxxiEUsNWMQFGDYx85eL2Qq0YqRS45Y+Q493dbqSs of4G762b687PdNRmVBhPKyWNcge/xRfjB6tlaiwm784r6XwfLUpjGYGn2PzhfyczDngc 15qPXf+yuDP2n80G/+1CbewTurJzfdLEo7UlWM0xMV8/+HFkq40f80o+tIk6d63aT5+H ChIJifvp+PuxGEQdY0OvIyLsQ4F385tkGGCbS/cSbdQfn2p7Wb54j++974MZuPY1oB0D /lPQ== X-Gm-Message-State: ALoCoQnFp4JkzSfjzJ/zYmy0TuW0kQBJS2ht8+v9XlnW0ZmMULBTzdJqzJvgsv75AgmuJ3fLjYIK X-Received: by 10.194.202.229 with SMTP id kl5mr15915wjc.86.1397569889366; Tue, 15 Apr 2014 06:51:29 -0700 (PDT) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id go20sm1995477wjc.18.2014.04.15.06.51.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Apr 2014 06:51:28 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Tue, 15 Apr 2014 15:51:22 +0200 Message-Id: <1397569883-16761-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/2] kni: disable FDB operations on RHEL 6.5 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, 15 Apr 2014 13:51:29 -0000 From: Jean-Mickael Guerin On RH 6.5: igb_main.c:2298: error: unknown field ‘ndo_fdb_add’ specified in initializer FDB ops are present in RH 6.5 via the extension of netdev, so add the ifdef inside the netdev ops definition of igb. However, FDB functions are not set for RHEL 6.5: the implementation relies on dev_mc_add_excl API which has not been backported. Signed-off-by: Jean-Mickael Guerin --- lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 ++ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c index 6933626..54b3ccf 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c @@ -2294,12 +2294,14 @@ static const struct net_device_ops igb_netdev_ops = { #ifdef HAVE_VLAN_RX_REGISTER .ndo_vlan_rx_register = igb_vlan_mode, #endif +#ifndef HAVE_RHEL6_NETDEV_OPS_EXT_FDB #ifdef NTF_SELF .ndo_fdb_add = igb_ndo_fdb_add, #ifndef USE_DEFAULT_FDB_DEL_DUMP .ndo_fdb_del = igb_ndo_fdb_del, .ndo_fdb_dump = igb_ndo_fdb_dump, #endif +#endif /* ! HAVE_RHEL6_NETDEV_OPS_EXT_FDB */ #ifdef HAVE_BRIDGE_ATTRIBS .ndo_bridge_setlink = igb_ndo_bridge_setlink, .ndo_bridge_getlink = igb_ndo_bridge_getlink, diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index a404c9f..70bc1a2 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -2837,6 +2837,12 @@ static inline bool pci_is_pcie(struct pci_dev *dev) #define HAVE_ETHTOOL_GET_TS_INFO #endif /* RHEL >= 6.4 && RHEL < 7.0 */ +#if (RHEL_RELEASE_CODE && \ + (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,5)) && \ + (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0))) +#define HAVE_RHEL6_NETDEV_OPS_EXT_FDB +#endif /* RHEL >= 6.5 && RHEL < 7.0 */ + #else /* < 2.6.33 */ #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) #ifndef HAVE_NETDEV_OPS_FCOE_GETWWN -- 1.7.10.4