Skip to content

Commit

Permalink
Fix auxiliary compilation for iavf
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Jan 10, 2024
1 parent de5f903 commit 9a8b4f6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/intel/Makefile.dkms.iavf.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ all: install
add: veryclean
\/bin/rm -rf /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@
mkdir -p /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/
cp @IAVF@/@IAVF@-@IAVF_VERSION@-zc/scripts/check_aux_bus /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/
cd @IAVF@/@IAVF@-@IAVF_VERSION@-zc/src/ ; make clean; cp -r * /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/
cp ../../kernel/linux/pf_ring.h /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/
sed -i -e 's/iavf\.o/iavf_zc.o/' -e 's/iavf-/iavf_zc-/' /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/Kbuild
Expand Down
9 changes: 9 additions & 0 deletions drivers/intel/iavf/iavf-4.9.5-zc/src/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Makefile for the Intel Ethernet Adaptive Virtual Function Driver
#

BUILD_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
include $(BUILD_DIR)common.mk

obj-m += iavf.o

iavf-objs := iavf_main.o \
Expand All @@ -18,6 +21,12 @@ iavf-objs := iavf_main.o \

CFLAGS_iavf_main.o := -I$(src)

ifeq (${NEED_AUX_BUS},2)
#obj-m += auxiliary.o
intel_auxiliary-objs := auxiliary.o
obj-m += intel_auxiliary.o
endif

EXTRA_CFLAGS += -DHAVE_PF_RING
KBUILD_EXTRA_SYMBOLS=${PF_RING_PATH}/Module.symvers

Expand Down
4 changes: 4 additions & 0 deletions drivers/intel/iavf/iavf-4.9.5-zc/src/auxiliary.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/string.h>
#ifdef HAVE_PF_RING
#include "auxiliary_bus.h"
#else
#include "linux/auxiliary_bus.h"
#endif

static const struct auxiliary_device_id *auxiliary_match_id(const struct auxiliary_device_id *id,
const struct auxiliary_device *auxdev)
Expand Down
4 changes: 4 additions & 0 deletions drivers/intel/iavf/iavf-4.9.5-zc/src/iidc.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
#include <linux/kernel.h>
#include <linux/netdevice.h>
#ifdef USE_INTEL_AUX_BUS
#ifdef HAVE_PF_RING
#include "auxiliary_bus.h"
#else
#include "linux/auxiliary_bus.h"
#endif
#else
#include <linux/auxiliary_bus.h>
#endif /* USE_INTEL_AUX_BUS */
Expand Down

0 comments on commit 9a8b4f6

Please sign in to comment.