qcacmn: Refactor fisa packet history for BE

Refactor FISA packet history to not access "struct rx_pkt_tlvs". This is
because this structure may be different for Li and BE chips and should
not be accessed directly and only via hal_soc->ops in common code.

CRs-Fixed: 2888556
Change-Id: I0d9f2785a81c130a2dc506020a02ee5581c0bbd3
This commit is contained in:
Mohit Khanna
2021-04-20 22:50:23 -07:00
committed by Rakesh Pillai
parent fa29d164f6
commit 89270803f3
4 changed files with 27 additions and 36 deletions

View File

@@ -1152,7 +1152,6 @@ void dp_rx_fill_gro_info(struct dp_soc *soc, uint8_t *rx_tlv,
if (!wlan_cfg_is_gro_enabled(soc->wlan_cfg_ctx)) if (!wlan_cfg_is_gro_enabled(soc->wlan_cfg_ctx))
return; return;
/* Filling up RX offload info only for TCP packets */
if (hal_rx_tlv_get_offload_info(soc->hal_soc, rx_tlv, &offload_info)) if (hal_rx_tlv_get_offload_info(soc->hal_soc, rx_tlv, &offload_info))
return; return;

View File

@@ -3291,23 +3291,15 @@ enum fisa_aggr_ret {
FISA_FLUSH_FLOW FISA_FLUSH_FLOW
}; };
/**
* struct fisa_pkt_hist_elem - FISA Packet history element
* @ts: timestamp indicating when the packet was received by FISA framework.
* @tlvs: record of TLVS for the packet coming to FISA framework
*/
struct fisa_pkt_hist_elem {
qdf_time_t ts;
struct rx_pkt_tlvs tlvs;
};
/** /**
* struct fisa_pkt_hist - FISA Packet history structure * struct fisa_pkt_hist - FISA Packet history structure
* @hist_elem: array of hist elements * @tlv_hist: array of TLV history
* @ts: array of timestamps of fisa packets
* @idx: index indicating the next location to be used in the array. * @idx: index indicating the next location to be used in the array.
*/ */
struct fisa_pkt_hist { struct fisa_pkt_hist {
struct fisa_pkt_hist_elem hist_elem[FISA_FLOW_MAX_AGGR_COUNT]; uint8_t *tlv_hist;
qdf_time_t ts_hist[FISA_FLOW_MAX_AGGR_COUNT];
uint32_t idx; uint32_t idx;
}; };
@@ -3359,7 +3351,7 @@ struct dp_fisa_rx_sw_ft {
qdf_time_t flow_init_ts; qdf_time_t flow_init_ts;
qdf_time_t last_accessed_ts; qdf_time_t last_accessed_ts;
#ifdef WLAN_SUPPORT_RX_FISA_HIST #ifdef WLAN_SUPPORT_RX_FISA_HIST
struct fisa_pkt_hist *pkt_hist; struct fisa_pkt_hist pkt_hist;
#endif #endif
}; };

View File

@@ -1602,20 +1602,21 @@ hal_rx_tlv_get_offload_info_be(uint8_t *rx_tlv,
struct hal_offload_info *offload_info) struct hal_offload_info *offload_info)
{ {
struct rx_pkt_tlvs *rx_pkt_tlvs = (struct rx_pkt_tlvs *)rx_tlv; struct rx_pkt_tlvs *rx_pkt_tlvs = (struct rx_pkt_tlvs *)rx_tlv;
offload_info->tcp_proto = HAL_RX_TLV_GET_TCP_PROTO(rx_pkt_tlvs);
if (!offload_info->tcp_proto)
return -EINVAL;
offload_info->lro_eligible = HAL_RX_TLV_GET_LRO_ELIGIBLE(rx_pkt_tlvs); offload_info->lro_eligible = HAL_RX_TLV_GET_LRO_ELIGIBLE(rx_pkt_tlvs);
offload_info->tcp_pure_ack = HAL_RX_TLV_GET_TCP_PURE_ACK(rx_pkt_tlvs);
offload_info->ipv6_proto = HAL_RX_TLV_GET_IPV6(rx_pkt_tlvs);
offload_info->tcp_offset = HAL_RX_TLV_GET_TCP_OFFSET(rx_pkt_tlvs);
offload_info->tcp_win = HAL_RX_TLV_GET_TCP_WIN(rx_pkt_tlvs);
offload_info->tcp_seq_num = HAL_RX_TLV_GET_TCP_SEQ(rx_pkt_tlvs);
offload_info->tcp_ack_num = HAL_RX_TLV_GET_TCP_ACK(rx_pkt_tlvs);
offload_info->flow_id = HAL_RX_TLV_GET_FLOW_ID_TOEPLITZ(rx_pkt_tlvs); offload_info->flow_id = HAL_RX_TLV_GET_FLOW_ID_TOEPLITZ(rx_pkt_tlvs);
offload_info->ipv6_proto = HAL_RX_TLV_GET_IPV6(rx_pkt_tlvs);
offload_info->tcp_proto = HAL_RX_TLV_GET_TCP_PROTO(rx_pkt_tlvs);
if (offload_info->tcp_proto) {
offload_info->tcp_pure_ack =
HAL_RX_TLV_GET_TCP_PURE_ACK(rx_pkt_tlvs);
offload_info->tcp_offset =
HAL_RX_TLV_GET_TCP_OFFSET(rx_pkt_tlvs);
offload_info->tcp_win = HAL_RX_TLV_GET_TCP_WIN(rx_pkt_tlvs);
offload_info->tcp_seq_num = HAL_RX_TLV_GET_TCP_SEQ(rx_pkt_tlvs);
offload_info->tcp_ack_num = HAL_RX_TLV_GET_TCP_ACK(rx_pkt_tlvs);
}
return 0; return 0;
} }

View File

@@ -430,20 +430,19 @@ static int
hal_rx_tlv_get_offload_info_li(uint8_t *rx_tlv, hal_rx_tlv_get_offload_info_li(uint8_t *rx_tlv,
struct hal_offload_info *offload_info) struct hal_offload_info *offload_info)
{ {
offload_info->flow_id = HAL_RX_TLV_GET_FLOW_ID_TOEPLITZ(rx_tlv);
offload_info->ipv6_proto = HAL_RX_TLV_GET_IPV6(rx_tlv);
offload_info->lro_eligible = HAL_RX_TLV_GET_LRO_ELIGIBLE(rx_tlv);
offload_info->tcp_proto = HAL_RX_TLV_GET_TCP_PROTO(rx_tlv); offload_info->tcp_proto = HAL_RX_TLV_GET_TCP_PROTO(rx_tlv);
if (!offload_info->tcp_proto) if (offload_info->tcp_proto) {
return -EINVAL; offload_info->tcp_pure_ack =
HAL_RX_TLV_GET_TCP_PURE_ACK(rx_tlv);
offload_info->lro_eligible = HAL_RX_TLV_GET_LRO_ELIGIBLE(rx_tlv); offload_info->tcp_offset = HAL_RX_TLV_GET_TCP_OFFSET(rx_tlv);
offload_info->tcp_pure_ack = HAL_RX_TLV_GET_TCP_PURE_ACK(rx_tlv); offload_info->tcp_win = HAL_RX_TLV_GET_TCP_WIN(rx_tlv);
offload_info->ipv6_proto = HAL_RX_TLV_GET_IPV6(rx_tlv); offload_info->tcp_seq_num = HAL_RX_TLV_GET_TCP_SEQ(rx_tlv);
offload_info->tcp_offset = HAL_RX_TLV_GET_TCP_OFFSET(rx_tlv); offload_info->tcp_ack_num = HAL_RX_TLV_GET_TCP_ACK(rx_tlv);
offload_info->tcp_win = HAL_RX_TLV_GET_TCP_WIN(rx_tlv); }
offload_info->tcp_seq_num = HAL_RX_TLV_GET_TCP_SEQ(rx_tlv);
offload_info->tcp_ack_num = HAL_RX_TLV_GET_TCP_ACK(rx_tlv);
offload_info->flow_id = HAL_RX_TLV_GET_FLOW_ID_TOEPLITZ(rx_tlv);
return 0; return 0;
} }