netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: "Mateusz Palczewski" <mateusz.palczewski@intel.com>,
	netdev@vger.kernel.org, sassmann@redhat.com,
	anthony.l.nguyen@intel.com,
	"Andrzej Sawuła" <andrzej.sawula@intel.com>,
	"Arkadiusz Kubalewski" <arkadiusz.kubalewski@intel.com>,
	"Aleksandr Loktionov" <aleksandr.loktionov@intel.com>,
	"Tony Brelinski" <tonyx.brelinski@intel.com>
Subject: [PATCH net v2 3/8] i40e: Add zero-initialization of AQ command structures
Date: Fri, 19 Feb 2021 13:36:01 -0800	[thread overview]
Message-ID: <20210219213606.2567536-4-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210219213606.2567536-1-anthony.l.nguyen@intel.com>

From: Mateusz Palczewski <mateusz.palczewski@intel.com>

Zero-initialize AQ command data structures to comply with
API specifications.

Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
Fixes: f4492db16df8 ("i40e: Add NPAR BW get and set functions")
Signed-off-by: Andrzej Sawuła <andrzej.sawula@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 84916261f5df..90c6c991aebc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7667,6 +7667,8 @@ int i40e_add_del_cloud_filter(struct i40e_vsi *vsi,
 	if (filter->flags >= ARRAY_SIZE(flag_table))
 		return I40E_ERR_CONFIG;
 
+	memset(&cld_filter, 0, sizeof(cld_filter));
+
 	/* copy element needed to add cloud filter from filter */
 	i40e_set_cld_element(filter, &cld_filter);
 
@@ -7734,6 +7736,8 @@ int i40e_add_del_cloud_filter_big_buf(struct i40e_vsi *vsi,
 	    !ipv6_addr_any(&filter->ip.v6.src_ip6))
 		return -EOPNOTSUPP;
 
+	memset(&cld_filter, 0, sizeof(cld_filter));
+
 	/* copy element needed to add cloud filter from filter */
 	i40e_set_cld_element(filter, &cld_filter.element);
 
@@ -11709,6 +11713,8 @@ i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf)
 	struct i40e_aqc_configure_partition_bw_data bw_data;
 	i40e_status status;
 
+	memset(&bw_data, 0, sizeof(bw_data));
+
 	/* Set the valid bit for this PF */
 	bw_data.pf_valid_bits = cpu_to_le16(BIT(pf->hw.pf_id));
 	bw_data.max_bw[pf->hw.pf_id] = pf->max_bw & I40E_ALT_BW_VALUE_MASK;
-- 
2.26.2


  parent reply	other threads:[~2021-02-19 21:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 21:35 [PATCH net v2 0/8][pull request] Intel Wired LAN Driver Updates 2021-02-19 Tony Nguyen
2021-02-19 21:35 ` [PATCH net v2 1/8] i40e: Fix flow for IPv6 next header (extension header) Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 2/8] i40e: Fix memory leak in i40e_probe Tony Nguyen
2021-02-19 21:36 ` Tony Nguyen [this message]
2021-02-19 21:36 ` [PATCH net v2 4/8] i40e: Fix overwriting flow control settings during driver loading Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 5/8] i40e: Fix addition of RX filters after enabling FW LLDP agent Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 6/8] i40e: Fix VFs not created Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 7/8] i40e: Fix add TC filter for IPv6 Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 8/8] i40e: Fix endianness conversions Tony Nguyen
2021-02-23  3:20 ` [PATCH net v2 0/8][pull request] Intel Wired LAN Driver Updates 2021-02-19 patchwork-bot+netdevbpf

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=20210219213606.2567536-4-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrzej.sawula@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mateusz.palczewski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --cc=tonyx.brelinski@intel.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).