From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: Re: [PATCH 0/8]: Sequence numbers, larger windows revisited, minor cleanups
Date: Tue, 19 Dec 2006 10:07:47 +0000 [thread overview]
Message-ID: <200612191007.47807@strip-the-willow> (raw)
In-Reply-To: <200612151049.50073@strip-the-willow>
Hi Arnaldo / Ian
| Tomorrow I'll try to review this patch series and take into account
| your opinion when deciding which ones are pure bug fixes worthy for
| pushing to DaveM and then to Linus.
I am not fussy about getting the patches into 2.6.20 at all cost. I am reconsidering
the add48/sub48 and the dccp_inc_seqno functions/macros.
The reason is something which I initially didn't consider: Ian reminded me that the
address of a bitfield (e.g. ccid3hcrx_seqno_nonloss). This means that dccp_inc_seqno
is of little use for this purpose - and so are, likely, the add48/sub48 functions.
Please see below for a suggestion of an _inc48() macro which would work in this case.
Since I expect that the sub48/add48 functions will be needed mostly for bitfields and
not for 64-bit values of DCCP internal structures, it may be good to leave those patches
`on ice' and give Ian's patch the preference.
Ian I would appreciate input on how and where such subtraction/addition functions shall
be used. Maybe it is better to just just a set of macros, ditch the sub48/add48 functions.
Gerrit
+++ b/net/dccp/dccp.h
@@ -102,6 +102,7 @@ extern int sysctl_dccp_tx_qlen;
#define TO_UNSIGNED48(x) (((x) >= 0)? (x) : COMPLEMENT48(-(x)))
#define _add48(a, b) (((a) + (b)) & DCCP_MAX_SEQNO)
#define _sub48(a, b) _add48((a), COMPLEMENT48((b)))
+#define _inc48(seqno) (seqno) = _add48((seqno), 1)
static inline void dccp_set_seqno(u64 *seqno, u64 value)
{
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -981,10 +981,8 @@ static int ccid3_hc_rx_detect_loss(struc
loss = 1;
ccid3_hc_rx_update_li(sk, hcrx->ccid3hcrx_seqno_nonloss,
hcrx->ccid3hcrx_ccval_nonloss);
+ _inc48(hcrx->ccid3hcrx_seqno_nonloss);
tmp_seqno = hcrx->ccid3hcrx_seqno_nonloss;
- dccp_inc_seqno(&tmp_seqno);
- hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno;
- dccp_inc_seqno(&tmp_seqno);
while (dccp_rx_hist_find_entry(&hcrx->ccid3hcrx_hist,
tmp_seqno, &ccval)) {
hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno;
next prev parent reply other threads:[~2006-12-19 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 10:49 [PATCH 0/8]: Sequence numbers, larger windows revisited, minor cleanups Gerrit Renker
2006-12-15 21:54 ` Ian McDonald
2006-12-15 23:59 ` Arnaldo Carvalho de Melo
2006-12-16 0:09 ` Ian McDonald
2006-12-19 10:07 ` Gerrit Renker [this message]
2006-12-19 23:06 ` Ian McDonald
2006-12-21 12:01 ` 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=200612191007.47807@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox