All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] net_sched: make tbf support 64bit rates
@ 2013-11-07  2:13 Yang Yingliang
  2013-11-07  2:13 ` [PATCH net-next v2 1/3] net_sched: tbf: support of " Yang Yingliang
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Yang Yingliang @ 2013-11-07  2:13 UTC (permalink / raw)
  To: davem, netdev; +Cc: eric.dumazet, jhs, stephen

After this patch(commit 3e1e3aae1f5d4e8e5:
net_sched: add u64 rate to psched_ratecfg_precompute())
which is from Eric, tbf can deal with 64bit rates.
Add two new attributes so that tc can use them to break
the 32bit limit.
And, fix some checkpatch errors;
replace printk(KERN_DEBUG ...) with pr_debug.

v1 -> v2:
  - patch 2/3: return an assignment on seperate line
    in tcf_hash_new_index() suggested by Stephen.

Yang Yingliang (3):
  net_sched: tbf: support of 64bit rates
  net_sched: fix some checkpatch errors
  net_sched: Use pr_debug replace printk(KERN_DEBUG ...)

 include/uapi/linux/pkt_sched.h |  2 ++
 net/sched/act_api.c            |  5 +++--
 net/sched/cls_bpf.c            |  2 +-
 net/sched/cls_u32.c            |  2 +-
 net/sched/sch_cbq.c            |  5 +++--
 net/sched/sch_dsmark.c         |  2 +-
 net/sched/sch_generic.c        |  4 ++--
 net/sched/sch_gred.c           |  4 ++--
 net/sched/sch_htb.c            | 19 ++++++++++---------
 net/sched/sch_netem.c          |  2 +-
 net/sched/sch_sfq.c            | 10 ++++++----
 net/sched/sch_tbf.c            | 22 ++++++++++++++++++----
 12 files changed, 50 insertions(+), 29 deletions(-)

-- 
1.7.12

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH net-next v2 1/3] net_sched: tbf: support of 64bit rates
  2013-11-07  2:13 [PATCH net-next v2 0/3] net_sched: make tbf support 64bit rates Yang Yingliang
@ 2013-11-07  2:13 ` Yang Yingliang
  2013-11-07 14:25   ` Sergei Shtylyov
  2013-11-07  2:13 ` [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors Yang Yingliang
  2013-11-07  2:13 ` [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...) Yang Yingliang
  2 siblings, 1 reply; 13+ messages in thread
From: Yang Yingliang @ 2013-11-07  2:13 UTC (permalink / raw)
  To: davem, netdev; +Cc: eric.dumazet, jhs, stephen

With psched_ratecfg_precompute(), tbf can deal with 64bit rates.
Add two new attributes so that tc can use them to break the 32bit
limit.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 include/uapi/linux/pkt_sched.h |  2 ++
 net/sched/sch_tbf.c            | 22 ++++++++++++++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index f2624b5..307f293 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -171,6 +171,8 @@ enum {
 	TCA_TBF_PARMS,
 	TCA_TBF_RTAB,
 	TCA_TBF_PTAB,
+	TCA_TBF_RATE64,
+	TCA_TBF_PRATE64,
 	__TCA_TBF_MAX,
 };
 
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index b057122..b736517 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -266,20 +266,23 @@ static const struct nla_policy tbf_policy[TCA_TBF_MAX + 1] = {
 	[TCA_TBF_PARMS]	= { .len = sizeof(struct tc_tbf_qopt) },
 	[TCA_TBF_RTAB]	= { .type = NLA_BINARY, .len = TC_RTAB_SIZE },
 	[TCA_TBF_PTAB]	= { .type = NLA_BINARY, .len = TC_RTAB_SIZE },
+	[TCA_TBF_RATE64]	= { .type = NLA_U64 },
+	[TCA_TBF_PRATE64]	= { .type = NLA_U64 },
 };
 
 static int tbf_change(struct Qdisc *sch, struct nlattr *opt)
 {
 	int err;
 	struct tbf_sched_data *q = qdisc_priv(sch);
-	struct nlattr *tb[TCA_TBF_PTAB + 1];
+	struct nlattr *tb[TCA_TBF_MAX + 1];
 	struct tc_tbf_qopt *qopt;
 	struct qdisc_rate_table *rtab = NULL;
 	struct qdisc_rate_table *ptab = NULL;
 	struct Qdisc *child = NULL;
 	int max_size, n;
+	u64 rate64 = 0, prate64 = 0;
 
-	err = nla_parse_nested(tb, TCA_TBF_PTAB, opt, tbf_policy);
+	err = nla_parse_nested(tb, TCA_TBF_MAX, opt, tbf_policy);
 	if (err < 0)
 		return err;
 
@@ -341,9 +344,13 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt)
 	q->tokens = q->buffer;
 	q->ptokens = q->mtu;
 
-	psched_ratecfg_precompute(&q->rate, &rtab->rate, 0);
+	if (tb[TCA_TBF_RATE64])
+		rate64 = nla_get_u64(tb[TCA_TBF_RATE64]);
+	psched_ratecfg_precompute(&q->rate, &rtab->rate, rate64);
 	if (ptab) {
-		psched_ratecfg_precompute(&q->peak, &ptab->rate, 0);
+		if (tb[TCA_TBF_PRATE64])
+			prate64 = nla_get_u64(tb[TCA_TBF_PRATE64]);
+		psched_ratecfg_precompute(&q->peak, &ptab->rate, prate64);
 		q->peak_present = true;
 	} else {
 		q->peak_present = false;
@@ -402,6 +409,13 @@ static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb)
 	opt.buffer = PSCHED_NS2TICKS(q->buffer);
 	if (nla_put(skb, TCA_TBF_PARMS, sizeof(opt), &opt))
 		goto nla_put_failure;
+	if ((q->rate.rate_bytes_ps >= (1ULL << 32)) &&
+			nla_put_u64(skb, TCA_TBF_RATE64, q->rate.rate_bytes_ps))
+		goto nla_put_failure;
+	if (q->peak_present &&
+			(q->peak.rate_bytes_ps >= (1ULL << 32)) &&
+			nla_put_u64(skb, TCA_TBF_PRATE64, q->peak.rate_bytes_ps))
+		goto nla_put_failure;
 
 	nla_nest_end(skb, nest);
 	return skb->len;
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors
  2013-11-07  2:13 [PATCH net-next v2 0/3] net_sched: make tbf support 64bit rates Yang Yingliang
  2013-11-07  2:13 ` [PATCH net-next v2 1/3] net_sched: tbf: support of " Yang Yingliang
@ 2013-11-07  2:13 ` Yang Yingliang
  2013-11-07  8:37   ` Daniel Borkmann
  2013-11-07 14:33   ` Sergei Shtylyov
  2013-11-07  2:13 ` [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...) Yang Yingliang
  2 siblings, 2 replies; 13+ messages in thread
From: Yang Yingliang @ 2013-11-07  2:13 UTC (permalink / raw)
  To: davem, netdev; +Cc: eric.dumazet, jhs, stephen

There are some checkpatch errors, fix them.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
---
 net/sched/act_api.c     |  5 +++--
 net/sched/cls_bpf.c     |  2 +-
 net/sched/cls_u32.c     |  2 +-
 net/sched/sch_cbq.c     |  3 ++-
 net/sched/sch_generic.c |  4 ++--
 net/sched/sch_htb.c     | 13 +++++++------
 net/sched/sch_netem.c   |  2 +-
 net/sched/sch_sfq.c     | 10 ++++++----
 8 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index fd70728..d92a90e9 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -191,7 +191,8 @@ u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo)
 			val = 1;
 	} while (tcf_hash_lookup(val, hinfo));
 
-	return (*idx_gen = val);
+	*idx_gen = val;
+	return *idx_gen;
 }
 EXPORT_SYMBOL(tcf_hash_new_index);
 
@@ -263,7 +264,7 @@ void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo)
 }
 EXPORT_SYMBOL(tcf_hash_insert);
 
-static struct tc_action_ops *act_base = NULL;
+static struct tc_action_ops *act_base;
 static DEFINE_RWLOCK(act_mod_lock);
 
 int tcf_register_action(struct tc_action_ops *act)
diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index 1002a82..d7c72be 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -323,7 +323,7 @@ static int cls_bpf_dump(struct tcf_proto *tp, unsigned long fh,
 	if (nla == NULL)
 		goto nla_put_failure;
 
-        memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla));
+	memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla));
 
 	if (tcf_exts_dump(skb, &prog->exts, &bpf_ext_map) < 0)
 		goto nla_put_failure;
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index eb07a1e..59e546c 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -352,7 +352,7 @@ static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n)
 	return 0;
 }
 
-static int u32_delete_key(struct tcf_proto *tp, struct tc_u_knode* key)
+static int u32_delete_key(struct tcf_proto *tp, struct tc_u_knode *key)
 {
 	struct tc_u_knode **kp;
 	struct tc_u_hnode *ht = key->ht_up;
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 7a42c81..a8f40f5 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1058,7 +1058,8 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
 				cl->quantum = (cl->weight*cl->allot*q->nclasses[prio])/
 					q->quanta[prio];
 			}
