* [PATCH 2/8] Improve the declaration of tfrc_option_receive struct
@ 2007-12-20 16:58 Leandro
0 siblings, 0 replies; only message in thread
From: Leandro @ 2007-12-20 16:58 UTC (permalink / raw)
To: dccp
[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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-20 16:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-20 16:58 [PATCH 2/8] Improve the declaration of tfrc_option_receive struct Leandro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox