net/virtio: fix Tx checksum offloads
[dpdk.git] / drivers / net / bnxt / bnxt_hwrm.c
index 018113c..c777c73 100644 (file)
@@ -859,6 +859,10 @@ int bnxt_hwrm_func_reserve_vf_resc(struct bnxt *bp, bool test)
                req.num_rsscos_ctxs = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_RSS_CTX);
                req.num_l2_ctxs = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_L2_CTX);
                req.num_vnics = rte_cpu_to_le_16(BNXT_VF_RSV_NUM_VNIC);
+       } else if (bp->vf_resv_strategy ==
+                  HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL) {
+               enables |= HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS;
+               req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx);
        }
 
        if (test)
@@ -2952,7 +2956,8 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)
        }
 
        req.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags);
-       req.mtu = rte_cpu_to_le_16(BNXT_MAX_MTU);
+       req.mtu = rte_cpu_to_le_16(RTE_MIN(bp->eth_dev->data->mtu,
+                                          BNXT_MAX_MTU)); //FW adds hdr sizes
        req.mru = rte_cpu_to_le_16(BNXT_VNIC_MRU(bp->eth_dev->data->mtu));
        req.num_rsscos_ctxs = rte_cpu_to_le_16(bp->max_rsscos_ctx);
        req.num_stat_ctxs = rte_cpu_to_le_16(bp->max_stat_ctx);