Commit acc79d98 authored by Sriram R's avatar Sriram R Committed by Kalle Valo
Browse files

ath11k: Perform per-msdu rx processing



As Hash based reo destination selection is configured,
the decapped packets reach different reo destintion rings
based on the destintaion ring selected for the computed hash (based on
the 5-tuple {ip src/ip dst/src port/dst port/protocol}) by hw and
as configured by driver.

Hence the current implementation of amsdu list based processing after all
the subframes of amsdu are received (since all msdu's for a pdev are
received in same reo dest ring), is not applicable here and hence is
replaced with per msdu based handling as these subframes
can be received in different reo dest rings.

Also, as some of the rx descriptor fields might be valid only for the
first msdu (for ex. received 80211 header, encryption type, etc),
it might not be useful now as we cannot sync between different
subframes received in different rings. Hence do not rely on those
fields and replace them with fieds valid only on per msdu descriptors.
Also cache other details such as encryption type for a peer so that
it can be reused when a packet is received from it.

Co-developed-by: default avatarTamizh Chelvam Raja <tamizhr@codeaurora.org>
Signed-off-by: default avatarTamizh Chelvam Raja <tamizhr@codeaurora.org>
Signed-off-by: default avatarSriram R <srirrama@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 26c79927
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -458,7 +458,6 @@ static void ath11k_ahb_ext_grp_disable(struct ath11k_ext_irq_grp *irq_grp)

static void __ath11k_ahb_ext_irq_disable(struct ath11k_base *ab)
{
	struct sk_buff *skb;
	int i;

	for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) {
@@ -468,9 +467,6 @@ static void __ath11k_ahb_ext_irq_disable(struct ath11k_base *ab)

		napi_synchronize(&irq_grp->napi);
		napi_disable(&irq_grp->napi);

		while ((skb = __skb_dequeue(&irq_grp->pending_q)))
			dev_kfree_skb_any(skb);
	}
}

@@ -740,7 +736,6 @@ static int ath11k_ahb_ext_irq_config(struct ath11k_base *ab)
		init_dummy_netdev(&irq_grp->napi_ndev);
		netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
			       ath11k_ahb_ext_grp_napi_poll, NAPI_POLL_WEIGHT);
		__skb_queue_head_init(&irq_grp->pending_q);

		for (j = 0; j < ATH11K_EXT_IRQ_NUM_MAX; j++) {
			if (ath11k_tx_ring_mask[i] & BIT(j)) {
+1 −4
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ struct ath11k_skb_rxcb {
	u8 mac_id;
	u8 unmapped;
	u8 is_frag;
	u8 tid;
};

enum ath11k_hw_rev {
@@ -113,10 +114,6 @@ struct ath11k_ext_irq_grp {
	u64 timestamp;
	struct napi_struct napi;
	struct net_device napi_ndev;
	/* Queue of pending packets, not expected to be accessed concurrently
	 * to avoid locking overhead.
	 */
	struct sk_buff_head pending_q;
};

#define HEHANDLE_CAP_PHYINFO_SIZE       3
+7 −11
Original line number Diff line number Diff line
@@ -650,18 +650,14 @@ int ath11k_dp_service_srng(struct ath11k_base *ab,
	}

	if (ath11k_rx_ring_mask[grp_id]) {
		for (i = 0; i <  ab->num_radios; i++) {
			if (ath11k_rx_ring_mask[grp_id] & BIT(i)) {
		i =  fls(ath11k_rx_ring_mask[grp_id]) - 1;
		work_done = ath11k_dp_process_rx(ab, i, napi,
								 &irq_grp->pending_q,
						 budget);
		budget -= work_done;
		tot_work_done += work_done;
			}
		if (budget <= 0)
			goto done;
	}
	}

	if (rx_mon_status_ring_mask[grp_id]) {
		for (i = 0; i <  ab->num_radios; i++) {
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,6 @@ struct ath11k_pdev_dp {
	u32 mac_id;
	atomic_t num_tx_pending;
	wait_queue_head_t tx_empty_waitq;
	struct dp_srng reo_dst_ring;
	struct dp_rxdma_ring rx_refill_buf_ring;
	struct dp_srng rxdma_err_dst_ring;
	struct dp_srng rxdma_mon_dst_ring;
@@ -218,6 +217,7 @@ struct ath11k_dp {
	struct dp_srng reo_except_ring;
	struct dp_srng reo_cmd_ring;
	struct dp_srng reo_status_ring;
	struct dp_srng reo_dst_ring[DP_REO_DST_RING_MAX];
	struct dp_tx_ring tx_ring[DP_TCL_NUM_RING_MAX];
	struct hal_wbm_idle_scatter_list scatter_list[DP_IDLE_SCATTER_BUFS_MAX];
	struct list_head reo_cmd_list;
+220 −293

File changed.

Preview size limit exceeded, changes collapsed.

Loading