aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Rojek <ar@semihalf.com>2021-09-16 12:14:54 +0000
committerMarcin Wojtas <mw@FreeBSD.org>2021-09-16 14:47:45 +0000
commita3f0d18237bdcf272461d3b4b682de384c572144 (patch)
tree5b952ce3e2c194cf46db8b841e914bf1498a1474
parenteb3148cc4d256c20b5c7c9052539139b6f57f58b (diff)
downloadsrc-a3f0d18237bdcf272461d3b4b682de384c572144.tar.gz
src-a3f0d18237bdcf272461d3b4b682de384c572144.zip
ena: fix building in-kernel driver
When building ENA as compiled into the kernel, the driver would fail to build. Resolve the problem by introducing the following changes: 1. Add missing `ena_rss.c` entry in `sys/conf/files`. 2. Prevent SYSCTL_ADD_INT from throwing an assert due to an extra CTLTYPE_INT flag. Fixes: 986e7b92276 ("ena: Move RSS logic into its own source files") Fixes: 6d1ef2abd33 ("ena: Implement full RSS reconfiguration") Obtained from: Semihalf Sponsored by: Amazon, Inc. MFC after: 1 week
-rw-r--r--sys/conf/files2
-rw-r--r--sys/dev/ena/ena_sysctl.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/conf/files b/sys/conf/files
index eb0c489b7833..4dd0151945bb 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1695,6 +1695,8 @@ dev/ena/ena_datapath.c optional ena \
compile-with "${NORMAL_C} -I$S/contrib"
dev/ena/ena_netmap.c optional ena \
compile-with "${NORMAL_C} -I$S/contrib"
+dev/ena/ena_rss.c optional ena \
+ compile-with "${NORMAL_C} -I$S/contrib"
dev/ena/ena_sysctl.c optional ena \
compile-with "${NORMAL_C} -I$S/contrib"
contrib/ena-com/ena_com.c optional ena
diff --git a/sys/dev/ena/ena_sysctl.c b/sys/dev/ena/ena_sysctl.c
index db3eb69cd369..7337f6578e68 100644
--- a/sys/dev/ena/ena_sysctl.c
+++ b/sys/dev/ena/ena_sysctl.c
@@ -456,7 +456,7 @@ ena_sysctl_add_rss(struct ena_adapter *adapter)
/* RSS indirection table size */
SYSCTL_ADD_INT(ctx, child, OID_AUTO, "indir_table_size",
- CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, &ena_rss_table_size, 0,
+ CTLFLAG_RD | CTLFLAG_MPSAFE, &ena_rss_table_size, 0,
"RSS indirection table size.");
}
#endif /* RSS */