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: 986e7b9227 ("ena: Move RSS logic into its own source files")
Fixes: 6d1ef2abd3 ("ena: Implement full RSS reconfiguration")

Obtained from: Semihalf
Sponsored by: Amazon, Inc.
MFC after: 1 week
This commit is contained in:
Artur Rojek 2021-09-16 14:14:54 +02:00 committed by Marcin Wojtas
parent eb3148cc4d
commit a3f0d18237
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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 */