[dpdk-dev] [PATCH v4 05/10] qede: Add core driver
Stephen Hemminger
stephen at networkplumber.org
Wed Mar 30 18:47:57 CEST 2016
On Tue, 29 Mar 2016 22:28:20 -0700
Rasesh Mody <rasesh.mody at qlogic.com> 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,
};
More information about the dev
mailing list