From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next] veth: report NEWLINK event when moving the peer device in a new namespace Date: Sat, 1 Sep 2018 17:45:57 -0600 Message-ID: <247de7c5-5046-81f4-d0b9-f6fcd505e8e8@gmail.com> References: <51722660f2ef860779e227541dab77046496f135.1535712096.git.lorenzo.bianconi@redhat.com> <1321a4ad-75c5-358f-3a5d-1ec1549a9474@gmail.com> <20180831161902.GD6236@localhost.localdomain> <20180831165444.GE6236@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Network Development , Thomas Haller To: Lorenzo Bianconi Return-path: Received: from mail-it0-f68.google.com ([209.85.214.68]:52325 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbeIBD7i (ORCPT ); Sat, 1 Sep 2018 23:59:38 -0400 Received: by mail-it0-f68.google.com with SMTP id h3-v6so11528137ita.2 for ; Sat, 01 Sep 2018 16:46:00 -0700 (PDT) In-Reply-To: Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 9/1/18 3:05 AM, Lorenzo Bianconi wrote: > > I was thinking about the commit 38e01b30563a and then I realized I > misread the code > yesterday. The commit 38e01b30563a provides all relevant info but it > emits the event > for veth1 (the device moved in the new namespace). > An userspace application will not receive that message if it filters > events for just > a specific device (veth0 in this case) despite that some device > properties have changed > (since veth0 and veth1 are paired devices). To fix that behavior in > veth_notify routine > I emits a RTM_NEWLINK event for veth0. Userspace is managing a veth a pair. It moves one of them to a new namespace and decides to filter messages related to that device before the move. If it did not filter the DELLINK message it would get the information you want. That to me is a userspace problem. What am I missing? Fundamentally, your proposal means 3 messages when moving a device to a new namespace which is what I think is unnecessary.