All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: Re: [PATCH 2/2]: Use `unsigned' for packet lengths
Date: Tue, 28 Nov 2006 19:41:27 +0000	[thread overview]
Message-ID: <200611281941.28068@strip-the-willow> (raw)
In-Reply-To: <200611281435.05466@strip-the-willow>

Quoting Ian McDonald:
|  On 11/29/06, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
|  > [DCCP]: Use `unsigned' for packet lengths
|  >
|  I'm wondering whether this code is 64 bit safe??? I don't think it is.
|  Arnaldo can probably advise.
|  
|  We changed int to u32 for length and I went and checked the callers
|  and parameters. They all basically go back to skb->len which is an
|  unsigned int. So at least we did the right thing changing to unsigned
|  as we were mismatched before.
|  
|  As much as I would like to change sk_buff definition to __u32 and save
|  2 bytes on 64 bit I don't think we can really as that is in a
|  userspace include as I understand it and therefore we would break
|  programs...
These are further changes - do you think that this would improve anything - I don't know.
The proposed change of u32 for payload length seems fully sufficient in my eyes since 
with that we have more than enough for IPv4 and in IPv6 we are already in jumbogram-dimensions.

I have two other suggestions regarding 64-bit unsigned - I think it would make sense to store
the calculated send rate in bytes per microsecond, since there are some nasty conversion problems
attached to it, as well as division errors. I am working on this right now.

  parent reply	other threads:[~2006-11-28 19:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28 14:35 [PATCH 2/2]: Use `unsigned' for packet lengths Gerrit Renker
2006-11-28 19:34 ` Ian McDonald
2006-11-28 19:41 ` Gerrit Renker [this message]
2006-11-28 19:49 ` Ian McDonald
2006-11-28 20:04 ` Gerrit Renker
2006-11-28 20:17 ` Ian McDonald
2006-11-28 20:27 ` Arnaldo Carvalho de Melo
2006-11-28 20:31 ` Gerrit Renker
2006-11-28 20:37 ` Arnaldo Carvalho de Melo
2006-11-28 20:53 ` Gerrit Renker
2006-11-28 21:01 ` Ian McDonald
2006-11-28 21:19 ` Eddie Kohler
2006-11-28 21:56 ` Gerrit Renker

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=200611281941.28068@strip-the-willow \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=dccp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.