Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-02-05 Thread Sven Van Asbroeck
Hi Christoph, On Fri, Feb 5, 2021 at 4:31 AM Christoph Hellwig wrote: > > This is a pattern we've seen in a few other net driver, so we should > be ok. It just is rather hairy and needs a good justification, which > seems to be given here. Thank you so much for taking the time to look into this

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-02-05 Thread Sergej Bauer
On Friday, February 5, 2021 5:07:22 PM MSK you wrote: > Hi Sergej, > > On Fri, Feb 5, 2021 at 7:44 AM Sergej Bauer wrote: > > Hi Sven > > I can confirm great stability improvement after your patch > > "lan743x: boost performance on cpu archs w/o dma cache snooping". > > > > Test machine is Intel

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-02-05 Thread Sven Van Asbroeck
Hi Sergej, On Fri, Feb 5, 2021 at 10:09 AM Sergej Bauer wrote: > > Tests after applying patches [2/6] and [3/6] are: > $ ifmtu eth7 500 > $ sudo test_ber -l eth7 -c 1000 -n 100 -f500 --no-conf Thank you! Is there a way for me to run test_ber myself? Is this a standard, or a bespoke testing t

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-02-05 Thread Sergej Bauer
sOn Friday, February 5, 2021 7:39:40 PM MSK Sven Van Asbroeck wrote: > Hi Sergej, > > On Fri, Feb 5, 2021 at 10:09 AM Sergej Bauer wrote: > > Tests after applying patches [2/6] and [3/6] are: > > $ ifmtu eth7 500 > > $ sudo test_ber -l eth7 -c 1000 -n 100 -f500 --no-conf > > Thank you! Is th

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-02-05 Thread Sven Van Asbroeck
Hi Sergej, On Fri, Feb 5, 2021 at 7:44 AM Sergej Bauer wrote: > > Hi Sven > I can confirm great stability improvement after your patch > "lan743x: boost performance on cpu archs w/o dma cache snooping". > > Test machine is Intel Pentium G4560 3.50GHz > lan743x with rejected virtual phy 'inside'

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-02-05 Thread Sergej Bauer
Hi Sven I can confirm great stability improvement after your patch "lan743x: boost performance on cpu archs w/o dma cache snooping". Please note, that test_ber opens raw sockets as s = socket(AF_PACKET, SOCK_RAW, ETH_P_ALL) and resulting 'average speed' is a average egress speed. Test machine is I

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-02-05 Thread Christoph Hellwig
This is a pattern we've seen in a few other net driver, so we should be ok. It just is rather hairy and needs a good justification, which seems to be given here.

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-01-30 Thread Sven Van Asbroeck
On Sat, Jan 30, 2021 at 5:11 PM wrote: > > It appears you moved this packet_length assignment from just below the > following if block, however you left out the le32_to_cpu.See next comment PS this merge snafu is removed completely by the next patch in the set. So this will not prevent you from

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-01-30 Thread Sven Van Asbroeck
Hi Bryan, thank you so much for reviewing, I really appreciate it. On Sat, Jan 30, 2021 at 5:11 PM wrote: > > > /* unmap from dma */ > > + packet_length = RX_DESC_DATA0_FRAME_LENGTH_GET_ > > + (descriptor->data0);

RE: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-01-30 Thread Bryan.Whitehead
Sven, see below comments > @@ -2148,11 +2149,18 @@ static int lan743x_rx_process_packet(struct > lan743x_rx *rx) > descriptor = &rx->ring_cpu_ptr[first_index]; > > /* unmap from dma */ > + packet_length = RX_DESC_DATA0_FRAME_LE

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-01-29 Thread Sven Van Asbroeck
Hi Andrew, thank you so much for looking at this patch ! On Fri, Jan 29, 2021 at 3:36 PM Andrew Lunn wrote: > > So this patch appears to contain two different changes > 1) You only allocate a receive buffer as big as the MTU plus overheads > 2) You change the cache operations to operate on the re

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-01-29 Thread Sven Van Asbroeck
On Fri, Jan 29, 2021 at 5:01 PM Jakub Kicinski wrote: > > You may need to rebase to see this: > > drivers/net/ethernet/microchip/lan743x_main.c:2123:41: warning: restricted > __le32 degrades to integer Good catch. The problem goes away with the next commit in the set. This is probably because I

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-01-29 Thread Jakub Kicinski
On Fri, 29 Jan 2021 14:52:35 -0500 Sven Van Asbroeck wrote: > From: Sven Van Asbroeck > > The buffers in the lan743x driver's receive ring are always 9K, > even when the largest packet that can be received (the mtu) is > much smaller. This performs particularly badly on cpu archs > without dma ca

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-01-29 Thread Andrew Lunn
> diff --git a/drivers/net/ethernet/microchip/lan743x_main.c > b/drivers/net/ethernet/microchip/lan743x_main.c > index f1f6eba4ace4..f485320e5784 100644 > --- a/drivers/net/ethernet/microchip/lan743x_main.c > +++ b/drivers/net/ethernet/microchip/lan743x_main.c > @@ -1957,11 +1957,11 @@ static int