PERFORCE change 195084 for review
Catalin Nicutar
cnicutar at FreeBSD.org
Tue Jun 21 07:24:24 UTC 2011
http://p4web.freebsd.org/@@195084?ac=10
Change 195084 by cnicutar at cnicutar_cronos on 2011/06/21 07:24:09
Send UTO when sending SYN-ACK
Affected files ...
.. //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_syncache.c#2 edit
.. //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_syncache.h#2 edit
Differences ...
==== //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_syncache.c#2 (text+ko) ====
@@ -1045,6 +1045,12 @@
win = sbspace(&so->so_rcv);
sb_hiwat = so->so_rcv.sb_hiwat;
ltflags = (tp->t_flags & (TF_NOOPT | TF_SIGNATURE));
+
+ /* Set User Timeout to send in SYN-ACK. */
+ if (tp->t_flags & TF_SND_UTO) {
+ to->to_uto = tp->snd_uto;
+ to->to_flags |= TOF_UTO;
+ }
/* By the time we drop the lock these should no longer be used. */
so = NULL;
@@ -1250,6 +1256,10 @@
sc->sc_flags |= SCF_NOOPT;
if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn)
sc->sc_flags |= SCF_ECN;
+ if (to->to_flags & TOF_UTO) {
+ sc->sc_uto = to->to_uto;
+ sc->sc_flags |= SCF_UTO;
+ }
if (V_tcp_syncookies) {
syncookie_generate(sch, sc, &flowtmp);
@@ -1412,6 +1422,10 @@
}
if (sc->sc_flags & SCF_SACK)
to.to_flags |= TOF_SACKPERM;
+ if (sc->sc_flags & SCF_UTO) {
+ to.to_uto = sc->sc_uto;
+ to.to_flags |= TOF_UTO;
+ }
#ifdef TCP_SIGNATURE
if (sc->sc_flags & SCF_SIGNATURE)
to.to_flags |= TOF_SIGNATURE;
==== //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_syncache.h#2 (text+ko) ====
@@ -74,6 +74,7 @@
u_int8_t sc_ip_tos; /* IPv4 TOS */
u_int8_t sc_requested_s_scale:4,
sc_requested_r_scale:4;
+ u_int16_t sc_uto; /* user timeout to send */
u_int16_t sc_flags;
#ifndef TCP_OFFLOAD_DISABLE
struct toe_usrreqs *sc_tu; /* TOE operations */
@@ -94,6 +95,7 @@
#define SCF_SIGNATURE 0x20 /* send MD5 digests */
#define SCF_SACK 0x80 /* send SACK option */
#define SCF_ECN 0x100 /* send ECN setup packet */
+#define SCF_UTO 0x200 /* send UTO */
#define SYNCOOKIE_SECRET_SIZE 8 /* dwords */
#define SYNCOOKIE_LIFETIME 16 /* seconds */
More information about the p4-projects
mailing list