From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5DA1A0523; Thu, 2 Jul 2020 05:32:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87EA11D646; Thu, 2 Jul 2020 05:31:10 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3B9801D665 for ; Thu, 2 Jul 2020 05:31:08 +0200 (CEST) IronPort-SDR: OvyFfHcOZEIEvx2YtgbAlcRnq05JQh8FcfIBS6l0+GWv4dn+vJKTU+7ZbxVi7OQzA1p7Zj+/Ap enyZ9EaXAILQ== X-IronPort-AV: E=McAfee;i="6000,8403,9669"; a="144300656" X-IronPort-AV: E=Sophos;i="5.75,302,1589266800"; d="scan'208";a="144300656" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 20:31:07 -0700 IronPort-SDR: EbUVSrT/4YHfTXZdJs8EJ1i82kzkVHP8BUP6zkmZzL/PlLieFULskPgjW1GGJ15NDpDDID/K+F nFGSYu1Jf1MQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,302,1589266800"; d="scan'208";a="295751607" Received: from intel.sh.intel.com ([10.239.255.18]) by orsmga002.jf.intel.com with ESMTP; 01 Jul 2020 20:31:05 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Jeff Guo , Zhao1 Wei , Guinan Sun , Krzysztof Galazka , Piotr Pietruszewski Date: Thu, 2 Jul 2020 03:13:23 +0000 Message-Id: <20200702031329.4495-15-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200702031329.4495-1-guinanx.sun@intel.com> References: <20200612032410.20864-1-guinanx.sun@intel.com> <20200702031329.4495-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 14/20] net/ixgbe/base: initialize data field in struct buffer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" While sending request using ixgbe_hic_unlocked() the data field in buffer struct is not used. It is set when the struct is overwritten by FW to deliver the response. To not pass random data to FW the whole structure should be zeroed before use. Signed-off-by: Krzysztof Galazka Signed-off-by: Piotr Pietruszewski Signed-off-by: Guinan Sun --- drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index d3363ff1d..8343efbc2 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -3126,6 +3126,7 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) /* one word */ buffer.length = IXGBE_CPU_TO_BE16(sizeof(u16)); buffer.pad2 = 0; + buffer.data = 0; buffer.pad3 = 0; status = hw->mac.ops.acquire_swfw_sync(hw, mask); @@ -3186,6 +3187,7 @@ s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, buffer.address = IXGBE_CPU_TO_BE32((offset + current_word) * 2); buffer.length = IXGBE_CPU_TO_BE16(words_to_read * 2); buffer.pad2 = 0; + buffer.data = 0; buffer.pad3 = 0; status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer), -- 2.17.1