Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp586966pxb; Wed, 3 Mar 2021 10:07:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJznhKyQezM+ifWQ/sqdoPBPwqEq979p+S+B+G++KgIYuSecsuKbo8fb8SUlmsN5ht3phmqt X-Received: by 2002:a17:906:3899:: with SMTP id q25mr45846ejd.157.1614794840700; Wed, 03 Mar 2021 10:07:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614794840; cv=none; d=google.com; s=arc-20160816; b=s4HFyUyJd0gM3oI/D109hJ2nc7EedGnAr2wcSmLK1I5NSDXQE3PJ4LS3J5cX4IiJKS qJ19Lazn3cYCe84W/V1RHCTSM0Et4o3hZ2g9KgdltEOe56r5enQ/KL3OI8Qf483qDhSO l/VS51hXBpyYgfbN4yGFl5KyGDOX7RtISXixG7StNT4hFQdxNZ59hPkZA0v4XcMDtiTC uGYEMBWM1/5pjph9AqEjsBJIef5jQz/QXP1SAoIXg1KNQPf1zv/V7MjAlFTfG10tC0SY UbEWfG28CiYcUS0i5G7cKZvPAGIS98hppewD6uhhpkow3yI9U4WPSG293XR0PEgevvrz p4ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5krk3V6q+jnFk4nBfrynaiX/uvt95PjWfygxWyXqUUE=; b=qyM5GQmD+m8JLutdzejqnbrHHc0+lM3BKyETnzCqT34xHBdknBNwdJlf/dQ1zgIt3w yoBLVm4MugWK9TG7GC7UD6i55YLHsEZmVTh1QfQnAebw0Wy3kMHpJfiAuUUbj2H0KFRx oSEa0Ar7Q5ydvaARqDB1O7ONwfSCxVYo+8DoaSNNXWgsSX0KIIxYOaitTTW1mMBYkjvr EQRnk1TY64CikSO827kQsS5gepJdhpwGdZU1JJAjmkvp5luIqfAgNhlJhosiMe39sdb4 WCA9LByuslpuLcz3Ewv/ZmVil+N8HPEK5Vhpe4ckVVG0koZ/C+P8Evl435lVaB2lueo8 RlEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GXFr7hbJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si9304397ejz.464.2021.03.03.10.06.20; Wed, 03 Mar 2021 10:07:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GXFr7hbJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345507AbhCBBBV (ORCPT + 99 others); Mon, 1 Mar 2021 20:01:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:57866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240506AbhCASvm (ORCPT ); Mon, 1 Mar 2021 13:51:42 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3F16A6521D; Mon, 1 Mar 2021 17:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619382; bh=BaMT1W2QKF/Ej5o8voNVnRg3XEAvWOyRn/mZhTTy/9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GXFr7hbJHcnMEDHJXamUeftKFnI1yRLx1vEsrgx9NakUI+h4cqreEhO7HMyKrs1rw biZA5hzdgb0vF4Zy5H4x997Jmkpse8I7erH6g931cemv7ynz1umgdxN32NWePBERPd fQha7JWMnwaTMNXWg0Yl4C00Eke6Nfn5MjfSik+w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Andrzej=20Sawu=C5=82a?= , Mateusz Palczewski , Arkadiusz Kubalewski , Aleksandr Loktionov , Tony Brelinski , Tony Nguyen , Sasha Levin Subject: [PATCH 5.10 435/663] i40e: Add zero-initialization of AQ command structures Date: Mon, 1 Mar 2021 17:11:23 +0100 Message-Id: <20210301161203.414581837@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mateusz Palczewski [ Upstream commit d2c788f739b6f68090e968a2ee31b543701e795f ] 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 Signed-off-by: Mateusz Palczewski Reviewed-by: Arkadiusz Kubalewski Reviewed-by: Aleksandr Loktionov Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- 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 1db482d310c2d..9b1251a710c09 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.27.0