Netdev List
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Scott Feldman <sfeldma@gmail.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>,
	"David S. Miller" <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net/bridge: Enable bridge also when switchdev can't be built
Date: Wed, 13 May 2015 17:47:44 +0200	[thread overview]
Message-ID: <20150513154743.GA2773@nanopsycho> (raw)
In-Reply-To: <CAE4R7bCO3Zs=NzZDz9WTKRJznU7BMOkNNZFewNttUXqYsYUq0A@mail.gmail.com>

Wed, May 13, 2015 at 05:44:11PM CEST, sfeldma@gmail.com wrote:
>On Wed, May 13, 2015 at 3:08 AM, Or Gerlitz <ogerlitz@mellanox.com> wrote:
>> Currently switchdev doesn't build on older gcc version such as 4.4.6
>>
>> The reason for the compile error is such that it causes a failure
>> to build the bridge too, even when switchdev isn't configured (the
>> stub isn't enough), fix it.
>>
>> CC [M]  net/bridge/br_stp.o
>> net/bridge/br_stp.c: In function 'br_set_state':
>> net/bridge/br_stp.c:44: error: unknown field 'stp_state' specified in initializer
>>
>> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
>> ---
>>  net/bridge/br_stp.c |    4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
>> index b9300da..752783a 100644
>> --- a/net/bridge/br_stp.c
>> +++ b/net/bridge/br_stp.c
>> @@ -39,17 +39,19 @@ void br_log_state(const struct net_bridge_port *p)
>>
>>  void br_set_state(struct net_bridge_port *p, unsigned int state)
>>  {
>> +#ifdef CONFIG_NET_SWITCHDEV
>>         struct switchdev_attr attr = {
>>                 .id = SWITCHDEV_ATTR_PORT_STP_STATE,
>>                 .stp_state = state,
>>         };
>>         int err;
>>
>> -       p->state = state;
>>         err = switchdev_port_attr_set(p->dev, &attr);
>>         if (err && err != -EOPNOTSUPP)
>>                 br_warn(p->br, "error setting offload STP state on port %u(%s)\n",
>>                                 (unsigned int) p->port_no, p->dev->name);
>> +#endif
>> +       p->state = state;
>>  }
>
>Isn't this the same issue with anonymous unions and older gcc?

I believe it is

  reply	other threads:[~2015-05-13 15:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 10:08 [PATCH net-next] net/bridge: Enable bridge also when switchdev can't be built Or Gerlitz
2015-05-13 15:44 ` Scott Feldman
2015-05-13 15:47   ` Jiri Pirko [this message]
2015-05-13 15:54     ` Scott Feldman

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=20150513154743.GA2773@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=sfeldma@gmail.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