netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: Ivo Calado <ivocalado@embedded.ufcg.edu.br>
Cc: dccp@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/5] First Patch on TFRC-SP. Copy base files from TFRC
Date: Sat, 12 Sep 2009 20:32:22 +0200	[thread overview]
Message-ID: <20090912183222.GA5706@gerrit.erg.abdn.ac.uk> (raw)
In-Reply-To: <4AA6A25A.5040508@embedded.ufcg.edu.br>

Hi Ivo,

you have made a really good job of sticking to code conventions (see other
posting). There are a few things that needed tending to in the first patch.

(1) Version changes
===================
It seems that you applied something like s/\*\*/*/g to the first instance of
the patch, in order to remove duplicate asterisks. This caused a problem:

--- tfrc_sp_receiver_01.patch   2009/09/12 08:37:12     1.1
+++ tfrc_sp_receiver_01.patch   2009/09/08 17:34:40
@@ -1001,8 +1001,8 @@ Index: dccp_tree_work4/net/dccp/ccids/li
 +
 +#endif
 +
-+extern int  tfrc_sp_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno);
-+extern void tfrc_sp_tx_hist_purge(struct tfrc_tx_hist_entry **headp);
++extern int  tfrc_sp_tx_hist_add(struct tfrc_tx_hist_entry *headp, u64 seqno);
++extern void tfrc_sp_tx_hist_purge(struct tfrc_tx_hist_entry *headp);

I have reverted the bug, also to minimise the difference to the existing (non
TFRC-SP) files.


(2) Other changes that I edited out
===================================
(Other than whitespace changes.)

net/dccp/ccids/lib/loss_interval_sp.c
-------------------------------------
I replaced the following dead code
        if ((tfrc_lh_slab != NULL))
                return 0;

        if (tfrc_lh_slab != NULL) {
                kmem_cache_destroy(tfrc_lh_slab);
                tfrc_lh_slab = NULL;
        }
        return -ENOBUFS;
with 
        return tfrc_lh_slab == NULL ? -ENOBUFS : 0;

Also separated the conditions
+               if ((len <= 0) || 
+                   (!tfrc_lh_closed_check(cur, cong_evt->tfrchrx_ccval))) {
back into 
                if (len <= 0)
                        return false;

                if (!tfrc_lh_closed_check(cur, cong_evt->tfrchrx_ccval))
                        return false;

I removed the following unnecessary inclusion:
+#include <linux/random.h>


The following function pokes a hole in thei so far "abstract" data type;
the convention has been to access the internals of the struct only via
get-functions:

static inline struct tfrc_loss_interval
        *tfrc_lh_get_loss_interval(struct tfrc_loss_hist *lh, const u8 i)
{
        BUG_ON(i >= lh->counter);
        return lh->ring[LIH_INDEX(lh->counter - i - 1)];
}

(You use it in patch 3/5 to gain access to li_ccval and li_losses.
Better would be to have two separate accessor functions.)


net/dccp/ccids/lib/tfrc_equation_sp.c
-------------------------------------
This is a prime candidate for removal. After editing out the whitespace
differences, I found that it is 100% identical with tfrc_equation.c.

The result of this editing has been uploaded to
http://eden-feed.erg.abdn.ac.uk/tfrc_sp_receiver_01.patch

  reply	other threads:[~2009-09-12 18:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-08 18:28 [PATCH 1/5] First Patch on TFRC-SP. Copy base files from TFRC Ivo Calado
2009-09-12 18:32 ` Gerrit Renker [this message]
2009-09-15  0:38   ` Ivo Calado
2009-09-15  5:25     ` Ian McDonald
2009-09-18 22:54       ` gerrit
2009-09-19  6:16     ` gerrit
2009-10-13 17:18     ` [PATCHv2 1/4] " Ivo Calado
2009-10-13 18:06       ` Jarek Poplawski
2009-10-13 18:12         ` Ivo Calado
2009-10-13 18:21           ` Jarek Poplawski
2009-10-13 18:25             ` Ivo Calado
2009-10-13 18:42               ` Arnaldo Carvalho de Melo
2009-10-13 18:53               ` Jarek Poplawski
2009-10-19  5:21       ` Gerrit Renker
2009-10-20 13:51         ` Ivo Calado
  -- strict thread matches above, loose matches on Subject: below --
2009-09-04 12:24 [PATCH 1/5] " Ivo Calado
     [not found] <cb00fa210909011735l5038c28eofba84b3976902964@mail.gmail.com>
2009-09-02  2:44 ` Ivo Calado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090912183222.GA5706@gerrit.erg.abdn.ac.uk \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=dccp@vger.kernel.org \
    --cc=ivocalado@embedded.ufcg.edu.br \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).