RE: [PATCH] rtw88: pci: Use general byte arrays as the elements of RX ring

2019-07-30 Thread David Laight
From: Stanislaw Gruszka > Sent: 30 July 2019 10:36 ... > > + len = pkt_stat.pkt_len + pkt_offset; > > + skb = dev_alloc_skb(len); > > + if (WARN_ONCE(!skb, "rx routine starvation\n")) > > goto next_rp; > > > > /* put the DMA data

Re: [PATCH] rtw88: pci: Use general byte arrays as the elements of RX ring

2019-07-30 Thread Stanislaw Gruszka
On Thu, Jul 25, 2019 at 04:09:26PM +0800, Jian-Hong Pan wrote: > Each skb as the element in RX ring was expected with sized buffer 8216 > (RTK_PCI_RX_BUF_SIZE) bytes. However, the skb buffer's true size is > 16640 bytes for alignment after allocated, x86_64 for example. And, the rtw88 advertise

RE: [PATCH] rtw88: pci: Use general byte arrays as the elements of RX ring

2019-07-29 Thread Tony Chuang
> > > > While allocating all 512 buffers in one block (just over 4MB) > > > > is probably not a good idea, you may need to allocated (and dma map) > > > > then in groups. > > > > > > Thanks for reviewing. But got questions here to double confirm the > idea. > > > According to original code, it

Re: [PATCH] rtw88: pci: Use general byte arrays as the elements of RX ring

2019-07-26 Thread Jian-Hong Pan
David Laight 於 2019年7月26日 週五 下午5:23寫道: > > From: Jian-Hong Pan > > Sent: 26 July 2019 07:18 > ... > > > While allocating all 512 buffers in one block (just over 4MB) > > > is probably not a good idea, you may need to allocated (and dma map) > > > then in groups. > > > > Thanks for reviewing. But

RE: [PATCH] rtw88: pci: Use general byte arrays as the elements of RX ring

2019-07-26 Thread David Laight
From: Jian-Hong Pan > Sent: 26 July 2019 07:18 ... > > While allocating all 512 buffers in one block (just over 4MB) > > is probably not a good idea, you may need to allocated (and dma map) > > then in groups. > > Thanks for reviewing. But got questions here to double confirm the idea. >

Re: [PATCH] rtw88: pci: Use general byte arrays as the elements of RX ring

2019-07-26 Thread Jian-Hong Pan
David Laight 於 2019年7月25日 週四 下午5:21寫道: > > From: Jian-Hong Pan > > Sent: 25 July 2019 09:09 > > Each skb as the element in RX ring was expected with sized buffer 8216 > > (RTK_PCI_RX_BUF_SIZE) bytes. However, the skb buffer's true size is > > 16640 bytes for alignment after allocated, x86_64 for

RE: [PATCH] rtw88: pci: Use general byte arrays as the elements of RX ring

2019-07-25 Thread David Laight
From: Jian-Hong Pan > Sent: 25 July 2019 09:09 > Each skb as the element in RX ring was expected with sized buffer 8216 > (RTK_PCI_RX_BUF_SIZE) bytes. However, the skb buffer's true size is > 16640 bytes for alignment after allocated, x86_64 for example. And, the > difference will be enlarged 512

[PATCH] rtw88: pci: Use general byte arrays as the elements of RX ring

2019-07-25 Thread Jian-Hong Pan
Each skb as the element in RX ring was expected with sized buffer 8216 (RTK_PCI_RX_BUF_SIZE) bytes. However, the skb buffer's true size is 16640 bytes for alignment after allocated, x86_64 for example. And, the difference will be enlarged 512 times (RTK_MAX_RX_DESC_NUM). To prevent that much