From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id E3D30293C for ; Wed, 30 Mar 2016 18:47:41 +0200 (CEST) Received: by mail-pf0-f177.google.com with SMTP id x3so47299123pfb.1 for ; Wed, 30 Mar 2016 09:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r6D7+CrNwQ7GMxosnGbpx2UMmuTSRTeFc57tAJRK9fc=; b=BioUQrhtc5wsPwANu0xdYlDlO7gLV4N7lW+JshXNylKCRKsgiLOk350BMgFP0n5/s2 a87lsum9OzQXzvzW/JsFrXf5SNsOngFDlgM8vQSWC3s6GZf3+G+EQJTSJ7H92n5ZKC6L gG/U5GDbx9KKRphX0Si6ZHJRQli7kbgG9Rki4vJBoPeUuUgExWMDfeimX0vUhDAkaEJK Iuvppj5H1QuAZVM2K/bQx9lHQtyJzDmKviJOqGrlorYy4qlVbFgdepnA9Y36HnJHyd72 fWrZf91JTDCeZuNhqvQbJf7UQY6SIwZ182K5MwtvR4/4pjbKuOIrpkB7qWgoNuEsRLDl AitQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r6D7+CrNwQ7GMxosnGbpx2UMmuTSRTeFc57tAJRK9fc=; b=R83HktfP2RP83DCCzF26UlssKa9Nog9Od6DG8xmssSdV+w2joSnA6JiHpj3iJAcYcA xtA/X4OHgHuX9l3o1jvwato4Ow7Wj/UkAZpvn3jAPtXpaeKge8IsOAeqLn87LidPSwAL lE7sQvZCftXg+S1yJ44DknirFkNs+IXU+AdWcGjEPx3aCAvphZxCw7YS3vDdwC03GDzZ A4qaTUiGvYC3qnk8nTZA9vQg4OzLHfJWrDuPd4tsKDft0Sw59PW7RvmRlabXSCColx11 2nGczTBHL9An2lbcfDVynO/FzBpTDF5AQng6HF8rTDXbEA0yCVk5smKsO+1LUdjbM4jt JLXw== X-Gm-Message-State: AD7BkJI+KwDbFOI+PDniFTdfQk9zaw7yWsCyvwssbgqpOQSmTLmIuhxzxfSUj/egOJgSNA== X-Received: by 10.98.34.200 with SMTP id p69mr14677926pfj.114.1459356461332; Wed, 30 Mar 2016 09:47:41 -0700 (PDT) Received: from xeon-e3 (static-50-53-73-178.bvtn.or.frontiernet.net. [50.53.73.178]) by smtp.gmail.com with ESMTPSA id l11sm7166375pfb.56.2016.03.30.09.47.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Mar 2016 09:47:41 -0700 (PDT) Date: Wed, 30 Mar 2016 09:47:57 -0700 From: Stephen Hemminger To: Rasesh Mody Cc: , , , , , Message-ID: <20160330094757.253c012a@xeon-e3> In-Reply-To: <1459315705-25001-6-git-send-email-rasesh.mody@qlogic.com> References: <1459315705-25001-1-git-send-email-rasesh.mody@qlogic.com> <1459315705-25001-6-git-send-email-rasesh.mody@qlogic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 05/10] qede: Add core driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 16:47:42 -0000 On Tue, 29 Mar 2016 22:28:20 -0700 Rasesh Mody wrote: > +static void qede_config_accept_any_vlan(struct qede_dev *qdev, bool action) > +{ > + struct ecore_dev *edev = &qdev->edev; > + struct qed_update_vport_params params; > + int rc; > + > + /* Proceed only if action actually needs to be performed */ > + if (qdev->accept_any_vlan == action) > + return; > + > + memset(¶ms, 0, sizeof(params)); > + > + params.vport_id = 0; > + params.accept_any_vlan = action; > + params.update_accept_any_vlan_flg = 1; Minor nit. A lot of this code uses memset() then sets structure elements. Why not just use C99 style initialization: struct qed_update_vport_params params = { .vport_id = 0, .accept_any_vlan = action, .update_accept_any_vlan = 1, };