mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
qcacld-3.0: Do not aggregate checksum failure packets in FISA
When MSDU fails for checksum validation, do not aggregate those packets and make sure current flow is flushed. Since checksum failure packet data is not trust worthy it is not advisable to build aggregated skb on top of checksum failure packets. Change-Id: I09d8c4aeb656e6b0b5d268a60d72147534f2a2ab CRs-Fixed: 3805053
This commit is contained in:
parent
1f9eea707a
commit
40ef76f8a2
1 changed files with 11 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -1607,7 +1607,16 @@ static bool dp_fisa_aggregation_should_stop(
|
|||
HAL_RX_TLV_GET_TCP_OFFSET(rx_tlv_hdr);
|
||||
uint32_t cumulative_ip_len_delta = hal_cumulative_ip_len -
|
||||
fisa_flow->hal_cumultive_ip_len;
|
||||
bool ip_csum_err = hal_rx_attn_ip_cksum_fail_get(rx_tlv_hdr);
|
||||
bool tcp_udp_csum_er = hal_rx_attn_tcp_udp_cksum_fail_get(rx_tlv_hdr);
|
||||
|
||||
/**
|
||||
* If l3/l4 checksum validation failed for MSDU, then data
|
||||
* is not trust worthy to build aggregated skb, so do not
|
||||
* allow for aggregation. And also in aggregated case it
|
||||
* is job of driver to make sure checksum is valid before
|
||||
* computing partial checksum for final aggregated skb.
|
||||
*
|
||||
* kernel network panic if UDP data length < 12 bytes get aggregated,
|
||||
* no solid conclusion currently, as a SW WAR, only allow UDP
|
||||
* aggregation if UDP data length >= 16 bytes.
|
||||
|
|
@ -1620,6 +1629,7 @@ static bool dp_fisa_aggregation_should_stop(
|
|||
* otherwise, current fisa flow aggregation should be stopped.
|
||||
*/
|
||||
if (fisa_flow->do_not_aggregate ||
|
||||
(ip_csum_err || tcp_udp_csum_er) ||
|
||||
msdu_len < (l4_hdr_offset + FISA_MIN_L4_AND_DATA_LEN) ||
|
||||
hal_cumulative_ip_len <= fisa_flow->hal_cumultive_ip_len ||
|
||||
cumulative_ip_len_delta > FISA_MAX_SINGLE_CUMULATIVE_IP_LEN ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue