diff options
author | np <np@FreeBSD.org> | 2013-07-04 19:44:30 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2013-07-04 19:44:30 +0000 |
commit | ef8e539e8daae6e8331dc786ccd04dd48e41ba7b (patch) | |
tree | 0285119142e91c37d8ef30d6e1c7e6f5c24796c5 /sys/dev | |
parent | 0814087cf4af15756b580b413d0560ad205e35ee (diff) | |
download | FreeBSD-src-ef8e539e8daae6e8331dc786ccd04dd48e41ba7b.zip FreeBSD-src-ef8e539e8daae6e8331dc786ccd04dd48e41ba7b.tar.gz |
Pay attention to TCP_NODELAY when it's set/unset after the connection
is established.
MFC after: 1 day
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cxgbe/tom/t4_tom.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 8e7965a..671174d 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_msg.h" #include "common/t4_regs.h" #include "common/t4_regs_values.h" +#include "common/t4_tcb.h" #include "tom/t4_tom_l2t.h" #include "tom/t4_tom.h" @@ -331,6 +332,30 @@ t4_pcb_detach(struct toedev *tod __unused, struct tcpcb *tp) } /* + * setsockopt handler. + */ +static void +t4_ctloutput(struct toedev *tod, struct tcpcb *tp, int dir, int name) +{ + struct adapter *sc = tod->tod_softc; + struct toepcb *toep = tp->t_toe; + + if (dir == SOPT_GET) + return; + + CTR4(KTR_CXGBE, "%s: tp %p, dir %u, name %u", __func__, tp, dir, name); + + switch (name) { + case TCP_NODELAY: + t4_set_tcb_field(sc, toep, 1, W_TCB_T_FLAGS, V_TF_NAGLE(1), + V_TF_NAGLE(tp->t_flags & TF_NODELAY ? 0 : 1)); + break; + default: + break; + } +} + +/* * The TOE driver will not receive any more CPLs for the tid associated with the * toepcb; release the hold on the inpcb. */ @@ -946,6 +971,7 @@ t4_tom_activate(struct adapter *sc) tod->tod_syncache_removed = t4_syncache_removed; tod->tod_syncache_respond = t4_syncache_respond; tod->tod_offload_socket = t4_offload_socket; + tod->tod_ctloutput = t4_ctloutput; for_each_port(sc, i) TOEDEV(sc->port[i]->ifp) = &td->tod; |