Skip to content

Commit 57ae676

Browse files
Jakub Kicinskidavem330
authored andcommitted
nfp: flower: add Kconfig for flower app
Give users an option not to build the flower-offload related code. Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6d48ceb commit 57ae676

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

drivers/net/ethernet/netronome/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ config NFP
2525
cards working as a advanced Ethernet NIC. It works with both
2626
SR-IOV physical and virtual functions.
2727

28+
config NFP_APP_FLOWER
29+
bool "NFP4000/NFP6000 TC Flower offload support"
30+
depends on NFP
31+
depends on NET_SWITCHDEV
32+
---help---
33+
Enable driver support for TC Flower offload on NFP4000 and NFP6000.
34+
Say Y, if you are planning to make use of TC Flower offload
35+
either directly, with Open vSwitch, or any other way. Note that
36+
TC Flower offload requires specific FW to work.
37+
2838
config NFP_DEBUG
2939
bool "Debug support for Netronome(R) NFP4000/NFP6000 NIC drivers"
3040
depends on NFP

drivers/net/ethernet/netronome/nfp/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ nfp-objs := \
2727
nfp_port.o \
2828
bpf/main.o \
2929
bpf/offload.o \
30-
flower/cmsg.o \
31-
flower/main.o \
3230
nic/main.o
3331

32+
ifeq ($(CONFIG_NFP_APP_FLOWER),y)
33+
nfp-objs += \
34+
flower/cmsg.o \
35+
flower/main.o
36+
endif
37+
3438
ifeq ($(CONFIG_BPF_SYSCALL),y)
3539
nfp-objs += \
3640
bpf/verifier.o \

drivers/net/ethernet/netronome/nfp/nfp_app.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
static const struct nfp_app_type *apps[] = {
4444
&app_nic,
4545
&app_bpf,
46+
#ifdef CONFIG_NFP_APP_FLOWER
4647
&app_flower,
48+
#endif
4749
};
4850

4951
const char *nfp_app_mip_name(struct nfp_app *app)

0 commit comments

Comments
 (0)