* [PATCH iproute2] gre/tunnel: Print erspan_index using print_uint()
@ 2017-12-28 11:12 Serhey Popovych
2017-12-28 15:13 ` William Tu
0 siblings, 1 reply; 3+ messages in thread
From: Serhey Popovych @ 2017-12-28 11:12 UTC (permalink / raw)
To: netdev
One is missing in JSON output because fprintf()
is used instead of print_uint().
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
---
ip/link_gre.c | 3 ++-
ip/link_gre6.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ip/link_gre.c b/ip/link_gre.c
index 896bb19..1e331c8 100644
--- a/ip/link_gre.c
+++ b/ip/link_gre.c
@@ -476,7 +476,8 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_GRE_ERSPAN_INDEX]) {
__u32 erspan_idx = rta_getattr_u32(tb[IFLA_GRE_ERSPAN_INDEX]);
- fprintf(f, "erspan_index %u ", erspan_idx);
+ print_uint(PRINT_ANY,
+ "erspan_index", "erspan_index %u ", erspan_idx);
}
if (tb[IFLA_GRE_ENCAP_TYPE] &&
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
index 7ae4b49..2687a62 100644
--- a/ip/link_gre6.c
+++ b/ip/link_gre6.c
@@ -532,7 +532,9 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
if (tb[IFLA_GRE_ERSPAN_INDEX]) {
__u32 erspan_idx = rta_getattr_u32(tb[IFLA_GRE_ERSPAN_INDEX]);
- fprintf(f, "erspan_index %u ", erspan_idx);
+
+ print_uint(PRINT_ANY,
+ "erspan_index", "erspan_index %u ", erspan_idx);
}
if (tb[IFLA_GRE_ENCAP_TYPE] &&
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH iproute2] gre/tunnel: Print erspan_index using print_uint()
2017-12-28 11:12 [PATCH iproute2] gre/tunnel: Print erspan_index using print_uint() Serhey Popovych
@ 2017-12-28 15:13 ` William Tu
2017-12-28 15:48 ` Serhey Popovych
0 siblings, 1 reply; 3+ messages in thread
From: William Tu @ 2017-12-28 15:13 UTC (permalink / raw)
To: Serhey Popovych; +Cc: Linux Kernel Network Developers
Hi Serhey,
On Thu, Dec 28, 2017 at 3:12 AM, Serhey Popovych
<serhe.popovych@gmail.com> wrote:
> One is missing in JSON output because fprintf()
> is used instead of print_uint().
>
> Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
> ---
> ip/link_gre.c | 3 ++-
> ip/link_gre6.c | 4 +++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/ip/link_gre.c b/ip/link_gre.c
> index 896bb19..1e331c8 100644
> --- a/ip/link_gre.c
> +++ b/ip/link_gre.c
> @@ -476,7 +476,8 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> if (tb[IFLA_GRE_ERSPAN_INDEX]) {
> __u32 erspan_idx = rta_getattr_u32(tb[IFLA_GRE_ERSPAN_INDEX]);
>
> - fprintf(f, "erspan_index %u ", erspan_idx);
> + print_uint(PRINT_ANY,
> + "erspan_index", "erspan_index %u ", erspan_idx);
> }
>
Did you pull the latest code from net-next branch?
I think I already fix it.
William
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH iproute2] gre/tunnel: Print erspan_index using print_uint()
2017-12-28 15:13 ` William Tu
@ 2017-12-28 15:48 ` Serhey Popovych
0 siblings, 0 replies; 3+ messages in thread
From: Serhey Popovych @ 2017-12-28 15:48 UTC (permalink / raw)
To: William Tu; +Cc: Linux Kernel Network Developers
[-- Attachment #1.1: Type: text/plain, Size: 1450 bytes --]
> Hi Serhey,
Hi William,
Yes, iproute2-next/net-next branch contains fix already: we probably do
not need proposed change. Sorry for noise.
I'm currently focused on bug fixing in stable which affects my work for
iproute2-next. All my future work will be based on iproute2-next as it
contains refactoring, optimization and cleanups, not fixes.
Sorry again and thanks for feedback.
>
> On Thu, Dec 28, 2017 at 3:12 AM, Serhey Popovych
> <serhe.popovych@gmail.com> wrote:
>> One is missing in JSON output because fprintf()
>> is used instead of print_uint().
>>
>> Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
>> ---
>> ip/link_gre.c | 3 ++-
>> ip/link_gre6.c | 4 +++-
>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/ip/link_gre.c b/ip/link_gre.c
>> index 896bb19..1e331c8 100644
>> --- a/ip/link_gre.c
>> +++ b/ip/link_gre.c
>> @@ -476,7 +476,8 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
>> if (tb[IFLA_GRE_ERSPAN_INDEX]) {
>> __u32 erspan_idx = rta_getattr_u32(tb[IFLA_GRE_ERSPAN_INDEX]);
>>
>> - fprintf(f, "erspan_index %u ", erspan_idx);
>> + print_uint(PRINT_ANY,
>> + "erspan_index", "erspan_index %u ", erspan_idx);
>> }
>>
>
> Did you pull the latest code from net-next branch?
> I think I already fix it.
> William
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-28 15:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-28 11:12 [PATCH iproute2] gre/tunnel: Print erspan_index using print_uint() Serhey Popovych
2017-12-28 15:13 ` William Tu
2017-12-28 15:48 ` Serhey Popovych
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox