]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Schedule napi when RX buffers allocation fails
authorIdo Shamay <idos@mellanox.com>
Thu, 30 Apr 2015 14:32:46 +0000 (17:32 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2015 20:47:50 +0000 (16:47 -0400)
commit133d98374d3ca939be983f17e3c4af63cf109842
treec92c000d3119f222b8fcee9fe732bd796804f193
parentc8de057af2c7860d7f5fd358ffd704541627813b
net/mlx4_en: Schedule napi when RX buffers allocation fails

When system is out of memory, refilling of RX buffers fails while
the driver continue to pass the received packets to the kernel stack.
At some point, when all RX buffers deplete, driver may fall into a
sleep, and not recover when memory for new RX buffers is once again
availible. This is because hardware does not have valid descriptors,
so no interrupt will be generated for the driver to return to work
in napi context. Fix it by schedule the napi poll function from
stats_task delayed workqueue, as long as the allocations fail.

Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h