Date: Tue, 30 Jan 2007 00:55:03 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 113683 for review Message-ID: <200701300055.l0U0t3HB081931@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113683 Change 113683 by piso@piso_newluxor on 2007/01/30 00:54:23 We don't need to ip_next() in GetDeltaAckIt(): pass down the tcp ack field and eliminate the necessity to have pointers to the ip and tcp headers. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#37 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_db.c#19 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_local.h#14 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#37 (text+ko) ==== @@ -930,7 +930,7 @@ if (GetAckModified(lnk) == 1) { int delta; - delta = GetDeltaAckIn(pip, lnk); + delta = GetDeltaAckIn(lnk, tc->th_ack); if (delta != 0) { accumulate += twowords(&tc->th_ack); tc->th_ack = htonl(ntohl(tc->th_ack) - delta); ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_db.c#19 (text+ko) ==== @@ -2007,7 +2007,7 @@ int -GetDeltaAckIn(struct ip *pip, struct alias_link *lnk) +GetDeltaAckIn(struct alias_link *lnk, u_long ack) { /* Find out how much the ACK number has been altered for an incoming @@ -2016,12 +2016,7 @@ */ int i; - struct tcphdr *tc; int delta, ack_diff_min; - u_long ack; - - tc = ip_next(pip); - ack = tc->th_ack; delta = 0; ack_diff_min = -1; ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_local.h#14 (text+ko) ==== @@ -298,7 +298,7 @@ void SetProxyPort(struct alias_link *_lnk, u_short _port); void SetAckModified(struct alias_link *_lnk); int GetAckModified(struct alias_link *_lnk); -int GetDeltaAckIn(struct ip *_pip, struct alias_link *_lnk); +int GetDeltaAckIn(struct alias_link *_lnk, u_long ack); int GetDeltaSeqOut(struct ip *_pip, struct alias_link *_lnk); void AddSeq (struct ip *_pip, struct alias_link *_lnk, int _delta); void SetExpire (struct alias_link *_lnk, int _expire);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701300055.l0U0t3HB081931>