All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2 1/1] tc: distinguish Add/Replace qdisc operations
@ 2017-10-26 21:30 Roman Mashak
  2017-10-27  7:36 ` Stephen Hemminger
  2017-11-12 23:59 ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Roman Mashak @ 2017-10-26 21:30 UTC (permalink / raw)
  To: stephen; +Cc: jhs, netdev, Roman Mashak

Signed-off-by: Roman Mashak <mrv@mojatatu.com>
---
 tc/tc_qdisc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
index 1e9d909..493538c 100644
--- a/tc/tc_qdisc.c
+++ b/tc/tc_qdisc.c
@@ -231,6 +231,16 @@ int print_qdisc(const struct sockaddr_nl *who,
 	if (n->nlmsg_type == RTM_DELQDISC)
 		fprintf(fp, "deleted ");
 
+	if (n->nlmsg_type == RTM_NEWQDISC &&
+			(n->nlmsg_flags & NLM_F_CREATE) &&
+			(n->nlmsg_flags & NLM_F_REPLACE))
+		fprintf(fp, "replaced ");
+
+	if (n->nlmsg_type == RTM_NEWQDISC &&
+			(n->nlmsg_flags & NLM_F_CREATE) &&
+			(n->nlmsg_flags & NLM_F_EXCL))
+		fprintf(fp, "added ");
+
 	if (show_raw)
 		fprintf(fp, "qdisc %s %x:[%08x]  ",
 			rta_getattr_str(tb[TCA_KIND]),
-- 
1.9.1

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

* Re: [PATCH iproute2 1/1] tc: distinguish Add/Replace qdisc operations
  2017-10-26 21:30 [PATCH iproute2 1/1] tc: distinguish Add/Replace qdisc operations Roman Mashak
@ 2017-10-27  7:36 ` Stephen Hemminger
  2017-10-27 14:02   ` Roman Mashak
  2017-11-12 23:59 ` Stephen Hemminger
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2017-10-27  7:36 UTC (permalink / raw)
  To: Roman Mashak; +Cc: jhs, netdev

On Thu, 26 Oct 2017 17:30:08 -0400
Roman Mashak <mrv@mojatatu.com> wrote:

> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
> ---
>  tc/tc_qdisc.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
> index 1e9d909..493538c 100644
> --- a/tc/tc_qdisc.c
> +++ b/tc/tc_qdisc.c
> @@ -231,6 +231,16 @@ int print_qdisc(const struct sockaddr_nl *who,
>  	if (n->nlmsg_type == RTM_DELQDISC)
>  		fprintf(fp, "deleted ");
>  
> +	if (n->nlmsg_type == RTM_NEWQDISC &&
> +			(n->nlmsg_flags & NLM_F_CREATE) &&
> +			(n->nlmsg_flags & NLM_F_REPLACE))
> +		fprintf(fp, "replaced ");
> +
> +	if (n->nlmsg_type == RTM_NEWQDISC &&
> +			(n->nlmsg_flags & NLM_F_CREATE) &&
> +			(n->nlmsg_flags & NLM_F_EXCL))
> +		fprintf(fp, "added ");
> +
>  	if (show_raw)
>  		fprintf(fp, "qdisc %s %x:[%08x]  ",
>  			rta_getattr_str(tb[TCA_KIND]),

I am not sure about this. We don't do this for monitoring routes or addresses.

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

* Re: [PATCH iproute2 1/1] tc: distinguish Add/Replace qdisc operations
  2017-10-27  7:36 ` Stephen Hemminger
@ 2017-10-27 14:02   ` Roman Mashak
  0 siblings, 0 replies; 4+ messages in thread
From: Roman Mashak @ 2017-10-27 14:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: jhs, netdev

Stephen Hemminger <stephen@networkplumber.org> writes:

> On Thu, 26 Oct 2017 17:30:08 -0400
> Roman Mashak <mrv@mojatatu.com> wrote:
>
>> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
>> ---
>>  tc/tc_qdisc.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>> 
>> diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
>> index 1e9d909..493538c 100644
>> --- a/tc/tc_qdisc.c
>> +++ b/tc/tc_qdisc.c
>> @@ -231,6 +231,16 @@ int print_qdisc(const struct sockaddr_nl *who,
>>  	if (n->nlmsg_type == RTM_DELQDISC)
>>  		fprintf(fp, "deleted ");
>>  
>> +	if (n->nlmsg_type == RTM_NEWQDISC &&
>> +			(n->nlmsg_flags & NLM_F_CREATE) &&
>> +			(n->nlmsg_flags & NLM_F_REPLACE))
>> +		fprintf(fp, "replaced ");
>> +
>> +	if (n->nlmsg_type == RTM_NEWQDISC &&
>> +			(n->nlmsg_flags & NLM_F_CREATE) &&
>> +			(n->nlmsg_flags & NLM_F_EXCL))
>> +		fprintf(fp, "added ");
>> +
>>  	if (show_raw)
>>  		fprintf(fp, "qdisc %s %x:[%08x]  ",
>>  			rta_getattr_str(tb[TCA_KIND]),
>
> I am not sure about this. We don't do this for monitoring routes or addresses.

However we already do this for other TC components - actions and
filters, e.g. print_action() or print_filter().

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

* Re: [PATCH iproute2 1/1] tc: distinguish Add/Replace qdisc operations
  2017-10-26 21:30 [PATCH iproute2 1/1] tc: distinguish Add/Replace qdisc operations Roman Mashak
  2017-10-27  7:36 ` Stephen Hemminger
@ 2017-11-12 23:59 ` Stephen Hemminger
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-11-12 23:59 UTC (permalink / raw)
  To: Roman Mashak; +Cc: jhs, netdev

On Thu, 26 Oct 2017 17:30:08 -0400
Roman Mashak <mrv@mojatatu.com> wrote:

> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
> ---
>  tc/tc_qdisc.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied to 4.14

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

end of thread, other threads:[~2017-11-12 23:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 21:30 [PATCH iproute2 1/1] tc: distinguish Add/Replace qdisc operations Roman Mashak
2017-10-27  7:36 ` Stephen Hemminger
2017-10-27 14:02   ` Roman Mashak
2017-11-12 23:59 ` Stephen Hemminger

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.