From: Roman Mashak <mrv@mojatatu.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH net-next 1/1] net sched qdisc: pass netlink message flags in event notification
Date: Sat, 28 Oct 2017 23:36:41 -0400 [thread overview]
Message-ID: <85mv4atyk6.fsf@mojatatu.com> (raw)
In-Reply-To: <CAM_iQpWC=JJDBnxPTmkSjqhBGqQakoWbTuBxnLSETHo7+mQvcA@mail.gmail.com> (Cong Wang's message of "Fri, 27 Oct 2017 14:55:05 -0700")
Cong Wang <xiyou.wangcong@gmail.com> writes:
> On Thu, Oct 26, 2017 at 2:40 PM, Roman Mashak <mrv@mojatatu.com> wrote:
>> Userland client should be able to read an event, and reflect it back to
>> the kernel, therefore it needs to extract complete set of netlink flags.
>>
>> For example, this will allow "tc monitor" to distinguish Add and Replace
>> qdisc operations.
>>
>> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
>> ---
>> 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 a9ac912..e3e29be 100644
>> --- a/net/sched/sch_api.c
>> +++ b/net/sched/sch_api.c
>> @@ -859,7 +859,7 @@ static int qdisc_notify(struct net *net, struct sk_buff *oskb,
>> }
>> if (new && !tc_qdisc_dump_ignore(new, false)) {
>> if (tc_fill_qdisc(skb, new, clid, portid, n->nlmsg_seq,
>> - old ? NLM_F_REPLACE : 0, RTM_NEWQDISC) < 0)
>> + n->nlmsg_flags, RTM_NEWQDISC) < 0)
>
>
> Don't you want to change the other tc_fill_qdisc() in the same function
> too? ;)
The other tc_fill_qdisc generates RTM_DELQDISC event, in that case
netlink flags for user don't matter.
next prev parent reply other threads:[~2017-10-29 3:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 21:40 [PATCH net-next 1/1] net sched qdisc: pass netlink message flags in event notification Roman Mashak
2017-10-27 21:55 ` Cong Wang
2017-10-29 3:36 ` Roman Mashak [this message]
2017-10-30 16:23 ` Cong Wang
2017-10-30 18:07 ` Roman Mashak
2017-10-30 19:23 ` Cong Wang
2017-10-30 21:17 ` Roman Mashak
2017-11-01 0:55 ` Cong Wang
2017-11-02 22:44 ` Roman Mashak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85mv4atyk6.fsf@mojatatu.com \
--to=mrv@mojatatu.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.