From patchwork Wed Sep 26 23:11:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 975494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42LDGd0DN2z9rxp for ; Thu, 27 Sep 2018 09:11:53 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 44E2310FD; Wed, 26 Sep 2018 23:11:50 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8E70910F3 for ; Wed, 26 Sep 2018 23:11:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id F284925A for ; Wed, 26 Sep 2018 23:11:48 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id F0BE7FF80E; Wed, 26 Sep 2018 23:11:45 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Wed, 26 Sep 2018 16:11:40 -0700 Message-Id: <20180926231140.9550-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] ofproto: Fix build with some GCC versions. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org GCC 4.8.x and possibly other versions don't like a designated initializer for an anonymous struct, see e.g. https://travis-ci.org/openvswitch/ovs/jobs/433747674 Fixes: f836888d28ec ("ofproto: Handle OpenFlow version mismatch for requestforward with groups.") Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- ofproto/ofproto.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index a8cc4751f8c9..0f8d74747851 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -7393,13 +7393,12 @@ ofproto_group_mod_finish(struct ofproto *ofproto, remove_groups_postponed(&ogm->old_groups); if (req) { - struct ofputil_requestforward rf = { - .xid = req->request->xid, - .reason = OFPRFR_GROUP_MOD, - .group_mod = &ogm->gm, - .new_buckets = new_group ? &new_group->buckets : NULL, - .group_existed = group_collection_n(&ogm->old_groups) > 0, - }; + struct ofputil_requestforward rf; + rf.xid = req->request->xid; + rf.reason = OFPRFR_GROUP_MOD; + rf.group_mod = &ogm->gm; + rf.new_buckets = new_group ? &new_group->buckets : NULL; + rf.group_existed = group_collection_n(&ogm->old_groups) > 0; connmgr_send_requestforward(ofproto->connmgr, req->ofconn, &rf); } }