From: Leandro <leandroal@gmail.com>
To: dccp@vger.kernel.org
Subject: [PATCH 17/25] Share ccid3_tx_state_name function via tfrc_ccids
Date: Thu, 01 Nov 2007 00:31:52 +0000 [thread overview]
Message-ID: <200710312131.52573.leandroal@gmail.com> (raw)
[CCID-3/4] Share ccid3_tx_state_name function via tfrc_ccids
ccid3_tx_state_name is now tfrc_tx_state_name
Signed-off-by: Leandro Melo de Sales <leandro@embedded.ufcg.edu.br>
Index: leandro.new/net/dccp/ccids/ccid3.c
=================================--- leandro.new.orig/net/dccp/ccids/ccid3.c
+++ leandro.new/net/dccp/ccids/ccid3.c
@@ -48,23 +48,6 @@ static int ccid3_debug;
DECLARE_TFRC_TX_CACHE(ccid3_tx_hist);
-/*
- * Transmitter Half-Connection Routines
- */
-#if defined(CONFIG_IP_DCCP_CCID3_DEBUG) || defined(CONFIG_IP_DCCP_CCID4_DEBUG)
-static const char *ccid3_tx_state_name(enum tfrc_hc_tx_states state)
-{
- static char *ccid3_state_names[] = {
- [TFRC_SSTATE_NO_SENT] = "NO_SENT",
- [TFRC_SSTATE_NO_FBACK] = "NO_FBACK",
- [TFRC_SSTATE_FBACK] = "FBACK",
- [TFRC_SSTATE_TERM] = "TERM",
- };
-
- return ccid3_state_names[state];
-}
-#endif
-
/**
* Each of the following #define aims at maintain the current
* dccp code nomenclature unchanged while still share
@@ -113,8 +96,8 @@ static void ccid3_hc_tx_set_state(struct
enum tfrc_hc_tx_states oldstate = hctx->tfrchctx_state;
ccid3_pr_debug("%s(%p) %-8.8s -> %s\n",
- dccp_role(sk), sk, ccid3_tx_state_name(oldstate),
- ccid3_tx_state_name(state));
+ dccp_role(sk), sk, tfrc_tx_state_name(oldstate),
+ tfrc_tx_state_name(state));
WARN_ON(state = oldstate);
hctx->tfrchctx_state = state;
}
@@ -270,7 +253,7 @@ static void ccid3_hc_tx_no_feedback_time
}
ccid3_pr_debug("%s(%p, state=%s) - entry \n", dccp_role(sk), sk,
- ccid3_tx_state_name(hctx->tfrchctx_state));
+ tfrc_tx_state_name(hctx->tfrchctx_state));
if (hctx->tfrchctx_state = TFRC_SSTATE_FBACK)
ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);
Index: leandro.new/net/dccp/ccids/ccid4.c
=================================--- leandro.new.orig/net/dccp/ccids/ccid4.c
+++ leandro.new/net/dccp/ccids/ccid4.c
@@ -58,23 +58,6 @@ static int ccid4_debug;
DECLARE_TFRC_TX_CACHE(ccid4_tx_hist);
-/*
- * Transmitter Half-Connection Routines
- */
-#ifdef CONFIG_IP_DCCP_CCID4_DEBUG
-static const char *ccid4_tx_state_name(enum tfrc_hc_tx_states state)
-{
- static char *ccid4_state_names[] = {
- [TFRC_SSTATE_NO_SENT] = "NO_SENT",
- [TFRC_SSTATE_NO_FBACK] = "NO_FBACK",
- [TFRC_SSTATE_FBACK] = "FBACK",
- [TFRC_SSTATE_TERM] = "TERM",
- };
-
- return ccid4_state_names[state];
-}
-#endif
-
/**
* Each of the following #define aims at maintain the current
* dccp code nomenclature unchanged while still share
@@ -123,8 +106,8 @@ static void ccid4_hc_tx_set_state(struct
enum tfrc_hc_tx_states oldstate = hctx->tfrchctx_state;
ccid4_pr_debug("%s(%p) %-8.8s -> %s\n",
- dccp_role(sk), sk, ccid4_tx_state_name(oldstate),
- ccid4_tx_state_name(state));
+ dccp_role(sk), sk, tfrc_tx_state_name(oldstate),
+ tfrc_tx_state_name(state));
WARN_ON(state = oldstate);
hctx->tfrchctx_state = state;
}
@@ -296,7 +279,7 @@ static void ccid4_hc_tx_no_feedback_time
}
ccid4_pr_debug("%s(%p, state=%s) - entry \n", dccp_role(sk), sk,
- ccid4_tx_state_name(hctx->tfrchctx_state));
+ tfrc_tx_state_name(hctx->tfrchctx_state));
if (hctx->tfrchctx_state = TFRC_SSTATE_FBACK)
ccid4_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);
Index: leandro.new/net/dccp/ccids/lib/tfrc_ccids.h
=================================--- leandro.new.orig/net/dccp/ccids/lib/tfrc_ccids.h
+++ leandro.new/net/dccp/ccids/lib/tfrc_ccids.h
@@ -154,3 +154,21 @@ static inline struct tfrc_hc_rx_sock *tf
BUG_ON(hcrx = NULL);
return hcrx;
}
+
+/**
+ * Transmitter Half-Connection Routines
+ */
+#if defined(CONFIG_IP_DCCP_CCID3_DEBUG) || defined(CONFIG_IP_DCCP_CCID4_DEBUG)
+static const char *tfrc_tx_state_name(enum tfrc_hc_tx_states state)
+{
+ static char *tfrc_state_names[] = {
+ [TFRC_SSTATE_NO_SENT] = "NO_SENT",
+ [TFRC_SSTATE_NO_FBACK] = "NO_FBACK",
+ [TFRC_SSTATE_FBACK] = "FBACK",
+ [TFRC_SSTATE_TERM] = "TERM",
+ };
+
+ return tfrc_state_names[state];
+}
+#endif
+
next reply other threads:[~2007-11-01 0:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 0:31 Leandro [this message]
2007-11-01 12:36 ` [PATCH 17/25] Share ccid3_tx_state_name function via tfrc_ccids Tommi Saviranta
2007-11-10 12:31 ` Gerrit Renker
2007-11-13 16:14 ` Łeandro Sales
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=200710312131.52573.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.