From patchwork Wed Sep 2 02:46:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ivo Calado X-Patchwork-Id: 32786 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 7AE19B7BC5 for ; Wed, 2 Sep 2009 12:46:57 +1000 (EST) Received: by ozlabs.org (Postfix) id 6F0F5DDD0C; Wed, 2 Sep 2009 12:46:57 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 7F721DDD0B for ; Wed, 2 Sep 2009 12:46:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755603AbZIBCqr (ORCPT ); Tue, 1 Sep 2009 22:46:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755596AbZIBCqr (ORCPT ); Tue, 1 Sep 2009 22:46:47 -0400 Received: from mail-yw0-f188.google.com ([209.85.211.188]:35251 "EHLO mail-yw0-f188.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755594AbZIBCqp convert rfc822-to-8bit (ORCPT ); Tue, 1 Sep 2009 22:46:45 -0400 Received: by ywh26 with SMTP id 26so812193ywh.5 for ; Tue, 01 Sep 2009 19:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=c44r3/HwGA8lL3vIIKDoguCUPvIWcDTzI3AcKijLSAE=; b=ww2OdhJTuXL9oMiGIf2X7CCyoXQLJXBxfH0S9LNimfNePHqDegAgzaVKBCplRjVKZP GvvmF8EWrCf66v2LFD3Vdh1J9MNttNUnYac4pgKgDAiq/x3xtYgBP0Iv5kUwz6QFa2Nd efW7Eyn+hq/+b5OK4BJtGL/rT1VUSdJTCMlUc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=BhM51WbNvZru90ruo1m9j3dsX7QmUj8imOYNeh+KHjOv53Lh07ixcAwSTZYY+Mzn9N QzqQZHcx/0ISxaUFBNobEAxinPyZ8BLdjgYLeXzDLZA2l0f85K2sTnkczz+oipPdbxjT hQcT2eEJ4mqFahjGsYlMbGvhfC8p5JxO43PU8= MIME-Version: 1.0 Received: by 10.150.110.1 with SMTP id i1mr12934745ybc.63.1251859607137; Tue, 01 Sep 2009 19:46:47 -0700 (PDT) In-Reply-To: References: From: Ivo Calado Date: Tue, 1 Sep 2009 23:46:26 -0300 X-Google-Sender-Auth: b1b74752b36b765f Message-ID: Subject: [PATCH 5/5] Updating documentation accordingly To: dccp Cc: netdev Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Updating documentation accordingly Signed-off-by: Ivo Calado, Erivaldo Xavier, Leandro Sales , , Index: b/net/dccp/ccids/lib/loss_interval_sp.h =================================================================== --- a/net/dccp/ccids/lib/loss_interval_sp.h     2009-08-27 22:37:40.000000000 -0300 +++ b/net/dccp/ccids/lib/loss_interval_sp.h     2009-08-27 23:02:00.000000000 -0300 @@ -1,6 +1,7 @@  #ifndef _DCCP_LI_HIST_SP_  #define _DCCP_LI_HIST_SP_  /* + *  Copyright (c) 2009 Federal University of Campina Grande, Embedded Systems and Pervasive Computing Lab  *  Copyright (c) 2007   The University of Aberdeen, Scotland, UK  *  Copyright (c) 2005-7 The University of Waikato, Hamilton, New Zealand.  *  Copyright (c) 2005-7 Ian McDonald @@ -69,6 +70,15 @@  #endif +/** + *  tfrc_loss_data_entry  -  Holds info about one loss interval + *  @next:             next entry on this linked list + *  @lossless_length:  length of lossless sequence + *  @ecn_nonce_sum:    ecn nonce sum for this interval + *  @loss_length:      length of lossy part + *  @data_length:      data length on lossless part + *  @drop_count:       count of dopped packets + */  struct tfrc_loss_data_entry {        struct tfrc_loss_data_entry     *next;        u32                             lossless_length:24; @@ -78,9 +88,20 @@        u32                             drop_count:24;  }; -#define TFRC_LOSS_INTERVALS_OPT_MAX_LENGTH     28 -#define TFRC_DROP_OPT_MAX_LENGTH               84 +#define TFRC_LOSS_INTERVALS_OPT_MAX_LENGTH     28      /* As defined at section 8.6.1. of RFC 4342 */ +#define TFRC_DROP_OPT_MAX_LENGTH               84      /* Specified on section 8.7. of CCID4 draft */ +/** + *  tfrc_loss_data  -  loss interval data + *  used by loss intervals and dropped packets options + *  @head:                     linked list containing loss interval data + *  @counter:                  number of entries + *  @loss_intervals_opts:      space necessary for writing temporary option data for loss intervals option + *  @drop_opts:                        same for dropped packets option + *  @last_loss_count:          last loss count (num. of packets after hole on transmission) observed + *  @sto_ecn:                  ecn's observed while waiting for hole to be filled or accepted as missing + *  @sto_is_data:              flags about if packets saw were data packets + */  struct tfrc_loss_data {        struct tfrc_loss_data_entry     *head;        u16                             counter; Index: b/net/dccp/ccids/lib/loss_interval_sp.c =================================================================== --- a/net/dccp/ccids/lib/loss_interval_sp.c     2009-08-27 22:36:43.000000000 -0300 +++ b/net/dccp/ccids/lib/loss_interval_sp.c     2009-08-28 21:07:28.000000000 -0300 @@ -1,4 +1,5 @@  /* + *  Copyright (c) 2009 Federal University of Campina Grande, Embedded Systems and Pervasive Computing Lab  *  Copyright (c) 2007   The University of Aberdeen, Scotland, UK  *  Copyright (c) 2005-7 The University of Waikato, Hamilton, New Zealand.  *  Copyright (c) 2005-7 Ian McDonald @@ -56,6 +57,12 @@        ld->counter = 0;  } +/** + *  tfrc_sp_ld_prepare_data  -  updates arrays on tfrc_loss_data so they can be sent as options + *  @loss_count:       current loss count (packets after hole on transmission), + *                     used to determine skip length for loss intervals option + *  @ld:               loss intervals data being updated + */  void tfrc_sp_ld_prepare_data(u8 loss_count, struct tfrc_loss_data* ld)  {        u8* li_ofs, *d_ofs; @@ -184,7 +191,7 @@  }  /** - * tfrc_lh_update_i_mean  -  Update the `open' loss interval I_0 + * tfrc_sp_lh_update_i_mean  -  Update the `open' loss interval I_0  * This updates I_mean as the sequence numbers increase. As a consequence, the  * open loss interval I_0 increases, hence p = W_tot/max(I_tot0, I_tot1)  * decreases, and thus there is no need to send renewed feedback. @@ -232,11 +239,12 @@        return cur->li_is_closed;  } -/** tfrc_lh_interval_add  -  Insert new record into the Loss Interval database +/** tfrc_sp_lh_interval_add  -  Insert new record into the Loss Interval database  * @lh:                   Loss Interval database  * @rh:                   Receive history containing a fresh loss event  * @calc_first_li: Caller-dependent routine to compute length of first interval  * @sk:                   Used by @calc_first_li in caller-specific way (subtyping) + * @ccval:        Current ccval  * Updates I_mean and returns 1 if a new interval has in fact been added to @lh.  */  bool tfrc_sp_lh_interval_add(struct tfrc_loss_hist *lh, struct tfrc_rx_hist *rh, @@ -315,6 +323,14 @@        return true;  } +/** + *  tfrc_sp_update_li_data  -  Update tfrc_loss_data upon packet receiving or loss detection + *  @ld:                       tfrc_loss_data being updated + *  @rh:                       loss event record + *  @skb:                      received packet + *  @new_loss:                 dictates if new loss was detected upon receiving current packet + *  @new_event:                        ...and if the loss starts new loss interval + */  void tfrc_sp_update_li_data(struct tfrc_loss_data *ld, struct tfrc_rx_hist *rh, struct sk_buff *skb, bool new_loss, bool new_event)  {        struct tfrc_loss_data_entry* new, *h; Index: b/net/dccp/ccids/lib/packet_history_sp.c =================================================================== --- a/net/dccp/ccids/lib/packet_history_sp.c    2009-08-27 22:36:43.000000000 -0300 +++ b/net/dccp/ccids/lib/packet_history_sp.c    2009-08-28 21:05:35.000000000 -0300 @@ -4,6 +4,12 @@  *  *  An implementation of the DCCP protocol  * + *  Copyright (c) 2009 Ivo Calado, Erivaldo Xavier, Leandro Sales + * + *  This code has been developed by the Federal University of Campina Grande + *  Embedded Systems and Pervasive Computing Lab. For further information please see + *  http://embedded.ufcg.edu.br/ , , + *  *  This code has been developed by the University of Waikato WAND  *  research group. For further information please see http://www.wand.net.nz/  *  or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz @@ -323,9 +329,10 @@  }  /** - *  tfrc_rx_congestion_event  -  Loss detection and further processing + *  tfrc_sp_rx_congestion_event  -  Loss detection and further processing  *  @h:                The non-empty RX history object  *  @lh:       Loss Intervals database to update + *  @ld:       loss data for options  *  @skb:      Currently received packet  *  @ndp:      The NDP count belonging to @skb  *  @first_li: Caller-dependent computation of first loss interval in @lh @@ -476,7 +483,7 @@  }  /** - * tfrc_rx_hist_sample_rtt  -  Sample RTT from timestamp / CCVal + * tfrc_sp_rx_hist_sample_rtt  -  Sample RTT from timestamp / CCVal  * Based on ideas presented in RFC 4342, 8.1. This function expects that no loss  * is pending and uses the following history entries (via rtt_sample_prev):  * - h->ring[0]  contains the most recent history entry prior to @skb; Index: b/net/dccp/ccids/lib/packet_history_sp.h =================================================================== --- a/net/dccp/ccids/lib/packet_history_sp.h    2009-08-27 22:36:43.000000000 -0300 +++ b/net/dccp/ccids/lib/packet_history_sp.h    2009-08-27 23:04:28.000000000 -0300 @@ -1,6 +1,12 @@  /*  *  Packet RX/TX history data structures and routines for TFRC-based protocols.  * + *  Copyright (c) 2009 Ivo Calado, Erivaldo Xavier, Leandro Sales + * + *  This code has been developed by the Federal University of Campina Grande + *  Embedded Systems and Pervasive Computing Lab. For further information please see + *  http://embedded.ufcg.edu.br/ , , + *  *  Copyright (c) 2007   The University of Aberdeen, Scotland, UK  *  Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand.  * Index: b/net/dccp/ccids/lib/tfrc_ccids_sp.c =================================================================== --- a/net/dccp/ccids/lib/tfrc_ccids_sp.c        2009-08-27 22:36:43.000000000 -0300 +++ b/net/dccp/ccids/lib/tfrc_ccids_sp.c        2009-08-27 23:09:18.000000000 -0300 @@ -1,4 +1,5 @@  /* + *  Copyright (c) 2009 Federal University of Campina Grande, Embedded Systems and Pervasive Computing Lab  *  Copyright (c) 2007 Leandro Melo de Sales  *  Copyright (c) 2005 Ian McDonald  *  Copyright (c) 2005 Arnaldo Carvalho de Melo Index: b/net/dccp/ccids/lib/tfrc_ccids_sp.h =================================================================== --- a/net/dccp/ccids/lib/tfrc_ccids_sp.h        2009-08-27 22:36:43.000000000 -0300 +++ b/net/dccp/ccids/lib/tfrc_ccids_sp.h        2009-08-27 23:11:00.000000000 -0300 @@ -1,4 +1,5 @@  /* + *  Copyright (c) 2009 Federal University of Campina Grande, Embedded Systems and Pervasive Computing Lab  *  Copyright (c) 2007 Leandro Melo de Sales  *  Copyright (c) 2005 Ian McDonald  *  Copyright (c) 2005 Arnaldo Carvalho de Melo  *  Copyright (c) 2005-6 Ian McDonald Index: b/net/dccp/ccids/lib/tfrc_equation_sp.c =================================================================== --- a/net/dccp/ccids/lib/tfrc_equation_sp.c     2009-08-27 22:36:43.000000000 -0300 +++ b/net/dccp/ccids/lib/tfrc_equation_sp.c     2009-08-28 21:08:54.000000000 -0300 @@ -1,4 +1,5 @@  /* + *  Copyright (c) 2009 Federal University of Campina Grande, Embedded Systems and Pervasive Computing Lab  *  Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand.  *  Copyright (c) 2005 Ian McDonald  *  Copyright (c) 2005 Arnaldo Carvalho de Melo @@ -607,7 +608,7 @@  }  /** - * tfrc_calc_x - Calculate the send rate as per section 3.1 of RFC3448 + * tfrc_sp_calc_x - Calculate the send rate as per section 3.1 of RFC3448  *  *  @s: packet size          in bytes  *  @R: RTT                  scaled by 1000000   (i.e., microseconds) @@ -666,7 +667,7 @@  }  /** - *  tfrc_calc_x_reverse_lookup  -  try to find p given f(p) + *  tfrc_sp_calc_x_reverse_lookup  -  try to find p given f(p)  *  *  @fvalue: function value to match, scaled by 1000000  *  Returns closest match for p, also scaled by 1000000 @@ -699,7 +700,7 @@  }  /** - * tfrc_invert_loss_event_rate  -  Compute p so that 10^6 corresponds to 100% + * tfrc_sp_invert_loss_event_rate  -  Compute p so that 10^6 corresponds to 100%  * When @loss_event_rate is large, there is a chance that p is truncated to 0.  * To avoid re-entering slow-start in that case, we set p = TFRC_SMALLEST_P > 0.  */ --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/net/dccp/ccids/lib/tfrc_sp.c =================================================================== --- a/net/dccp/ccids/lib/tfrc_sp.c      2009-08-27 22:36:43.000000000 -0300 +++ b/net/dccp/ccids/lib/tfrc_sp.c      2009-08-27 23:25:50.000000000 -0300 @@ -1,6 +1,9 @@  /*  * TFRC library initialisation  * + * Copyright (c) 2009 Federal University of Campina Grande, Embedded Systems and Pervasive Computing Lab + *     Almost copied from tfrc.c, only renamed symbols + *  * Copyright (c) 2007 The University of Aberdeen, Scotland, UK  * Copyright (c) 2007 Arnaldo Carvalho de Melo  */ Index: b/net/dccp/ccids/lib/tfrc_sp.h =================================================================== --- a/net/dccp/ccids/lib/tfrc_sp.h      2009-08-27 22:36:43.000000000 -0300 +++ b/net/dccp/ccids/lib/tfrc_sp.h      2009-08-27 23:28:55.000000000 -0300 @@ -1,6 +1,7 @@  #ifndef _TFRC_SP_H_  #define _TFRC_SP_H_  /* + *  Copyright (c) 2009 Federal University of Campina Grande, Embedded Systems and Pervasive Computing Lab  *  Copyright (c) 2007   The University of Aberdeen, Scotland, UK  *  Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand.