From 7dc2bbaa72f9cef61f05370a645288728ab33b8c Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Wed, 15 Apr 2015 20:29:09 +0530 Subject: net: ipv6: fix virtual tunneling build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IPv6 PMTUD has been updated to support UID-based routing. Pass INVALID_UID as the socket UID to ip6_update_pmtu(), otherwise we run into following build error: ---------------- CC net/ipv6/ip6_vti.o net/ipv6/ip6_vti.c: In function ‘vti6_err’: net/ipv6/ip6_vti.c:559:3: error: too few arguments to function ‘ip6_update_pmtu’ In file included from include/net/ip_tunnels.h:19:0, from net/ipv6/ip6_vti.c:44: include/net/ip6_route.h:110:6: note: declared here make[2]: *** [net/ipv6/ip6_vti.o] Error 1 ---------------- Signed-off-by: Amit Pundir --- net/ipv6/ip6_vti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c index 0224c032dca5..0dbba59e8817 100644 --- a/net/ipv6/ip6_vti.c +++ b/net/ipv6/ip6_vti.c @@ -599,7 +599,7 @@ static int vti6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, if (type == NDISC_REDIRECT) ip6_redirect(skb, net, skb->dev->ifindex, 0); else - ip6_update_pmtu(skb, net, info, 0, 0); + ip6_update_pmtu(skb, net, info, 0, 0, INVALID_UID); xfrm_state_put(x); return 0; -- cgit v1.2.3 From 8e0d8b48e28e9f488b63cafd57bf7d3aff5c7d0e Mon Sep 17 00:00:00 2001 From: Tushar Behera Date: Wed, 26 Mar 2014 15:27:05 +0530 Subject: tcp: Fix IPV6 module build errors If CONFIG_IPV6=m is selected, we are getting following build errors. net/built-in.o: In function `tcp_is_local6': net/ipv4/tcp.c:3261: undefined reference to `rt6_lookup' Making the code conditional upon only CONFIG_IPV6=y fixes this issue. Also export tcp_nuke_addr to build IPv6 modules. Otherwise we run into following build error: CC [M] lib/zlib_deflate/deftree.o CC [M] lib/zlib_deflate/deflate_syms.o LD [M] lib/zlib_deflate/zlib_deflate.o Building modules, stage 2. MODPOST 46 modules ERROR: "tcp_nuke_addr" [net/ipv6/ipv6.ko] undefined! make[2]: *** [__modpost] Error 1 Change-Id: I896ede85a22a89df0c9540376e743041b5329697 Signed-off-by: Tushar Behera CC: John Stultz Signed-off-by: John Stultz Signed-off-by: Amit Pundir --- net/ipv4/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 27a10c3a547c..13c1b51defe3 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3141,7 +3141,7 @@ static int tcp_is_local(struct net *net, __be32 addr) { return rt->dst.dev && (rt->dst.dev->flags & IFF_LOOPBACK); } -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +#if defined(CONFIG_IPV6) static int tcp_is_local6(struct net *net, struct in6_addr *addr) { struct rt6_info *rt6 = rt6_lookup(net, addr, addr, 0, 0); return rt6 && rt6->dst.dev && (rt6->dst.dev->flags & IFF_LOOPBACK); @@ -3209,7 +3209,7 @@ restart: continue; } -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +#if defined(CONFIG_IPV6) if (family == AF_INET6) { struct in6_addr *s6; if (!inet->pinet6) @@ -3246,3 +3246,4 @@ restart: return 0; } +EXPORT_SYMBOL_GPL(tcp_nuke_addr); -- cgit v1.2.3 From d231cdfa7c3440c5b1afa13c3343b06898a0d587 Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Mon, 14 Dec 2015 11:56:35 +0530 Subject: uid_cputime: skip power reporting per uid for now AOSP's cpufreq_stats patch to report power/current per cpufreq is broken at the moment so skip power reporting for now. Change-Id: I07779511f51ff3a9303dc98a3b71ac0a5882a4e9 Signed-off-by: Amit Pundir --- drivers/misc/uid_cputime.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/misc/uid_cputime.c b/drivers/misc/uid_cputime.c index c751188ce2ab..c1ad5246f564 100644 --- a/drivers/misc/uid_cputime.c +++ b/drivers/misc/uid_cputime.c @@ -38,8 +38,6 @@ struct uid_entry { cputime_t stime; cputime_t active_utime; cputime_t active_stime; - unsigned long long active_power; - unsigned long long power; struct hlist_node hash; }; @@ -85,7 +83,6 @@ static int uid_stat_show(struct seq_file *m, void *v) hash_for_each(hash_table, bkt, uid_entry, hash) { uid_entry->active_stime = 0; uid_entry->active_utime = 0; - uid_entry->active_power = 0; } read_lock(&tasklist_lock); @@ -100,15 +97,9 @@ static int uid_stat_show(struct seq_file *m, void *v) task_uid(task))); return -ENOMEM; } - /* if this task is exiting, we have already accounted for the - * time and power. - */ - if (task->cpu_power == ULLONG_MAX) - continue; task_cputime_adjusted(task, &utime, &stime); uid_entry->active_utime += utime; uid_entry->active_stime += stime; - uid_entry->active_power += task->cpu_power; } while_each_thread(temp, task); read_unlock(&tasklist_lock); @@ -117,14 +108,11 @@ static int uid_stat_show(struct seq_file *m, void *v) uid_entry->active_utime; cputime_t total_stime = uid_entry->stime + uid_entry->active_stime; - unsigned long long total_power = uid_entry->power + - uid_entry->active_power; - seq_printf(m, "%d: %llu %llu %llu\n", uid_entry->uid, + seq_printf(m, "%d: %llu %llu\n", uid_entry->uid, (unsigned long long)jiffies_to_msecs( cputime_to_jiffies(total_utime)) * USEC_PER_MSEC, (unsigned long long)jiffies_to_msecs( - cputime_to_jiffies(total_stime)) * USEC_PER_MSEC, - total_power); + cputime_to_jiffies(total_stime)) * USEC_PER_MSEC); } mutex_unlock(&uid_lock); @@ -218,8 +206,6 @@ static int process_notifier(struct notifier_block *self, task_cputime_adjusted(task, &utime, &stime); uid_entry->utime += utime; uid_entry->stime += stime; - uid_entry->power += task->cpu_power; - task->cpu_power = ULLONG_MAX; exit: mutex_unlock(&uid_lock); -- cgit v1.2.3