Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4183637ybp; Mon, 7 Oct 2019 04:42:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaOLUhMFA/xnuA2u15G4dDp2bvW0PZ4/s03A+M8BTc9yastKwFYviVZGKN8Z1qehfkzR7j X-Received: by 2002:a17:906:fd1:: with SMTP id c17mr23719126ejk.45.1570448551516; Mon, 07 Oct 2019 04:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570448551; cv=none; d=google.com; s=arc-20160816; b=T+uV40Mea7V5SnEBxdF0qWD2E3nBfgBEtLl3iMozK2FKCd6TcQqdzTq/K7Xs18a2Tp CstuZtzsKeUKBOgyG7XJL2SSBUI5fwyzpnJY/DlAyzw3qQjKPNo74PiEWGuV2S9FQvcU kbhk4LLj3Zpo38MOKDiNyqUH8uke8gWZo0ixvV8YKqU7zNcNd9wrOgomui9xYyrI5zTK ifgPG3kjKiFEcpMTvgeOO3GDrEr40JmP5VcPcnTGSDDOZ0XDZJ06yw6K8olpeW9BFrJH ytEzX60Loa4Ire1TGtTQbkJBb0TX6uVGeiE+Lunes8/nhmHvGwNhFATwFVxEmz8Re9c1 469w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=0+SkQye8HGxXlyWkp4N5bsYiofeDC2ZCUWoIZS1Zw4Q=; b=W9a53/51xlsuiYq69XOc+1kZlGu6hB7KmDo1/gQJCC1OxddtfChzsL2cKsjworTP5J dk63O/3LJ1xSp/WUHOXaF83uRuhBuVTp1EqNaiYlrIuIp8oVwgUQMmF1cOTQK0XobEcM ip5DejC4mHuOEwO2yweVCqRjVnQ0B6/ZIqTEJho9h35j7pL5iOqmfaKBIgFD0oPrxovz 8WeyB1N3Txw93v53qzQeLVcgCeSafcp09vSXQyjKJd2O6LmG4UcXNV5purmkT5m5I7o0 Jktvcanq7BNiPjWBwdiRnjI5ZzFg4BinhCdQS+hskON+8mevt4q9Nw+UheJ59BVJa1DC ASow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f57si8194660edb.165.2019.10.07.04.42.02; Mon, 07 Oct 2019 04:42:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727522AbfJGLlh (ORCPT + 99 others); Mon, 7 Oct 2019 07:41:37 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:33862 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727411AbfJGLlh (ORCPT ); Mon, 7 Oct 2019 07:41:37 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.2) (envelope-from ) id 1iHRO8-0004uH-9s; Mon, 07 Oct 2019 13:41:16 +0200 Message-ID: Subject: Re: [PATCH net v4 07/12] macvlan: use dynamic lockdep key instead of subclass From: Johannes Berg To: Taehee Yoo Cc: David Miller , Netdev , linux-wireless@vger.kernel.org, Jakub Kicinski , j.vosburgh@gmail.com, vfalico@gmail.com, Andy Gospodarek , =?UTF-8?Q?Ji=C5=99=C3=AD_P=C3=ADrko?= , sd@queasysnail.net, Roopa Prabhu , saeedm@mellanox.com, manishc@marvell.com, rahulv@marvell.com, kys@microsoft.com, haiyangz@microsoft.com, Stephen Hemminger , sashal@kernel.org, hare@suse.de, varun@chelsio.com, ubraun@linux.ibm.com, kgraul@linux.ibm.com, Jay Vosburgh , Cody Schuffelen , bjorn@mork.no Date: Mon, 07 Oct 2019 13:41:14 +0200 In-Reply-To: (sfid-20191005_111343_179256_72415A7E) References: <20190928164843.31800-1-ap420073@gmail.com> <20190928164843.31800-8-ap420073@gmail.com> <33adc57c243dccc1dcb478113166fa01add3d49a.camel@sipsolutions.net> <72bc9727d0943c56403eac03b6de69c00b0f53f6.camel@sipsolutions.net> (sfid-20191005_111343_179256_72415A7E) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, 2019-10-05 at 18:13 +0900, Taehee Yoo wrote: > > If we place lockdep keys into "struct net_device", this macro would be a > little bit modified and reused. And driver code shape will not be huge > changed. I think this way is better than this v4 way. > So I will try it. What I was thinking was that if we can do this for every VLAN netdev, why shouldn't we do it for *every* netdev unconditionally? Some code could perhaps even be simplified if this was just a general part of netdev allocation. > > But it seems to me the whole nesting also has to be applied here? > > > > __dev_xmit_skb: > > * qdisc_run_begin() > > * sch_direct_xmit() > > * HARD_TX_LOCK(dev, txq, smp_processor_id()); > > * dev_hard_start_xmit() // say this is VLAN > > * dev_queue_xmit() // on real_dev > > * __dev_xmit_skb // recursion on another netdev > > > > Now if you have VLAN-in-VLAN the whole thing will recurse right? > > > > I have checked on this routine. > Only xmit_lock(HARD_TX_LOCK) could be nested. other > qdisc locks(runinng, busylock) will not be nested. OK, I still didn't check it too closely I guess, or got confused which lock I should look at. > This patch already > handles the _xmit_lock key. so I think there is no problem. Right > But I would like to place four lockdep keys(busylock, address, > running, _xmit_lock) into "struct net_device" because of code complexity. > > Let me know if I misunderstood anything. Nothing to misunderstand - I was just asking/wondering why the qdisc locks were not treated the same way. johannes