summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
diff options
context:
space:
mode:
authorlstewart <lstewart@FreeBSD.org>2009-07-13 11:51:02 +0000
committerlstewart <lstewart@FreeBSD.org>2009-07-13 11:51:02 +0000
commit31cb6fd0f611d62a67ef9aa10d33bec66c2ca87e (patch)
tree7cc55e422a0a1c514ce30ad5dd81afc1953c41fa /sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
parentf8ef0d9b7276dbb53a6d2c76693bd3950cabec64 (diff)
downloadFreeBSD-src-31cb6fd0f611d62a67ef9aa10d33bec66c2ca87e.zip
FreeBSD-src-31cb6fd0f611d62a67ef9aa10d33bec66c2ca87e.tar.gz
Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface to
the TCP syncache. This returns struct tcpopt to being private within the TCP implementation, thus allowing it to be modified without ABI concerns. The patch breaks the ABI. Bump __FreeBSD_version to 800103 accordingly. The cxgb driver is the only TOE consumer affected by this change, and needs to be recompiled along with the kernel. Suggested by: rwatson Reviewed by: rwatson, kmacy Approved by: re (kensmith), kensmith (mentor temporarily unavailable)
Diffstat (limited to 'sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c')
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
index 96a0dc8..f3c6d2b 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
@@ -3249,13 +3249,13 @@ static void
syncache_add_accept_req(struct cpl_pass_accept_req *req, struct socket *lso, struct toepcb *toep)
{
struct in_conninfo inc;
- struct tcpopt to;
+ struct toeopt toeo;
struct tcphdr th;
struct inpcb *inp;
int mss, wsf, sack, ts;
uint32_t rcv_isn = ntohl(req->rcv_isn);
- bzero(&to, sizeof(struct tcpopt));
+ bzero(&toeo, sizeof(struct toeopt));
inp = so_sotoinpcb(lso);
/*
@@ -3281,10 +3281,11 @@ syncache_add_accept_req(struct cpl_pass_accept_req *req, struct socket *lso, str
wsf = req->tcp_options.wsf;
ts = req->tcp_options.tstamp;
sack = req->tcp_options.sack;
- to.to_mss = mss;
- to.to_wscale = wsf;
- to.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0);
- tcp_offload_syncache_add(&inc, &to, &th, inp, &lso, &cxgb_toe_usrreqs, toep);
+ toeo.to_mss = mss;
+ toeo.to_wscale = wsf;
+ toeo.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0);
+ tcp_offload_syncache_add(&inc, &toeo, &th, inp, &lso, &cxgb_toe_usrreqs,
+toep);
}
@@ -3584,7 +3585,7 @@ syncache_expand_establish_req(struct cpl_pass_establish *req, struct socket **so
{
struct in_conninfo inc;
- struct tcpopt to;
+ struct toeopt to;
struct tcphdr th;
int mss, wsf, sack, ts;
struct mbuf *m = NULL;
@@ -3597,7 +3598,7 @@ syncache_expand_establish_req(struct cpl_pass_establish *req, struct socket **so
opt = ntohs(req->tcp_opt);
- bzero(&to, sizeof(struct tcpopt));
+ bzero(&toeo, sizeof(struct toeopt));
/*
* Fill out information for entering us into the syncache
@@ -3617,15 +3618,15 @@ syncache_expand_establish_req(struct cpl_pass_establish *req, struct socket **so
ts = G_TCPOPT_TSTAMP(opt);
sack = G_TCPOPT_SACK(opt);
- to.to_mss = mss;
- to.to_wscale = G_TCPOPT_SND_WSCALE(opt);
- to.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0);
+ toeo.to_mss = mss;
+ toeo.to_wscale = G_TCPOPT_SND_WSCALE(opt);
+ toeo.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0);
DPRINTF("syncache expand of %d:%d %d:%d mss:%d wsf:%d ts:%d sack:%d\n",
ntohl(req->local_ip), ntohs(req->local_port),
ntohl(req->peer_ip), ntohs(req->peer_port),
mss, wsf, ts, sack);
- return tcp_offload_syncache_expand(&inc, &to, &th, so, m);
+ return tcp_offload_syncache_expand(&inc, &toeo, &th, so, m);
}
OpenPOWER on IntegriCloud