-			if (cl->quantum <= 0 || cl->quantum>32*qdisc_dev(cl->qdisc)->mtu) {
+			if (cl->quantum <= 0 ||
+				cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {
 				pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
 					   cl->common.classid, cl->quantum);
 				cl->quantum = qdisc_dev(cl->qdisc)->mtu/2 + 1;
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 7fc899a..9421350 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -338,13 +338,13 @@ EXPORT_SYMBOL(netif_carrier_off);
    cheaper.
  */
 
-static int noop_enqueue(struct sk_buff *skb, struct Qdisc * qdisc)
+static int noop_enqueue(struct sk_buff *skb, struct Qdisc *qdisc)
 {
 	kfree_skb(skb);
 	return NET_XMIT_CN;
 }
 
-static struct sk_buff *noop_dequeue(struct Qdisc * qdisc)
+static struct sk_buff *noop_dequeue(struct Qdisc *qdisc)
 {
 	return NULL;
 }
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 0e1e38b..f6e8a74 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -54,7 +54,7 @@
     one less than their parent.
 */
 
-static int htb_hysteresis __read_mostly = 0; /* whether to use mode hysteresis for speedup */
+static int htb_hysteresis __read_mostly; /* whether to use mode hysteresis for speedup */
 #define HTB_VER 0x30011		/* major must be matched with number suplied by TC as version */
 
 #if HTB_VER >> 16 != TC_HTB_PROTOVER
@@ -65,7 +65,7 @@ static int htb_hysteresis __read_mostly = 0; /* whether to use mode hysteresis f
 module_param    (htb_hysteresis, int, 0640);
 MODULE_PARM_DESC(htb_hysteresis, "Hysteresis mode, less CPU load, less accurate");
 
-static int htb_rate_est = 0; /* htb classes have a default rate estimator */
+static int htb_rate_est; /* htb classes have a default rate estimator */
 module_param(htb_rate_est, int, 0640);
 MODULE_PARM_DESC(htb_rate_est, "setup a default rate estimator (4sec 16sec) for htb classes");
 
@@ -846,7 +846,7 @@ next:
 			break;
 
 		qdisc_warn_nonwc("htb", cl->un.leaf.q);
-		htb_next_rb_node(level ? &cl->parent->un.inner.clprio[prio].ptr:
+		htb_next_rb_node(level ? &cl->parent->un.inner.clprio[prio].ptr :
 					 &q->hlevel[0].hprio[prio].ptr);
 		cl = htb_lookup_leaf(hprio, prio);
 
@@ -1276,9 +1276,10 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
 	struct Qdisc *new_q = NULL;
 	int last_child = 0;
 
-	// TODO: why don't allow to delete subtree ? references ? does
-	// tc subsys quarantee us that in htb_destroy it holds no class
-	// refs so that we can remove children safely there ?
+	/* TODO: why don't allow to delete subtree ? references ? does
+	 * tc subsys quarantee us that in htb_destroy it holds no class
+	 * refs so that we can remove children safely there ?
+	 */
 	if (cl->children || cl->filter_cnt)
 		return -EBUSY;
 
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 75c94e5..9765c3f 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -728,7 +728,7 @@ static int get_loss_clg(struct Qdisc *sch, const struct nlattr *attr)
 	nla_for_each_nested(la, attr, rem) {
 		u16 type = nla_type(la);
 
-		switch(type) {
+		switch (type) {
 		case NETEM_LOSS_GI: {
 			const struct tc_netem_gimodel *gi = nla_data(la);
 
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index d3a1bc2..76f01e0 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -237,10 +237,12 @@ static inline void sfq_link(struct sfq_sched_data *q, sfq_index x)
 }
 
 #define sfq_unlink(q, x, n, p)			\
-	n = q->slots[x].dep.next;		\
-	p = q->slots[x].dep.prev;		\
-	sfq_dep_head(q, p)->next = n;		\
-	sfq_dep_head(q, n)->prev = p
+	do {					\
+		n = q->slots[x].dep.next;	\
+		p = q->slots[x].dep.prev;	\
+		sfq_dep_head(q, p)->next = n;	\
+		sfq_dep_head(q, n)->prev = p;	\
+	} while (0)
 
 
 static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x)
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...)
  2013-11-07  2:13 [PATCH net-next v2 0/3] net_sched: make tbf support 64bit rates Yang Yingliang
  2013-11-07  2:13 ` [PATCH net-next v2 1/3] net_sched: tbf: support of " Yang Yingliang
  2013-11-07  2:13 ` [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors Yang Yingliang
@ 2013-11-07  2:13 ` Yang Yingliang
  2013-11-07  8:30   ` Daniel Borkmann
  2013-11-07 14:43   ` Sergei Shtylyov
  2 siblings, 2 replies; 13+ messages in thread
From: Yang Yingliang @ 2013-11-07  2:13 UTC (permalink / raw)
  To: davem, netdev; +Cc: eric.dumazet, jhs, stephen

Replace printk(KERN_DEBUG ...) with pr_debug() and
replace pr_warning() with pr_warn().

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 net/sched/sch_cbq.c    | 2 +-
 net/sched/sch_dsmark.c | 2 +-
 net/sched/sch_gred.c   | 4 ++--
 net/sched/sch_htb.c    | 6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index a8f40f5..9e3a9dc 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1060,7 +1060,7 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
 			}
 			if (cl->quantum <= 0 ||
 				cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {
-				pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
+				pr_warn("CBQ: class %08x has bad quantum==%ld, repaired.\n",
 					   cl->common.classid, cl->quantum);
 				cl->quantum = qdisc_dev(cl->qdisc)->mtu/2 + 1;
 			}
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 3886365..190cf65 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -303,7 +303,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
 		 * and don't need yet another qdisc as a bypass.
 		 */
 		if (p->mask[index] != 0xff || p->value[index])
-			pr_warning("dsmark_dequeue: unsupported protocol %d\n",
+			pr_warn("dsmark_dequeue: unsupported protocol %d\n",
 				   ntohs(skb->protocol));
 		break;
 	}
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index d42234c..19fa4dc 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -370,7 +370,7 @@ static inline int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps)
 
 	for (i = table->DPs; i < MAX_DPs; i++) {
 		if (table->tab[i]) {
-			pr_warning("GRED: Warning: Destroying "
+			pr_warn("GRED: Warning: Destroying "
 				   "shadowed VQ 0x%x\n", i);
 			gred_destroy_vq(table->tab[i]);
 			table->tab[i] = NULL;
@@ -456,7 +456,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt)
 			if (table->tab[table->def])
 				def_prio = table->tab[table->def]->prio;
 
-			printk(KERN_DEBUG "GRED: DP %u does not have a prio "
+			pr_debug("GRED: DP %u does not have a prio "
 			       "setting default to %d\n", ctl->DP, def_prio);
 
 			prio = def_prio;
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index f6e8a74..6586f3b 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -712,7 +712,7 @@ static s64 htb_do_events(struct htb_sched *q, const int level,
 
 	/* too much load - let's continue after a break for scheduling */
 	if (!(q->warned & HTB_WARN_TOOMANYEVENTS)) {
-		pr_warning("htb: too many events!\n");
+		pr_warn("htb: too many events!\n");
 		q->warned |= HTB_WARN_TOOMANYEVENTS;
 	}
 
@@ -1484,13 +1484,13 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
 	if (!cl->level) {
 		cl->quantum = hopt->rate.rate / q->rate2quantum;
 		if (!hopt->quantum && cl->quantum < 1000) {
-			pr_warning(
+			pr_warn(
 			       "HTB: quantum of class %X is small. Consider r2q change.\n",
 			       cl->common.classid);
 			cl->quantum = 1000;
 		}
 		if (!hopt->quantum && cl->quantum > 200000) {
-			pr_warning(
+			pr_warn(
 			       "HTB: quantum of class %X is big. Consider r2q change.\n",
 			       cl->common.classid);
 			cl->quantum = 200000;
-- 
1.7.12

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...)
  2013-11-07  2:13 ` [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...) Yang Yingliang
@ 2013-11-07  8:30   ` Daniel Borkmann
  2013-11-07  8:43     ` Yang Yingliang
  2013-11-07 14:43   ` Sergei Shtylyov
  1 sibling, 1 reply; 13+ messages in thread
From: Daniel Borkmann @ 2013-11-07  8:30 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: davem, netdev, eric.dumazet, jhs, stephen

On 11/07/2013 03:13 AM, Yang Yingliang wrote:
> Replace printk(KERN_DEBUG ...) with pr_debug() and
> replace pr_warning() with pr_warn().
>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>   net/sched/sch_cbq.c    | 2 +-
>   net/sched/sch_dsmark.c | 2 +-
>   net/sched/sch_gred.c   | 4 ++--
>   net/sched/sch_htb.c    | 6 +++---
>   4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
> index a8f40f5..9e3a9dc 100644
> --- a/net/sched/sch_cbq.c
> +++ b/net/sched/sch_cbq.c
> @@ -1060,7 +1060,7 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
>   			}
>   			if (cl->quantum <= 0 ||
>   				cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {
> -				pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
> +				pr_warn("CBQ: class %08x has bad quantum==%ld, repaired.\n",
>   					   cl->common.classid, cl->quantum);

You also need to fix alignment of the second line here and in all other places
you did changes like that.

>   				cl->quantum = qdisc_dev(cl->qdisc)->mtu/2 + 1;
>   			}
> diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
> index 3886365..190cf65 100644
> --- a/net/sched/sch_dsmark.c
> +++ b/net/sched/sch_dsmark.c
> @@ -303,7 +303,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
>   		 * and don't need yet another qdisc as a bypass.
>   		 */
>   		if (p->mask[index] != 0xff || p->value[index])
> -			pr_warning("dsmark_dequeue: unsupported protocol %d\n",
> +			pr_warn("dsmark_dequeue: unsupported protocol %d\n",
>   				   ntohs(skb->protocol));
>   		break;
>   	}
> diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
> index d42234c..19fa4dc 100644
> --- a/net/sched/sch_gred.c
> +++ b/net/sched/sch_gred.c
> @@ -370,7 +370,7 @@ static inline int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps)
>
>   	for (i = table->DPs; i < MAX_DPs; i++) {
>   		if (table->tab[i]) {
> -			pr_warning("GRED: Warning: Destroying "
> +			pr_warn("GRED: Warning: Destroying "
>   				   "shadowed VQ 0x%x\n", i);
>   			gred_destroy_vq(table->tab[i]);
>   			table->tab[i] = NULL;
> @@ -456,7 +456,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt)
>   			if (table->tab[table->def])
>   				def_prio = table->tab[table->def]->prio;
>
> -			printk(KERN_DEBUG "GRED: DP %u does not have a prio "
> +			pr_debug("GRED: DP %u does not have a prio "
>   			       "setting default to %d\n", ctl->DP, def_prio);
>
>   			prio = def_prio;
> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
> index f6e8a74..6586f3b 100644
> --- a/net/sched/sch_htb.c
> +++ b/net/sched/sch_htb.c
> @@ -712,7 +712,7 @@ static s64 htb_do_events(struct htb_sched *q, const int level,
>
>   	/* too much load - let's continue after a break for scheduling */
>   	if (!(q->warned & HTB_WARN_TOOMANYEVENTS)) {
> -		pr_warning("htb: too many events!\n");
> +		pr_warn("htb: too many events!\n");
>   		q->warned |= HTB_WARN_TOOMANYEVENTS;
>   	}
>
> @@ -1484,13 +1484,13 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
>   	if (!cl->level) {
>   		cl->quantum = hopt->rate.rate / q->rate2quantum;
>   		if (!hopt->quantum && cl->quantum < 1000) {
> -			pr_warning(
> +			pr_warn(
>   			       "HTB: quantum of class %X is small. Consider r2q change.\n",

Also, this looks quite ugly, so changing into pr_warn("HTB: .....") would be better if
you're at it anyway.

>   			       cl->common.classid);
>   			cl->quantum = 1000;
>   		}
>   		if (!hopt->quantum && cl->quantum > 200000) {
> -			pr_warning(
> +			pr_warn(
>   			       "HTB: quantum of class %X is big. Consider r2q change.\n",
>   			       cl->common.classid);

Ditto

>   			cl->quantum = 200000;
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors
  2013-11-07  2:13 ` [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors Yang Yingliang
@ 2013-11-07  8:37   ` Daniel Borkmann
  2013-11-08 11:04     ` Bjørn Mork
  2013-11-07 14:33   ` Sergei Shtylyov
  1 sibling, 1 reply; 13+ messages in thread
From: Daniel Borkmann @ 2013-11-07  8:37 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: davem, netdev, eric.dumazet, jhs, stephen

On 11/07/2013 03:13 AM, Yang Yingliang wrote:
> There are some checkpatch errors, fix them.
>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>   net/sched/act_api.c     |  5 +++--
>   net/sched/cls_bpf.c     |  2 +-
>   net/sched/cls_u32.c     |  2 +-
>   net/sched/sch_cbq.c     |  3 ++-
>   net/sched/sch_generic.c |  4 ++--
>   net/sched/sch_htb.c     | 13 +++++++------
>   net/sched/sch_netem.c   |  2 +-
>   net/sched/sch_sfq.c     | 10 ++++++----
>   8 files changed, 23 insertions(+), 18 deletions(-)
>
> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
> index fd70728..d92a90e9 100644
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -191,7 +191,8 @@ u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo)
>   			val = 1;
>   	} while (tcf_hash_lookup(val, hinfo));
>
> -	return (*idx_gen = val);
> +	*idx_gen = val;
> +	return *idx_gen;
>   }
>   EXPORT_SYMBOL(tcf_hash_new_index);
>
> @@ -263,7 +264,7 @@ void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo)
>   }
>   EXPORT_SYMBOL(tcf_hash_insert);
>
> -static struct tc_action_ops *act_base = NULL;
> +static struct tc_action_ops *act_base;

 From a readability point of view, I think this makes it worse, also the other places
where you change globals vars like that.

>   static DEFINE_RWLOCK(act_mod_lock);
>
>   int tcf_register_action(struct tc_action_ops *act)
> diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
> index 1002a82..d7c72be 100644
> --- a/net/sched/cls_bpf.c
> +++ b/net/sched/cls_bpf.c
> @@ -323,7 +323,7 @@ static int cls_bpf_dump(struct tcf_proto *tp, unsigned long fh,
>   	if (nla == NULL)
[...]

Also, when you submit v3, I think it would be good if you separate your patch into two
sets: patch1 on its own, and then patch2 and patch3 as an own set as the last two have
not much in common from what's in the cover letter.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...)
  2013-11-07  8:30   ` Daniel Borkmann
@ 2013-11-07  8:43     ` Yang Yingliang
  0 siblings, 0 replies; 13+ messages in thread
From: Yang Yingliang @ 2013-11-07  8:43 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: netdev

On 2013/11/7 16:30, Daniel Borkmann wrote:
> On 11/07/2013 03:13 AM, Yang Yingliang wrote:
>> Replace printk(KERN_DEBUG ...) with pr_debug() and
>> replace pr_warning() with pr_warn().
>>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>> ---
>>   net/sched/sch_cbq.c    | 2 +-
>>   net/sched/sch_dsmark.c | 2 +-
>>   net/sched/sch_gred.c   | 4 ++--
>>   net/sched/sch_htb.c    | 6 +++---
>>   4 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
>> index a8f40f5..9e3a9dc 100644
>> --- a/net/sched/sch_cbq.c
>> +++ b/net/sched/sch_cbq.c
>> @@ -1060,7 +1060,7 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
>>               }
>>               if (cl->quantum <= 0 ||
>>                   cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {
>> -                pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
>> +                pr_warn("CBQ: class %08x has bad quantum==%ld, repaired.\n",
>>                          cl->common.classid, cl->quantum);
> 
> You also need to fix alignment of the second line here and in all other places
> you did changes like that.
> 
>>                   cl->quantum = qdisc_dev(cl->qdisc)->mtu/2 + 1;
>>               }
>> diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
>> index 3886365..190cf65 100644
>> --- a/net/sched/sch_dsmark.c
>> +++ b/net/sched/sch_dsmark.c
>> @@ -303,7 +303,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
>>            * and don't need yet another qdisc as a bypass.
>>            */
>>           if (p->mask[index] != 0xff || p->value[index])
>> -            pr_warning("dsmark_dequeue: unsupported protocol %d\n",
>> +            pr_warn("dsmark_dequeue: unsupported protocol %d\n",
>>                      ntohs(skb->protocol));
>>           break;
>>       }
>> diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
>> index d42234c..19fa4dc 100644
>> --- a/net/sched/sch_gred.c
>> +++ b/net/sched/sch_gred.c
>> @@ -370,7 +370,7 @@ static inline int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps)
>>
>>       for (i = table->DPs; i < MAX_DPs; i++) {
>>           if (table->tab[i]) {
>> -            pr_warning("GRED: Warning: Destroying "
>> +            pr_warn("GRED: Warning: Destroying "
>>                      "shadowed VQ 0x%x\n", i);
>>               gred_destroy_vq(table->tab[i]);
>>               table->tab[i] = NULL;
>> @@ -456,7 +456,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt)
>>               if (table->tab[table->def])
>>                   def_prio = table->tab[table->def]->prio;
>>
>> -            printk(KERN_DEBUG "GRED: DP %u does not have a prio "
>> +            pr_debug("GRED: DP %u does not have a prio "
>>                      "setting default to %d\n", ctl->DP, def_prio);
>>
>>               prio = def_prio;
>> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
>> index f6e8a74..6586f3b 100644
>> --- a/net/sched/sch_htb.c
>> +++ b/net/sched/sch_htb.c
>> @@ -712,7 +712,7 @@ static s64 htb_do_events(struct htb_sched *q, const int level,
>>
>>       /* too much load - let's continue after a break for scheduling */
>>       if (!(q->warned & HTB_WARN_TOOMANYEVENTS)) {
>> -        pr_warning("htb: too many events!\n");
>> +        pr_warn("htb: too many events!\n");
>>           q->warned |= HTB_WARN_TOOMANYEVENTS;
>>       }
>>
>> @@ -1484,13 +1484,13 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
>>       if (!cl->level) {
>>           cl->quantum = hopt->rate.rate / q->rate2quantum;
>>           if (!hopt->quantum && cl->quantum < 1000) {
>> -            pr_warning(
>> +            pr_warn(
>>                      "HTB: quantum of class %X is small. Consider r2q change.\n",
> 
> Also, this looks quite ugly, so changing into pr_warn("HTB: .....") would be better if
> you're at it anyway.
Thanks, i will fix it in v3.
> 
>>                      cl->common.classid);
>>               cl->quantum = 1000;
>>           }
>>           if (!hopt->quantum && cl->quantum > 200000) {
>> -            pr_warning(
>> +            pr_warn(
>>                      "HTB: quantum of class %X is big. Consider r2q change.\n",
>>                      cl->common.classid);
> 
> Ditto
> 
>>               cl->quantum = 200000;
>>
> 
> .
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 1/3] net_sched: tbf: support of 64bit rates
  2013-11-07  2:13 ` [PATCH net-next v2 1/3] net_sched: tbf: support of " Yang Yingliang
@ 2013-11-07 14:25   ` Sergei Shtylyov
  2013-11-08  1:40     ` Yang Yingliang
  0 siblings, 1 reply; 13+ messages in thread
From: Sergei Shtylyov @ 2013-11-07 14:25 UTC (permalink / raw)
  To: Yang Yingliang, davem, netdev; +Cc: eric.dumazet, jhs, stephen

Hello.

On 07-11-2013 6:13, Yang Yingliang wrote:

> With psched_ratecfg_precompute(), tbf can deal with 64bit rates.
> Add two new attributes so that tc can use them to break the 32bit
> limit.

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
[...]

> diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
> index b057122..b736517 100644
> --- a/net/sched/sch_tbf.c
> +++ b/net/sched/sch_tbf.c
[...]
> @@ -402,6 +409,13 @@ static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb)
>   	opt.buffer = PSCHED_NS2TICKS(q->buffer);
>   	if (nla_put(skb, TCA_TBF_PARMS, sizeof(opt), &opt))
>   		goto nla_put_failure;
> +	if ((q->rate.rate_bytes_ps >= (1ULL << 32)) &&
> +			nla_put_u64(skb, TCA_TBF_RATE64, q->rate.rate_bytes_ps))
> +		goto nla_put_failure;
> +	if (q->peak_present &&
> +			(q->peak.rate_bytes_ps >= (1ULL << 32)) &&
> +			nla_put_u64(skb, TCA_TBF_PRATE64, q->peak.rate_bytes_ps))
> +		goto nla_put_failure;

    According to the networking coding style, the *if* continuation lines 
should start under the next character after (.

WBR, Sergei

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors
  2013-11-07  2:13 ` [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors Yang Yingliang
  2013-11-07  8:37   ` Daniel Borkmann
@ 2013-11-07 14:33   ` Sergei Shtylyov
  2013-11-08  1:51     ` Yang Yingliang
  1 sibling, 1 reply; 13+ messages in thread
From: Sergei Shtylyov @ 2013-11-07 14:33 UTC (permalink / raw)
  To: Yang Yingliang, davem, netdev; +Cc: eric.dumazet, jhs, stephen

Hello.

On 07-11-2013 6:13, Yang Yingliang wrote:

> There are some checkpatch errors, fix them.

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
[...]

> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
> index fd70728..d92a90e9 100644
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -191,7 +191,8 @@ u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo)
>   			val = 1;
>   	} while (tcf_hash_lookup(val, hinfo));
>
> -	return (*idx_gen = val);
> +	*idx_gen = val;
> +	return *idx_gen;

	return val;

would have been simpler.

> diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
> index 7a42c81..a8f40f5 100644
> --- a/net/sched/sch_cbq.c
> +++ b/net/sched/sch_cbq.c
> @@ -1058,7 +1058,8 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
>   				cl->quantum = (cl->weight*cl->allot*q->nclasses[prio])/
>   					q->quanta[prio];
>   			}
> -			if (cl->quantum <= 0 || cl->quantum>32*qdisc_dev(cl->qdisc)->mtu) {
> +			if (cl->quantum <= 0 ||
> +				cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {

    According to the networking coding style, the continuation line should 
start right under 'cl' on the first line of *if*. The way you did it makes it 
harder for the eyes to differentiate the code in the *if* branch from the *if* 
expression.

>   				pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
>   					   cl->common.classid, cl->quantum);
>   				cl->quantum = qdisc_dev(cl->qdisc)->mtu/2 + 1;
[...]

WBR, Sergei

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...)
  2013-11-07  2:13 ` [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...) Yang Yingliang
  2013-11-07  8:30   ` Daniel Borkmann
@ 2013-11-07 14:43   ` Sergei Shtylyov
  1 sibling, 0 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2013-11-07 14:43 UTC (permalink / raw)
  To: Yang Yingliang, davem, netdev; +Cc: eric.dumazet, jhs, stephen

Hello.

On 07-11-2013 6:13, Yang Yingliang wrote:

> Replace printk(KERN_DEBUG ...) with pr_debug() and

    Note that this is not an equivalent change: first variant always prints 
the message, while pr_debug() only does this if DEBUG is #define'd or dynamic 
debugging is enabled.

> replace pr_warning() with pr_warn().

    This should probably be in a separate patch.

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>   net/sched/sch_cbq.c    | 2 +-
>   net/sched/sch_dsmark.c | 2 +-
>   net/sched/sch_gred.c   | 4 ++--
>   net/sched/sch_htb.c    | 6 +++---
>   4 files changed, 7 insertions(+), 7 deletions(-)

> diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
> index a8f40f5..9e3a9dc 100644
> --- a/net/sched/sch_cbq.c
> +++ b/net/sched/sch_cbq.c
> @@ -1060,7 +1060,7 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
>   			}
>   			if (cl->quantum <= 0 ||
>   				cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {
> -				pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
> +				pr_warn("CBQ: class %08x has bad quantum==%ld, repaired.\n",
>   					   cl->common.classid, cl->quantum);

    You should also adjust indentation of the continuation line. Same comment 
to the code furhter below...

[...]
> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
> index f6e8a74..6586f3b 100644
> --- a/net/sched/sch_htb.c
> +++ b/net/sched/sch_htb.c

> @@ -1484,13 +1484,13 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
>   	if (!cl->level) {
>   		cl->quantum = hopt->rate.rate / q->rate2quantum;
>   		if (!hopt->quantum && cl->quantum < 1000) {
> -			pr_warning(
> +			pr_warn(
>   			       "HTB: quantum of class %X is small. Consider r2q change.\n",

    It would have been good if you moved the string literal to the preceding 
line. Same comment to the below code.

WBR, Sergei

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 1/3] net_sched: tbf: support of 64bit rates
  2013-11-07 14:25   ` Sergei Shtylyov
@ 2013-11-08  1:40     ` Yang Yingliang
  0 siblings, 0 replies; 13+ messages in thread
From: Yang Yingliang @ 2013-11-08  1:40 UTC (permalink / raw)
  To: Sergei Shtylyov, netdev

On 2013/11/7 22:25, Sergei Shtylyov wrote:
> Hello.
> 
> On 07-11-2013 6:13, Yang Yingliang wrote:
> 
>> With psched_ratecfg_precompute(), tbf can deal with 64bit rates.
>> Add two new attributes so that tc can use them to break the 32bit
>> limit.
> 
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> [...]
> 
>> diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
>> index b057122..b736517 100644
>> --- a/net/sched/sch_tbf.c
>> +++ b/net/sched/sch_tbf.c
> [...]
>> @@ -402,6 +409,13 @@ static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb)
>>       opt.buffer = PSCHED_NS2TICKS(q->buffer);
>>       if (nla_put(skb, TCA_TBF_PARMS, sizeof(opt), &opt))
>>           goto nla_put_failure;
>> +    if ((q->rate.rate_bytes_ps >= (1ULL << 32)) &&
>> +            nla_put_u64(skb, TCA_TBF_RATE64, q->rate.rate_bytes_ps))
>> +        goto nla_put_failure;
>> +    if (q->peak_present &&
>> +            (q->peak.rate_bytes_ps >= (1ULL << 32)) &&
>> +            nla_put_u64(skb, TCA_TBF_PRATE64, q->peak.rate_bytes_ps))
>> +        goto nla_put_failure;
> 
>    According to the networking coding style, the *if* continuation lines should start under the next character after (.
> 
> WBR, Sergei

Got it, i'll fix in next patch.
Thanks

> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors
  2013-11-07 14:33   ` Sergei Shtylyov
@ 2013-11-08  1:51     ` Yang Yingliang
  0 siblings, 0 replies; 13+ messages in thread
From: Yang Yingliang @ 2013-11-08  1:51 UTC (permalink / raw)
  To: Sergei Shtylyov, netdev

On 2013/11/7 22:33, Sergei Shtylyov wrote:
> Hello.
> 
> On 07-11-2013 6:13, Yang Yingliang wrote:
> 
>> There are some checkpatch errors, fix them.
> 
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> [...]
> 
>> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
>> index fd70728..d92a90e9 100644
>> --- a/net/sched/act_api.c
>> +++ b/net/sched/act_api.c
>> @@ -191,7 +191,8 @@ u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo)
>>               val = 1;
>>       } while (tcf_hash_lookup(val, hinfo));
>>
>> -    return (*idx_gen = val);
>> +    *idx_gen = val;
>> +    return *idx_gen;
> 
>     return val;
> 
> would have been simpler.

Yeah, i think so.
Thanks

> 
>> diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
>> index 7a42c81..a8f40f5 100644
>> --- a/net/sched/sch_cbq.c
>> +++ b/net/sched/sch_cbq.c
>> @@ -1058,7 +1058,8 @@ static void cbq_normalize_quanta(struct cbq_sched_data *q, int prio)
>>                   cl->quantum = (cl->weight*cl->allot*q->nclasses[prio])/
>>                       q->quanta[prio];
>>               }
>> -            if (cl->quantum <= 0 || cl->quantum>32*qdisc_dev(cl->qdisc)->mtu) {
>> +            if (cl->quantum <= 0 ||
>> +                cl->quantum > 32*qdisc_dev(cl->qdisc)->mtu) {
> 
>    According to the networking coding style, the continuation line should start right under 'cl' on the first line of *if*. The way you did it makes it harder for the eyes to differentiate the code in the *if* branch from the *if* expression.
> 
>>                   pr_warning("CBQ: class %08x has bad quantum==%ld, repaired.\n",
>>                          cl->common.classid, cl->quantum);
>>                   cl->quantum = qdisc_dev(cl->qdisc)->mtu/2 + 1;
> [...]
> 
> WBR, Sergei
> 
> 
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors
  2013-11-07  8:37   ` Daniel Borkmann
@ 2013-11-08 11:04     ` Bjørn Mork
  0 siblings, 0 replies; 13+ messages in thread
From: Bjørn Mork @ 2013-11-08 11:04 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: Yang Yingliang, davem, netdev, eric.dumazet, jhs, stephen

Daniel Borkmann <dborkman@redhat.com> writes:
> On 11/07/2013 03:13 AM, Yang Yingliang wrote:
>
>> @@ -263,7 +264,7 @@ void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo)
>>   }
>>   EXPORT_SYMBOL(tcf_hash_insert);
>>
>> -static struct tc_action_ops *act_base = NULL;
>> +static struct tc_action_ops *act_base;
>
> From a readability point of view, I think this makes it worse, also the other places
> where you change globals vars like that.

Then you should probably argue for a change to checkpatch. It will make
a lot of noise about such unnecessary initialization.


Bjørn

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-11-08 11:06 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-07  2:13 [PATCH net-next v2 0/3] net_sched: make tbf support 64bit rates Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 1/3] net_sched: tbf: support of " Yang Yingliang
2013-11-07 14:25   ` Sergei Shtylyov
2013-11-08  1:40     ` Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors Yang Yingliang
2013-11-07  8:37   ` Daniel Borkmann
2013-11-08 11:04     ` Bjørn Mork
2013-11-07 14:33   ` Sergei Shtylyov
2013-11-08  1:51     ` Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...) Yang Yingliang
2013-11-07  8:30   ` Daniel Borkmann
2013-11-07  8:43     ` Yang Yingliang
2013-11-07 14:43   ` Sergei Shtylyov

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.