qcacld-3.0: Add Rx thread feature support for Dp component
Add Rx thread and Rx refill thread support for DP componentization. Change-Id: I2c0a0f7780280a0c2304f026d2580a81123de312 CRs-Fixed: 3316814
Este cometimento está contido em:

cometido por
Madan Koyyalamudi

ascendente
8211f09db9
cometimento
b81f52931c
@@ -19,7 +19,7 @@
|
||||
#define _WLAN_DP_PREALLOC_H
|
||||
|
||||
#include <wlan_objmgr_psoc_obj.h>
|
||||
#include <dp_rx_thread.h>
|
||||
#include <wlan_dp_rx_thread.h>
|
||||
#include <qdf_trace.h>
|
||||
#include <cdp_txrx_cmn_struct.h>
|
||||
#include <cdp_txrx_cmn.h>
|
||||
@@ -91,8 +91,8 @@ void *dp_prealloc_get_coherent(uint32_t *size, void **base_vaddr_unaligned,
|
||||
/**
|
||||
* dp_prealloc_put_coherent() - puts back pre-alloc DP memory
|
||||
* @size: size of memory to be returned
|
||||
* @base_vaddr_unaligned: Unaligned virtual address.
|
||||
* @paddr_unaligned: Unaligned physical address.
|
||||
* @vaddr_unligned: Unaligned virtual address.
|
||||
* @paddr: Physical address
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
@@ -100,7 +100,7 @@ void dp_prealloc_put_coherent(qdf_size_t size, void *vaddr_unligned,
|
||||
qdf_dma_addr_t paddr);
|
||||
|
||||
/**
|
||||
* dp_prealloc_get_multi_page() - gets pre-alloc DP multi-pages memory
|
||||
* dp_prealloc_get_multi_pages() - gets pre-alloc DP multi-pages memory
|
||||
* @src_type: the source that do memory allocation
|
||||
* @element_size: single element size
|
||||
* @element_num: total number of elements should be allocated
|
||||
@@ -127,7 +127,7 @@ void dp_prealloc_put_multi_pages(uint32_t src_type,
|
||||
|
||||
/**
|
||||
* dp_prealloc_get_consistent_mem_unaligned() - gets pre-alloc unaligned
|
||||
consistent memory
|
||||
* consistent memory
|
||||
* @size: total memory size
|
||||
* @base_addr: pointer to dma address
|
||||
* @ring_type: HAL ring type that requires memory
|
||||
@@ -140,7 +140,7 @@ void *dp_prealloc_get_consistent_mem_unaligned(qdf_size_t size,
|
||||
|
||||
/**
|
||||
* dp_prealloc_put_consistent_mem_unaligned() - puts back pre-alloc unaligned
|
||||
consistent memory
|
||||
* consistent memory
|
||||
* @va_unaligned: memory virtual address pointer
|
||||
*
|
||||
* Return: None
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#include "wlan_dp_cfg.h"
|
||||
#include "wlan_dp_objmgr.h"
|
||||
#include <cdp_txrx_misc.h>
|
||||
#include <dp_rx_thread.h>
|
||||
#include <wlan_dp_rx_thread.h>
|
||||
#include "qdf_periodic_work.h"
|
||||
#include <cds_api.h>
|
||||
#include "pld_common.h"
|
||||
@@ -49,9 +49,9 @@
|
||||
#if defined(WLAN_FEATURE_DP_BUS_BANDWIDTH) && defined(FEATURE_RUNTIME_PM)
|
||||
/**
|
||||
* enum dp_rtpm_tput_policy_state - states to track runtime_pm tput policy
|
||||
* @RTPM_TPUT_POLICY_STATE_INVALID: invalid state
|
||||
* @RTPM_TPUT_POLICY_STATE_REQUIRED: state indicating runtime_pm is required
|
||||
* @RTPM_TPUT_POLICY_STATE_NOT_REQUIRED: state indicating runtime_pm is NOT
|
||||
* @DP_RTPM_TPUT_POLICY_STATE_INVALID: invalid state
|
||||
* @DP_RTPM_TPUT_POLICY_STATE_REQUIRED: state indicating runtime_pm is required
|
||||
* @DP_RTPM_TPUT_POLICY_STATE_NOT_REQUIRED: state indicating runtime_pm is NOT
|
||||
* required
|
||||
*/
|
||||
enum dp_rtpm_tput_policy_state {
|
||||
@@ -77,6 +77,62 @@ struct dp_rtpm_tput_policy_context {
|
||||
|
||||
/**
|
||||
* struct wlan_dp_psoc_cfg - DP configuration parameters.
|
||||
* @tx_orphan_enable: Enable/Disable tx orphan
|
||||
* @rx_mode: rx mode for packet processing
|
||||
* @tx_comp_loop_pkt_limit: max # of packets to be processed
|
||||
* @rx_reap_loop_pkt_limit: max # of packets to be reaped
|
||||
* @rx_hp_oos_update_limit: max # of HP OOS (out of sync)
|
||||
* @rx_softirq_max_yield_duration_ns: max duration for RX softirq
|
||||
* @periodic_stats_timer_interval: Print selective stats on this specified
|
||||
* interval
|
||||
* @periodic_stats_timer_duration: duration for which periodic timer should run
|
||||
* @bus_bw_super_high_threshold: bus bandwidth super high threshold
|
||||
* @bus_bw_ultra_high_threshold: bus bandwidth ultra high threshold
|
||||
* @bus_bw_very_high_threshold: bus bandwidth very high threshold
|
||||
* @bus_bw_dbs_threshold: bus bandwidth for DBS mode threshold
|
||||
* @bus_bw_high_threshold: bus bandwidth high threshold
|
||||
* @bus_bw_medium_threshold: bandwidth threshold for medium bandwidth
|
||||
* @bus_bw_low_threshold: bandwidth threshold for low bandwidth
|
||||
* @bus_bw_compute_interval: bus bandwidth compute interval
|
||||
* @enable_tcp_delack: enable Dynamic Configuration of Tcp Delayed Ack
|
||||
* @enable_tcp_limit_output: enable TCP limit output
|
||||
* @enable_tcp_adv_win_scale: enable TCP adv window scaling
|
||||
* @tcp_delack_thres_high: High Threshold inorder to trigger TCP Del Ack
|
||||
* indication
|
||||
* @tcp_delack_thres_low: Low Threshold inorder to trigger TCP Del Ack
|
||||
* indication
|
||||
* @tcp_tx_high_tput_thres: High Threshold inorder to trigger High Tx
|
||||
* Throughput requirement.
|
||||
* @tcp_delack_timer_count: Del Ack Timer Count inorder to trigger TCP Del Ack
|
||||
* indication
|
||||
* @enable_tcp_param_update: enable tcp parameter update
|
||||
* @bus_low_cnt_threshold: Threshold count to trigger low Tput GRO flush skip
|
||||
* @enable_latency_crit_clients: Enable the handling of latency critical clients
|
||||
* * @del_ack_enable: enable Dynamic Configuration of Tcp Delayed Ack
|
||||
* @del_ack_threshold_high: High Threshold inorder to trigger TCP delay ack
|
||||
* @del_ack_threshold_low: Low Threshold inorder to trigger TCP delay ack
|
||||
* @del_ack_timer_value: Timeout value (ms) to send out all TCP del ack frames
|
||||
* @del_ack_pkt_count: The maximum number of TCP delay ack frames
|
||||
* @rx_thread_ul_affinity_mask: CPU mask to affine Rx_thread
|
||||
* @rx_thread_affinity_mask: CPU mask to affine Rx_thread
|
||||
* @cpu_map_list: RPS map for different RX queues
|
||||
* @multicast_replay_filter: enable filtering of replayed multicast packets
|
||||
* @rx_wakelock_timeout: Amount of time to hold wakelock for RX unicast packets
|
||||
* @num_dp_rx_threads: number of dp rx threads
|
||||
* @enable_dp_trace: Enable/Disable DP trace
|
||||
* @dp_trace_config: DP trace configuration
|
||||
* @enable_nud_tracking: Enable/Disable nud tracking
|
||||
* @pkt_bundle_threshold_high: tx bundle high threshold
|
||||
* @pkt_bundle_threshold_low: tx bundle low threshold
|
||||
* @pkt_bundle_timer_value: tx bundle timer value in ms
|
||||
* @pkt_bundle_size: tx bundle size
|
||||
* @dp_proto_event_bitmap: Control for which protocol type diag log should be
|
||||
* sent
|
||||
* @fisa_enable: Enable/Disable FISA
|
||||
* @icmp_req_to_fw_mark_interval: Interval to mark the ICMP Request packet to
|
||||
* be sent to FW.
|
||||
* @lro_enable: Enable/Disable lro
|
||||
* @gro_enable: Enable/Disable gro
|
||||
*/
|
||||
struct wlan_dp_psoc_cfg {
|
||||
bool tx_orphan_enable;
|
||||
@@ -156,7 +212,7 @@ struct wlan_dp_psoc_cfg {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct tx_rx_histogram - structure to keep track of tx and rx packets
|
||||
* struct tx_rx_histogram: structure to keep track of tx and rx packets
|
||||
* received over 100ms intervals
|
||||
* @interval_rx: # of rx packets received in the last 100ms interval
|
||||
* @interval_tx: # of tx packets received in the last 100ms interval
|
||||
@@ -169,9 +225,9 @@ struct wlan_dp_psoc_cfg {
|
||||
* @next_tx_level: pld_bus_width_type voting level (high or low)
|
||||
* determined on the basis of tx packets received in the
|
||||
* last 100ms interval
|
||||
* @is_rx_pm_qos_high Capture rx_pm_qos voting
|
||||
* @is_tx_pm_qos_high Capture tx_pm_qos voting
|
||||
* @qtime timestamp when the record is added
|
||||
* @is_rx_pm_qos_high: Capture rx_pm_qos voting
|
||||
* @is_tx_pm_qos_high: Capture tx_pm_qos voting
|
||||
* @qtime: timestamp when the record is added
|
||||
*
|
||||
* The structure keeps track of throughput requirements of wlan driver.
|
||||
* An entry is added if either of next_vote_level, next_rx_level or
|
||||
@@ -191,6 +247,12 @@ struct tx_rx_histogram {
|
||||
/**
|
||||
* struct dp_stats - DP stats
|
||||
* @tx_rx_stats : Tx/Rx debug stats
|
||||
* @arp_stats: arp debug stats
|
||||
* @dns_stats: dns debug stats
|
||||
* @tcp_stats: tcp debug stats
|
||||
* @icmpv4_stats: icmpv4 debug stats
|
||||
* @dhcp_stats: dhcp debug stats
|
||||
* @eapol_stats: eapol debug stats
|
||||
*/
|
||||
struct dp_stats {
|
||||
struct dp_tx_rx_stats tx_rx_stats;
|
||||
@@ -203,7 +265,7 @@ struct dp_stats {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dhcp_phase - Per Peer DHCP Phases
|
||||
* enum dhcp_phase - Per Peer DHCP Phases
|
||||
* @DHCP_PHASE_ACK: upon receiving DHCP_ACK/NAK message in REQUEST phase or
|
||||
* DHCP_DELINE message in OFFER phase
|
||||
* @DHCP_PHASE_DISCOVER: upon receiving DHCP_DISCOVER message in ACK phase
|
||||
@@ -219,7 +281,7 @@ enum dhcp_phase {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dhcp_nego_status - Per Peer DHCP Negotiation Status
|
||||
* enum dhcp_nego_status - Per Peer DHCP Negotiation Status
|
||||
* @DHCP_NEGO_STOP: when the peer is in ACK phase or client disassociated
|
||||
* @DHCP_NEGO_IN_PROGRESS: when the peer is in DISCOVER or REQUEST
|
||||
* (Renewal process) phase
|
||||
@@ -229,7 +291,7 @@ enum dhcp_nego_status {
|
||||
DHCP_NEGO_IN_PROGRESS
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* Pending frame type of EAP_FAILURE, bit number used in "pending_eap_frm_type"
|
||||
* of sta_info.
|
||||
*/
|
||||
@@ -258,7 +320,7 @@ struct wlan_dp_conn_info {
|
||||
* struct link_monitoring - link speed monitoring related info
|
||||
* @enabled: Is link speed monitoring feature enabled
|
||||
* @rx_linkspeed_threshold: link speed good/bad threshold
|
||||
* @is_link_speed_good: true means link speed good, false means bad
|
||||
* @is_rx_linkspeed_good: true means rx link speed good, false means bad
|
||||
*/
|
||||
struct link_monitoring {
|
||||
uint8_t enabled;
|
||||
@@ -280,8 +342,30 @@ struct direct_link_info {
|
||||
* @intf_id: Interface ID
|
||||
* @node: list node for membership in the interface list
|
||||
* @vdev: object manager vdev context
|
||||
* @vdev_lock: vdev spin lock
|
||||
* @dev: netdev reference
|
||||
* @stats: Netdev stats
|
||||
* @dp_stats: Device TX/RX statistics
|
||||
* @is_sta_periodic_stats_enabled: Indicate whether to display sta periodic
|
||||
* stats
|
||||
* @periodic_stats_timer_count: count of periodic stats timer
|
||||
* @periodic_stats_timer_counter: periodic stats timer counter
|
||||
* @sta_periodic_stats_lock: sta periodic stats lock
|
||||
* @stats: netdev stats
|
||||
* @con_status: con_status value
|
||||
* @dad: dad value
|
||||
* @pkt_type_bitmap: packet type bitmap value
|
||||
* @track_arp_ip: track ARP ip
|
||||
* @dns_payload: dns payload
|
||||
* @track_dns_domain_len: dns domain length
|
||||
* @track_src_port: track source port value
|
||||
* @track_dest_port: track destination port value
|
||||
* @track_dest_ipv4: track destination ipv4 value
|
||||
* @prev_rx_packets: Rx packets received N/W interface
|
||||
* @prev_tx_packets: Tx packets transmitted on N/W interface
|
||||
* @prev_tx_bytes: Tx bytes transmitted on N/W interface
|
||||
* @prev_fwd_tx_packets: forwarded tx packets count
|
||||
* @prev_fwd_rx_packets: forwarded rx packets count
|
||||
* @nud_tracking: NUD tracking
|
||||
* @mic_work: Work to handle MIC error
|
||||
* @num_active_task: Active task count
|
||||
* @sap_tx_block_mask: SAP TX block mask
|
||||
@@ -388,20 +472,54 @@ struct dp_direct_link_context {
|
||||
|
||||
/**
|
||||
* struct wlan_dp_psoc_context - psoc related data required for DP
|
||||
* @psoc: object manager psoc context
|
||||
* @pdev: object manager pdev context
|
||||
* @qdf_dev: qdf device
|
||||
* @dp_cfg: place holder for DP configuration
|
||||
* @intf_list_lock: DP interfaces list lock
|
||||
* @intf_list: DP interfaces list
|
||||
* @cb_obj: DP callbacks registered from other modules
|
||||
* @rps: rps
|
||||
* @dynamic_rps: dynamic rps
|
||||
* @enable_rxthread: Enable/Disable rx thread
|
||||
* @enable_dp_rx_threads: Enable/Disable DP rx threads
|
||||
* @napi_enable: Enable/Disable napi
|
||||
* @dp_ops: DP callbacks registered from other modules
|
||||
* @sb_ops: South bound direction call backs registered in DP
|
||||
* @nb_ops: North bound direction call backs registered in DP
|
||||
* @en_tcp_delack_no_lro: Enable/Disable tcp delack no lro
|
||||
* @no_rx_offload_pkt_cnt: no of rx offload packet count
|
||||
* @no_tx_offload_pkt_cnt: no of tx offload packet count
|
||||
* @is_suspend: to check whether syetem suspend or not
|
||||
* @is_wiphy_suspended: to check whether wiphy suspend or not
|
||||
* @num_latency_critical_clients: num latency critical clients
|
||||
* @high_bus_bw_request: high bus bandwidth request
|
||||
* @bw_vote_time: bus bandwidth vote time
|
||||
* @bus_bw_work: work for periodically computing DDR bus bandwidth requirements
|
||||
* @cur_vote_level: Current vote level
|
||||
* @prev_no_rx_offload_pkts: no of previous rx offload packets
|
||||
* @prev_rx_offload_pkts: previous rx offload packets
|
||||
* @prev_no_tx_offload_pkts: no of previous tx offload packets
|
||||
* @prev_tx_offload_pkts: previous tx offload packets
|
||||
* @cur_tx_level: Current Tx level
|
||||
* @prev_tx: previous tx
|
||||
* @low_tput_gro_enable: Enable/Disable low tput gro
|
||||
* @bus_bw_lock: Bus bandwidth work lock
|
||||
* @cur_rx_level: Current Rx level
|
||||
* @bus_low_vote_cnt: bus low level count
|
||||
* @disable_rx_ol_in_concurrency: disable RX offload in concurrency scenarios
|
||||
* @disable_rx_ol_in_low_tput: disable RX offload in tput scenarios
|
||||
* @txrx_hist_idx: txrx histogram index
|
||||
* @rx_high_ind_cnt: rx high_ind count
|
||||
* @receive_offload_cb: receive offload cb
|
||||
* @dp_agg_param: DP aggregation parameter
|
||||
* @rtpm_tput_policy_ctx: Runtime Tput policy context
|
||||
* @txrx_hist: TxRx histogram
|
||||
* @bbm_ctx: bus bandwidth manager context
|
||||
* @dp_direct_link_ctx: DP Direct Link context
|
||||
* @rx_skip_qdisc_chk_conc:rx skip qdisc check connection
|
||||
* @arp_connectivity_map: ARP connectiviy map
|
||||
* @rx_wake_lock: rx wake lock
|
||||
* @ol_enable: Enable/Disable offload
|
||||
*/
|
||||
struct wlan_dp_psoc_context {
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
763
components/dp/core/inc/wlan_dp_rx_thread.h
Ficheiro normal
763
components/dp/core/inc/wlan_dp_rx_thread.h
Ficheiro normal
@@ -0,0 +1,763 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 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 copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#if !defined(__WLAN_DP_RX_THREAD_H)
|
||||
#define __WLAN_DP_RX_THREAD_H
|
||||
|
||||
#include <qdf_lock.h>
|
||||
#include <qdf_event.h>
|
||||
#include <qdf_threads.h>
|
||||
#include <wlan_objmgr_vdev_obj.h>
|
||||
#include "cfg_dp.h"
|
||||
#include <cdp_txrx_cmn_struct.h>
|
||||
#include <cdp_txrx_cmn.h>
|
||||
#include "wlan_cfg.h"
|
||||
#include "qdf_nbuf.h"
|
||||
#include "qdf_threads.h"
|
||||
#include "qdf_net_if.h"
|
||||
|
||||
/* Maximum number of REO rings supported (for stats tracking) */
|
||||
#define DP_RX_TM_MAX_REO_RINGS WLAN_CFG_NUM_REO_DEST_RING
|
||||
/* Number of DP RX threads supported */
|
||||
#define DP_MAX_RX_THREADS WLAN_CFG_NUM_REO_DEST_RING
|
||||
|
||||
/*
|
||||
* struct dp_rx_tm_handle_cmn - Opaque handle for rx_threads to store
|
||||
* rx_tm_handle. This handle will be common for all the threads.
|
||||
* Individual threads should not be accessing
|
||||
* elements from dp_rx_tm_handle. It should be via an API.
|
||||
*/
|
||||
struct dp_rx_tm_handle_cmn;
|
||||
|
||||
/**
|
||||
* struct dp_rx_thread_stats - structure holding stats for DP RX thread
|
||||
* @nbuf_queued: packets queued into the thread per reo ring
|
||||
* @nbuf_queued_total: packets queued into the thread for all reo rings
|
||||
* @nbuf_dequeued: packets de-queued from the thread
|
||||
* @nbuf_sent_to_stack: packets sent to the stack. some dequeued packets may be
|
||||
* dropped due to no peer or vdev, hence this stat.
|
||||
* @gro_flushes: number of GRO flushes
|
||||
* @gro_flushes_by_vdev_del: number of GRO flushes triggered by vdev del.
|
||||
* @nbufq_max_len: maximum number of nbuf_lists queued for the thread
|
||||
* @dropped_invalid_vdev: packets(nbuf_list) dropped due to no vdev
|
||||
* @rx_flushed: packets flushed after vdev delete
|
||||
* @dropped_invalid_peer: packets(nbuf_list) dropped due to no peer
|
||||
* @dropped_invalid_os_rx_handles: packets(nbuf_list) dropped due to no os rx
|
||||
* handles
|
||||
* @dropped_others: packets dropped due to other reasons
|
||||
* @dropped_enq_fail: packets dropped due to pending queue full
|
||||
* @rx_nbufq_loop_yield: rx loop yield counter
|
||||
*/
|
||||
struct dp_rx_thread_stats {
|
||||
unsigned int nbuf_queued[DP_RX_TM_MAX_REO_RINGS];
|
||||
unsigned int nbuf_queued_total;
|
||||
unsigned int nbuf_dequeued;
|
||||
unsigned int nbuf_sent_to_stack;
|
||||
unsigned int gro_flushes;
|
||||
unsigned int gro_flushes_by_vdev_del;
|
||||
unsigned int nbufq_max_len;
|
||||
unsigned int dropped_invalid_vdev;
|
||||
unsigned int rx_flushed;
|
||||
unsigned int dropped_invalid_peer;
|
||||
unsigned int dropped_invalid_os_rx_handles;
|
||||
unsigned int dropped_others;
|
||||
unsigned int dropped_enq_fail;
|
||||
unsigned int rx_nbufq_loop_yield;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dp_rx_refill_thread_state - enum to keep track of rx refill thread state
|
||||
* @DP_RX_REFILL_THREAD_INVALID: initial invalid state
|
||||
* @DP_RX_REFILL_THREAD_RUNNING: rx refill thread functional(NOT suspended,
|
||||
* processing packets or waiting on a wait_queue)
|
||||
* @DP_RX_REFILL_THREAD_SUSPENDING: rx refill thread is suspending
|
||||
* @DP_RX_REFILL_THREAD_SUSPENDED: rx refill_thread suspended
|
||||
*/
|
||||
enum dp_rx_refill_thread_state {
|
||||
DP_RX_REFILL_THREAD_INVALID,
|
||||
DP_RX_REFILL_THREAD_RUNNING,
|
||||
DP_RX_REFILL_THREAD_SUSPENDING,
|
||||
DP_RX_REFILL_THREAD_SUSPENDED
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dp_rx_thread - structure holding variables for a single DP RX thread
|
||||
* @id: id of the dp_rx_thread (0 or 1 or 2..DP_MAX_RX_THREADS - 1)
|
||||
* @task: task structure corresponding to the thread
|
||||
* @start_event: handle of Event for DP Rx thread to signal startup
|
||||
* @suspend_event: handle of Event for DP Rx thread to signal suspend
|
||||
* @resume_event: handle of Event for DP Rx thread to signal resume
|
||||
* @shutdown_event: handle of Event for DP Rx thread to signal shutdown
|
||||
* @vdev_del_event: handle of Event for vdev del thread to signal completion
|
||||
* for gro flush
|
||||
* @gro_flush_ind: gro flush indication for DP Rx thread
|
||||
* @event_flag: event flag to post events to DP Rx thread
|
||||
* @nbuf_queue:nbuf queue used to store RX packets
|
||||
* @nbufq_len: length of the nbuf queue
|
||||
* @aff_mask: cuurent affinity mask of the DP Rx thread
|
||||
* @stats: per thread stats
|
||||
* @rtm_handle_cmn: abstract RX TM handle. This allows access to the dp_rx_tm
|
||||
* structures via APIs.
|
||||
* @napi: napi to deliver packet to stack via GRO
|
||||
* @wait_q: wait queue to conditionally wait on events for DP Rx thread
|
||||
* @netdev: dummy netdev to initialize the napi structure with
|
||||
*/
|
||||
struct dp_rx_thread {
|
||||
uint8_t id;
|
||||
qdf_thread_t *task;
|
||||
qdf_event_t start_event;
|
||||
qdf_event_t suspend_event;
|
||||
qdf_event_t resume_event;
|
||||
qdf_event_t shutdown_event;
|
||||
qdf_event_t vdev_del_event;
|
||||
qdf_atomic_t gro_flush_ind;
|
||||
unsigned long event_flag;
|
||||
qdf_nbuf_queue_head_t nbuf_queue;
|
||||
unsigned long aff_mask;
|
||||
struct dp_rx_thread_stats stats;
|
||||
struct dp_rx_tm_handle_cmn *rtm_handle_cmn;
|
||||
qdf_napi_struct napi;
|
||||
qdf_wait_queue_head_t wait_q;
|
||||
qdf_dummy_netdev_t netdev;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dp_rx_refill_thread - structure holding info of DP Rx refill thread
|
||||
* @task: task structure corresponding to the thread
|
||||
* @start_event: handle of Event for DP Rx refill thread to signal startup
|
||||
* @suspend_event: handle of Event for DP Rx refill thread to signal suspend
|
||||
* @resume_event: handle of Event for DP Rx refill thread to signal resume
|
||||
* @shutdown_event: handle of Event for DP Rx refill thread to signal shutdown
|
||||
* @event_flag: event flag to post events to DP Rx refill thread
|
||||
* @wait_q: wait queue to conditionally wait on events for DP Rx refill thread
|
||||
* @enabled: flag to check whether DP Rx refill thread is enabled
|
||||
* @soc: abstract DP soc reference used in internal API's
|
||||
* @state: state of DP Rx refill thread
|
||||
*/
|
||||
struct dp_rx_refill_thread {
|
||||
qdf_thread_t *task;
|
||||
qdf_event_t start_event;
|
||||
qdf_event_t suspend_event;
|
||||
qdf_event_t resume_event;
|
||||
qdf_event_t shutdown_event;
|
||||
unsigned long event_flag;
|
||||
qdf_wait_queue_head_t wait_q;
|
||||
bool enabled;
|
||||
void *soc;
|
||||
enum dp_rx_refill_thread_state state;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dp_rx_thread_state - enum to keep track of the state of the rx threads
|
||||
* @DP_RX_THREADS_INVALID: initial invalid state
|
||||
* @DP_RX_THREADS_RUNNING: rx threads functional(NOT suspended, processing
|
||||
* packets or waiting on a wait_queue)
|
||||
* @DP_RX_THREADS_SUSPENDING: rx thread is suspending
|
||||
* @DP_RX_THREADS_SUSPENDED: rx_threads suspended from cfg8011 suspend
|
||||
*/
|
||||
enum dp_rx_thread_state {
|
||||
DP_RX_THREADS_INVALID,
|
||||
DP_RX_THREADS_RUNNING,
|
||||
DP_RX_THREADS_SUSPENDING,
|
||||
DP_RX_THREADS_SUSPENDED
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dp_rx_tm_handle - DP RX thread infrastructure handle
|
||||
* @num_dp_rx_threads: number of DP RX threads initialized
|
||||
* @txrx_handle_cmn: opaque txrx handle to get to pdev and soc
|
||||
* @state: state of the rx_threads. All of them should be in the same state.
|
||||
* @rx_thread: array of pointers of type struct dp_rx_thread
|
||||
* @allow_dropping: flag to indicate frame dropping is enabled
|
||||
*/
|
||||
struct dp_rx_tm_handle {
|
||||
uint8_t num_dp_rx_threads;
|
||||
struct dp_txrx_handle_cmn *txrx_handle_cmn;
|
||||
enum dp_rx_thread_state state;
|
||||
struct dp_rx_thread **rx_thread;
|
||||
qdf_atomic_t allow_dropping;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum dp_rx_gro_flush_code - enum differentiate different GRO flushes
|
||||
* @DP_RX_GRO_NOT_FLUSH: not fush indication
|
||||
* @DP_RX_GRO_NORMAL_FLUSH: Regular full flush
|
||||
* @DP_RX_GRO_LOW_TPUT_FLUSH: Flush during low tput level
|
||||
*/
|
||||
enum dp_rx_gro_flush_code {
|
||||
DP_RX_GRO_NOT_FLUSH = 0,
|
||||
DP_RX_GRO_NORMAL_FLUSH,
|
||||
DP_RX_GRO_LOW_TPUT_FLUSH
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dp_txrx_config - dp txrx configuration passed to dp txrx modules
|
||||
* @enable_rx_threads: DP rx threads or not
|
||||
*/
|
||||
struct dp_txrx_config {
|
||||
bool enable_rx_threads;
|
||||
};
|
||||
|
||||
struct dp_txrx_handle_cmn;
|
||||
|
||||
/**
|
||||
* struct dp_txrx_handle - main dp txrx container handle
|
||||
* @pdev: cdp_pdev pdev handle
|
||||
* @soc: ol_txrx_soc_handle soc handle
|
||||
* @refill_thread: rx refill thread infra handle
|
||||
* @rx_tm_hdl: rx thread infrastructure handle
|
||||
* @config: configuration for DP TXRX modules
|
||||
*/
|
||||
struct dp_txrx_handle {
|
||||
ol_txrx_soc_handle soc;
|
||||
struct cdp_pdev *pdev;
|
||||
struct dp_rx_tm_handle rx_tm_hdl;
|
||||
struct dp_rx_refill_thread refill_thread;
|
||||
struct dp_txrx_config config;
|
||||
};
|
||||
|
||||
/**
|
||||
* dp_rx_refill_thread_init() - Initialize DP Rx refill threads
|
||||
* @refill_thread: Contains over all rx refill thread info
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS dp_rx_refill_thread_init(struct dp_rx_refill_thread *refill_thread);
|
||||
|
||||
/**
|
||||
* dp_rx_refill_thread_deinit() - De-initialize DP Rx refill threads
|
||||
* @refill_thread: Contains over all rx refill thread info
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
dp_rx_refill_thread_deinit(struct dp_rx_refill_thread *refill_thread);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_init() - initialize DP Rx thread infrastructure
|
||||
* @rx_tm_hdl: dp_rx_tm_handle containing the overall thread infrastructure
|
||||
* @num_dp_rx_threads: number of DP Rx threads to be initialized
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_init(struct dp_rx_tm_handle *rx_tm_hdl,
|
||||
uint8_t num_dp_rx_threads);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_deinit() - de-initialize DP Rx thread infrastructure
|
||||
* @rx_tm_hdl: dp_rx_tm_handle containing the overall thread infrastructure
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_deinit(struct dp_rx_tm_handle *rx_tm_hdl);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_enqueue_pkt() - enqueue RX packet into RXTI
|
||||
* @rx_tm_hdl: dp_rx_tm_handle containing the overall thread infrastructure
|
||||
* @nbuf_list: single or a list of nbufs to be enqueued into RXTI
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_enqueue_pkt(struct dp_rx_tm_handle *rx_tm_hdl,
|
||||
qdf_nbuf_t nbuf_list);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_gro_flush_ind() - flush GRO packets for a RX Context Id
|
||||
* @rx_tm_handle: dp_rx_tm_handle containing the overall thread infrastructure
|
||||
* @rx_ctx_id: RX Thread Context Id for which GRO flush needs to be done
|
||||
* @flush_code: flush code to differentiate low TPUT flush
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_gro_flush_ind(struct dp_rx_tm_handle *rx_tm_handle,
|
||||
int rx_ctx_id,
|
||||
enum dp_rx_gro_flush_code flush_code);
|
||||
/**
|
||||
* dp_rx_refill_thread_suspend() - Suspend RX refill thread
|
||||
* @refill_thread: pointer to dp_rx_refill_thread object
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS
|
||||
dp_rx_refill_thread_suspend(struct dp_rx_refill_thread *refill_thread);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_suspend() - suspend all threads in RXTI
|
||||
* @rx_tm_handle: pointer to dp_rx_tm_handle object
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_suspend(struct dp_rx_tm_handle *rx_tm_handle);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_flush_by_vdev_id() - flush rx packets by vdev_id in all
|
||||
* rx thread queues
|
||||
* @rx_tm_hdl: dp_rx_tm_handle containing the overall thread
|
||||
* infrastructure
|
||||
* @vdev_id: vdev id for which packets are to be flushed
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_flush_by_vdev_id(struct dp_rx_tm_handle *rx_tm_hdl,
|
||||
uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* dp_rx_refill_thread_resume() - Resume RX refill thread
|
||||
* @refill_thread: pointer to dp_rx_refill_thread
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS
|
||||
dp_rx_refill_thread_resume(struct dp_rx_refill_thread *refill_thread);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_resume() - resume all threads in RXTI
|
||||
* @rx_tm_handle: pointer to dp_rx_tm_handle object
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_resume(struct dp_rx_tm_handle *rx_tm_handle);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_dump_stats() - dump stats for all threads in RXTI
|
||||
* @rx_tm_handle: pointer to dp_rx_tm_handle object
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_dump_stats(struct dp_rx_tm_handle *rx_tm_handle);
|
||||
|
||||
/**
|
||||
* dp_rx_thread_get_txrx_handle() - get txrx handle from rx_tm_handle_cmn
|
||||
* @rx_tm_handle_cmn: opaque pointer to dp_rx_tm_handle_cmn struct
|
||||
*
|
||||
* Return: pointer to dp_txrx_handle_cmn handle
|
||||
*/
|
||||
static inline struct dp_txrx_handle_cmn*
|
||||
dp_rx_thread_get_txrx_handle(struct dp_rx_tm_handle_cmn *rx_tm_handle_cmn)
|
||||
{
|
||||
return (((struct dp_rx_tm_handle *)rx_tm_handle_cmn)->txrx_handle_cmn);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_rx_tm_get_napi_context() - get NAPI context for a RX CTX ID
|
||||
* @rx_ctx_id: RX context ID (RX thread ID) corresponding to which NAPI is
|
||||
* needed
|
||||
* @rx_tm_hdl: dp_rx_tm_handle containing the overall thread
|
||||
* infrastructure
|
||||
*
|
||||
* Return: NULL on failure, else pointer to NAPI corresponding to rx_ctx_id
|
||||
*/
|
||||
qdf_napi_struct *dp_rx_tm_get_napi_context(struct dp_rx_tm_handle *rx_tm_hdl,
|
||||
uint8_t rx_ctx_id);
|
||||
|
||||
/**
|
||||
* dp_rx_tm_set_cpu_mask() - set CPU mask for RX threads
|
||||
* @rx_tm_hdl: dp_rx_tm_handle containing the overall thread
|
||||
* infrastructure
|
||||
* @new_mask: New CPU mask pointer
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS dp_rx_tm_set_cpu_mask(struct dp_rx_tm_handle *rx_tm_hdl,
|
||||
qdf_cpu_mask *new_mask);
|
||||
|
||||
#ifdef FEATURE_WLAN_DP_RX_THREADS
|
||||
/**
|
||||
* dp_txrx_get_cmn_hdl_frm_ext_hdl() - conversion func ext_hdl->txrx_handle_cmn
|
||||
* @dp_ext_hdl: pointer to dp_txrx_handle structure
|
||||
*
|
||||
* Return: typecasted pointer of type - struct dp_txrx_handle_cmn
|
||||
*/
|
||||
static inline struct dp_txrx_handle_cmn *
|
||||
dp_txrx_get_cmn_hdl_frm_ext_hdl(struct dp_txrx_handle *dp_ext_hdl)
|
||||
{
|
||||
return (struct dp_txrx_handle_cmn *)dp_ext_hdl;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_txrx_get_ext_hdl_frm_cmn_hdl() - conversion func txrx_handle_cmn->ext_hdl
|
||||
* @txrx_cmn_hdl: pointer to dp_txrx_handle_cmn structure
|
||||
*
|
||||
* Return: typecasted pointer of type - struct dp_txrx_handle
|
||||
*/
|
||||
static inline struct dp_txrx_handle *
|
||||
dp_txrx_get_ext_hdl_frm_cmn_hdl(struct dp_txrx_handle_cmn *txrx_cmn_hdl)
|
||||
{
|
||||
return (struct dp_txrx_handle *)txrx_cmn_hdl;
|
||||
}
|
||||
|
||||
static inline ol_txrx_soc_handle
|
||||
dp_txrx_get_soc_from_ext_handle(struct dp_txrx_handle_cmn *txrx_cmn_hdl)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
|
||||
dp_ext_hdl = dp_txrx_get_ext_hdl_frm_cmn_hdl(txrx_cmn_hdl);
|
||||
|
||||
return dp_ext_hdl->soc;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_txrx_init() - initialize DP TXRX module
|
||||
* @soc: ol_txrx_soc_handle
|
||||
* @pdev_id: id of dp pdev handle
|
||||
* @config: configuration for DP TXRX modules
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS dp_txrx_init(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||
struct dp_txrx_config *config);
|
||||
|
||||
/**
|
||||
* dp_txrx_deinit() - de-initialize DP TXRX module
|
||||
* @soc: ol_txrx_soc_handle
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
QDF_STATUS dp_txrx_deinit(ol_txrx_soc_handle soc);
|
||||
|
||||
/**
|
||||
* dp_txrx_flush_pkts_by_vdev_id() - flush rx packets for a vdev_id
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
* @vdev_id: vdev_id for which rx packets are to be flushed
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
static inline QDF_STATUS dp_txrx_flush_pkts_by_vdev_id(ol_txrx_soc_handle soc,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!soc) {
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
dp_ext_hdl = cdp_soc_get_dp_txrx_handle(soc);
|
||||
if (!dp_ext_hdl) {
|
||||
qdf_status = QDF_STATUS_E_FAULT;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
qdf_status = dp_rx_tm_flush_by_vdev_id(&dp_ext_hdl->rx_tm_hdl, vdev_id);
|
||||
ret:
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_txrx_resume() - resume all threads
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
static inline QDF_STATUS dp_txrx_resume(ol_txrx_soc_handle soc)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
struct dp_rx_refill_thread *refill_thread;
|
||||
|
||||
if (!soc) {
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
dp_ext_hdl = cdp_soc_get_dp_txrx_handle(soc);
|
||||
if (!dp_ext_hdl) {
|
||||
qdf_status = QDF_STATUS_E_FAULT;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
refill_thread = &dp_ext_hdl->refill_thread;
|
||||
if (refill_thread->enabled) {
|
||||
qdf_status = dp_rx_refill_thread_resume(refill_thread);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
qdf_status = dp_rx_tm_resume(&dp_ext_hdl->rx_tm_hdl);
|
||||
ret:
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_txrx_suspend() - suspend all threads
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
static inline QDF_STATUS dp_txrx_suspend(ol_txrx_soc_handle soc)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
struct dp_rx_refill_thread *refill_thread;
|
||||
|
||||
if (!soc) {
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
dp_ext_hdl = cdp_soc_get_dp_txrx_handle(soc);
|
||||
if (!dp_ext_hdl) {
|
||||
qdf_status = QDF_STATUS_E_FAULT;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
refill_thread = &dp_ext_hdl->refill_thread;
|
||||
if (refill_thread->enabled) {
|
||||
qdf_status = dp_rx_refill_thread_suspend(refill_thread);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
qdf_status = dp_rx_tm_suspend(&dp_ext_hdl->rx_tm_hdl);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status) && refill_thread->enabled)
|
||||
dp_rx_refill_thread_resume(refill_thread);
|
||||
|
||||
ret:
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_rx_enqueue_pkt() - enqueue packet(s) into the thread
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
* @nbuf_list: list of packets to be queued into the rx_thread
|
||||
*
|
||||
* The function accepts a list of skbs connected by the skb->next pointer and
|
||||
* queues them into a RX thread to be sent to the stack.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS dp_rx_enqueue_pkt(ol_txrx_soc_handle soc, qdf_nbuf_t nbuf_list)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!soc || !nbuf_list) {
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
dp_err("invalid input params soc %pK nbuf %pK"
|
||||
, soc, nbuf_list);
|
||||
goto ret;
|
||||
}
|
||||
|
||||
dp_ext_hdl = cdp_soc_get_dp_txrx_handle(soc);
|
||||
if (!dp_ext_hdl) {
|
||||
qdf_status = QDF_STATUS_E_FAULT;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
qdf_status = dp_rx_tm_enqueue_pkt(&dp_ext_hdl->rx_tm_hdl, nbuf_list);
|
||||
ret:
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_rx_gro_flush_ind() - Flush GRO packets for a given RX CTX Id
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
* @rx_ctx_id: Context Id (Thread for which GRO packets need to be flushed)
|
||||
* @flush_code: flush_code differentiating normal_flush from low_tput_flush
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS dp_rx_gro_flush_ind(ol_txrx_soc_handle soc, int rx_ctx_id,
|
||||
enum dp_rx_gro_flush_code flush_code)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!soc) {
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
dp_err("invalid input param soc %pK", soc);
|
||||
goto ret;
|
||||
}
|
||||
|
||||
dp_ext_hdl = cdp_soc_get_dp_txrx_handle(soc);
|
||||
if (!dp_ext_hdl) {
|
||||
qdf_status = QDF_STATUS_E_FAULT;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
qdf_status = dp_rx_tm_gro_flush_ind(&dp_ext_hdl->rx_tm_hdl, rx_ctx_id,
|
||||
flush_code);
|
||||
ret:
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_txrx_ext_dump_stats() - dump txrx external module stats
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
* @stats_id: id for the module whose stats are needed
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
static inline QDF_STATUS dp_txrx_ext_dump_stats(ol_txrx_soc_handle soc,
|
||||
uint8_t stats_id)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
QDF_STATUS qdf_status;
|
||||
|
||||
if (!soc) {
|
||||
dp_err("invalid input params soc %pK", soc);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
dp_ext_hdl = cdp_soc_get_dp_txrx_handle(soc);
|
||||
if (!dp_ext_hdl)
|
||||
return QDF_STATUS_E_FAULT;
|
||||
|
||||
if (stats_id == CDP_DP_RX_THREAD_STATS)
|
||||
qdf_status = dp_rx_tm_dump_stats(&dp_ext_hdl->rx_tm_hdl);
|
||||
else
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_rx_get_napi_context() - get NAPI context for a RX CTX ID
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
* @rx_ctx_id: RX context ID (RX thread ID) corresponding to which NAPI is
|
||||
* needed
|
||||
*
|
||||
* Return: NULL on failure, else pointer to NAPI corresponding to rx_ctx_id
|
||||
*/
|
||||
static inline
|
||||
qdf_napi_struct *dp_rx_get_napi_context(ol_txrx_soc_handle soc,
|
||||
uint8_t rx_ctx_id)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
|
||||
if (!soc) {
|
||||
dp_err("soc in NULL!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dp_ext_hdl = cdp_soc_get_dp_txrx_handle(soc);
|
||||
if (!dp_ext_hdl) {
|
||||
dp_err("dp_ext_hdl in NULL!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return dp_rx_tm_get_napi_context(&dp_ext_hdl->rx_tm_hdl, rx_ctx_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_txrx_set_cpu_mask() - set CPU mask for RX threads
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
* @new_mask: New CPU mask pointer
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, error qdf status on failure
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS dp_txrx_set_cpu_mask(ol_txrx_soc_handle soc, qdf_cpu_mask *new_mask)
|
||||
{
|
||||
struct dp_txrx_handle *dp_ext_hdl;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!soc) {
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
dp_ext_hdl = cdp_soc_get_dp_txrx_handle(soc);
|
||||
if (!dp_ext_hdl) {
|
||||
qdf_status = QDF_STATUS_E_FAULT;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
qdf_status = dp_rx_tm_set_cpu_mask(&dp_ext_hdl->rx_tm_hdl, new_mask);
|
||||
|
||||
ret:
|
||||
return qdf_status;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline
|
||||
QDF_STATUS dp_txrx_init(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
||||
struct dp_txrx_config *config)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS dp_txrx_deinit(ol_txrx_soc_handle soc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS dp_txrx_flush_pkts_by_vdev_id(ol_txrx_soc_handle soc,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS dp_txrx_resume(ol_txrx_soc_handle soc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS dp_txrx_suspend(ol_txrx_soc_handle soc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS dp_rx_enqueue_pkt(ol_txrx_soc_handle soc, qdf_nbuf_t nbuf_list)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS dp_rx_gro_flush_ind(ol_txrx_soc_handle soc, int rx_ctx_id,
|
||||
enum dp_rx_gro_flush_code flush_code)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS dp_txrx_ext_dump_stats(ol_txrx_soc_handle soc,
|
||||
uint8_t stats_id)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
qdf_napi_struct *dp_rx_get_napi_context(ol_txrx_soc_handle soc,
|
||||
uint8_t rx_ctx_id)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS dp_txrx_set_cpu_mask(ol_txrx_soc_handle soc, qdf_cpu_mask *new_mask)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* FEATURE_WLAN_DP_RX_THREADS */
|
||||
|
||||
/**
|
||||
* dp_rx_tm_get_pending() - get number of frame in thread
|
||||
* nbuf queue pending
|
||||
* @soc: ol_txrx_soc_handle object
|
||||
*
|
||||
* Return: number of frames
|
||||
*/
|
||||
int dp_rx_tm_get_pending(ol_txrx_soc_handle soc);
|
||||
#endif /* __WLAN_DP_RX_THREAD_H */
|
@@ -29,7 +29,7 @@
|
||||
#include "cds_api.h"
|
||||
#include <wlan_nlink_common.h>
|
||||
#include "wlan_ipa_ucfg_api.h"
|
||||
#include "dp_txrx.h"
|
||||
#include "wlan_dp_rx_thread.h"
|
||||
#include "wlan_mlme_vdev_mgr_interface.h"
|
||||
#include "hif.h"
|
||||
#include "qdf_trace.h"
|
||||
@@ -43,9 +43,10 @@
|
||||
#include "wlan_cm_roam_api.h"
|
||||
|
||||
#ifdef FEATURE_BUS_BANDWIDTH_MGR
|
||||
/**
|
||||
* bus_bw_table_default - default table which provides bus bandwidth level
|
||||
* corresponding to a given connection mode and throughput level.
|
||||
/*
|
||||
* bus_bw_table_default: default table which provides bus
|
||||
* bandwidth level corresponding to a given connection mode and throughput
|
||||
* level.
|
||||
*/
|
||||
static bus_bw_table_type bus_bw_table_default = {
|
||||
[QCA_WLAN_802_11_MODE_11B] = {BUS_BW_LEVEL_NONE, BUS_BW_LEVEL_1,
|
||||
@@ -78,10 +79,10 @@ static bus_bw_table_type bus_bw_table_default = {
|
||||
BUS_BW_LEVEL_7, BUS_BW_LEVEL_8},
|
||||
};
|
||||
|
||||
/**
|
||||
* bus_bw_table_low_latency - table which provides bus bandwidth level
|
||||
* corresponding to a given connection mode and throughput level in low
|
||||
* latency setting.
|
||||
/*
|
||||
* bus_bw_table_low_latency: table which provides bus
|
||||
* bandwidth level corresponding to a given connection mode and throughput
|
||||
* level in low latency setting.
|
||||
*/
|
||||
static bus_bw_table_type bus_bw_table_low_latency = {
|
||||
[QCA_WLAN_802_11_MODE_11B] = {BUS_BW_LEVEL_NONE, BUS_BW_LEVEL_8,
|
||||
@@ -1127,8 +1128,8 @@ static void wlan_dp_display_txrx_stats(struct wlan_dp_psoc_context *dp_ctx)
|
||||
|
||||
/**
|
||||
* dp_display_periodic_stats() - Function to display periodic stats
|
||||
* @dp_ctx - handle to dp context
|
||||
* @bool data_in_interval - true, if data detected in bw time interval
|
||||
* @dp_ctx: handle to dp context
|
||||
* @data_in_interval: true, if data detected in bw time interval
|
||||
*
|
||||
* The periodicity is determined by dp_ctx->dp_cfg->periodic_stats_disp_time.
|
||||
* Stats show up in wlan driver logs.
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include "dp_htt.h"
|
||||
#include "dp_internal.h"
|
||||
#include "hif.h"
|
||||
#include "dp_txrx.h"
|
||||
#include "wlan_dp_rx_thread.h"
|
||||
|
||||
/* Timeout in milliseconds to wait for CMEM FST HTT response */
|
||||
#define DP_RX_FST_CMEM_RESP_TIMEOUT 2000
|
||||
|
1612
components/dp/core/src/wlan_dp_rx_thread.c
Ficheiro normal
1612
components/dp/core/src/wlan_dp_rx_thread.c
Ficheiro normal
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Carregar diff
@@ -31,7 +31,7 @@
|
||||
#include <cdp_txrx_peer_ops.h>
|
||||
#include <cdp_txrx_misc.h>
|
||||
#include <cdp_txrx_flow_ctrl_v2.h>
|
||||
#include "dp_txrx.h"
|
||||
#include "wlan_dp_rx_thread.h"
|
||||
#include "nan_public_structs.h"
|
||||
#include "nan_ucfg_api.h"
|
||||
#include <wlan_cm_ucfg_api.h>
|
||||
@@ -207,8 +207,8 @@ void dp_softap_check_wait_for_tx_eap_pkt(struct wlan_dp_intf *dp_intf,
|
||||
/**
|
||||
* dp_post_dhcp_ind() - Send DHCP START/STOP indication to FW
|
||||
* @dp_intf: pointer to DP interface
|
||||
* @sta_id: peer station ID
|
||||
* @type: WMA message type
|
||||
* @mac_addr: mac address
|
||||
* @dhcp_start: dhcp start
|
||||
*
|
||||
* Return: error number
|
||||
*/
|
||||
@@ -250,8 +250,8 @@ int dp_post_dhcp_ind(struct wlan_dp_intf *dp_intf, uint8_t *mac_addr,
|
||||
|
||||
/**
|
||||
* dp_softap_notify_dhcp_ind() - Notify SAP for DHCP indication for tx desc
|
||||
* @context: pointer to DP interface context
|
||||
* @netbuf: pointer to OS packet (sk_buff)
|
||||
* @intf_context: pointer to DP interface context
|
||||
* @nbuf: pointer to OS packet (sk_buff)
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
@@ -744,8 +744,8 @@ void dp_softap_tx_timeout(struct wlan_dp_intf *dp_intf)
|
||||
/**
|
||||
* dp_softap_notify_tx_compl_cbk() - callback to notify tx completion
|
||||
* @nbuf: pointer to n/w buffer
|
||||
* @dp_intf: pointer to DP interface
|
||||
* @flags: tx status flag
|
||||
* @context: pointer to DP interface
|
||||
* @flag: tx status flag
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#include <cdp_txrx_peer_ops.h>
|
||||
#include <cdp_txrx_misc.h>
|
||||
#include <cdp_txrx_flow_ctrl_v2.h>
|
||||
#include "dp_txrx.h"
|
||||
#include "wlan_dp_rx_thread.h"
|
||||
#if defined(WLAN_SUPPORT_RX_FISA)
|
||||
#include "wlan_dp_fisa_rx.h"
|
||||
#endif
|
||||
@@ -81,7 +81,6 @@ void dp_get_tx_resource(struct wlan_dp_intf *dp_intf,
|
||||
* dp_event_eapol_log() - send event to wlan diag
|
||||
* @nbuf: Network buffer ptr
|
||||
* @dir: direction
|
||||
* @eapol_key_info: eapol key info
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
@@ -951,6 +950,7 @@ static void dp_resolve_rx_ol_mode(struct wlan_dp_psoc_context *dp_ctx)
|
||||
#ifdef WLAN_FEATURE_DYNAMIC_RX_AGGREGATION
|
||||
/**
|
||||
* dp_gro_rx_bh_disable() - GRO RX/flush function.
|
||||
* @dp_intf: DP interface pointer
|
||||
* @napi_to_use: napi to be used to give packets to the stack, gro flush
|
||||
* @nbuf: pointer to n/w buff
|
||||
*
|
||||
@@ -999,6 +999,7 @@ static QDF_STATUS dp_gro_rx_bh_disable(struct wlan_dp_intf *dp_intf,
|
||||
|
||||
/**
|
||||
* dp_gro_rx_bh_disable() - GRO RX/flush function.
|
||||
* @dp_intf: DP interface pointer
|
||||
* @napi_to_use: napi to be used to give packets to the stack, gro flush
|
||||
* @nbuf: pointer to nbuff
|
||||
*
|
||||
@@ -1178,8 +1179,8 @@ out:
|
||||
}
|
||||
|
||||
/**
|
||||
* dp_register_rx_ol() - Register LRO/GRO rx processing callbacks
|
||||
* @hdd_ctx: pointer to hdd_ctx
|
||||
* dp_register_rx_ol_cb() - Register LRO/GRO rx processing callbacks
|
||||
* @dp_ctx: pointer to dp_ctx
|
||||
* @wifi3_0_target: whether its a lithium/beryllium arch based target or not
|
||||
*
|
||||
* Return: none
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador