git: a3f0d18237bd - main - ena: fix building in-kernel driver

Marcin Wojtas mw at FreeBSD.org
Thu Sep 16 14:53:25 UTC 2021


The branch main has been updated by mw:

URL: https://cgit.FreeBSD.org/src/commit/?id=a3f0d18237bdcf272461d3b4b682de384c572144

commit a3f0d18237bdcf272461d3b4b682de384c572144
Author:     Artur Rojek <ar at semihalf.com>
AuthorDate: 2021-09-16 12:14:54 +0000
Commit:     Marcin Wojtas <mw at FreeBSD.org>
CommitDate: 2021-09-16 14:47:45 +0000

    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
---
 sys/conf/files           | 2 ++
 sys/dev/ena/ena_sysctl.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

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


More information about the dev-commits-src-all mailing list