* [PATCH net] ipv6: route: remove duplicated string from error message
@ 2019-01-12 20:45 Jakub Kicinski
2019-01-12 21:07 ` Joe Perches
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2019-01-12 20:45 UTC (permalink / raw)
To: davem; +Cc: netdev, Jakub Kicinski
"IPv6: " prefix is already added by pr_fmt, no need to include
it again in the pr_warn() format.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
net/ipv6/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 49117a72fcad..06708f0070cf 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4256,7 +4256,7 @@ static void ip6_print_replace_route_err(struct list_head *rt6_nh_list)
struct rt6_nh *nh;
list_for_each_entry(nh, rt6_nh_list, next) {
- pr_warn("IPV6: multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
+ pr_warn("multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
&nh->r_cfg.fc_dst, &nh->r_cfg.fc_gateway,
nh->r_cfg.fc_ifindex);
}
--
2.19.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv6: route: remove duplicated string from error message
2019-01-12 20:45 [PATCH net] ipv6: route: remove duplicated string from error message Jakub Kicinski
@ 2019-01-12 21:07 ` Joe Perches
2019-01-13 16:08 ` David Ahern
0 siblings, 1 reply; 7+ messages in thread
From: Joe Perches @ 2019-01-12 21:07 UTC (permalink / raw)
To: Jakub Kicinski, davem; +Cc: netdev, Roopa Prabhu
On Sat, 2019-01-12 at 12:45 -0800, Jakub Kicinski wrote:
> "IPv6: " prefix is already added by pr_fmt, no need to include
> it again in the pr_warn() format.
[]
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
[]
> @@ -4256,7 +4256,7 @@ static void ip6_print_replace_route_err(struct list_head *rt6_nh_list)
> struct rt6_nh *nh;
>
> list_for_each_entry(nh, rt6_nh_list, next) {
> - pr_warn("IPV6: multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
> + pr_warn("multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
Thanks.
Just asking, couldn't this emit a rather long list?
Perhaps it should be ratelimited?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv6: route: remove duplicated string from error message
2019-01-12 21:07 ` Joe Perches
@ 2019-01-13 16:08 ` David Ahern
2019-01-14 18:38 ` Jakub Kicinski
2019-01-14 18:52 ` [PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack Jakub Kicinski
0 siblings, 2 replies; 7+ messages in thread
From: David Ahern @ 2019-01-13 16:08 UTC (permalink / raw)
To: Joe Perches, Jakub Kicinski, davem; +Cc: netdev, Roopa Prabhu
On 1/12/19 2:07 PM, Joe Perches wrote:
> On Sat, 2019-01-12 at 12:45 -0800, Jakub Kicinski wrote:
>> "IPv6: " prefix is already added by pr_fmt, no need to include
>> it again in the pr_warn() format.
> []
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> []
>> @@ -4256,7 +4256,7 @@ static void ip6_print_replace_route_err(struct list_head *rt6_nh_list)
>> struct rt6_nh *nh;
>>
>> list_for_each_entry(nh, rt6_nh_list, next) {
>> - pr_warn("IPV6: multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
>> + pr_warn("multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
>
> Thanks.
>
> Just asking, couldn't this emit a rather long list?
> Perhaps it should be ratelimited?
>
>
That should be converted to an extack message now.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net] ipv6: route: remove duplicated string from error message
2019-01-13 16:08 ` David Ahern
@ 2019-01-14 18:38 ` Jakub Kicinski
2019-01-14 18:52 ` [PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack Jakub Kicinski
1 sibling, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2019-01-14 18:38 UTC (permalink / raw)
To: David Ahern; +Cc: Joe Perches, davem, netdev, Roopa Prabhu
On Sun, 13 Jan 2019 09:08:56 -0700, David Ahern wrote:
> On 1/12/19 2:07 PM, Joe Perches wrote:
> > On Sat, 2019-01-12 at 12:45 -0800, Jakub Kicinski wrote:
> >> "IPv6: " prefix is already added by pr_fmt, no need to include
> >> it again in the pr_warn() format.
> > []
> >> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> > []
> >> @@ -4256,7 +4256,7 @@ static void ip6_print_replace_route_err(struct list_head *rt6_nh_list)
> >> struct rt6_nh *nh;
> >>
> >> list_for_each_entry(nh, rt6_nh_list, next) {
> >> - pr_warn("IPV6: multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
> >> + pr_warn("multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
> >
> > Thanks.
> >
> > Just asking, couldn't this emit a rather long list?
> > Perhaps it should be ratelimited?
> >
> >
>
> That should be converted to an extack message now.
I assumed the information from the format is of importance.
Let me respin then.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack
2019-01-13 16:08 ` David Ahern
2019-01-14 18:38 ` Jakub Kicinski
@ 2019-01-14 18:52 ` Jakub Kicinski
2019-01-16 3:54 ` David Ahern
2019-01-16 22:07 ` David Miller
1 sibling, 2 replies; 7+ messages in thread
From: Jakub Kicinski @ 2019-01-14 18:52 UTC (permalink / raw)
To: davem, dsahern; +Cc: netdev, oss-drivers, joe, Jakub Kicinski
"IPv6: " prefix is already added by pr_fmt, no need to include
it again in the pr_warn() format. The message predates extack
support, we can replace the whole thing with an extack message.
Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
net/ipv6/route.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 49117a72fcad..92b947419670 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4251,17 +4251,6 @@ struct rt6_nh {
struct list_head next;
};
-static void ip6_print_replace_route_err(struct list_head *rt6_nh_list)
-{
- struct rt6_nh *nh;
-
- list_for_each_entry(nh, rt6_nh_list, next) {
- pr_warn("IPV6: multipath route replace failed (check consistency of installed routes): %pI6c nexthop %pI6c ifi %d\n",
- &nh->r_cfg.fc_dst, &nh->r_cfg.fc_gateway,
- nh->r_cfg.fc_ifindex);
- }
-}
-
static int ip6_route_info_append(struct net *net,
struct list_head *rt6_nh_list,
struct fib6_info *rt,
@@ -4407,7 +4396,8 @@ static int ip6_route_multipath_add(struct fib6_config *cfg,
nh->fib6_info = NULL;
if (err) {
if (replace && nhn)
- ip6_print_replace_route_err(&rt6_nh_list);
+ NL_SET_ERR_MSG_MOD(extack,
+ "multipath route replace failed (check consistency of installed routes)");
err_nh = nh;
goto add_errout;
}
--
2.19.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack
2019-01-14 18:52 ` [PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack Jakub Kicinski
@ 2019-01-16 3:54 ` David Ahern
2019-01-16 22:07 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Ahern @ 2019-01-16 3:54 UTC (permalink / raw)
To: Jakub Kicinski, davem; +Cc: netdev, oss-drivers, joe
On 1/14/19 11:52 AM, Jakub Kicinski wrote:
> "IPv6: " prefix is already added by pr_fmt, no need to include
> it again in the pr_warn() format. The message predates extack
> support, we can replace the whole thing with an extack message.
>
> Suggested-by: David Ahern <dsahern@gmail.com>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> ---
> net/ipv6/route.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
Reviewed-by: David Ahern <dsahern@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack
2019-01-14 18:52 ` [PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack Jakub Kicinski
2019-01-16 3:54 ` David Ahern
@ 2019-01-16 22:07 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2019-01-16 22:07 UTC (permalink / raw)
To: jakub.kicinski; +Cc: dsahern, netdev, oss-drivers, joe
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Mon, 14 Jan 2019 10:52:45 -0800
> "IPv6: " prefix is already added by pr_fmt, no need to include
> it again in the pr_warn() format. The message predates extack
> support, we can replace the whole thing with an extack message.
>
> Suggested-by: David Ahern <dsahern@gmail.com>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-01-16 22:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-12 20:45 [PATCH net] ipv6: route: remove duplicated string from error message Jakub Kicinski
2019-01-12 21:07 ` Joe Perches
2019-01-13 16:08 ` David Ahern
2019-01-14 18:38 ` Jakub Kicinski
2019-01-14 18:52 ` [PATCH net v2] ipv6: route: place a warning with duplicated string with correct extack Jakub Kicinski
2019-01-16 3:54 ` David Ahern
2019-01-16 22:07 ` David Miller
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.