Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bnxt/bnxt_hwrm.c
Context not available. | |||||
return hwrm_send_message(softc, &req, sizeof(req)); | return hwrm_send_message(softc, &req, sizeof(req)); | ||||
} | } | ||||
void | |||||
bnxt_validate_hw_lro_settings(struct bnxt_softc *softc) | |||||
{ | |||||
softc->hw_lro.enable = min(softc->hw_lro.enable, 1); | |||||
softc->hw_lro.is_mode_gro = min(softc->hw_lro.is_mode_gro, 1); | |||||
softc->hw_lro.max_agg_segs = min(softc->hw_lro.max_agg_segs, | |||||
HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX); | |||||
softc->hw_lro.max_aggs = min(softc->hw_lro.max_aggs, | |||||
HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX); | |||||
softc->hw_lro.min_agg_len = min(softc->hw_lro.min_agg_len, BNXT_MAX_MTU); | |||||
} | |||||
int | int | ||||
bhargava.marreddy_broadcom.com: Stephen,
I assumed that based on max MTU which is 9000. | |||||
Done Inline ActionsShould use BNXT_MAX_MTU then. shurd: Should use BNXT_MAX_MTU then. | |||||
Not Done Inline ActionsTaken care!! bhargava.marreddy_broadcom.com: Taken care!! | |||||
bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic, | bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc) | ||||
uint32_t flags) | |||||
{ | { | ||||
struct hwrm_vnic_tpa_cfg_input req = {0}; | struct hwrm_vnic_tpa_cfg_input req = {0}; | ||||
uint32_t flags; | |||||
bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_TPA_CFG); | bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_TPA_CFG); | ||||
req.flags = htole32(flags); | if (softc->hw_lro.enable) { | ||||
req.vnic_id = htole16(vnic->id); | flags = HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA | | ||||
req.enables = htole32(HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS | | HWRM_VNIC_TPA_CFG_INPUT_FLAGS_ENCAP_TPA | | ||||
HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS | | HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN | | ||||
/* HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_TIMER | */ | HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ; | ||||
HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN); | |||||
/* TODO: Calculate this based on ring size? */ | if (softc->hw_lro.is_mode_gro) | ||||
req.max_agg_segs = htole16(3); | flags |= HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO; | ||||
/* Base this in the allocated TPA start size... */ | else | ||||
req.max_aggs = htole16(7); | flags |= HWRM_VNIC_TPA_CFG_INPUT_FLAGS_RSC_WND_UPDATE; | ||||
/* | |||||
* TODO: max_agg_timer? | req.flags = htole32(flags); | ||||
* req.mag_agg_timer = htole32(XXX); | |||||
*/ | |||||
req.min_agg_len = htole32(0); | |||||
req.enables = htole32(HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS | | |||||
HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS | | |||||
HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN); | |||||
req.max_agg_segs = htole16(softc->hw_lro.max_agg_segs); | |||||
req.max_aggs = htole16(softc->hw_lro.max_aggs); | |||||
req.min_agg_len = htole32(softc->hw_lro.min_agg_len); | |||||
} | |||||
req.vnic_id = htole16(softc->vnic_info.id); | |||||
return hwrm_send_message(softc, &req, sizeof(req)); | return hwrm_send_message(softc, &req, sizeof(req)); | ||||
} | } | ||||
Context not available. |
Stephen,