From: David Miller <davem@davemloft.net>
To: vivien.didelot@savoirfairelinux.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@savoirfairelinux.com, sfeldma@gmail.com, jiri@resnulli.us,
f.fainelli@gmail.com, andrew@lunn.ch, narmstrong@baylibre.com,
sergei.shtylyov@cogentembedded.com
Subject: Re: [PATCH net-next 0/3] net: remove dsa.h from netdevice.h
Date: Thu, 08 Oct 2015 04:57:32 -0700 (PDT) [thread overview]
Message-ID: <20151008.045732.1781136095864323644.davem@davemloft.net> (raw)
In-Reply-To: <1444168467-10293-1-git-send-email-vivien.didelot@savoirfairelinux.com>
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Tue, 6 Oct 2015 17:54:24 -0400
> 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.
>
> 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.
The netdevice structure is already too big, and bloating it up even more
to satisfy some include ordering issue is rather unacceptable as far as I
am concerned.
Just forward declare the pointer type, you're not dereferencing it.
prev parent reply other threads:[~2015-10-08 11:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 21:54 [PATCH net-next 0/3] net: remove dsa.h from netdevice.h Vivien Didelot
2015-10-06 21:54 ` [PATCH net-next 1/3] net: dsa: add uses_hw_tag Vivien Didelot
2015-10-06 21:54 ` [PATCH net-next 2/3] net: dsa: include dsa.h in dsa_priv.h Vivien Didelot
2015-10-06 21:54 ` [PATCH net-next 3/3] net: remove dsa.h include from linux/netdevice.h Vivien Didelot
2015-10-07 0:42 ` [PATCH net-next 0/3] net: remove dsa.h from netdevice.h Florian Fainelli
2015-10-07 16:27 ` Vivien Didelot
2015-10-07 17:20 ` Jiri Pirko
2015-10-08 11:57 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151008.045732.1781136095864323644.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=jiri@resnulli.us \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=narmstrong@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=sfeldma@gmail.com \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).