Re: [PATCH 01/12] net: mediatek: fix DQL support

2016-06-07 Thread Tom Herbert
On Tue, Jun 7, 2016 at 4:01 PM, David Miller wrote: > From: John Crispin > Date: Mon, 6 Jun 2016 08:43:13 +0200 > >> i think one solution would be to add some code to have 2 devices share >> the same dql instance. would that be an acceptable solution ? > >

Re: [PATCH 01/12] net: mediatek: fix DQL support

2016-06-07 Thread David Miller
From: John Crispin Date: Mon, 6 Jun 2016 08:43:13 +0200 > i think one solution would be to add some code to have 2 devices share > the same dql instance. would that be an acceptable solution ? You still need to address the issue of synchronization. dql purposefully doesn't

Re: [PATCH 01/12] net: mediatek: fix DQL support

2016-06-06 Thread John Crispin
On 05/06/2016 09:32, David Miller wrote: > From: John Crispin > Date: Sun, 5 Jun 2016 08:32:54 +0200 > >> @@ -625,7 +625,16 @@ static int mtk_tx_map(struct sk_buff *skb, struct >> net_device *dev, >> WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) |

Re: [PATCH 01/12] net: mediatek: fix DQL support

2016-06-05 Thread David Miller
From: John Crispin Date: Sun, 5 Jun 2016 08:32:54 +0200 > @@ -625,7 +625,16 @@ static int mtk_tx_map(struct sk_buff *skb, struct > net_device *dev, > WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) | > (!nr_frags *

[PATCH 01/12] net: mediatek: fix DQL support

2016-06-05 Thread John Crispin
The MTK ethernet core has 2 MACs both sitting on the same DMA ring. For DQL to be deterministic it needs to track the amount of data in the DMA ring and not the amount of data enqueued on each device. The current code is incorrect, fix it by making it each device track its own traffic aswell as