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 <brett.cree...@intel.com>
Signed-off-by: Qi Zhang <qi.z.zh...@intel.com>
---
 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;
-- 
2.13.6

Reply via email to