qcacmn: Add verbose log for RX frame dropping
Now only error counter is present in normal datapath RX frame dropping. This change add verbose log for easy debug. CRs-Fixed: 3706290 Change-Id: Iae2fb9f6100109173921c4f1d43258a0722dc0de
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-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
|
||||
@@ -641,6 +641,7 @@ done:
|
||||
dp_rx_prefetch_nbuf_data_be(nbuf, next);
|
||||
if (qdf_unlikely(dp_rx_is_raw_frame_dropped(nbuf))) {
|
||||
nbuf = next;
|
||||
dp_verbose_debug("drop raw frame");
|
||||
DP_STATS_INC(soc, rx.err.raw_frm_drop, 1);
|
||||
continue;
|
||||
}
|
||||
@@ -663,6 +664,7 @@ done:
|
||||
tid = qdf_nbuf_get_tid_val(nbuf);
|
||||
if (qdf_unlikely(tid >= CDP_MAX_DATA_TIDS)) {
|
||||
DP_STATS_INC(soc, rx.err.rx_invalid_tid_err, 1);
|
||||
dp_verbose_debug("drop invalid tid");
|
||||
dp_rx_nbuf_free(nbuf);
|
||||
nbuf = next;
|
||||
continue;
|
||||
@@ -677,6 +679,7 @@ done:
|
||||
&rx_pdev, &dsf,
|
||||
&old_tid);
|
||||
if (qdf_unlikely(!txrx_peer) || qdf_unlikely(!vdev)) {
|
||||
dp_verbose_debug("drop no peer frame");
|
||||
nbuf = next;
|
||||
continue;
|
||||
}
|
||||
@@ -693,6 +696,7 @@ done:
|
||||
&rx_pdev, &dsf,
|
||||
&old_tid);
|
||||
if (qdf_unlikely(!txrx_peer) || qdf_unlikely(!vdev)) {
|
||||
dp_verbose_debug("drop by unmatch peer_id");
|
||||
nbuf = next;
|
||||
continue;
|
||||
}
|
||||
@@ -859,6 +863,7 @@ done:
|
||||
DP_PEER_PER_PKT_STATS_INC(txrx_peer,
|
||||
rx.peer_unauth_rx_pkt_drop,
|
||||
1, link_id);
|
||||
dp_verbose_debug("drop by unauthorized peer");
|
||||
dp_rx_nbuf_free(nbuf);
|
||||
nbuf = next;
|
||||
continue;
|
||||
@@ -879,6 +884,7 @@ done:
|
||||
(txrx_peer,
|
||||
rx.multipass_rx_pkt_drop,
|
||||
1, link_id);
|
||||
dp_verbose_debug("drop multi pass");
|
||||
dp_rx_nbuf_free(nbuf);
|
||||
nbuf = next;
|
||||
continue;
|
||||
@@ -893,6 +899,7 @@ done:
|
||||
DP_PEER_PER_PKT_STATS_INC(txrx_peer,
|
||||
rx.nawds_mcast_drop,
|
||||
1, link_id);
|
||||
dp_verbose_debug("drop nawds");
|
||||
dp_rx_nbuf_free(nbuf);
|
||||
nbuf = next;
|
||||
continue;
|
||||
|
@@ -1468,10 +1468,12 @@ void DP_PRINT_STATS(const char *fmt, ...);
|
||||
#define DP_TX_HIST_STATS_PER_PDEV()
|
||||
#endif /* DISABLE_DP_STATS */
|
||||
|
||||
#define FRAME_MASK_IPV4_ARP 1
|
||||
#define FRAME_MASK_IPV4_DHCP 2
|
||||
#define FRAME_MASK_IPV4_EAPOL 4
|
||||
#define FRAME_MASK_IPV6_DHCP 8
|
||||
#define FRAME_MASK_IPV4_ARP 0x1
|
||||
#define FRAME_MASK_IPV4_DHCP 0x2
|
||||
#define FRAME_MASK_IPV4_EAPOL 0x4
|
||||
#define FRAME_MASK_IPV6_DHCP 0x8
|
||||
#define FRAME_MASK_DNS_QUERY 0x10
|
||||
#define FRAME_MASK_DNS_RESP 0x20
|
||||
|
||||
static inline int dp_log2_ceil(unsigned int value)
|
||||
{
|
||||
|
@@ -2836,7 +2836,9 @@ void dp_rx_deliver_to_stack_no_peer(struct dp_soc *soc, qdf_nbuf_t nbuf)
|
||||
uint32_t pkt_len = 0;
|
||||
uint8_t *rx_tlv_hdr;
|
||||
uint32_t frame_mask = FRAME_MASK_IPV4_ARP | FRAME_MASK_IPV4_DHCP |
|
||||
FRAME_MASK_IPV4_EAPOL | FRAME_MASK_IPV6_DHCP;
|
||||
FRAME_MASK_IPV4_EAPOL | FRAME_MASK_IPV6_DHCP |
|
||||
FRAME_MASK_DNS_QUERY | FRAME_MASK_DNS_RESP;
|
||||
|
||||
bool is_special_frame = false;
|
||||
struct dp_peer *peer = NULL;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-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
|
||||
@@ -267,7 +267,11 @@ bool dp_rx_is_special_frame(qdf_nbuf_t nbuf, uint32_t frame_mask)
|
||||
((frame_mask & FRAME_MASK_IPV4_EAPOL) &&
|
||||
qdf_nbuf_is_ipv4_eapol_pkt(nbuf)) ||
|
||||
((frame_mask & FRAME_MASK_IPV6_DHCP) &&
|
||||
qdf_nbuf_is_ipv6_dhcp_pkt(nbuf)))
|
||||
qdf_nbuf_is_ipv6_dhcp_pkt(nbuf)) ||
|
||||
((frame_mask & FRAME_MASK_DNS_QUERY) &&
|
||||
qdf_nbuf_data_is_dns_query(nbuf)) ||
|
||||
((frame_mask & FRAME_MASK_DNS_RESP) &&
|
||||
qdf_nbuf_data_is_dns_response(nbuf)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user