Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149251378
D12223.id32637.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D12223.id32637.diff
View Options
Index: bnxt_hwrm.h
===================================================================
--- bnxt_hwrm.h
+++ bnxt_hwrm.h
@@ -61,7 +61,7 @@
uint32_t hash_type);
int bnxt_hwrm_func_cfg(struct bnxt_softc *softc);
int bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc,
- struct bnxt_vnic_info *vnic, uint32_t flags);
+ struct bnxt_vnic_info *vnic, bool enable_tpa);
int bnxt_hwrm_nvm_find_dir_entry(struct bnxt_softc *softc, uint16_t type,
uint16_t *ordinal, uint16_t ext, uint16_t *index, bool use_index,
uint8_t search_opt, uint32_t *data_length, uint32_t *item_length,
Index: bnxt_hwrm.c
===================================================================
--- bnxt_hwrm.c
+++ bnxt_hwrm.c
@@ -921,27 +921,29 @@
int
bnxt_hwrm_vnic_tpa_cfg(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic,
- uint32_t flags)
+ bool enable_tpa)
{
struct hwrm_vnic_tpa_cfg_input req = {0};
+ uint32_t flags;
bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_VNIC_TPA_CFG);
- req.flags = htole32(flags);
+ if (enable_tpa) {
+ flags = HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA |
+ HWRM_VNIC_TPA_CFG_INPUT_FLAGS_ENCAP_TPA |
+ HWRM_VNIC_TPA_CFG_INPUT_FLAGS_RSC_WND_UPDATE |
+ HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN |
+ HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ;
+ req.flags = htole32(flags);
+ 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(HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX);
+ req.max_aggs = htole16(HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX);
+ req.min_agg_len = htole32(512);
+ }
+
req.vnic_id = htole16(vnic->id);
- 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_MAX_AGG_TIMER | */
- HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN);
- /* TODO: Calculate this based on ring size? */
- req.max_agg_segs = htole16(3);
- /* Base this in the allocated TPA start size... */
- req.max_aggs = htole16(7);
- /*
- * TODO: max_agg_timer?
- * req.mag_agg_timer = htole32(XXX);
- */
- req.min_agg_len = htole32(0);
return hwrm_send_message(softc, &req, sizeof(req));
}
Index: if_bnxt.c
===================================================================
--- if_bnxt.c
+++ if_bnxt.c
@@ -1018,15 +1018,8 @@
if (rc)
goto fail;
- /*
- * Enable LRO/TPA/GRO
- * TBD:
- * Enable / Disable HW_LRO based on
- * ifconfig lro / ifconfig -lro setting
- */
rc = bnxt_hwrm_vnic_tpa_cfg(softc, &softc->vnic_info,
- (if_getcapenable(iflib_get_ifp(ctx)) & IFCAP_LRO) ?
- HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA : 0);
+ (if_getcapenable(iflib_get_ifp(ctx)) & IFCAP_LRO) ? true : false);
if (rc)
goto fail;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 24, 7:20 AM (1 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30235956
Default Alt Text
D12223.id32637.diff (2 KB)
Attached To
Mode
D12223: bnxt: Choose correct Firmware options of HW LRO for best performance
Attached
Detach File
Event Timeline
Log In to Comment