* [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3
@ 2007-11-01 0:30 Leandro
2007-11-01 12:32 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to Tommi Saviranta
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Leandro @ 2007-11-01 0:30 UTC (permalink / raw)
To: dccp
[CCID-4] Adapt CCID-4 according to the latest changes to CCID-3
Signed-off-by: Leandro Melo de Sales <leandro@embedded.ufcg.edu.br>
Index: leandro.new/net/dccp/ccids/ccid4.c
=================================--- leandro.new.orig/net/dccp/ccids/ccid4.c
+++ leandro.new/net/dccp/ccids/ccid4.c
@@ -156,7 +156,6 @@ static inline void ccid4_hc_tx_x_header_
*
*/
static void ccid4_hc_tx_update_x(struct sock *sk, ktime_t *stamp)
-
{
struct ccid4_hc_tx_sock *hctx = ccid4_hc_tx_sk(sk);
__u64 min_rate = 2 * hctx->ccid4hctx_x_recv;
@@ -939,7 +938,7 @@ static int ccid4_hc_rx_getsockopt(struct
static struct ccid_operations ccid4 = {
.ccid_id = DCCPC_CCID4,
- .ccid_name = "ccid4",
+ .ccid_name = "TCP-Friendly Rate Control (Small-Packet variant)",
.ccid_owner = THIS_MODULE,
.ccid_hc_tx_obj_size = sizeof(struct ccid4_hc_tx_sock),
.ccid_hc_tx_init = ccid4_hc_tx_init,
Index: leandro.new/net/dccp/ccids/ccid4.h
=================================--- leandro.new.orig/net/dccp/ccids/ccid4.h
+++ leandro.new/net/dccp/ccids/ccid4.h
@@ -128,10 +128,9 @@ struct ccid4_hc_tx_sock {
static inline struct ccid4_hc_tx_sock *ccid4_hc_tx_sk(const struct sock *sk)
{
- void *ccid4_tx_priv = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
-
- BUG_ON(ccid4_tx_priv = NULL);
- return ccid4_tx_priv;
+ struct ccid4_hc_tx_sock *hctx = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
+ BUG_ON(hctx = NULL);
+ return hctx;
}
/* CCID4 receiver states */
@@ -177,10 +176,9 @@ struct ccid4_hc_rx_sock {
static inline struct ccid4_hc_rx_sock *ccid4_hc_rx_sk(const struct sock *sk)
{
- void *ccid4_rx_priv = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
-
- BUG_ON(ccid4_rx_priv = NULL);
- return ccid4_rx_priv;
+ struct ccid4_hc_rx_sock *hcrx = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
+ BUG_ON(hcrx = NULL);
+ return hcrx;
}
#endif /* _DCCP_CCID4_H_ */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 9/25] Adapt CCID-4 according to the latest changes to
2007-11-01 0:30 [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Leandro
@ 2007-11-01 12:32 ` Tommi Saviranta
2007-11-01 21:44 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Łeandro Sales
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Tommi Saviranta @ 2007-11-01 12:32 UTC (permalink / raw)
To: dccp
On Wed, Oct 31, 2007 at 21:30:35 -0300, Leandro wrote:
> [CCID-4] Adapt CCID-4 according to the latest changes to CCID-3
>
> Signed-off-by: Leandro Melo de Sales <leandro@embedded.ufcg.edu.br>
Another hit from whitespace police. This isn't really about Leandro's
code, but generally about whitespace usage in Linux kernel. Obviously
people prefer aligning things:
> .ccid_owner = THIS_MODULE,
> .ccid_hc_tx_obj_size = sizeof(struct ccid4_hc_tx_sock),
> .ccid_hc_tx_init = ccid4_hc_tx_init,
Sometimes tabulators are used to fill up most of the gap, followed by
spaces (like in this case). Sometimes only spaces are used, even for
gaps longer seven characters. Is there a general consensus about this?
Do the spaces/tabs just get mixed as the code evolves?
> Index: leandro.new/net/dccp/ccids/ccid4.h
> =================================> --- leandro.new.orig/net/dccp/ccids/ccid4.h
> +++ leandro.new/net/dccp/ccids/ccid4.h
> @@ -128,10 +128,9 @@ struct ccid4_hc_tx_sock {
>
> static inline struct ccid4_hc_tx_sock *ccid4_hc_tx_sk(const struct sock *sk)
> {
> - void *ccid4_tx_priv = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
> -
> - BUG_ON(ccid4_tx_priv = NULL);
> - return ccid4_tx_priv;
> + struct ccid4_hc_tx_sock *hctx = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
> + BUG_ON(hctx = NULL);
> + return hctx;
> }
>
> /* CCID4 receiver states */
> @@ -177,10 +176,9 @@ struct ccid4_hc_rx_sock {
>
> static inline struct ccid4_hc_rx_sock *ccid4_hc_rx_sk(const struct sock *sk)
> {
> - void *ccid4_rx_priv = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
> -
> - BUG_ON(ccid4_rx_priv = NULL);
> - return ccid4_rx_priv;
> + struct ccid4_hc_rx_sock *hcrx = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
> + BUG_ON(hcrx = NULL);
> + return hcrx;
> }
At least this is obvious. Tabulators should be used for indentation
here. These inline functions finally ended up in lib/tfrc_ccids.h.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3
2007-11-01 0:30 [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Leandro
2007-11-01 12:32 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to Tommi Saviranta
@ 2007-11-01 21:44 ` Łeandro Sales
2007-11-01 22:14 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to Tommi Saviranta
2007-11-08 11:27 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Gerrit Renker
3 siblings, 0 replies; 5+ messages in thread
From: Łeandro Sales @ 2007-11-01 21:44 UTC (permalink / raw)
To: dccp
2007/11/1, Tommi Saviranta <wnd@iki.fi>:
> On Wed, Oct 31, 2007 at 21:30:35 -0300, Leandro wrote:
> > [CCID-4] Adapt CCID-4 according to the latest changes to CCID-3
> >
> > Signed-off-by: Leandro Melo de Sales <leandro@embedded.ufcg.edu.br>
>
> Another hit from whitespace police. This isn't really about Leandro's
> code, but generally about whitespace usage in Linux kernel. Obviously
> people prefer aligning things:
>
> > .ccid_owner = THIS_MODULE,
> > .ccid_hc_tx_obj_size = sizeof(struct ccid4_hc_tx_sock),
> > .ccid_hc_tx_init = ccid4_hc_tx_init,
>
> Sometimes tabulators are used to fill up most of the gap, followed by
> spaces (like in this case). Sometimes only spaces are used, even for
> gaps longer seven characters. Is there a general consensus about this?
> Do the spaces/tabs just get mixed as the code evolves?
>
> > Index: leandro.new/net/dccp/ccids/ccid4.h
> > =================================> > --- leandro.new.orig/net/dccp/ccids/ccid4.h
> > +++ leandro.new/net/dccp/ccids/ccid4.h
> > @@ -128,10 +128,9 @@ struct ccid4_hc_tx_sock {
> >
> > static inline struct ccid4_hc_tx_sock *ccid4_hc_tx_sk(const struct sock *sk)
> > {
> > - void *ccid4_tx_priv = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
> > -
> > - BUG_ON(ccid4_tx_priv = NULL);
> > - return ccid4_tx_priv;
> > + struct ccid4_hc_tx_sock *hctx = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
> > + BUG_ON(hctx = NULL);
> > + return hctx;
> > }
> >
> > /* CCID4 receiver states */
> > @@ -177,10 +176,9 @@ struct ccid4_hc_rx_sock {
> >
> > static inline struct ccid4_hc_rx_sock *ccid4_hc_rx_sk(const struct sock *sk)
> > {
> > - void *ccid4_rx_priv = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
> > -
> > - BUG_ON(ccid4_rx_priv = NULL);
> > - return ccid4_rx_priv;
> > + struct ccid4_hc_rx_sock *hcrx = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
> > + BUG_ON(hcrx = NULL);
> > + return hcrx;
> > }
>
> At least this is obvious. Tabulators should be used for indentation
> here. These inline functions finally ended up in lib/tfrc_ccids.h.
>
>
I think that we can now concentrate our efforts on the ccid-4
implementation and pay attention for the next coding. As you said,
many of the code is from ccid-3, then my suggestion is to focus the
job on the ccid-4 implementation and ccid-3/4 code sharing. After
we can quickly solve issues related to code style, what do you think?
Leandro
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 9/25] Adapt CCID-4 according to the latest changes to
2007-11-01 0:30 [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Leandro
2007-11-01 12:32 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to Tommi Saviranta
2007-11-01 21:44 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Łeandro Sales
@ 2007-11-01 22:14 ` Tommi Saviranta
2007-11-08 11:27 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Gerrit Renker
3 siblings, 0 replies; 5+ messages in thread
From: Tommi Saviranta @ 2007-11-01 22:14 UTC (permalink / raw)
To: dccp
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1252", Size: 687 bytes --]
On Thu, Nov 01, 2007 at 18:44:47 -0300, Łeandro Sales wrote:
> my suggestion is to focus the job on the ccid-4 implementation and
> ccid-3/4 code sharing. After we can quickly solve issues related to
> code style, what do you think?
That's fine with me. No matter how it may seem, I'm really not hunting
for whitespaces.
Talking of CCID 4 implementation, when would it be safe to start porting
changes from old codebase to the new one? I have some Loss Interval and
Dropped Packets -related code available for the old repository, but I
find it somewhat pointless to submit patches when I know the repository
will be written from scratch again, as it was just recently.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3
2007-11-01 0:30 [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Leandro
` (2 preceding siblings ...)
2007-11-01 22:14 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to Tommi Saviranta
@ 2007-11-08 11:27 ` Gerrit Renker
3 siblings, 0 replies; 5+ messages in thread
From: Gerrit Renker @ 2007-11-08 11:27 UTC (permalink / raw)
To: dccp
| static inline struct ccid4_hc_tx_sock *ccid4_hc_tx_sk(const struct sock *sk)
| {
| - void *ccid4_tx_priv = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
| -
| - BUG_ON(ccid4_tx_priv = NULL);
| - return ccid4_tx_priv;
| + struct ccid4_hc_tx_sock *hctx = ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
| + BUG_ON(hctx = NULL);
| + return hctx;
| @@ -177,10 +176,9 @@ struct ccid4_hc_rx_sock {
|
| static inline struct ccid4_hc_rx_sock *ccid4_hc_rx_sk(const struct sock *sk)
| {
| - void *ccid4_rx_priv = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
| -
| - BUG_ON(ccid4_rx_priv = NULL);
| - return ccid4_rx_priv;
| + struct ccid4_hc_rx_sock *hcrx = ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
| + BUG_ON(hcrx = NULL);
| + return hcrx;
Two instances of re-indenting - also fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-08 11:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-01 0:30 [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Leandro
2007-11-01 12:32 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to Tommi Saviranta
2007-11-01 21:44 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Łeandro Sales
2007-11-01 22:14 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to Tommi Saviranta
2007-11-08 11:27 ` [PATCH 9/25] Adapt CCID-4 according to the latest changes to CCID-3 Gerrit Renker
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.