Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Mar 2022 13:32:52 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 20ea94a9ec0b - stable/13 - if_epair: fix build with RSS and INET or INET6 disabled
Message-ID:  <202203101332.22ADWqo0006681@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kp:

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

commit 20ea94a9ec0b99f97f7c0adf0e5168c97e8025d1
Author:     Santiago Martinez <sm@codenetworks.net>
AuthorDate: 2022-03-03 09:44:43 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-03-10 08:51:41 +0000

    if_epair: fix build with RSS and INET or INET6 disabled
    
    Reviewed by:    kp
    MFC after:      1 week
    
    (cherry picked from commit 52bcdc5b809ea56cbdce0bd36499e4ae74780d2b)
---
 sys/modules/if_epair/Makefile |  2 +-
 sys/net/if_epair.c            | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/sys/modules/if_epair/Makefile b/sys/modules/if_epair/Makefile
index 3e102413bfe2..8b063623f2e8 100644
--- a/sys/modules/if_epair/Makefile
+++ b/sys/modules/if_epair/Makefile
@@ -3,6 +3,6 @@
 .PATH: ${SRCTOP}/sys/net
 
 KMOD=	if_epair
-SRCS=	bus_if.h device_if.h if_epair.c
+SRCS=	bus_if.h device_if.h if_epair.c opt_rss.h opt_inet.h opt_inet6.h
 
 .include <bsd.kmod.mk>
diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
index 818f25f0cdb5..6a77f44ffe87 100644
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -41,6 +41,8 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_rss.h"
+#include "opt_inet.h"
+#include "opt_inet6.h"
 
 #include <sys/param.h>
 #include <sys/hash.h>
@@ -73,9 +75,13 @@ __FBSDID("$FreeBSD$");
 #include <net/netisr.h>
 #ifdef RSS
 #include <net/rss_config.h>
+#ifdef INET
 #include <netinet/in_rss.h>
+#endif
+#ifdef INET6
 #include <netinet6/in6_rss.h>
 #endif
+#endif
 #include <net/vnet.h>
 
 static int epair_clone_match(struct if_clone *, const char *);
@@ -217,12 +223,16 @@ epair_menq(struct mbuf *m, struct epair_softc *osc)
 		eh = mtod(m, struct ether_header *);
 
 		switch (ntohs(eh->ether_type)) {
+#ifdef INET
 		case ETHERTYPE_IP:
 			rss_soft_m2cpuid_v4(m, 0, &bucket);
 			break;
+#endif
+#ifdef INET6
 		case ETHERTYPE_IPV6:
 			rss_soft_m2cpuid_v6(m, 0, &bucket);
 			break;
+#endif
 		default:
 			bucket = 0;
 			break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203101332.22ADWqo0006681>