On Thu, Dec 11, 2014 at 09:46:15PM +0000, Fujinaka, Todd wrote: > First, thanks for the patch. You'll have to include it in the text of the > message because it gets stripped here. > Todd, I've inlined the patch below.
> Unfortunately, we may not be able to take it (depending on what you did, the > attachment gets stripped) because you guys don't put any identifiers for your > kernel (like a define that says UBUNTU_KERNEL) and just going off version > numbers can collide with upstream. I know Red Hat and SuSE put in kernel > defines to uniquely identify their variant kernels. I understand, I tried to make this patch distro-agnostic so that it doesn't need to use distro-specific identifiers. Let me know if this method is acceptible. Thanks, --chris j arges > Todd Fujinaka > Software Application Engineer > Networking Division (ND) > Intel Corporation > todd.fujin...@intel.com > (503) 712-4565 > > -----Original Message----- > From: Chris J Arges [mailto:chris.j.ar...@canonical.com] > Sent: Thursday, December 11, 2014 1:19 PM > To: e1000-devel@lists.sourceforge.net > Subject: [E1000-devel] [PATCH] Issues with compiling ixgbevf-2.15.3 on Ubuntu > 3.13.0-30 > > Attached is a patch that fixes compile issues where > 57a7744e09867ebcfa0ccf1d6d529caa7728d552 was backported to kernel versions > eariler than 3.15. > > Please accept this patch for your next stable update. > Thanks, > --chris j arges -- >From 27ed8f0c050daa31ac04edac80514a99831366ee Mon Sep 17 00:00:00 2001 From: Chris J Arges <chris.j.ar...@canonical.com> Date: Thu, 11 Dec 2014 14:54:01 -0600 Subject: [PATCH] Add macros to check for u64_stats_fetch_{retry,begin}_bh Because many distributions may backports patches that change functionality, this patch adds a check in the Makefile to see if particular functions exist. If they do it injects a HAVE_* macro that can be check in the C code. This patch fixes it for the case where u64_stats_fetch_{retry,begin}_bh are no longer defined in kernels < 3.15. Signed-off-by: Chris J Arges <chris.j.ar...@canonical.com> --- src/Makefile | 8 ++++++++ src/kcompat.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/Makefile b/src/Makefile index f8fc1ff..c7eefbc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -146,6 +146,14 @@ EXTRA_CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \ echo "-DMODVERSIONS -DEXPORT_SYMTAB \ -include $(KSRC)/include/linux/modversions.h") +# define HAVEs for available functions +ifeq (0,$(shell grep -q u64_stats_fetch_retry_bh $(KSRC)/include/linux/u64_stats_sync.h; echo $$?)) +EXTRA_CFLAGS += -DHAVE_U64_STATS_FETCH_RETRY_BH +endif +ifeq (0,$(shell grep -q u64_stats_fetch_begin_bh $(KSRC)/include/linux/u64_stats_sync.h; echo $$?)) +EXTRA_CFLAGS += -DHAVE_U64_STATS_FETCH_BEGIN_BH +endif + EXTRA_CFLAGS += $(CFLAGS_EXTRA) RHC := $(KSRC)/include/linux/rhconfig.h diff --git a/src/kcompat.h b/src/kcompat.h index 2f9c016..b0d8783 100644 --- a/src/kcompat.h +++ b/src/kcompat.h @@ -4104,8 +4104,12 @@ static inline void __kc_ether_addr_copy(u8 *dst, const u8 *src) /*****************************************************************************/ #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) ) +#ifdef HAVE_U64_STATS_FETCH_BEGIN_BH #define u64_stats_fetch_begin_irq u64_stats_fetch_begin_bh +#endif /* HAVE_U64_STATS_FETCH_BEGIN_BH */ +#ifdef HAVE_U64_STATS_FETCH_RETRY_BH #define u64_stats_fetch_retry_irq u64_stats_fetch_retry_bh +#endif /* HAVE_U64_STATS_FETCH_RETRY_BH */ #endif /* 3.15.0 */ /*****************************************************************************/ -- 1.9.1 ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired