netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
To: netdev@vger.kernel.org
Cc: linux-wireles@vger.kernel.org,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH] codel: add forgotten inline to functions in header file
Date: Thu, 11 Feb 2016 16:08:21 +0200	[thread overview]
Message-ID: <1455199701-25767-1-git-send-email-emmanuel.grumbach@intel.com> (raw)

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 include/net/codel.h | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/include/net/codel.h b/include/net/codel.h
index 267e702..0775c24 100644
--- a/include/net/codel.h
+++ b/include/net/codel.h
@@ -92,18 +92,18 @@ struct codel_skb_cb {
 	codel_time_t enqueue_time;
 };
 
-static struct codel_skb_cb *get_codel_cb(const struct sk_buff *skb)
+static inline struct codel_skb_cb *get_codel_cb(const struct sk_buff *skb)
 {
 	qdisc_cb_private_validate(skb, sizeof(struct codel_skb_cb));
 	return (struct codel_skb_cb *)qdisc_skb_cb(skb)->data;
 }
 
-static codel_time_t codel_get_enqueue_time(const struct sk_buff *skb)
+static inline codel_time_t codel_get_enqueue_time(const struct sk_buff *skb)
 {
 	return get_codel_cb(skb)->enqueue_time;
 }
 
-static void codel_set_enqueue_time(struct sk_buff *skb)
+static inline void codel_set_enqueue_time(struct sk_buff *skb)
 {
 	get_codel_cb(skb)->enqueue_time = codel_get_time();
 }
@@ -174,8 +174,8 @@ struct codel_stats {
 
 #define CODEL_DISABLED_THRESHOLD INT_MAX
 
-static void codel_params_init(struct codel_params *params,
-			      const struct Qdisc *sch)
+static inline void codel_params_init(struct codel_params *params,
+				     const struct Qdisc *sch)
 {
 	params->interval = MS2TIME(100);
 	params->target = MS2TIME(5);
@@ -184,12 +184,12 @@ static void codel_params_init(struct codel_params *params,
 	params->ecn = false;
 }
 
-static void codel_vars_init(struct codel_vars *vars)
+static inline void codel_vars_init(struct codel_vars *vars)
 {
 	memset(vars, 0, sizeof(*vars));
 }
 
-static void codel_stats_init(struct codel_stats *stats)
+static inline void codel_stats_init(struct codel_stats *stats)
 {
 	stats->maxpacket = 0;
 }
@@ -200,7 +200,7 @@ static void codel_stats_init(struct codel_stats *stats)
  *
  * Here, invsqrt is a fixed point number (< 1.0), 32bit mantissa, aka Q0.32
  */
-static void codel_Newton_step(struct codel_vars *vars)
+static inline void codel_Newton_step(struct codel_vars *vars)
 {
 	u32 invsqrt = ((u32)vars->rec_inv_sqrt) << REC_INV_SQRT_SHIFT;
 	u32 invsqrt2 = ((u64)invsqrt * invsqrt) >> 32;
@@ -217,19 +217,19 @@ static void codel_Newton_step(struct codel_vars *vars)
  * We maintain in rec_inv_sqrt the reciprocal value of sqrt(count) to avoid
  * both sqrt() and divide operation.
  */
-static codel_time_t codel_control_law(codel_time_t t,
-				      codel_time_t interval,
-				      u32 rec_inv_sqrt)
+static inline codel_time_t codel_control_law(codel_time_t t,
+					     codel_time_t interval,
+					     u32 rec_inv_sqrt)
 {
 	return t + reciprocal_scale(interval, rec_inv_sqrt << REC_INV_SQRT_SHIFT);
 }
 
-static bool codel_should_drop(const struct sk_buff *skb,
-			      struct Qdisc *sch,
-			      struct codel_vars *vars,
-			      struct codel_params *params,
-			      struct codel_stats *stats,
-			      codel_time_t now)
+static inline bool codel_should_drop(const struct sk_buff *skb,
+				     struct Qdisc *sch,
+				     struct codel_vars *vars,
+				     struct codel_params *params,
+				     struct codel_stats *stats,
+				     codel_time_t now)
 {
 	bool ok_to_drop;
 
@@ -265,11 +265,11 @@ static bool codel_should_drop(const struct sk_buff *skb,
 typedef struct sk_buff * (*codel_skb_dequeue_t)(struct codel_vars *vars,
 						struct Qdisc *sch);
 
-static struct sk_buff *codel_dequeue(struct Qdisc *sch,
-				     struct codel_params *params,
-				     struct codel_vars *vars,
-				     struct codel_stats *stats,
-				     codel_skb_dequeue_t dequeue_func)
+static inline struct sk_buff *codel_dequeue(struct Qdisc *sch,
+					    struct codel_params *params,
+					    struct codel_vars *vars,
+					    struct codel_stats *stats,
+					    codel_skb_dequeue_t dequeue_func)
 {
 	struct sk_buff *skb = dequeue_func(vars, sch);
 	codel_time_t now;
-- 
2.5.0

             reply	other threads:[~2016-02-11 14:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 14:08 Emmanuel Grumbach [this message]
2016-02-11 14:30 ` [PATCH] codel: add forgotten inline to functions in header file Eric Dumazet
2016-02-11 15:05   ` Grumbach, Emmanuel
2016-02-11 15:12     ` Eric Dumazet
2016-02-11 15:29       ` Grumbach, Emmanuel
     [not found]         ` <0BA3FCBA62E2DC44AF3030971E174FB32EA0E809-Jy8z56yoSI9wl47ZQwxUxrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-02-11 16:09           ` Dave Taht
2016-02-11 15:46     ` Dave Taht

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=1455199701-25767-1-git-send-email-emmanuel.grumbach@intel.com \
    --to=emmanuel.grumbach@intel.com \
    --cc=linux-wireles@vger.kernel.org \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).