All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leandro <leandroal@gmail.com>
To: dccp@vger.kernel.org
Subject: [PATCH 2/8] Improve the declaration of tfrc_option_receive struct
Date: Thu, 20 Dec 2007 16:58:44 +0000	[thread overview]
Message-ID: <200712201358.44916.leandroal@gmail.com> (raw)

[TFRC_CCIDS] Improve the declaration of tfrc_option_receive struct.

It makes tfrcor_dropped_packets_idx a plain u16. tfrcor_loss_intervals_idx was part of a bitfield together with tfrcor_seqno because it is 48 bits and we wanted to use what is left in a 64. Adding the new DROPPED PACKET field this setup changed. Thus, making tfrcor_dropped_packets_idx a 16 bits entry in a 16 bits bitfield doesn't helps us here and likely produces bad code. Now we have just a 2 bytes hole.

Signed-off-by: Leandro Melo de Sales <leandro@embedded.ufcg.edu.br>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Index: ccid4.latest/net/dccp/ccids/lib/tfrc_ccids.h
=================================--- ccid4.latest.orig/net/dccp/ccids/lib/tfrc_ccids.h
+++ ccid4.latest/net/dccp/ccids/lib/tfrc_ccids.h
@@ -39,13 +39,13 @@ enum tfrc_options {
 };
 
 struct tfrc_options_received {
-	u64 tfrcor_seqno:48,
-	    tfrcor_loss_intervals_idx:16,
-	    tfrcor_dropped_packets_idx:16;
-	u16 tfrcor_loss_intervals_len,
-	    tfrcor_dropped_packets_len;
-	u32 tfrcor_loss_event_rate;
-	u32 tfrcor_receive_rate;
+	u64  tfrcor_seqno:48;
+	u64  tfrcor_loss_intervals_idx:16;
+	u16  tfrcor_dropped_packets_idx;
+	u16  tfrcor_loss_intervals_len;
+	u16  tfrcor_dropped_packets_len;
+	u32  tfrcor_loss_event_rate;
+	u32  tfrcor_receive_rate;
 };
 
 /* TFRC sender states */

                 reply	other threads:[~2007-12-20 16:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200712201358.44916.leandroal@gmail.com \
    --to=leandroal@gmail.com \
    --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.