From: Vlad Buslov <vladbu@mellanox.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Vlad Buslov <vladbu@mellanox.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"jhs@mojatatu.com" <jhs@mojatatu.com>,
"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
"jiri@resnulli.us" <jiri@resnulli.us>,
"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH net-next] net: sched: flower: refactor reoffload for concurrent access
Date: Wed, 24 Apr 2019 07:50:50 +0000 [thread overview]
Message-ID: <vbfbm0vkfjc.fsf@mellanox.com> (raw)
In-Reply-To: <20190423095131.41383446@cakuba.netronome.com>
On Tue 23 Apr 2019 at 19:51, Jakub Kicinski <jakub.kicinski@netronome.com> wrote:
> On Tue, 23 Apr 2019 07:34:20 +0000, Vlad Buslov wrote:
>> >> @@ -382,6 +395,8 @@ static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f,
>> >>
>> >> tc_setup_cb_call(block, TC_SETUP_CLSFLOWER, &cls_flower, false);
>> >> spin_lock(&tp->lock);
>> >> + if (!list_empty(&f->hw_list))
>> >> + list_del_init(&f->hw_list);
>> >
>> > Mm. I thought list_del_init() on an empty list should be fine?
>>
>> Is it? Implementation of list_del_init() doesn't seem to check if list
>> is empty before re-initializing its pointers. Technically it seems like
>> it can work because the implementation will just set pointers of empty
>> list to point to itself (which is how empty list head is defined), but
>> should we assume this is intended behavior and not just implementation
>> detail? I don't see anything in comments for this function that suggests
>> that it is okay to call list_del_init() on empty list head.
>
> Mm.. I'd do it, IDK if there was ever an official ruling by the
> supreme court of Linus or any such ;) __list_del_entry_valid()
> looks like it'd not complain. Up to you, in general it didn't
> read very idiomatic, that's all.
Okay.
prev parent reply other threads:[~2019-04-24 7:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-22 7:21 [PATCH net-next] net: sched: flower: refactor reoffload for concurrent access Vlad Buslov
2019-04-22 20:34 ` Saeed Mahameed
2019-04-23 7:43 ` Vlad Buslov
2019-04-23 16:52 ` Saeed Mahameed
2019-04-24 7:50 ` Vlad Buslov
2019-04-22 21:02 ` Jakub Kicinski
2019-04-23 7:34 ` Vlad Buslov
2019-04-23 16:51 ` Jakub Kicinski
2019-04-24 7:50 ` Vlad Buslov [this message]
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=vbfbm0vkfjc.fsf@mellanox.com \
--to=vladbu@mellanox.com \
--cc=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--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.