From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753432AbbJGAmw (ORCPT ); Tue, 6 Oct 2015 20:42:52 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34315 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752934AbbJGAmu (ORCPT ); Tue, 6 Oct 2015 20:42:50 -0400 Message-ID: <56146A74.8050807@gmail.com> Date: Tue, 06 Oct 2015 17:42:28 -0700 From: Florian Fainelli User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Vivien Didelot , netdev@vger.kernel.org CC: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Scott Feldman , Jiri Pirko , Andrew Lunn , Neil Armstrong , Sergei Shtylyov Subject: Re: [PATCH net-next 0/3] net: remove dsa.h from netdevice.h References: <1444168467-10293-1-git-send-email-vivien.didelot@savoirfairelinux.com> In-Reply-To: <1444168467-10293-1-git-send-email-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/10/15 14:54, Vivien Didelot wrote: > In order to push switchdev objects down to DSA drivers, I need to include > switchdev.h in dsa.h. But compilation fails because of a circular dependency > issue, since dsa.h is also included in linux/netdevice.h. Just for the record, what does this circular dependency looks like? Last I tried something in that front, I ended-up forward declaring the 'switchdev_obj' structure, but that was weeks ago before the whole restructuring, so could be pointless now. > > dsa.h is included for two purposes: to have the definition of struct > dsa_switch_tree; and to have access to dsa_uses_tagged_protocol(), used by > netdev_uses_dsa(). > > This patchset forward declares struct dsa_switch_tree; adds a new uses_hw_tag > boolean to struct net_device, which is more explicit than the DSA helper, and > finally get rid of the dsa.h include. > > With this patchset, switchdev.h can safely be included in dsa.h. > > Vivien Didelot (3): > net: dsa: add uses_hw_tag > net: dsa: include dsa.h in dsa_priv.h > net: remove dsa.h include from linux/netdevice.h > > include/linux/netdevice.h | 9 ++++++--- > include/net/dsa.h | 5 ----- > net/dsa/dsa.c | 1 + > net/dsa/dsa_priv.h | 1 + > 4 files changed, 8 insertions(+), 8 deletions(-) > -- Florian