Don't overload tcp_usrreqs unless the kernel doesn't provide offload support.

This commit is contained in:
Kip Macy 2007-12-18 23:00:25 +00:00
parent bc65987ade
commit b96ebbf2e8
2 changed files with 3 additions and 1 deletions

View File

@ -110,6 +110,7 @@ t3_init_socket_ops(void)
prp = pffindtype(AF_INET, SOCK_STREAM);
pru_sosend = prp->pr_usrreqs->pru_sosend;
pru_soreceive = prp->pr_usrreqs->pru_soreceive;
#ifdef TCP_USRREQS_OVERLOAD
tcp_usrreqs.pru_connect = cxgb_tcp_usrreqs.pru_connect;
tcp_usrreqs.pru_abort = cxgb_tcp_usrreqs.pru_abort;
tcp_usrreqs.pru_listen = cxgb_tcp_usrreqs.pru_listen;
@ -119,6 +120,7 @@ t3_init_socket_ops(void)
tcp_usrreqs.pru_close = cxgb_tcp_usrreqs.pru_close;
tcp_usrreqs.pru_shutdown = cxgb_tcp_usrreqs.pru_shutdown;
tcp_usrreqs.pru_rcvd = cxgb_tcp_usrreqs.pru_rcvd;
#endif
}

View File

@ -4,7 +4,7 @@ TOM = ${.CURDIR}/../../../dev/cxgb/ulp/tom
KMOD= tom
SRCS= cxgb_tom.c cxgb_cpl_io.c cxgb_listen.c cxgb_tom_sysctl.c cxgb_cpl_socket.c
SRCS+= cxgb_tcp_subr.c cxgb_tcp_usrreq.c
#SRCS+= cxgb_tcp_subr.c cxgb_tcp_usrreq.c
SRCS+= opt_compat.h opt_inet.h opt_inet6.h opt_ipsec.h opt_mac.h opt_tcpdebug.h opt_ddb.h
SRCS+= device_if.h bus_if.h pci_if.h