From patchwork Fri Sep 11 01:30:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 77259 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 92B11A04B7; Fri, 11 Sep 2020 03:27:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 590CD1C0DA; Fri, 11 Sep 2020 03:26:50 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 13D071C0CE for ; Fri, 11 Sep 2020 03:26:46 +0200 (CEST) IronPort-SDR: NmeRvLY8jC0tdBsbaI3giwpx3Wq+Fb7BFfT6DyR9QAmMAhIgAj2J/I431tNEPfiP6wOHQv8ykO 2WB0FKkwiB6Q== X-IronPort-AV: E=McAfee;i="6000,8403,9740"; a="159614186" X-IronPort-AV: E=Sophos;i="5.76,413,1592895600"; d="scan'208";a="159614186" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 18:26:46 -0700 IronPort-SDR: cvykOpwvuRZoNYZMuWXwFSXijiqmAawk6+PtTOlvXayIWIjfqO4MFbo5L/I3hhqKuJmKtIr8VE KXJYMvMn5xHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,413,1592895600"; d="scan'208";a="334362170" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by orsmga008.jf.intel.com with ESMTP; 10 Sep 2020 18:26:45 -0700 From: Qi Zhang To: beilei.xing@intel.com Cc: dev@dpdk.org, Qi Zhang , Brett Creeley Date: Fri, 11 Sep 2020 09:30:36 +0800 Message-Id: <20200911013038.19744-4-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200911013038.19744-1-qi.z.zhang@intel.com> References: <20200911013038.19744-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH 3/5] common/iavf: save max MTU received from PF 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" Most values from the VIRTCHNL_OP_GET_VF_RESOURCES are stored in the iavf_hw_capabilities structure. Unfortunately, it seems that max_mtu was missed. Add this member to the structure and save it when parsing hw config. Signed-off-by: Brett Creeley Signed-off-by: Qi Zhang --- drivers/common/iavf/iavf_common.c | 1 + drivers/common/iavf/iavf_type.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/common/iavf/iavf_common.c b/drivers/common/iavf/iavf_common.c index 57ec1ff39..c951b7d78 100644 --- a/drivers/common/iavf/iavf_common.c +++ b/drivers/common/iavf/iavf_common.c @@ -975,6 +975,7 @@ void iavf_vf_parse_hw_config(struct iavf_hw *hw, hw->dev_caps.num_msix_vectors_vf = msg->max_vectors; hw->dev_caps.dcb = msg->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_L2; + hw->dev_caps.max_mtu = msg->max_mtu; for (i = 0; i < msg->num_vsis; i++) { if (vsi_res->vsi_type == VIRTCHNL_VSI_SRIOV) { iavf_memcpy(hw->mac.perm_addr, diff --git a/drivers/common/iavf/iavf_type.h b/drivers/common/iavf/iavf_type.h index 665b070a0..0990c9aa3 100644 --- a/drivers/common/iavf/iavf_type.h +++ b/drivers/common/iavf/iavf_type.h @@ -224,6 +224,7 @@ struct iavf_hw_capabilities { u32 num_tx_qp; u32 base_queue; u32 num_msix_vectors_vf; + u32 max_mtu; bool apm_wol_support; enum iavf_acpi_programming_method acpi_prog_method; bool proxy_support;