Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1237496

Re: [RFC PATCH 0/3] net: dsa: Complete and fix the dsa unbinding

Path csiph.com!usenet.pasdenom.info!aioe.org!bofh.it!news.nic.it!robomod
From Neil Armstrong <narmstrong@baylibre.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 0/3] net: dsa: Complete and fix the dsa unbinding
Date Thu, 01 Oct 2015 17:20:02 +0200
Message-ID <qeNOi-8mD-7@gated-at.bofh.it> (permalink)
References <qekVY-7TY-9@gated-at.bofh.it> <qetFU-3Ao-19@gated-at.bofh.it>
X-Original-To Florian Fainelli <f.fainelli@gmail.com>, "David S. Miller" <davem@davemloft.net>, Jesper Dangaard Brouer <brouer@redhat.com>
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:organization :message-id:date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=4tTDiV3+ZmhqYcFvgH/PLKtKXvjwIvEKhlUvafrGxHw=; b=QCLMQs2WBcVyFWkh1/AiUF3W4m5BSpXXSlCvisBWY/Jyyhf6vbKzWeFo4CoA0vpi03 x4SaGwmLFk1k9rI4XuWGrS8l7xKqXdwUGoafNWoS9C0Vu42QaqclA13Wsfmq6YV1yGEL l+XWFS8yIxsGAQxNNWd6Xans1tCfG/dJKTcHIfROh0olSPS6IxO7PtdxN8GGGjBMX0rV eU0EA+CqrzybQxBr3Dpqrma/FCu30zYmaLPLtV7YNfqa1Q2YE1psytIHSt/GEpWdVif9 lRNSq4Iv7GD1PDnDCisrOgz+qpt7Eq/tNBw9tS3vvrkLn8+9tqedn+2tgzpwFdSawsQc S1Jw==
X-Gm-Message-State ALoCoQm5aDCvHZkUKouplipilkNZalikNsF/Q2jV3JpNaSCkwUM4UufgUILrs71QW5/BUBsQ1Hh3
X-Received by 10.180.103.2 with SMTP id fs2mr4176206wib.9.1443712781436; Thu, 01 Oct 2015 08:19:41 -0700 (PDT)
Organization Baylibre
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 56
X-Original-Cc netdev@vger.kernel.org, linux-kernel@vger.kernel.org, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, linux@roeck-us.net
X-Original-Date Thu, 1 Oct 2015 17:19:39 +0200
X-Original-Message-ID <560D4F0B.9080703@baylibre.com>
X-Original-References <560B9B70.6030202@baylibre.com> <560C1F5A.5070506@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1237496

Show key headers only | View raw


On 09/30/2015 07:43 PM, Florian Fainelli wrote:
> On 30/09/15 01:21, Neil Armstrong wrote:
>> In order to cleanly unbind the dsa core, either as a module removal,
>> or a platform device unbind, switch the allocation the their devm_
>> counterparts and complete the destroy functions.
>>
>> The last patch is an experimental way to exit the probe when no
>> switch is found in the discover process.
>>
>> The patches are based on the current net-next.
> 
> I looked at the patches and they bring DSA in a better direction. For
> future submissions, could you CC people who recently worked on DSA, like
> Andrew Lunn, Guenter Roeck, Vivien Didelot and myself? We can typically
> give your patches a try fairly quickly.
> 
> In case you are seriously considering making DSA a loadable module,
> there were an earlier attempt here:
> 
> http://comments.gmane.org/gmane.linux.network/345803
> 
> Thanks!
> 
>>
>> Neil Armstrong (3):
>>   net: dsa: Use devm_ prefixed allocations
>>   net: dsa: complete dsa_switch_destroy calls
>>   net: dsa: exit probe if no switch were found
>>
>>  net/dsa/dsa.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
>>  1 file changed, 60 insertions(+), 7 deletions(-)
>>
> 
> 

At least, the following patch could be added with no pain to complete my code :
[PATCH net-next 5/8] net: dsa: allow switch drivers to cleanup their resource (http://permalink.gmane.org/gmane.linux.network/345805)

Then, the following patch could be re-proposed :
[PATCH net-next 7/8] net: dsa: bcm_sf2: cleanup resources in remove callback

I should probably also take this part also :
+	dst->master_netdev->dsa_ptr = NULL;
+	/* If we used a tagging format that doesn't have an ethertype
+	 * field, make sure that all packets from this point get sent
+	 * without the tag and go through the regular receive path.
+	 */
+	wmb();
+

Neil
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[RFC PATCH 0/3] net: dsa: Complete and fix the dsa unbinding Neil Armstrong <narmstrong@baylibre.com> - 2015-09-30 10:30 +0200
  Re: [RFC PATCH 0/3] net: dsa: Complete and fix the dsa unbinding Florian Fainelli <f.fainelli@gmail.com> - 2015-09-30 19:50 +0200
    Re: [RFC PATCH 0/3] net: dsa: Complete and fix the dsa unbinding Neil Armstrong <narmstrong@baylibre.com> - 2015-10-01 17:10 +0200
      Re: [RFC PATCH 0/3] net: dsa: Complete and fix the dsa unbinding Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2015-10-01 19:30 +0200
    Re: [RFC PATCH 0/3] net: dsa: Complete and fix the dsa unbinding Neil Armstrong <narmstrong@baylibre.com> - 2015-10-01 17:20 +0200

csiph-web