From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754709AbcFGXBT (ORCPT ); Tue, 7 Jun 2016 19:01:19 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:58825 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752115AbcFGXBS (ORCPT ); Tue, 7 Jun 2016 19:01:18 -0400 Date: Tue, 07 Jun 2016 16:01:16 -0700 (PDT) Message-Id: <20160607.160116.2076757909377302163.davem@davemloft.net> To: john@phrozen.org Cc: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, keyhaede@gmail.com, linux-kernel@vger.kernel.org, nbd@nbd.name Subject: Re: [PATCH 01/12] net: mediatek: fix DQL support From: David Miller In-Reply-To: References: <1465108385-38286-2-git-send-email-john@phrozen.org> <20160605.003242.796780762112643713.davem@davemloft.net> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 07 Jun 2016 16:01:17 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Crispin Date: Mon, 6 Jun 2016 08:43:13 +0200 > i think one solution would be to add some code to have 2 devices share > the same dql instance. would that be an acceptable solution ? You still need to address the issue of synchronization. dql purposefully doesn't use locking, always because a higher level object (in this case the netdev TX queue) it is contained within provides the synchronization. That breaks apart once you share the dql between two netdevs, as you are proposing here. You'll have to add locking, which is expensive. That's why I'm trying to encourage you to think out of the box and find some way to solve the issue without having to access shared state shared between multiple devices. Thanks.