netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: sched: initialize bstats syncp
@ 2014-10-21  9:23 Sabrina Dubroca
  2014-10-21 18:52 ` Cong Wang
  2014-10-22  1:46 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Sabrina Dubroca @ 2014-10-21  9:23 UTC (permalink / raw)
  To: davem; +Cc: netdev, john.r.fastabend

Use netdev_alloc_pcpu_stats to allocate percpu stats and initialize syncp.

Fixes: 22e0f8b9322c "net: sched: make bstats per cpu and estimator RCU safe"
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
 net/sched/sch_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 2cf61b3e633c..76f402e05bd6 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -947,7 +947,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
 	if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS])) == 0) {
 		if (qdisc_is_percpu_stats(sch)) {
 			sch->cpu_bstats =
-				alloc_percpu(struct gnet_stats_basic_cpu);
+				netdev_alloc_pcpu_stats(struct gnet_stats_basic_cpu);
 			if (!sch->cpu_bstats)
 				goto err_out4;
 
-- 
2.1.2

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

* Re: [PATCH net] net: sched: initialize bstats syncp
  2014-10-21  9:23 [PATCH net] net: sched: initialize bstats syncp Sabrina Dubroca
@ 2014-10-21 18:52 ` Cong Wang
  2014-10-22  1:46 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2014-10-21 18:52 UTC (permalink / raw)
  To: Sabrina Dubroca; +Cc: David Miller, netdev, John Fastabend

On Tue, Oct 21, 2014 at 2:23 AM, Sabrina Dubroca <sd@queasysnail.net> wrote:
> Use netdev_alloc_pcpu_stats to allocate percpu stats and initialize syncp.
>
> Fixes: 22e0f8b9322c "net: sched: make bstats per cpu and estimator RCU safe"
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>

Acked-by: Cong Wang <cwang@twopensource.com>

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

* Re: [PATCH net] net: sched: initialize bstats syncp
  2014-10-21  9:23 [PATCH net] net: sched: initialize bstats syncp Sabrina Dubroca
  2014-10-21 18:52 ` Cong Wang
@ 2014-10-22  1:46 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-10-22  1:46 UTC (permalink / raw)
  To: sd; +Cc: netdev, john.r.fastabend

From: Sabrina Dubroca <sd@queasysnail.net>
Date: Tue, 21 Oct 2014 11:23:30 +0200

> Use netdev_alloc_pcpu_stats to allocate percpu stats and initialize syncp.
> 
> Fixes: 22e0f8b9322c "net: sched: make bstats per cpu and estimator RCU safe"
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>

Applied, thank you.

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

end of thread, other threads:[~2014-10-22  1:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21  9:23 [PATCH net] net: sched: initialize bstats syncp Sabrina Dubroca
2014-10-21 18:52 ` Cong Wang
2014-10-22  1:46 ` David Miller

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).