Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/iw_cxgbe/cm.c
Show All 39 Lines | |||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/socketvar.h> | #include <sys/socketvar.h> | ||||
#include <sys/sockio.h> | #include <sys/sockio.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <netinet/in.h> | #include <netinet/in.h> | ||||
#include <net/route.h> | #include <net/route.h> | ||||
#include <net/route/nhop.h> | |||||
#include <netinet/in_systm.h> | #include <netinet/in_systm.h> | ||||
#include <netinet/in_pcb.h> | #include <netinet/in_pcb.h> | ||||
#include <netinet6/in6_pcb.h> | #include <netinet6/in6_pcb.h> | ||||
#include <netinet/ip.h> | #include <netinet/ip.h> | ||||
#include <netinet/in_fib.h> | #include <netinet/in_fib.h> | ||||
#include <netinet6/in6_fib.h> | #include <netinet6/in6_fib.h> | ||||
#include <netinet6/scope6_var.h> | #include <netinet6/scope6_var.h> | ||||
▲ Show 20 Lines • Show All 476 Lines • ▼ Show 20 Lines | done: | ||||
INP_WUNLOCK(inp); | INP_WUNLOCK(inp); | ||||
return (rc); | return (rc); | ||||
} | } | ||||
static int | static int | ||||
get_ifnet_from_raddr(struct sockaddr_storage *raddr, struct ifnet **ifp) | get_ifnet_from_raddr(struct sockaddr_storage *raddr, struct ifnet **ifp) | ||||
{ | { | ||||
int err = 0; | int err = 0; | ||||
struct nhop_object *nh; | |||||
if (raddr->ss_family == AF_INET) { | if (raddr->ss_family == AF_INET) { | ||||
struct sockaddr_in *raddr4 = (struct sockaddr_in *)raddr; | struct sockaddr_in *raddr4 = (struct sockaddr_in *)raddr; | ||||
struct nhop4_extended nh4 = {0}; | |||||
err = fib4_lookup_nh_ext(RT_DEFAULT_FIB, raddr4->sin_addr, | nh = fib4_lookup(RT_DEFAULT_FIB, raddr4->sin_addr, 0, | ||||
NHR_REF, 0, &nh4); | NHR_NONE, 0); | ||||
*ifp = nh4.nh_ifp; | |||||
if (err) | |||||
fib4_free_nh_ext(RT_DEFAULT_FIB, &nh4); | |||||
} else { | } else { | ||||
struct sockaddr_in6 *raddr6 = (struct sockaddr_in6 *)raddr; | struct sockaddr_in6 *raddr6 = (struct sockaddr_in6 *)raddr; | ||||
struct nhop6_extended nh6 = {0}; | |||||
struct in6_addr addr6; | struct in6_addr addr6; | ||||
uint32_t scopeid; | uint32_t scopeid; | ||||
memset(&addr6, 0, sizeof(addr6)); | memset(&addr6, 0, sizeof(addr6)); | ||||
in6_splitscope((struct in6_addr *)&raddr6->sin6_addr, | in6_splitscope((struct in6_addr *)&raddr6->sin6_addr, | ||||
&addr6, &scopeid); | &addr6, &scopeid); | ||||
err = fib6_lookup_nh_ext(RT_DEFAULT_FIB, &addr6, scopeid, | nh = fib6_lookup(RT_DEFAULT_FIB, &addr6, scopeid, | ||||
NHR_REF, 0, &nh6); | NHR_NONE, 0); | ||||
*ifp = nh6.nh_ifp; | |||||
if (err) | |||||
fib6_free_nh_ext(RT_DEFAULT_FIB, &nh6); | |||||
} | } | ||||
if (nh == NULL) | |||||
err = EHOSTUNREACH; | |||||
else | |||||
*ifp = nh->nh_ifp; | |||||
CTR2(KTR_IW_CXGBE, "%s: return: %d", __func__, err); | CTR2(KTR_IW_CXGBE, "%s: return: %d", __func__, err); | ||||
return err; | return err; | ||||
} | } | ||||
static void | static void | ||||
close_socket(struct socket *so) | close_socket(struct socket *so) | ||||
{ | { | ||||
uninit_iwarp_socket(so); | uninit_iwarp_socket(so); | ||||
▲ Show 20 Lines • Show All 2,060 Lines • ▼ Show 20 Lines | if (!ep->com.qp) { | ||||
CTR2(KTR_IW_CXGBE, "%s:cc5 %p", __func__, ep); | CTR2(KTR_IW_CXGBE, "%s:cc5 %p", __func__, ep); | ||||
err = -EINVAL; | err = -EINVAL; | ||||
goto fail; | goto fail; | ||||
} | } | ||||
ref_qp(ep); | ref_qp(ep); | ||||
ep->com.thread = curthread; | ep->com.thread = curthread; | ||||
NET_EPOCH_ENTER(et); | |||||
np: cm.o ---
et is undefined.
/root/ws/head/sys/dev/cxgbe/iw_cxgbe/cm.c:2640:18: error: use of… | |||||
CURVNET_SET(vnet); | CURVNET_SET(vnet); | ||||
err = get_ifnet_from_raddr(&cm_id->remote_addr, &nh_ifp); | err = get_ifnet_from_raddr(&cm_id->remote_addr, &nh_ifp); | ||||
CURVNET_RESTORE(); | CURVNET_RESTORE(); | ||||
NET_EPOCH_EXIT(et); | |||||
if (err) { | if (err) { | ||||
CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep); | CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep); | ||||
printk(KERN_ERR MOD "%s - cannot find route.\n", __func__); | printk(KERN_ERR MOD "%s - cannot find route.\n", __func__); | ||||
err = EHOSTUNREACH; | err = EHOSTUNREACH; | ||||
return err; | return err; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 398 Lines • Show Last 20 Lines |
cm.o ---
et is undefined.
/root/ws/head/sys/dev/cxgbe/iw_cxgbe/cm.c:2640:18: error: use of undeclared identifier 'et'
/root/ws/head/sys/dev/cxgbe/iw_cxgbe/cm.c:2644:17: error: use of undeclared identifier 'et'