List Info

Thread: CCID2 patches




CCID2 patches
user name
2006-08-28 00:18:33
This was meant to go to dccp rather than netdev... Never
mind.

It does raise the question though is whether the dccp
mailing list is
worth keeping separate? Thoughts?

Ian
---------- Forwarded message ----------
From: Ian McDonald <ian.mcdonaldjandi.co.nz>
Date: Aug 28, 2006 12:12 PM
Subject: CCID2 patches
To: Andrea Bittau <a.bittaucs.ucl.ac.uk>
Cc: David Miller <davemdavemloft.net>,
arnaldo.melogmail.com, netdev
<netdevvger.kernel.org>


> On 8/27/06, Andrea Bittau <a.bittaucs.ucl.ac.uk> wrote:
> > The two sets of patches are at:
> > http://darkircop.org/dccp
> >

These look good in general and I know you have done a lot of
work on these.

Here are some comments. NB I haven't actually compiled or
tested -
just from reading the code.

You need a description of each patch and signed off line in
each
patch. They can't be accepted in this form. Alternatively
they could
be resubmitted.

Please state whether the target is 2.6.18 (bug fixes only)
or 2.6.19
(enhancements)

Please state any dependencies between patches.

In patch 01_ackvec_opt:

-int dccp_ackvec_parse(struct sock *sk, const struct sk_buff
*skb,
+u64 dccp_ackvec_parse(struct sock *sk, u64 ackno,
                      const u8 opt, const u8 *value, const
u8 len)
 {
-       if (len > DCCP_MAX_ACKVEC_LEN)
-               return -1;
-
        /*
dccp_ackvector_print(DCCP_SKB_CB(skb)->dccpd_ack_seq,
value, len); */
-      
dccp_ackvec_check_rcv_ackvector(dccp_sk(sk)->dccps_hc_rx_
ackvec, sk,
-                                      
DCCP_SKB_CB(skb)->dccpd_ack_seq,
-                                       len, value);
-       return 0;
+       return
dccp_ackvec_check_rcv_ackvector(dccp_sk(sk)->dccps_hc_rx_
ackvec,
+                                              sk, ackno,
len, value);

This becomes a one line function. This is only used in one
place that I can
see so this should go and that code should go there... Also
there is some
weird shit going on as this is also defined as inline with
return -1 in
ackvec.h. This needs fixing as well.

In patch 05_ccid2_seq_alloc I don't get this code:

+static int ccid2_hc_tx_alloc_seq(struct ccid2_hc_tx_sock
*hctx, int num)
+{
+       struct ccid2_seq *seqp;
+       int i;
+
+       /* check if we have space to preserve the pointer to
the buffer */
+       if (hctx->ccid2hctx_seqbufc >=
(sizeof(hctx->ccid2hctx_seqbuf) /
+                                       sizeof(struct
ccid2_seq*)))
+               return -ENOMEM;
+
+       /* allocate buffer and initialize linked list */
+       seqp = kmalloc(sizeof(*seqp) * num, gfp_any());
+       if (seqp == NULL)
+               return -ENOMEM;
+
+       for (i = 0; i < (num - 1); i++) {
+               seqp[i].ccid2s_next = &seqp[i + 1];
+               seqp[i + 1].ccid2s_prev = &seqp[i];
+       }

If you are allocating an array of structures in effect you
shouldn't
need to set next/prev pointers as they are allocated
contiguously. If
you are allocating groups of arrays, which I suspect you
are, I still
think the design is a bit ugly and wastes memory.

In 06_ccid2_ssthresh you don't justify why ssthresh can be
infinite to
start off with. And if it is allowed then I don't think you
should do
this by just picking a random high number. Change it to
something like
~0

In 07_ccid2_send_poll - changing to 1 msec poll is not nice.
I now you
said this should be dequeued. I've just added tx queuing to
2.6.19
tree now so you can do this. Up to Dave/Arnaldo if this is
OK as a
short term solution.

In 08_ccid2_cwnd:
+static void ccid2_congestion_event(struct ccid2_hc_tx_sock
*hctx,
+                                  struct ccid2_seq *seqp)
+{
+       if (time_before(seqp->ccid2s_sent,
hctx->ccid2hctx_last_cong)) {
+               dccp_pr_debug("Multiple losses in one
RTT---treating as one\n");

I think that should be a ccid2_pr_debug not a dccp_pr_debug

in 10_ccid2_change:

in ccid2_change_srtt why do you do the test there because
you are
going to take twice as many instructions if you are going to
alter. Is
this to minimise sets?

in 11_ccid2_profile:

in ccid2_profile_time the code there is ugly. I am guessing
you are
assuming 32 bit intel vs 64 bit intel. The world doesn't
revolve
around intel. If you need something architecture specific
that should
be put into the arch subtree not here.

in ccid2_hc_tx_init why are you using 6000? What is the
significant.
Make it a constant defined somewhere.
--
Ian McDonald
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.c
om
WAND Network Research Group
Department of Computer Science
University of Waikato
New Zealand


-- 
Ian McDonald
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.c
om
WAND Network Research Group
Department of Computer Science
University of Waikato
New Zealand
-
To unsubscribe from this list: send the line
"unsubscribe dccp" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html
CCID2 patches
user name
2006-08-28 07:05:34
On Mon, Aug 28, 2006 at 12:18:33PM +1200, Ian McDonald
wrote:
> It does raise the question though is whether the dccp
mailing list is
> worth keeping separate? Thoughts?

I'm registered on dccp only because netdev is too noisy =D 
I personally think
DCCP should gain more momentum before entering netdev. 
Also, I still need to
understand if stuff can go directly to dave or through
arnaldo, especially when
arnaldo gets killed with work.

> You need a description of each patch and signed off
line in each
> patch. They can't be accepted in this form.
Alternatively they could
> be resubmitted.

The proper email, patch and log description was sent a while
back in the DCCP
mailing list.  About resubmitting, I hate insisting.  If
people drop mail, there
probably is a reason.  It's one of my stubburn principles
=P.

> Please state whether the target is 2.6.18 (bug fixes
only) or 2.6.19
> (enhancements)

Some are bug fixes, but I'd send it all to .19.  It's a
milestone patchset:
enable DCCP to do gbit [with ccid2 at least].

> Please state any dependencies between patches.

just apply them sequentially.  Most are independent.  I
specifically put them in
an order "most likeley to be accepted -> most
likeley to be rejected".  If you
notice, the early patches are bug fixes.  The latest patches
are stuff like
"lets add profilin support".

> In patch 01_ackvec_opt:
> -int dccp_ackvec_parse(struct sock *sk, const struct
sk_buff *skb,
> +u64 dccp_ackvec_parse(struct sock *sk, u64 ackno,
>                      const u8 opt, const u8 *value,
const u8 len)
> 
> This becomes a one line function. This is only used in
one place that I can
> see so this should go and that code should go there...
Also there is some

yea I agree.  I'll do it once I see that the first patch
set starts getting
processed.

> weird shit going on as this is also defined as inline
with return -1 in
> ackvec.h. This needs fixing as well.

I dunno wtf that is =D  That's some old debris that needs
to get killed.

> In patch 05_ccid2_seq_alloc I don't get this code:
> If you are allocating an array of structures in effect
you shouldn't
> need to set next/prev pointers as they are allocated
contiguously. If

I am allocating records in a double linked list.  They will
be moved around in
time, so I need the pointers to keep them in the order I
wish.

> you are allocating groups of arrays, which I suspect
you are, I still
> think the design is a bit ugly and wastes memory.

I agree it's ugly, but I'm not a guru.  I wouldn't know
how to do it otherwise
[without spending time on it].  I maintain my own free-list
of structures and
reuse them as necessary.  I don't think it wastes that much
memory.  I do one
malloc for a bunch of structures.  Then I shove that pointer
into a "recycle
bin" so I can free it at the end.  What would the
alternative be?  One malloc
per structure?  That would probably waste more memory and
CPU.

> In 06_ccid2_ssthresh you don't justify why ssthresh
can be infinite to
> start off with. And if it is allowed then I don't
think you should do

I think by definition you exist slow start when you hit
packet loss.  I believe
this maps to an infinite sshtresh.

> this by just picking a random high number. Change it to
something like
> ~0

I agree.  [The number is not random; the original choice I
made was too low so I
had to repeat the digit.]

> In 07_ccid2_send_poll - changing to 1 msec poll is not
nice. I now you
> said this should be dequeued. I've just added tx
queuing to 2.6.19
> tree now so you can do this. Up to Dave/Arnaldo if this
is OK as a
> short term solution.

I personally think CCID should call-back to DCCP, "yo
dude, you can send".  What
polling frequency should I put there?  Intuitively it should
be
time_when_next_ack_arrives - now.  But when is that time? 
RTT/cwnd?

> In 08_ccid2_cwnd:
> I think that should be a ccid2_pr_debug not a
dccp_pr_debug

agree.

> in 10_ccid2_change:
> in ccid2_change_srtt why do you do the test there
because you are
> going to take twice as many instructions if you are
going to alter. Is
> this to minimise sets?

yea to lower profiling information.  Many times the srtt
doesn't change.  [Well
in lab environments.]

> in 11_ccid2_profile:
> in ccid2_profile_time the code there is ugly. I am
guessing you are
> assuming 32 bit intel vs 64 bit intel. The world
doesn't revolve
> around intel. If you need something architecture
specific that should
> be put into the arch subtree not here.

I don't expect this to be merged.  Using a kprobe in the
"change_X" functions
does the same.  I discovered kprobes later.  The refactoring
to the change_X
methods chould be kept though.

> in ccid2_hc_tx_init why are you using 6000? What is the
significant.
> Make it a constant defined somewhere.

Random number.  Again, the profiling was a hack to
"see" CCID2.  It turned out
to be really useful when testing the high speed stuff
[tcp_cong_whateveritscalled].

Dude, thanks for ur time in this.  I'll address the issues
I agreed on in this
mail when I see arnaldo, or anyone, playing and hopefully
commiting these
patches.
-
To unsubscribe from this list: send the line
"unsubscribe dccp" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html
CCID2 patches
user name
2006-08-28 19:15:09
> > You need a description of each patch and signed
off line in each
> > patch. They can't be accepted in this form.
Alternatively they could
> > be resubmitted.
>
> The proper email, patch and log description was sent a
while back in the DCCP
> mailing list.  About resubmitting, I hate insisting. 
If people drop mail, there
> probably is a reason.  It's one of my stubburn
principles =P.
>
> Dude, thanks for ur time in this.  I'll address the
issues I agreed on in this
> mail when I see arnaldo, or anyone, playing and
hopefully commiting these
> patches.

Your code is good dude. Don't let your attitude stop your
code getting
merged. Now some issues have been found you need to resubmit
your
patches before anyone starts playing with them. That's the
way the
kernel works - if your code is reviewed you neeed to fix and
resubmit.
If people don't get around to it submit again. I've had to
resubmit
some code about half a dozen times.

Don't let pride get in your way. If you want to see why
just google
for reiserfs4.

Ian
-- 
Ian McDonald
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.c
om
WAND Network Research Group
Department of Computer Science
University of Waikato
New Zealand
-
To unsubscribe from this list: send the line
"unsubscribe dccp" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html
CCID2 patches
user name
2006-08-28 19:54:12
On Tue, Aug 29, 2006 at 07:15:09AM +1200, Ian McDonald
wrote:
> Don't let pride get in your way. If you want to see
why just google

I'm a male after all; despite the name.  I'm just worried
that arnaldo is not
around anymore.  He hasn't been on IRC for some months now,
and he used to be
~24/7 =D.

When arnaldo sends me an "I'm alive" mail i'll
sort out the patches once more.
[And no... I won't accept spoofed mail =D.]
-
To unsubscribe from this list: send the line
"unsubscribe dccp" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )