From: Ivo Calado Date: Mon, 11 Oct 2010 18:40:04 +0000 (+0200) Subject: dccp: generalise data-loss condition X-Git-Tag: v2.6.37-rc1~147^2~161^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d196c9a5d4e150cdff675662214c80c69b906958;p=pandora-kernel.git dccp: generalise data-loss condition This patch generalises the task of determining data loss from RFC 4340, 7.7.1. Let S_A, S_B be sequence numbers such that S_B is "after" S_A, and let N_B be the NDP count of packet S_B. Then, using modulo-2^48 arithmetic, D = S_B - S_A - 1 is an upper bound of the number of lost data packets, D - N_B is an approximation of the number of lost data packets (there are cases where this is not exact). The patch implements this as dccp_loss_count(S_A, S_B, N_B) := max(S_B - S_A - 1 - N_B, 0) Signed-off-by: Ivo Calado Signed-off-by: Erivaldo Xavier Signed-off-by: Leandro Sales Signed-off-by: Gerrit Renker --- Reading git-diff-tree failed