Skip to content

Commit

Permalink
kni: fix build for SLES15-SP3 (Make)
Browse files Browse the repository at this point in the history
[ upstream commit c28e216 ]

Note: The actual commit c28e216 is already in 19.11. This is the
backport by Kalesh to also fix make based builds.

As suse version numbering is inconsistent to determine Linux kernel
API to be used. In this patch we check parameter of 'ndo_tx_timeout'
API directly from the kernel source. This is done only for suse build.

Bugzilla ID: 812
Cc: stable@dpdk.org

Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
  • Loading branch information
cpaelzer committed Dec 14, 2021
1 parent f32335f commit d43fa3e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kernel/linux/kni/Makefile
Expand Up @@ -16,6 +16,16 @@ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include
MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
MODULE_CFLAGS += -Wall -Werror

#
# Use explicit 'source' folder for header path. In SUSE 'source' is not linked to 'build' folder.
#
ifdef CONFIG_SUSE_KERNEL
KSRC = /lib/modules/$(shell uname -r)/source
ifneq ($(shell grep -A 1 "ndo_tx_timeout" $(KSRC)/include/linux/netdevice.h | grep -o txqueue),)
MODULE_CFLAGS += -DHAVE_TX_TIMEOUT_TXQUEUE
endif
endif

-include /etc/lsb-release

ifeq ($(DISTRIB_ID),Ubuntu)
Expand Down

0 comments on commit d43fa3e

Please sign in to comment.