Search Linux Wireless

Re: [RFC 2/2] mt76: introduce mt76_hw_queue data structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 01, 2019 at 10:22:04AM +0100, Lorenzo Bianconi wrote:
> -struct mt76_queue {
> +struct mt76_hw_queue {
>  
>  	u16 first;
>  	u16 head;
>  	u16 tail;
> -	int ndesc;
> -	int queued;
> -	int buf_size;
>  
> +	dma_addr_t desc_dma;
> +
> +	int buf_size;
>  	u8 buf_offset;
> +
>  	u8 hw_idx;
>  
> -	dma_addr_t desc_dma;
> -	struct sk_buff *rx_head;
>  	struct page_frag_cache rx_page;
>  	spinlock_t rx_page_lock;
> +	struct sk_buff *rx_head;
> +};
> +
> +struct mt76_queue {
> +	struct mt76_hw_queue *hwq;
> +
> +	struct list_head swq;
> +	int swq_queued;
>  };

I don't think massive renaming is necessary. It makes patch more complex
and eventual future backporting of fixes harder. Simpler approach would
be doing:

struct mt76_sw_queue {
	struct mt76_queue *q;

	struct list_head swq;
	int swq_queued;
}

what should achieve the same goal without massive changes in the code.

Stanislaw



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux