All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] 3.19-rc1 net: less interrupt masking in NAPI
@ 2015-01-10 20:39 Oded Gabbay
  2015-01-10 20:58 ` Eric Dumazet
  0 siblings, 1 reply; 11+ messages in thread
From: Oded Gabbay @ 2015-01-10 20:39 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet
  Cc: linux-kernel, netdev, Willem de Bruijn, Bridgman, John, Elifaz, Dana

Hi,

Commit d75b1ade567ffab085e8adbbdacf0092d10cd09c breaks my "Qualcomm Atheros
AR8161 Gigabit Ethernet (rev 10)" Ethernet controller, which is handled by
the alx network driver.

ogabbay@odedg-ubuntu:~$ lspci -s 01:00.0 -k
01:00.0 Ethernet controller:
	Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)
	Subsystem: Qualcomm Atheros Device 1071
	Kernel driver in use: alx

I have this controller on a mobile platform of AMD APU Kaveri, which I use
to test amdkfd, and from 3.19-rc1 the network stopped working when trying to
transfer files through scp or nfs.

I bisected the kernel (from 3.18.0 to 3.19-rc1) and reached this commit.

Here is the log of the bisect:

git bisect start
# bad: [97bf6af1f928216fd6c5a66e8a57bfa95a659672] Linux 3.19-rc1
git bisect bad 97bf6af1f928216fd6c5a66e8a57bfa95a659672

# good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18
git bisect good b2776bf7149bddd1f4161f14f79520f17fc1d71d

# bad: [70e71ca0af244f48a5dcf56dc435243792e3a495] Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
git bisect bad 70e71ca0af244f48a5dcf56dc435243792e3a495

# good: [e28870f9b3e92cd3570925089c6bb789c2603bc4] Merge tag
'backlight-for-linus-3.19' of
git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
git bisect good e28870f9b3e92cd3570925089c6bb789c2603bc4

# bad: [450fa21942fe2c37f0c9f52d1a33bbc081eee288] sh_eth: Remove redundant
alignment adjustment
git bisect bad 450fa21942fe2c37f0c9f52d1a33bbc081eee288

# bad: [5c8d19da950861d0482abc0ac3481acca34b008f] e100e: use
netdev_rss_key_fill() helper
git bisect bad 5c8d19da950861d0482abc0ac3481acca34b008f

# good: [bf515fb11ab539c76d04f0e3c5216ed41f41d81f] Merge tag
'mac80211-next-for-john-2014-11-04' of
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
git bisect good bf515fb11ab539c76d04f0e3c5216ed41f41d81f

# bad: [2c99cd914d4fed9160d98849c9dd38034616768e] Merge branch 'amd-xgbe-next'
git bisect bad 2c99cd914d4fed9160d98849c9dd38034616768e

# good: [3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2] net: dsa: Add support for
reading switch registers with ethtool
git bisect good 3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2

# bad: [8ce0c8254f15229aa99fc6c04141f28c446e5f8c] Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
git bisect bad 8ce0c8254f15229aa99fc6c04141f28c446e5f8c

# good: [f0c65567b3c1b23f79e8a49139580a3872a68d1f] Merge branch
'sunvnet-multi-tx-queue'
git bisect good f0c65567b3c1b23f79e8a49139580a3872a68d1f

# bad: [547f2735c20023d7b50a791b1b17cacb652e9237] Merge branch 'mlx4-next'
git bisect bad 547f2735c20023d7b50a791b1b17cacb652e9237

# good: [4cdb1e2e3d3495423db558d3bb7ed11d66aabce7] net: shrink struct
softnet_data
git bisect good 4cdb1e2e3d3495423db558d3bb7ed11d66aabce7

# bad: [0a98455666ec87378148a1dde97f1ce5baf75a64] net/mlx4_core: Protect
port type setting by mutex
git bisect bad 0a98455666ec87378148a1dde97f1ce5baf75a64

# bad: [6e8066999800d90d52af5c84ac49ebf683d14cdc] net/mlx4_core: Prevent VF
from changing port configuration
git bisect bad 6e8066999800d90d52af5c84ac49ebf683d14cdc

# bad: [d75b1ade567ffab085e8adbbdacf0092d10cd09c] net: less interrupt
masking in NAPI
git bisect bad d75b1ade567ffab085e8adbbdacf0092d10cd09c

# first bad commit: [d75b1ade567ffab085e8adbbdacf0092d10cd09c]
net: less interrupt masking in NAPI

Could you please solve this issue as it renders my board quite useless.

If you need more info, please ask.

Thanks,
	Oded

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] 3.19-rc1 net: less interrupt masking in NAPI
  2015-01-10 20:39 [BUG] 3.19-rc1 net: less interrupt masking in NAPI Oded Gabbay
@ 2015-01-10 20:58 ` Eric Dumazet
  2015-01-10 21:10   ` Eric Dumazet
  2015-01-10 21:30   ` Oded Gabbay
  0 siblings, 2 replies; 11+ messages in thread
From: Eric Dumazet @ 2015-01-10 20:58 UTC (permalink / raw)
  To: Oded Gabbay
  Cc: David S. Miller, Eric Dumazet, linux-kernel, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana

On Sat, 2015-01-10 at 22:39 +0200, Oded Gabbay wrote:
> Hi,
> 
> Commit d75b1ade567ffab085e8adbbdacf0092d10cd09c breaks my "Qualcomm Atheros
> AR8161 Gigabit Ethernet (rev 10)" Ethernet controller, which is handled by
> the alx network driver.
> 
> ogabbay@odedg-ubuntu:~$ lspci -s 01:00.0 -k
> 01:00.0 Ethernet controller:
> 	Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)
> 	Subsystem: Qualcomm Atheros Device 1071
> 	Kernel driver in use: alx
> 
> I have this controller on a mobile platform of AMD APU Kaveri, which I use
> to test amdkfd, and from 3.19-rc1 the network stopped working when trying to
> transfer files through scp or nfs.
> 
> I bisected the kernel (from 3.18.0 to 3.19-rc1) and reached this commit.
> 
> Here is the log of the bisect:
> 
> git bisect start
> # bad: [97bf6af1f928216fd6c5a66e8a57bfa95a659672] Linux 3.19-rc1
> git bisect bad 97bf6af1f928216fd6c5a66e8a57bfa95a659672
> 
> # good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18
> git bisect good b2776bf7149bddd1f4161f14f79520f17fc1d71d
> 
> # bad: [70e71ca0af244f48a5dcf56dc435243792e3a495] Merge
> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
> git bisect bad 70e71ca0af244f48a5dcf56dc435243792e3a495
> 
> # good: [e28870f9b3e92cd3570925089c6bb789c2603bc4] Merge tag
> 'backlight-for-linus-3.19' of
> git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
> git bisect good e28870f9b3e92cd3570925089c6bb789c2603bc4
> 
> # bad: [450fa21942fe2c37f0c9f52d1a33bbc081eee288] sh_eth: Remove redundant
> alignment adjustment
> git bisect bad 450fa21942fe2c37f0c9f52d1a33bbc081eee288
> 
> # bad: [5c8d19da950861d0482abc0ac3481acca34b008f] e100e: use
> netdev_rss_key_fill() helper
> git bisect bad 5c8d19da950861d0482abc0ac3481acca34b008f
> 
> # good: [bf515fb11ab539c76d04f0e3c5216ed41f41d81f] Merge tag
> 'mac80211-next-for-john-2014-11-04' of
> git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
> git bisect good bf515fb11ab539c76d04f0e3c5216ed41f41d81f
> 
> # bad: [2c99cd914d4fed9160d98849c9dd38034616768e] Merge branch 'amd-xgbe-next'
> git bisect bad 2c99cd914d4fed9160d98849c9dd38034616768e
> 
> # good: [3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2] net: dsa: Add support for
> reading switch registers with ethtool
> git bisect good 3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2
> 
> # bad: [8ce0c8254f15229aa99fc6c04141f28c446e5f8c] Merge branch 'master' of
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
> git bisect bad 8ce0c8254f15229aa99fc6c04141f28c446e5f8c
> 
> # good: [f0c65567b3c1b23f79e8a49139580a3872a68d1f] Merge branch
> 'sunvnet-multi-tx-queue'
> git bisect good f0c65567b3c1b23f79e8a49139580a3872a68d1f
> 
> # bad: [547f2735c20023d7b50a791b1b17cacb652e9237] Merge branch 'mlx4-next'
> git bisect bad 547f2735c20023d7b50a791b1b17cacb652e9237
> 
> # good: [4cdb1e2e3d3495423db558d3bb7ed11d66aabce7] net: shrink struct
> softnet_data
> git bisect good 4cdb1e2e3d3495423db558d3bb7ed11d66aabce7
> 
> # bad: [0a98455666ec87378148a1dde97f1ce5baf75a64] net/mlx4_core: Protect
> port type setting by mutex
> git bisect bad 0a98455666ec87378148a1dde97f1ce5baf75a64
> 
> # bad: [6e8066999800d90d52af5c84ac49ebf683d14cdc] net/mlx4_core: Prevent VF
> from changing port configuration
> git bisect bad 6e8066999800d90d52af5c84ac49ebf683d14cdc
> 
> # bad: [d75b1ade567ffab085e8adbbdacf0092d10cd09c] net: less interrupt
> masking in NAPI
> git bisect bad d75b1ade567ffab085e8adbbdacf0092d10cd09c
> 
> # first bad commit: [d75b1ade567ffab085e8adbbdacf0092d10cd09c]
> net: less interrupt masking in NAPI
> 
> Could you please solve this issue as it renders my board quite useless.
> 

Thanks for the report and bisection !

Could you try following fix ?

diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index e398eda07298..209c40765e0d 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -272,7 +272,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
 		   alx_clean_rx_irq(alx, budget);
 
 	if (!complete)
-		return 1;
+		return budget;
 
 	napi_complete(&alx->napi);
 





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [BUG] 3.19-rc1 net: less interrupt masking in NAPI
  2015-01-10 20:58 ` Eric Dumazet
@ 2015-01-10 21:10   ` Eric Dumazet
  2015-01-10 21:30   ` Oded Gabbay
  1 sibling, 0 replies; 11+ messages in thread
From: Eric Dumazet @ 2015-01-10 21:10 UTC (permalink / raw)
  To: Oded Gabbay, Johannes Berg
  Cc: David S. Miller, Eric Dumazet, linux-kernel, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana

On Sat, 2015-01-10 at 12:58 -0800, Eric Dumazet wrote:
> On Sat, 2015-01-10 at 22:39 +0200, Oded Gabbay wrote:
> > Hi,
> > 
> > Commit d75b1ade567ffab085e8adbbdacf0092d10cd09c breaks my "Qualcomm Atheros
> > AR8161 Gigabit Ethernet (rev 10)" Ethernet controller, which is handled by
> > the alx network driver.
> > 
> > ogabbay@odedg-ubuntu:~$ lspci -s 01:00.0 -k
> > 01:00.0 Ethernet controller:
> > 	Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)
> > 	Subsystem: Qualcomm Atheros Device 1071
> > 	Kernel driver in use: alx
> > 
> > I have this controller on a mobile platform of AMD APU Kaveri, which I use
> > to test amdkfd, and from 3.19-rc1 the network stopped working when trying to
> > transfer files through scp or nfs.
> > 
> > I bisected the kernel (from 3.18.0 to 3.19-rc1) and reached this commit.
> > 
> > Here is the log of the bisect:
> > 
> > git bisect start
> > # bad: [97bf6af1f928216fd6c5a66e8a57bfa95a659672] Linux 3.19-rc1
> > git bisect bad 97bf6af1f928216fd6c5a66e8a57bfa95a659672
> > 
> > # good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18
> > git bisect good b2776bf7149bddd1f4161f14f79520f17fc1d71d
> > 
> > # bad: [70e71ca0af244f48a5dcf56dc435243792e3a495] Merge
> > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
> > git bisect bad 70e71ca0af244f48a5dcf56dc435243792e3a495
> > 
> > # good: [e28870f9b3e92cd3570925089c6bb789c2603bc4] Merge tag
> > 'backlight-for-linus-3.19' of
> > git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
> > git bisect good e28870f9b3e92cd3570925089c6bb789c2603bc4
> > 
> > # bad: [450fa21942fe2c37f0c9f52d1a33bbc081eee288] sh_eth: Remove redundant
> > alignment adjustment
> > git bisect bad 450fa21942fe2c37f0c9f52d1a33bbc081eee288
> > 
> > # bad: [5c8d19da950861d0482abc0ac3481acca34b008f] e100e: use
> > netdev_rss_key_fill() helper
> > git bisect bad 5c8d19da950861d0482abc0ac3481acca34b008f
> > 
> > # good: [bf515fb11ab539c76d04f0e3c5216ed41f41d81f] Merge tag
> > 'mac80211-next-for-john-2014-11-04' of
> > git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
> > git bisect good bf515fb11ab539c76d04f0e3c5216ed41f41d81f
> > 
> > # bad: [2c99cd914d4fed9160d98849c9dd38034616768e] Merge branch 'amd-xgbe-next'
> > git bisect bad 2c99cd914d4fed9160d98849c9dd38034616768e
> > 
> > # good: [3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2] net: dsa: Add support for
> > reading switch registers with ethtool
> > git bisect good 3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2
> > 
> > # bad: [8ce0c8254f15229aa99fc6c04141f28c446e5f8c] Merge branch 'master' of
> > git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
> > git bisect bad 8ce0c8254f15229aa99fc6c04141f28c446e5f8c
> > 
> > # good: [f0c65567b3c1b23f79e8a49139580a3872a68d1f] Merge branch
> > 'sunvnet-multi-tx-queue'
> > git bisect good f0c65567b3c1b23f79e8a49139580a3872a68d1f
> > 
> > # bad: [547f2735c20023d7b50a791b1b17cacb652e9237] Merge branch 'mlx4-next'
> > git bisect bad 547f2735c20023d7b50a791b1b17cacb652e9237
> > 
> > # good: [4cdb1e2e3d3495423db558d3bb7ed11d66aabce7] net: shrink struct
> > softnet_data
> > git bisect good 4cdb1e2e3d3495423db558d3bb7ed11d66aabce7
> > 
> > # bad: [0a98455666ec87378148a1dde97f1ce5baf75a64] net/mlx4_core: Protect
> > port type setting by mutex
> > git bisect bad 0a98455666ec87378148a1dde97f1ce5baf75a64
> > 
> > # bad: [6e8066999800d90d52af5c84ac49ebf683d14cdc] net/mlx4_core: Prevent VF
> > from changing port configuration
> > git bisect bad 6e8066999800d90d52af5c84ac49ebf683d14cdc
> > 
> > # bad: [d75b1ade567ffab085e8adbbdacf0092d10cd09c] net: less interrupt
> > masking in NAPI
> > git bisect bad d75b1ade567ffab085e8adbbdacf0092d10cd09c
> > 
> > # first bad commit: [d75b1ade567ffab085e8adbbdacf0092d10cd09c]
> > net: less interrupt masking in NAPI
> > 
> > Could you please solve this issue as it renders my board quite useless.
> > 
> 
> Thanks for the report and bisection !
> 
> Could you try following fix ?
> 
> diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
> index e398eda07298..209c40765e0d 100644
> --- a/drivers/net/ethernet/atheros/alx/main.c
> +++ b/drivers/net/ethernet/atheros/alx/main.c
> @@ -272,7 +272,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
>  		   alx_clean_rx_irq(alx, budget);
>  
>  	if (!complete)
> -		return 1;
> +		return budget;
>  
>  	napi_complete(&alx->napi);
>  
> 
> 
> 

BTW this driver has other issues :

complete = alx_clean_tx_irq(alx) &&
            alx_clean_rx_irq(alx, budget);

Means that under TX completion pressure (alx_clean_tx_irq(alx) return
false), we never dequeue packets from RX rings.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] 3.19-rc1 net: less interrupt masking in NAPI
  2015-01-10 20:58 ` Eric Dumazet
  2015-01-10 21:10   ` Eric Dumazet
@ 2015-01-10 21:30   ` Oded Gabbay
  2015-01-10 21:43     ` Oded Gabbay
  2015-01-10 21:50     ` Eric Dumazet
  1 sibling, 2 replies; 11+ messages in thread
From: Oded Gabbay @ 2015-01-10 21:30 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S. Miller, Eric Dumazet, linux-kernel, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana



On 01/10/2015 10:58 PM, Eric Dumazet wrote:
> On Sat, 2015-01-10 at 22:39 +0200, Oded Gabbay wrote:
>> Hi,
>>
>> Commit d75b1ade567ffab085e8adbbdacf0092d10cd09c breaks my "Qualcomm Atheros
>> AR8161 Gigabit Ethernet (rev 10)" Ethernet controller, which is handled by
>> the alx network driver.
>>
>> ogabbay@odedg-ubuntu:~$ lspci -s 01:00.0 -k
>> 01:00.0 Ethernet controller:
>> 	Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)
>> 	Subsystem: Qualcomm Atheros Device 1071
>> 	Kernel driver in use: alx
>>
>> I have this controller on a mobile platform of AMD APU Kaveri, which I use
>> to test amdkfd, and from 3.19-rc1 the network stopped working when trying to
>> transfer files through scp or nfs.
>>
>> I bisected the kernel (from 3.18.0 to 3.19-rc1) and reached this commit.
>>
>> Here is the log of the bisect:
>>
>> git bisect start
>> # bad: [97bf6af1f928216fd6c5a66e8a57bfa95a659672] Linux 3.19-rc1
>> git bisect bad 97bf6af1f928216fd6c5a66e8a57bfa95a659672
>>
>> # good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18
>> git bisect good b2776bf7149bddd1f4161f14f79520f17fc1d71d
>>
>> # bad: [70e71ca0af244f48a5dcf56dc435243792e3a495] Merge
>> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
>> git bisect bad 70e71ca0af244f48a5dcf56dc435243792e3a495
>>
>> # good: [e28870f9b3e92cd3570925089c6bb789c2603bc4] Merge tag
>> 'backlight-for-linus-3.19' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
>> git bisect good e28870f9b3e92cd3570925089c6bb789c2603bc4
>>
>> # bad: [450fa21942fe2c37f0c9f52d1a33bbc081eee288] sh_eth: Remove redundant
>> alignment adjustment
>> git bisect bad 450fa21942fe2c37f0c9f52d1a33bbc081eee288
>>
>> # bad: [5c8d19da950861d0482abc0ac3481acca34b008f] e100e: use
>> netdev_rss_key_fill() helper
>> git bisect bad 5c8d19da950861d0482abc0ac3481acca34b008f
>>
>> # good: [bf515fb11ab539c76d04f0e3c5216ed41f41d81f] Merge tag
>> 'mac80211-next-for-john-2014-11-04' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
>> git bisect good bf515fb11ab539c76d04f0e3c5216ed41f41d81f
>>
>> # bad: [2c99cd914d4fed9160d98849c9dd38034616768e] Merge branch 'amd-xgbe-next'
>> git bisect bad 2c99cd914d4fed9160d98849c9dd38034616768e
>>
>> # good: [3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2] net: dsa: Add support for
>> reading switch registers with ethtool
>> git bisect good 3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2
>>
>> # bad: [8ce0c8254f15229aa99fc6c04141f28c446e5f8c] Merge branch 'master' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
>> git bisect bad 8ce0c8254f15229aa99fc6c04141f28c446e5f8c
>>
>> # good: [f0c65567b3c1b23f79e8a49139580a3872a68d1f] Merge branch
>> 'sunvnet-multi-tx-queue'
>> git bisect good f0c65567b3c1b23f79e8a49139580a3872a68d1f
>>
>> # bad: [547f2735c20023d7b50a791b1b17cacb652e9237] Merge branch 'mlx4-next'
>> git bisect bad 547f2735c20023d7b50a791b1b17cacb652e9237
>>
>> # good: [4cdb1e2e3d3495423db558d3bb7ed11d66aabce7] net: shrink struct
>> softnet_data
>> git bisect good 4cdb1e2e3d3495423db558d3bb7ed11d66aabce7
>>
>> # bad: [0a98455666ec87378148a1dde97f1ce5baf75a64] net/mlx4_core: Protect
>> port type setting by mutex
>> git bisect bad 0a98455666ec87378148a1dde97f1ce5baf75a64
>>
>> # bad: [6e8066999800d90d52af5c84ac49ebf683d14cdc] net/mlx4_core: Prevent VF
>> from changing port configuration
>> git bisect bad 6e8066999800d90d52af5c84ac49ebf683d14cdc
>>
>> # bad: [d75b1ade567ffab085e8adbbdacf0092d10cd09c] net: less interrupt
>> masking in NAPI
>> git bisect bad d75b1ade567ffab085e8adbbdacf0092d10cd09c
>>
>> # first bad commit: [d75b1ade567ffab085e8adbbdacf0092d10cd09c]
>> net: less interrupt masking in NAPI
>>
>> Could you please solve this issue as it renders my board quite useless.
>>
> 
> Thanks for the report and bisection !
> 
> Could you try following fix ?
> 
> diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
> index e398eda07298..209c40765e0d 100644
> --- a/drivers/net/ethernet/atheros/alx/main.c
> +++ b/drivers/net/ethernet/atheros/alx/main.c
> @@ -272,7 +272,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
>  		   alx_clean_rx_irq(alx, budget);
>  
>  	if (!complete)
> -		return 1;
> +		return budget;
>  
>  	napi_complete(&alx->napi);
>  
> 
> 
> 
> 
Yes, no problem.
I will update on the result.

	Oded

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] 3.19-rc1 net: less interrupt masking in NAPI
  2015-01-10 21:30   ` Oded Gabbay
@ 2015-01-10 21:43     ` Oded Gabbay
  2015-01-10 21:50     ` Eric Dumazet
  1 sibling, 0 replies; 11+ messages in thread
From: Oded Gabbay @ 2015-01-10 21:43 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S. Miller, Eric Dumazet, linux-kernel, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana



On 01/10/2015 11:30 PM, Oded Gabbay wrote:
> 
> 
> On 01/10/2015 10:58 PM, Eric Dumazet wrote:
>> On Sat, 2015-01-10 at 22:39 +0200, Oded Gabbay wrote:
>>> Hi,
>>>
>>> Commit d75b1ade567ffab085e8adbbdacf0092d10cd09c breaks my "Qualcomm Atheros
>>> AR8161 Gigabit Ethernet (rev 10)" Ethernet controller, which is handled by
>>> the alx network driver.
>>>
>>> ogabbay@odedg-ubuntu:~$ lspci -s 01:00.0 -k
>>> 01:00.0 Ethernet controller:
>>> 	Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)
>>> 	Subsystem: Qualcomm Atheros Device 1071
>>> 	Kernel driver in use: alx
>>>
>>> I have this controller on a mobile platform of AMD APU Kaveri, which I use
>>> to test amdkfd, and from 3.19-rc1 the network stopped working when trying to
>>> transfer files through scp or nfs.
>>>
>>> I bisected the kernel (from 3.18.0 to 3.19-rc1) and reached this commit.
>>>
>>> Here is the log of the bisect:
>>>
>>> git bisect start
>>> # bad: [97bf6af1f928216fd6c5a66e8a57bfa95a659672] Linux 3.19-rc1
>>> git bisect bad 97bf6af1f928216fd6c5a66e8a57bfa95a659672
>>>
>>> # good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18
>>> git bisect good b2776bf7149bddd1f4161f14f79520f17fc1d71d
>>>
>>> # bad: [70e71ca0af244f48a5dcf56dc435243792e3a495] Merge
>>> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
>>> git bisect bad 70e71ca0af244f48a5dcf56dc435243792e3a495
>>>
>>> # good: [e28870f9b3e92cd3570925089c6bb789c2603bc4] Merge tag
>>> 'backlight-for-linus-3.19' of
>>> git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
>>> git bisect good e28870f9b3e92cd3570925089c6bb789c2603bc4
>>>
>>> # bad: [450fa21942fe2c37f0c9f52d1a33bbc081eee288] sh_eth: Remove redundant
>>> alignment adjustment
>>> git bisect bad 450fa21942fe2c37f0c9f52d1a33bbc081eee288
>>>
>>> # bad: [5c8d19da950861d0482abc0ac3481acca34b008f] e100e: use
>>> netdev_rss_key_fill() helper
>>> git bisect bad 5c8d19da950861d0482abc0ac3481acca34b008f
>>>
>>> # good: [bf515fb11ab539c76d04f0e3c5216ed41f41d81f] Merge tag
>>> 'mac80211-next-for-john-2014-11-04' of
>>> git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
>>> git bisect good bf515fb11ab539c76d04f0e3c5216ed41f41d81f
>>>
>>> # bad: [2c99cd914d4fed9160d98849c9dd38034616768e] Merge branch 'amd-xgbe-next'
>>> git bisect bad 2c99cd914d4fed9160d98849c9dd38034616768e
>>>
>>> # good: [3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2] net: dsa: Add support for
>>> reading switch registers with ethtool
>>> git bisect good 3d762a0f0ab9cb4a6b5993db3ce56c92f9f90ab2
>>>
>>> # bad: [8ce0c8254f15229aa99fc6c04141f28c446e5f8c] Merge branch 'master' of
>>> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
>>> git bisect bad 8ce0c8254f15229aa99fc6c04141f28c446e5f8c
>>>
>>> # good: [f0c65567b3c1b23f79e8a49139580a3872a68d1f] Merge branch
>>> 'sunvnet-multi-tx-queue'
>>> git bisect good f0c65567b3c1b23f79e8a49139580a3872a68d1f
>>>
>>> # bad: [547f2735c20023d7b50a791b1b17cacb652e9237] Merge branch 'mlx4-next'
>>> git bisect bad 547f2735c20023d7b50a791b1b17cacb652e9237
>>>
>>> # good: [4cdb1e2e3d3495423db558d3bb7ed11d66aabce7] net: shrink struct
>>> softnet_data
>>> git bisect good 4cdb1e2e3d3495423db558d3bb7ed11d66aabce7
>>>
>>> # bad: [0a98455666ec87378148a1dde97f1ce5baf75a64] net/mlx4_core: Protect
>>> port type setting by mutex
>>> git bisect bad 0a98455666ec87378148a1dde97f1ce5baf75a64
>>>
>>> # bad: [6e8066999800d90d52af5c84ac49ebf683d14cdc] net/mlx4_core: Prevent VF
>>> from changing port configuration
>>> git bisect bad 6e8066999800d90d52af5c84ac49ebf683d14cdc
>>>
>>> # bad: [d75b1ade567ffab085e8adbbdacf0092d10cd09c] net: less interrupt
>>> masking in NAPI
>>> git bisect bad d75b1ade567ffab085e8adbbdacf0092d10cd09c
>>>
>>> # first bad commit: [d75b1ade567ffab085e8adbbdacf0092d10cd09c]
>>> net: less interrupt masking in NAPI
>>>
>>> Could you please solve this issue as it renders my board quite useless.
>>>
>>
>> Thanks for the report and bisection !
>>
>> Could you try following fix ?
>>
>> diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
>> index e398eda07298..209c40765e0d 100644
>> --- a/drivers/net/ethernet/atheros/alx/main.c
>> +++ b/drivers/net/ethernet/atheros/alx/main.c
>> @@ -272,7 +272,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
>>  		   alx_clean_rx_irq(alx, budget);
>>  
>>  	if (!complete)
>> -		return 1;
>> +		return budget;
>>  
>>  	napi_complete(&alx->napi);
>>  
>>
>>
>>
>>
> Yes, no problem.
> I will update on the result.
> 
> 	Oded
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

Hi Eric,
Your patch fixed the problem.
Thanks for the quick help!

	Oded

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] 3.19-rc1 net: less interrupt masking in NAPI
  2015-01-10 21:30   ` Oded Gabbay
  2015-01-10 21:43     ` Oded Gabbay
@ 2015-01-10 21:50     ` Eric Dumazet
  2015-01-10 22:05       ` Oded Gabbay
  2015-01-11 18:32       ` [PATCH net] alx: fix alx_poll() Eric Dumazet
  1 sibling, 2 replies; 11+ messages in thread
From: Eric Dumazet @ 2015-01-10 21:50 UTC (permalink / raw)
  To: Oded Gabbay, Johannes Berg
  Cc: David S. Miller, Eric Dumazet, linux-kernel, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana

On Sat, 2015-01-10 at 23:30 +0200, Oded Gabbay wrote:

> Yes, no problem.
> I will update on the result.

Please try this more complete patch, solving the TX pressure problem as
well, and not lying about NAPI budget. thanks !


diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index e398eda07298..5f05b387c0a7 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -184,15 +184,16 @@ static void alx_schedule_reset(struct alx_priv *alx)
 	schedule_work(&alx->reset_wk);
 }
 
-static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
+static int alx_clean_rx_irq(struct alx_priv *alx, int budget)
 {
 	struct alx_rx_queue *rxq = &alx->rxq;
 	struct alx_rrd *rrd;
 	struct alx_buffer *rxb;
 	struct sk_buff *skb;
 	u16 length, rfd_cleaned = 0;
+	int work = 0;
 
-	while (budget > 0) {
+	while (work < budget) {
 		rrd = &rxq->rrd[rxq->rrd_read_idx];
 		if (!(rrd->word3 & cpu_to_le32(1 << RRD_UPDATED_SHIFT)))
 			break;
@@ -243,7 +244,7 @@ static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
 		}
 
 		napi_gro_receive(&alx->napi, skb);
-		budget--;
+		work++;
 
 next_pkt:
 		if (++rxq->read_idx == alx->rx_ringsz)
@@ -258,21 +259,22 @@ next_pkt:
 	if (rfd_cleaned)
 		alx_refill_rx_ring(alx, GFP_ATOMIC);
 
-	return budget > 0;
+	return work;
 }
 
 static int alx_poll(struct napi_struct *napi, int budget)
 {
 	struct alx_priv *alx = container_of(napi, struct alx_priv, napi);
 	struct alx_hw *hw = &alx->hw;
-	bool complete = true;
 	unsigned long flags;
+	bool tx_complete;
+	int work;
 
-	complete = alx_clean_tx_irq(alx) &&
-		   alx_clean_rx_irq(alx, budget);
+	tx_complete = alx_clean_tx_irq(alx);
+	work = alx_clean_rx_irq(alx, budget);
 
-	if (!complete)
-		return 1;
+	if (!tx_complete || work == budget)
+		return budget;
 
 	napi_complete(&alx->napi);
 
@@ -284,7 +286,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
 
 	alx_post_write(hw);
 
-	return 0;
+	return work;
 }
 
 static irqreturn_t alx_intr_handle(struct alx_priv *alx, u32 intr)



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [BUG] 3.19-rc1 net: less interrupt masking in NAPI
  2015-01-10 21:50     ` Eric Dumazet
@ 2015-01-10 22:05       ` Oded Gabbay
  2015-01-10 22:08         ` Oded Gabbay
  2015-01-11 18:32       ` [PATCH net] alx: fix alx_poll() Eric Dumazet
  1 sibling, 1 reply; 11+ messages in thread
From: Oded Gabbay @ 2015-01-10 22:05 UTC (permalink / raw)
  To: Eric Dumazet, Johannes Berg
  Cc: David S. Miller, Eric Dumazet, linux-kernel, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana



On 01/10/2015 11:50 PM, Eric Dumazet wrote:
> On Sat, 2015-01-10 at 23:30 +0200, Oded Gabbay wrote:
> 
>> Yes, no problem.
>> I will update on the result.
> 
> Please try this more complete patch, solving the TX pressure problem as
> well, and not lying about NAPI budget. thanks !
> 
> 
> diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
> index e398eda07298..5f05b387c0a7 100644
> --- a/drivers/net/ethernet/atheros/alx/main.c
> +++ b/drivers/net/ethernet/atheros/alx/main.c
> @@ -184,15 +184,16 @@ static void alx_schedule_reset(struct alx_priv *alx)
>  	schedule_work(&alx->reset_wk);
>  }
>  
> -static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
> +static int alx_clean_rx_irq(struct alx_priv *alx, int budget)
>  {
>  	struct alx_rx_queue *rxq = &alx->rxq;
>  	struct alx_rrd *rrd;
>  	struct alx_buffer *rxb;
>  	struct sk_buff *skb;
>  	u16 length, rfd_cleaned = 0;
> +	int work = 0;
>  
> -	while (budget > 0) {
> +	while (work < budget) {
>  		rrd = &rxq->rrd[rxq->rrd_read_idx];
>  		if (!(rrd->word3 & cpu_to_le32(1 << RRD_UPDATED_SHIFT)))
>  			break;
> @@ -243,7 +244,7 @@ static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
>  		}
>  
>  		napi_gro_receive(&alx->napi, skb);
> -		budget--;
> +		work++;
>  
>  next_pkt:
>  		if (++rxq->read_idx == alx->rx_ringsz)
> @@ -258,21 +259,22 @@ next_pkt:
>  	if (rfd_cleaned)
>  		alx_refill_rx_ring(alx, GFP_ATOMIC);
>  
> -	return budget > 0;
> +	return work;
>  }
>  
>  static int alx_poll(struct napi_struct *napi, int budget)
>  {
>  	struct alx_priv *alx = container_of(napi, struct alx_priv, napi);
>  	struct alx_hw *hw = &alx->hw;
> -	bool complete = true;
>  	unsigned long flags;
> +	bool tx_complete;
> +	int work;
>  
> -	complete = alx_clean_tx_irq(alx) &&
> -		   alx_clean_rx_irq(alx, budget);
> +	tx_complete = alx_clean_tx_irq(alx);
> +	work = alx_clean_rx_irq(alx, budget);
>  
> -	if (!complete)
> -		return 1;
> +	if (!tx_complete || work == budget)
> +		return budget;
>  
>  	napi_complete(&alx->napi);
>  
> @@ -284,7 +286,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
>  
>  	alx_post_write(hw);
>  
> -	return 0;
> +	return work;
>  }
>  
>  static irqreturn_t alx_intr_handle(struct alx_priv *alx, u32 intr)
> 
> 
Hi,
Checked it and its working.
Thanks again.
Please note that I only use this Ethernet controller for NFS and SCP, it is
not used for development of networking software of any kind, so maybe a more
extensive testing is needed.

	Oded

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [BUG] 3.19-rc1 net: less interrupt masking in NAPI
  2015-01-10 22:05       ` Oded Gabbay
@ 2015-01-10 22:08         ` Oded Gabbay
  0 siblings, 0 replies; 11+ messages in thread
From: Oded Gabbay @ 2015-01-10 22:08 UTC (permalink / raw)
  To: Eric Dumazet, Johannes Berg
  Cc: David S. Miller, Eric Dumazet, linux-kernel, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana



On 01/11/2015 12:05 AM, Oded Gabbay wrote:
> 
> 
> On 01/10/2015 11:50 PM, Eric Dumazet wrote:
>> On Sat, 2015-01-10 at 23:30 +0200, Oded Gabbay wrote:
>>
>>> Yes, no problem.
>>> I will update on the result.
>>
>> Please try this more complete patch, solving the TX pressure problem as
>> well, and not lying about NAPI budget. thanks !
>>
>>
>> diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
>> index e398eda07298..5f05b387c0a7 100644
>> --- a/drivers/net/ethernet/atheros/alx/main.c
>> +++ b/drivers/net/ethernet/atheros/alx/main.c
>> @@ -184,15 +184,16 @@ static void alx_schedule_reset(struct alx_priv *alx)
>>  	schedule_work(&alx->reset_wk);
>>  }
>>  
>> -static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
>> +static int alx_clean_rx_irq(struct alx_priv *alx, int budget)
>>  {
>>  	struct alx_rx_queue *rxq = &alx->rxq;
>>  	struct alx_rrd *rrd;
>>  	struct alx_buffer *rxb;
>>  	struct sk_buff *skb;
>>  	u16 length, rfd_cleaned = 0;
>> +	int work = 0;
>>  
>> -	while (budget > 0) {
>> +	while (work < budget) {
>>  		rrd = &rxq->rrd[rxq->rrd_read_idx];
>>  		if (!(rrd->word3 & cpu_to_le32(1 << RRD_UPDATED_SHIFT)))
>>  			break;
>> @@ -243,7 +244,7 @@ static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
>>  		}
>>  
>>  		napi_gro_receive(&alx->napi, skb);
>> -		budget--;
>> +		work++;
>>  
>>  next_pkt:
>>  		if (++rxq->read_idx == alx->rx_ringsz)
>> @@ -258,21 +259,22 @@ next_pkt:
>>  	if (rfd_cleaned)
>>  		alx_refill_rx_ring(alx, GFP_ATOMIC);
>>  
>> -	return budget > 0;
>> +	return work;
>>  }
>>  
>>  static int alx_poll(struct napi_struct *napi, int budget)
>>  {
>>  	struct alx_priv *alx = container_of(napi, struct alx_priv, napi);
>>  	struct alx_hw *hw = &alx->hw;
>> -	bool complete = true;
>>  	unsigned long flags;
>> +	bool tx_complete;
>> +	int work;
>>  
>> -	complete = alx_clean_tx_irq(alx) &&
>> -		   alx_clean_rx_irq(alx, budget);
>> +	tx_complete = alx_clean_tx_irq(alx);
>> +	work = alx_clean_rx_irq(alx, budget);
>>  
>> -	if (!complete)
>> -		return 1;
>> +	if (!tx_complete || work == budget)
>> +		return budget;
>>  
>>  	napi_complete(&alx->napi);
>>  
>> @@ -284,7 +286,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
>>  
>>  	alx_post_write(hw);
>>  
>> -	return 0;
>> +	return work;
>>  }
>>  
>>  static irqreturn_t alx_intr_handle(struct alx_priv *alx, u32 intr)
>>
>>
> Hi,
> Checked it and its working.
> Thanks again.
> Please note that I only use this Ethernet controller for NFS and SCP, it is
> not used for development of networking software of any kind, so maybe a more
> extensive testing is needed.
> 
> 	Oded
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

But in any case, you can add:
Tested-by: Oded Gabbay <oded.gabbay@amd.com>

	Oded

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH net] alx: fix alx_poll()
  2015-01-10 21:50     ` Eric Dumazet
  2015-01-10 22:05       ` Oded Gabbay
@ 2015-01-11 18:32       ` Eric Dumazet
  2015-01-12  2:46         ` David Miller
  2015-01-12  8:55         ` Johannes Berg
  1 sibling, 2 replies; 11+ messages in thread
From: Eric Dumazet @ 2015-01-11 18:32 UTC (permalink / raw)
  To: Oded Gabbay
  Cc: Johannes Berg, David S. Miller, Eric Dumazet, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana

From: Eric Dumazet <edumazet@google.com>

Commit d75b1ade567f ("net: less interrupt masking in NAPI") uncovered
wrong alx_poll() behavior.

A NAPI poll() handler is supposed to return exactly the budget when/if
napi_complete() has not been called.

It is also supposed to return number of frames that were received, so
that netdev_budget can have a meaning.

Also, in case of TX pressure, we still have to dequeue received
packets : alx_clean_rx_irq() has to be called even if
alx_clean_tx_irq(alx) returns false, otherwise device is half duplex.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: d75b1ade567f ("net: less interrupt masking in NAPI")
Reported-by: Oded Gabbay <oded.gabbay@amd.com>
Bisected-by: Oded Gabbay <oded.gabbay@amd.com>
Tested-by: Oded Gabbay <oded.gabbay@amd.com>
---
 drivers/net/ethernet/atheros/alx/main.c |   24 +++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index e398eda07298..c8af3ce3ea38 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -184,15 +184,16 @@ static void alx_schedule_reset(struct alx_priv *alx)
 	schedule_work(&alx->reset_wk);
 }
 
-static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
+static int alx_clean_rx_irq(struct alx_priv *alx, int budget)
 {
 	struct alx_rx_queue *rxq = &alx->rxq;
 	struct alx_rrd *rrd;
 	struct alx_buffer *rxb;
 	struct sk_buff *skb;
 	u16 length, rfd_cleaned = 0;
+	int work = 0;
 
-	while (budget > 0) {
+	while (work < budget) {
 		rrd = &rxq->rrd[rxq->rrd_read_idx];
 		if (!(rrd->word3 & cpu_to_le32(1 << RRD_UPDATED_SHIFT)))
 			break;
@@ -203,7 +204,7 @@ static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
 		    ALX_GET_FIELD(le32_to_cpu(rrd->word0),
 				  RRD_NOR) != 1) {
 			alx_schedule_reset(alx);
-			return 0;
+			return work;
 		}
 
 		rxb = &rxq->bufs[rxq->read_idx];
@@ -243,7 +244,7 @@ static bool alx_clean_rx_irq(struct alx_priv *alx, int budget)
 		}
 
 		napi_gro_receive(&alx->napi, skb);
-		budget--;
+		work++;
 
 next_pkt:
 		if (++rxq->read_idx == alx->rx_ringsz)
@@ -258,21 +259,22 @@ next_pkt:
 	if (rfd_cleaned)
 		alx_refill_rx_ring(alx, GFP_ATOMIC);
 
-	return budget > 0;
+	return work;
 }
 
 static int alx_poll(struct napi_struct *napi, int budget)
 {
 	struct alx_priv *alx = container_of(napi, struct alx_priv, napi);
 	struct alx_hw *hw = &alx->hw;
-	bool complete = true;
 	unsigned long flags;
+	bool tx_complete;
+	int work;
 
-	complete = alx_clean_tx_irq(alx) &&
-		   alx_clean_rx_irq(alx, budget);
+	tx_complete = alx_clean_tx_irq(alx);
+	work = alx_clean_rx_irq(alx, budget);
 
-	if (!complete)
-		return 1;
+	if (!tx_complete || work == budget)
+		return budget;
 
 	napi_complete(&alx->napi);
 
@@ -284,7 +286,7 @@ static int alx_poll(struct napi_struct *napi, int budget)
 
 	alx_post_write(hw);
 
-	return 0;
+	return work;
 }
 
 static irqreturn_t alx_intr_handle(struct alx_priv *alx, u32 intr)

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH net] alx: fix alx_poll()
  2015-01-11 18:32       ` [PATCH net] alx: fix alx_poll() Eric Dumazet
@ 2015-01-12  2:46         ` David Miller
  2015-01-12  8:55         ` Johannes Berg
  1 sibling, 0 replies; 11+ messages in thread
From: David Miller @ 2015-01-12  2:46 UTC (permalink / raw)
  To: eric.dumazet
  Cc: oded.gabbay, johannes.berg, edumazet, netdev, willemb,
	John.Bridgman, Dana.Elifaz

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 11 Jan 2015 10:32:18 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> Commit d75b1ade567f ("net: less interrupt masking in NAPI") uncovered
> wrong alx_poll() behavior.
> 
> A NAPI poll() handler is supposed to return exactly the budget when/if
> napi_complete() has not been called.
> 
> It is also supposed to return number of frames that were received, so
> that netdev_budget can have a meaning.
> 
> Also, in case of TX pressure, we still have to dequeue received
> packets : alx_clean_rx_irq() has to be called even if
> alx_clean_tx_irq(alx) returns false, otherwise device is half duplex.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Fixes: d75b1ade567f ("net: less interrupt masking in NAPI")
> Reported-by: Oded Gabbay <oded.gabbay@amd.com>
> Bisected-by: Oded Gabbay <oded.gabbay@amd.com>
> Tested-by: Oded Gabbay <oded.gabbay@amd.com>

Applied and queued up for -stable, thanks Eric.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH net] alx: fix alx_poll()
  2015-01-11 18:32       ` [PATCH net] alx: fix alx_poll() Eric Dumazet
  2015-01-12  2:46         ` David Miller
@ 2015-01-12  8:55         ` Johannes Berg
  1 sibling, 0 replies; 11+ messages in thread
From: Johannes Berg @ 2015-01-12  8:55 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Oded Gabbay, David S. Miller, Eric Dumazet, netdev,
	Willem de Bruijn, Bridgman, John, Elifaz, Dana

On Sun, 2015-01-11 at 18:32 +0000, Eric Dumazet wrote:

> Commit d75b1ade567f ("net: less interrupt masking in NAPI") uncovered
> wrong alx_poll() behavior.

[...]

Thanks Eric and Oded! :)

johannes

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-01-12  8:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10 20:39 [BUG] 3.19-rc1 net: less interrupt masking in NAPI Oded Gabbay
2015-01-10 20:58 ` Eric Dumazet
2015-01-10 21:10   ` Eric Dumazet
2015-01-10 21:30   ` Oded Gabbay
2015-01-10 21:43     ` Oded Gabbay
2015-01-10 21:50     ` Eric Dumazet
2015-01-10 22:05       ` Oded Gabbay
2015-01-10 22:08         ` Oded Gabbay
2015-01-11 18:32       ` [PATCH net] alx: fix alx_poll() Eric Dumazet
2015-01-12  2:46         ` David Miller
2015-01-12  8:55         ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.