Re: [PATCH 15/50] wifi: ath12k: add dp_rx.c

Kalle Valo
2022-10-21T13:13:34Z

"Sriram R (QUIC)" <quic_srirrama@quicinc.com> writes:

>>> + paddr = dma_map_single(ab->dev, skb->data,
>>> + skb->len + skb_tailroom(skb),
>>> + DMA_FROM_DEVICE);
>>> + if (dma_mapping_error(ab->dev, paddr))
>>> + goto fail_free_skb;
>>> +
>>> + if (hw_cc) {
>>
>>hw_cc is a very cryptic name. is there a better name for this?
>>presumably this has something to do with hardware giving us unique
>>cookies so we don't have idr overhead?
>
> The hw_cc indicates Hw cookie conversion, which converts the cookie
>passed in the rxdma descriptor to a corresponding SW descriptor vaddr
>(which was allocated mapped during init time in ath12k_dp_cc_init())
>and passes back the addr directly during msdu rx rather than having the
>idr overhead. Since 'cc' was used across the driver to indicate this
>feature, we used it similarly here as well.

Having a comment explaining what hw_cc means would be really nice.

--