Re: [PATCH net-next 11/13] net: ethernet: aquantia: Refactoring buffers copying.

2017-02-19 Thread Lino Sanfilippo
Hi, On 16.02.2017 17:37, David Laight wrote: > From: Lino Sanfilippo >> Sent: 16 February 2017 16:02 > ... >> I was referring to the copy of tx descriptors, not the frames/fragments >> itself. >> I wrote "tx buffers" because in this driver a descriptor is represented as >> a struct "aq_ring_buff

RE: RE: [PATCH net-next 11/13] net: ethernet: aquantia: Refactoring buffers copying.

2017-02-16 Thread David Laight
From: Lino Sanfilippo > Sent: 16 February 2017 16:02 ... > I was referring to the copy of tx descriptors, not the frames/fragments > itself. > I wrote "tx buffers" because in this driver a descriptor is represented as > a struct "aq_ring_buff_s". I cannot see a reason why this descriptor copy >

Re: RE: [PATCH net-next 11/13] net: ethernet: aquantia: Refactoring buffers copying.

2017-02-16 Thread Lino Sanfilippo
Hi, > ... > > Well, you should really try to avoid copying the tx buffers _at all_. > > E.g. by passing self->buff_ring to aq_ring_tx_append_buffs() instead of > > the temporary array. > > Copying can help for horridly fragmented frames or when iommu (etc) > setup is expensive. > At least some et

RE: [PATCH net-next 11/13] net: ethernet: aquantia: Refactoring buffers copying.

2017-02-16 Thread David Laight
From: Lino Sanfilippo > Sent: 15 February 2017 21:31 ... > Well, you should really try to avoid copying the tx buffers _at all_. > E.g. by passing self->buff_ring to aq_ring_tx_append_buffs() instead of > the temporary array. Copying can help for horridly fragmented frames or when iommu (etc) setu

Re: [PATCH net-next 11/13] net: ethernet: aquantia: Refactoring buffers copying.

2017-02-15 Thread Pavel Belous
Thank you. I will think about how to avoid copying.. Regards, Pavel On 16.02.2017 00:31, Lino Sanfilippo wrote: On 15.02.2017 21:01, Pavel Belous wrote: From: Pavel Belous This fix simplified copying data to the ring buffer. Also, there was an error in the code when the second memcpy is ca

Re: [PATCH net-next 11/13] net: ethernet: aquantia: Refactoring buffers copying.

2017-02-15 Thread Lino Sanfilippo
On 15.02.2017 21:01, Pavel Belous wrote: From: Pavel Belous This fix simplified copying data to the ring buffer. Also, there was an error in the code when the second memcpy is called with zero length. It didn't break the driver, but it's bad. Signed-off-by: Pavel Belous --- drivers/net/ether

[PATCH net-next 11/13] net: ethernet: aquantia: Refactoring buffers copying.

2017-02-15 Thread Pavel Belous
From: Pavel Belous This fix simplified copying data to the ring buffer. Also, there was an error in the code when the second memcpy is called with zero length. It didn't break the driver, but it's bad. Signed-off-by: Pavel Belous --- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 25 ++