mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-08 12:54:11 +00:00
if_epair: fix build with RSS and INET or INET6 disabled
Reviewed by: kp MFC after: 1 week
This commit is contained in:
parent
afb08a6d07
commit
52bcdc5b80
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user