All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: <davem@davemloft.net>, <petrm@mellanox.com>,
	<idosch@mellanox.com>, <sd@queasysnail.net>,
	<mousuanming@huawei.com>, <netdev@vger.kernel.org>,
	Mingfangsen <mingfangsen@huawei.com>,
	"Zhoukang (A)" <zhoukang7@huawei.com>,
	"wangxiaogang (F)" <wangxiaogang3@huawei.com>
Subject: Re: [PATCH] vxlan: remove the redundant gro_cells_destroy() calling.
Date: Fri, 15 Mar 2019 22:55:52 +0800	[thread overview]
Message-ID: <3cf8fd2c-d0c0-0a22-d5d2-fe285bb628b0@huawei.com> (raw)
In-Reply-To: <20190315125434.093afbd1@elisabeth>

> On Fri, 15 Mar 2019 18:06:45 +0800
> Zhiqiang Liu <liuzhiqiang26@huawei.com> wrote:
> 
>> From: "Suanming.Mou" <mousuanming@huawei.com>
>>
>> With ad6c9986bcb6, GRO cells will be destroyed in vxlan_uninit.
> 
> Thanks for cleaning this up.
> 
> I think it would be nice if you could actually explain in the commit
> message why this makes the call in vxlan_destroy_tunnels() redundant.
> 
Thanks for your reply. Actually, the patch is a cleanup as you said.
In vxlan_destroy_tunnels func, unregister_netdevice_queue is called after gro_cells_destroy
func. However, in unregister_netdevice_queue func, the gro_cells_destroy func will also call
the gro_cells_destroy func as the following routine:
	unregister_netdevice_many -> rollback_registered_many -> ndo_uninit -> gro_cells_destroy

Fortunately, gro_cells_destroy func will check whether gcells->cells is NULL, so even more than
one call gro_cells_destroy would not cause the memory twice-free problem.

>> Fixes: ad6c9986bcb6 ("vxlan: Fix GRO cells race condition between receive and link delete")
> 
> I'm not sure a Fixes: tag is appropriate here (and also if this
> shouldn't be targeted for net-next) -- in the end, gro_cells_destroy()
> there would just return:
> 
>         if (!gcells->cells)
>                 return;
> 
>> Signed-off-by: Suanming.Mou <mousuanming@huawei.com>

As you said, this is just a cleanup. I will remove the Fixes tag in v2 patch.
I used the ./scripts/get_maintainer.pl to get the maintainers and mail-list, and the return is
given as follows,

[root@localhost linux]# ./scripts/get_maintainer.pl 0001-vxlan-remove-the-redundant-gro_cells_destroy-calling.patch
"David S. Miller" <davem@davemloft.net> (odd fixer:NETWORKING DRIVERS,commit_signer:57/57=100%)
Petr Machata <petrm@mellanox.com> (commit_signer:30/57=53%,authored:27/57=47%,added_lines:649/1160=56%,removed_lines:265/494=54%)
Ido Schimmel <idosch@mellanox.com> (commit_signer:15/57=26%,removed_lines:30/494=6%)
Roopa Prabhu <roopa@cumulusnetworks.com> (commit_signer:11/57=19%,authored:9/57=16%,added_lines:364/1160=31%,removed_lines:156/494=32%)
Sabrina Dubroca <sd@queasysnail.net> (commit_signer:6/57=11%)
Stefano Brivio <sbrivio@redhat.com> (authored:5/57=9%,added_lines:63/1160=5%)
netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
linux-kernel@vger.kernel.org (open list)

> 
> Either way,
> 
> Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
> 


  reply	other threads:[~2019-03-15 14:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 10:06 [PATCH] vxlan: remove the redundant gro_cells_destroy() calling Zhiqiang Liu
2019-03-15 11:54 ` Stefano Brivio
2019-03-15 14:55   ` Zhiqiang Liu [this message]
2019-03-15 15:25     ` Stefano Brivio
2019-03-15 14:58 ` Eric Dumazet
2019-03-15 15:18 ` [PATCH v2] " Zhiqiang Liu
2019-03-15 15:28   ` Stefano Brivio
2019-03-15 16:06     ` Eric Dumazet
2019-03-15 18:02       ` David Miller
2019-03-15 18:56         ` Eric Dumazet
2019-03-15 21:08           ` Stefano Brivio
2019-03-15 21:26             ` Eric Dumazet
2019-03-15 22:04               ` Stefano Brivio
2019-03-16  5:24                 ` Zhiqiang Liu
2019-03-16  5:45                   ` Stefano Brivio
2019-03-16  6:27                     ` Zhiqiang Liu
2019-03-16  2:33           ` Zhiqiang Liu
2019-03-16  9:02             ` [PATCH net v3] vxlan: Don't call gro_cells_destroy() before device is unregistered Zhiqiang Liu
2019-03-19  0:08               ` David Miller
2019-03-15 18:02     ` [PATCH v2] vxlan: remove the redundant gro_cells_destroy() calling David Miller

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=3cf8fd2c-d0c0-0a22-d5d2-fe285bb628b0@huawei.com \
    --to=liuzhiqiang26@huawei.com \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=mingfangsen@huawei.com \
    --cc=mousuanming@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@mellanox.com \
    --cc=sbrivio@redhat.com \
    --cc=sd@queasysnail.net \
    --cc=wangxiaogang3@huawei.com \
    --cc=zhoukang7@huawei.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.