From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: kni: error building with kernel < 3.3 and ether_addr_equal backport Date: Wed, 5 Mar 2014 17:00:55 +0100 Message-ID: References: <9cfac239bfe0489d901fe0158ff227ec@BLUPR05MB200.namprd05.prod.outlook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Patrick McGleenon Return-path: In-Reply-To: <9cfac239bfe0489d901fe0158ff227ec-tb+AdJJFl0bvdKjeIaEiAGu6+pknBqLbXA4E9RH9d+qIuWR1G4zioA@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hello Patrick, I encountered this problem as well, we are currently working on a fix. I have a few concerns, see below, but if you address them, feel free to contribute a new patch. On Wed, Mar 5, 2014 at 2:32 PM, Patrick McGleenon < Patrick.McGleenon-TAFI1U/hwAZOSnsfY10OVw@public.gmane.org> wrote: > [..] > diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h > b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h > index a404c9f..f6f6635 100644 > --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h > +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h > @@ -3528,11 +3528,12 @@ extern void _kc_skb_add_rx_frag(struct sk_buff *, > int, struct page *, > > /*****************************************************************************/ > #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) ) > #define skb_tx_timestamp(skb) do {} while (0) > -static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2) > +static inline bool kni_ether_addr_equal(const u8 *addr1, const u8 *addr2) > { > return !compare_ether_addr(addr1, addr2); > } > #else > +typedef ether_addr_equal kni_ether_addr_equal; > #define HAVE_FDB_OPS > #define HAVE_ETHTOOL_GET_TS_INFO > #endif /* < 3.5.0 */ > I am not sure this typedef will work. Did you try to build on kernels >= 3.5 ? > diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h > b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h > index 3fb6b14..45f6c4c 100644 > --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h > +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h > @@ -3107,11 +3107,12 @@ typedef netdev_features_t kni_netdev_features_t; > > > /*****************************************************************************/ > #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) ) > -static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2) > +static inline bool kni_ether_addr_equal(const u8 *addr1, const u8 *addr2) > { > return !compare_ether_addr(addr1, addr2); > } > #else > +typedef ether_addr_equal kni_ether_addr_equal; > #define HAVE_FDB_OPS > #endif /* < 3.5.0 */ > Same comment. Regards, -- David Marchand