Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/tom/t4_connect.c
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/socketvar.h> | #include <sys/socketvar.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <net/ethernet.h> | #include <net/ethernet.h> | ||||
#include <net/if.h> | #include <net/if.h> | ||||
#include <net/if_types.h> | #include <net/if_types.h> | ||||
#include <net/if_vlan_var.h> | #include <net/if_vlan_var.h> | ||||
#include <net/route.h> | #include <net/route.h> | ||||
#include <net/route/nhop.h> | |||||
#include <netinet/in.h> | #include <netinet/in.h> | ||||
#include <netinet/in_pcb.h> | #include <netinet/in_pcb.h> | ||||
#include <netinet/ip.h> | #include <netinet/ip.h> | ||||
#define TCPSTATES | #define TCPSTATES | ||||
#include <netinet/tcp_fsm.h> | #include <netinet/tcp_fsm.h> | ||||
#include <netinet/tcp_var.h> | #include <netinet/tcp_var.h> | ||||
#include <netinet/toecore.h> | #include <netinet/toecore.h> | ||||
#include <netinet/cc/cc.h> | #include <netinet/cc/cc.h> | ||||
▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | |||||
* State of affairs on entry: | * State of affairs on entry: | ||||
* soisconnecting (so_state |= SS_ISCONNECTING) | * soisconnecting (so_state |= SS_ISCONNECTING) | ||||
* tcbinfo not locked (This has changed - used to be WLOCKed) | * tcbinfo not locked (This has changed - used to be WLOCKed) | ||||
* inp WLOCKed | * inp WLOCKed | ||||
* tp->t_state = TCPS_SYN_SENT | * tp->t_state = TCPS_SYN_SENT | ||||
* rtalloc1, RT_UNLOCK on rt. | * rtalloc1, RT_UNLOCK on rt. | ||||
*/ | */ | ||||
int | int | ||||
t4_connect(struct toedev *tod, struct socket *so, struct rtentry *rt, | t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, | ||||
struct sockaddr *nam) | struct sockaddr *nam) | ||||
{ | { | ||||
struct adapter *sc = tod->tod_softc; | struct adapter *sc = tod->tod_softc; | ||||
struct toepcb *toep = NULL; | struct toepcb *toep = NULL; | ||||
struct wrqe *wr = NULL; | struct wrqe *wr = NULL; | ||||
struct ifnet *rt_ifp = rt->rt_ifp; | struct ifnet *rt_ifp = nh->nh_ifp; | ||||
struct vi_info *vi; | struct vi_info *vi; | ||||
int qid_atid, rc, isipv6; | int qid_atid, rc, isipv6; | ||||
struct inpcb *inp = sotoinpcb(so); | struct inpcb *inp = sotoinpcb(so); | ||||
struct tcpcb *tp = intotcpcb(inp); | struct tcpcb *tp = intotcpcb(inp); | ||||
int reason; | int reason; | ||||
struct offload_settings settings; | struct offload_settings settings; | ||||
struct epoch_tracker et; | struct epoch_tracker et; | ||||
uint16_t vid = 0xfff, pcp = 0; | uint16_t vid = 0xfff, pcp = 0; | ||||
Show All 28 Lines | t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, | ||||
if (toep == NULL) | if (toep == NULL) | ||||
DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); | DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); | ||||
toep->tid = alloc_atid(sc, toep); | toep->tid = alloc_atid(sc, toep); | ||||
if (toep->tid < 0) | if (toep->tid < 0) | ||||
DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); | DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); | ||||
toep->l2te = t4_l2t_get(vi->pi, rt_ifp, | toep->l2te = t4_l2t_get(vi->pi, rt_ifp, | ||||
rt->rt_flags & RTF_GATEWAY ? rt->rt_gateway : nam); | nh->nh_flags & NHF_GATEWAY ? &nh->gw_sa : nam); | ||||
Lint: Possible Spelling Mistake: Possible spelling error. You wrote 'nam', but did you mean 'name'? | |||||
if (toep->l2te == NULL) | if (toep->l2te == NULL) | ||||
DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); | DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); | ||||
toep->vnet = so->so_vnet; | toep->vnet = so->so_vnet; | ||||
init_conn_params(vi, &settings, &inp->inp_inc, so, NULL, | init_conn_params(vi, &settings, &inp->inp_inc, so, NULL, | ||||
toep->l2te->idx, &toep->params); | toep->l2te->idx, &toep->params); | ||||
init_toepcb(vi, toep); | init_toepcb(vi, toep); | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |
Possible spelling error. You wrote 'nam', but did you mean 'name'?