[PATCH net-next 0/8] Bug fixes in ena ethernet driver

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains fixes for the bugs that were discovered so far. Netanel Belgazal (8): net: ena: fix rare uncompleted admin command false alarm net: ena: fix bug that might cause hang after consecutive open/close interface. ne

[PATCH net-next 1/8] net: ena: fix rare uncompleted admin command false alarm

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> The current flow to detect admin completion is: while (command_not_completed) { if (timeout) error check_for_completion() sleep() } So in case the sleep took more than the timeout (in case the

[PATCH net-next 2/8] net: ena: fix bug that might cause hang after consecutive open/close interface.

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Fixing a bug that the driver does not unmask the IO interrupts in ndo_open(): occasionally, the MSI-X interrupt (for one or more IO queues) can be masked when ndo_close() was called. If that is followed by ndo open(), then the MSI-X will be still

[PATCH net-next 3/8] net: ena: add missing return when ena_com_get_io_handlers() fails

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/

[PATCH net-next 8/8] net: ena: bug fix in lost tx packets detection mechanism

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> check_for_missing_tx_completions() is called from a timer task and looking for lost tx packets. The old implementation accumulate all the lost tx packets and did not check if those packets were retrieved on a later stage. This cause to a situation

[PATCH net-next 4/8] net: ena: fix race condition between submit and completion admin command

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Bug: "Completion context is occupied" error printout will be noticed in dmesg. This error will cause the admin command to fail, which will lead to an ena_probe() failure or a watchdog reset (depends on which admin command fail

[PATCH net-next 6/8] net: ena: fix theoretical Rx hang on low memory systems

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers t

[PATCH net-next 5/8] net: ena: add missing unmap bars on device removal

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patch also change the mapping functions to devm_ functions Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-)

[PATCH net-next 7/8] net: ena: disable admin msix while working in polling mode

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena

[PATCH net-next 6/8] net: ena: fix theoretical Rx stuck on low memory systems

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers t

[PATCH net-next 7/8] net: ena: disable admin msix while working in polling mode

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena

[PATCH net-next 0/8] Bug fixes in ena ethernet driver

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains fixes for the bugs that were discovered so far. Netanel Belgazal (8): net: ena: fix rare uncompleted admin command false alarm net: ena: fix bug that might cause hang after consecutive open/close interface. ne

[PATCH net-next 1/8] net: ena: fix rare uncompleted admin command false alarm

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> The current flow to detect admin completion is: while (command_not_completed) { if (timeout) error check_for_completion() sleep() } So in case the sleep took more than the timeout (in case the

[PATCH net-next 5/8] net: ena: add missing unmap bars on device removal

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patch also change the mapping functions to devm_ functions Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-)

[PATCH net-next 3/8] net: ena: add missing return when ena_com_get_io_handlers() fails

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/

[PATCH net-next 6/8] net: ena: fix theoretical Rx hang on low memory systems

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers t

[PATCH net-next 2/8] net: ena: fix bug that might cause hang after consecutive open/close interface.

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Fixing a bug that the driver does not unmask the IO interrupts in ndo_open(): occasionally, the MSI-X interrupt (for one or more IO queues) can be masked when ndo_close() was called. If that is followed by ndo open(), then the MSI-X will be still

[PATCH net-next 4/8] net: ena: fix race condition between submit and completion admin command

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Bug: "Completion context is occupied" error printout will be noticed in dmesg. This error will cause the admin command to fail, which will lead to an ena_probe() failure or a watchdog reset (depends on which admin command fail

[PATCH net-next 8/8] net: ena: bug fix in lost tx packets detection mechanism

2017-06-09 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> check_for_missing_tx_completions() is called from a timer task and looking for lost tx packets. The old implementation accumulate all the lost tx packets and did not check if those packets were retrieved on a later stage. This cause to a situation

[PATCH V2 net-next 03/11] net: ena: change sizeof() argument to be the type pointer

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Instead of using: memset(ptr, 0x0, sizeof(struct ...)) use: memset(ptr, 0x0, sizeor(*ptr)) Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 16 1 file changed, 8 inse

[PATCH V2 net-next 02/11] net: ena: add hardware hints capability to the driver

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> With this patch, ENA device can update the ena driver about the desired timeout values: These values are part of the "hardware hints" which are transmitted to the driver as Asynchronous event through ENA async event notification queue.

[PATCH V2 net-next 01/11] net: ena: change return value for unsupported features unsupported return value

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> return -EOPNOTSUPP instead of -EPERM. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 22 +++--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 +++---

[PATCH V2 net-next 04/11] net: ena: add reset reason for each device FLR

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For each device reset, log to the device what is the cause the reset occur. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++- drivers/net/ethernet/amazon/ena/ena_com.

[PATCH V2 net-next 10/11] net: ena: update driver's rx drop statistics

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> rx drop counter is reported by the device in the keep-alive event. update the driver's counter with the device counter. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 + 1

[PATCH V2 net-next 05/11] net: ena: add support for out of order rx buffers refill

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> ENA driver post Rx buffers through the Rx submission queue for the ENA device to fill them with receive packets. Each Rx buffer is marked with req_id in the Rx descriptor. Newer ENA devices could consume the posted Rx buffer in out of

[PATCH V2 net-next 07/11] net: ena: use napi_schedule_irqoff when possible

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/etherne

[PATCH V2 net-next 09/11] net: ena: use lower_32_bits()/upper_32_bits() to split dma address

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> In ena_com_mem_addr_set(), use the above functions to split dma address to the lower 32 bits and the higher 16 bits. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 4 ++-- 1 fil

[PATCH V2 net-next 11/11] net: ena: update ena driver to version 1.2.0

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/eth

[PATCH V2 net-next 08/11] net: ena: separate skb allocation to dedicated function

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 44 +--- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena

[PATCH V2 net-next 06/11] net: ena: allow the driver to work with small number of msix vectors

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Current driver tries to allocate msix vectors as the number of the negotiated io queues. (with another msix vector for management). If pci_alloc_irq_vectors() fails, the driver aborts the probe and the ENA network device is never brou

[PATCH V2 net-next 00/11] update ena ethernet driver to version 1.2.0

2017-06-23 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains some new features/improvements that were added to the ENA driver to increase its robustness and are based on experience of wide ENA deployment. Change log: V2: * Remove patch that add inline to C-file static function (cont

[PATCH net-next 12/13] net: ena: change validate_tx_req_id() to be inline function

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> for optimization purpose, change validate_tx_req_id() to be inline function. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH net-next 09/13] net: ena: adding missing cast in ena_com_mem_addr_set()

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/etherne

[PATCH net-next 10/13] net: ena: add mtu limitation in ena_change_mtu()

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/

[PATCH net-next 08/13] net: ena: separate skb allocation to dedicated function

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 44 +--- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena

[PATCH net-next 13/13] net: ena: update ena driver to version 1.2.0

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/eth

[PATCH net-next 07/13] net: ena: use napi_schedule_irqoff when possible

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/etherne

[PATCH net-next 11/13] net: ena: update driver's rx drop statistics

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> rx drop counter is reported by the device in the keep-alive event. update the driver's counter with the device counter. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 + 1

[PATCH net-next 1/8] net: ena: fix rare uncompleted admin command false alarm

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> The current flow to detect admin completion is: while (command_not_completed) { if (timeout) error check_for_completion() sleep() } So in case the sleep took more than the timeout (in case the

[PATCH net-next 7/8] net: ena: disable admin msix while working in polling mode

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena

[PATCH net-next 03/13] net: ena: change sizeof() argument to be the type pointer

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Instead of using: memset(ptr, 0x0, sizeof(struct ...)) use: memset(ptr, 0x0, sizeor(*ptr)) Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 16 1 file changed, 8 inse

[PATCH net-next 8/8] net: ena: bug fix in lost tx packets detection mechanism

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> check_for_missing_tx_completions() is called from a timer task and looking for lost tx packets. The old implementation accumulate all the lost tx packets and did not check if those packets were retrieved on a later stage. This cause to a situation

[PATCH net-next 0/8] Bug fixes in ena ethernet driver

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains fixes for the bugs that were discovered so far. Netanel Belgazal (8): net: ena: fix rare uncompleted admin command false alarm net: ena: fix bug that might cause hang after consecutive open/close interface. ne

[PATCH net-next 4/8] net: ena: fix race condition between submit and completion admin command

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Bug: "Completion context is occupied" error printout will be noticed in dmesg. This error will cause the admin command to fail, which will lead to an ena_probe() failure or a watchdog reset (depends on which admin command fail

[PATCH net-next 3/8] net: ena: add missing return when ena_com_get_io_handlers() fails

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/

[PATCH net-next 6/8] net: ena: fix theoretical Rx stuck on low memory systems

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers t

[PATCH net-next 5/8] net: ena: add missing unmap bars on device removal

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patch also change the mapping functions to devm_ functions Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-)

[PATCH net-next 2/8] net: ena: fix bug that might cause hang after consecutive open/close interface.

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Fixing a bug that the driver does not unmask the IO interrupts in ndo_open(): occasionally, the MSI-X interrupt (for one or more IO queues) can be masked when ndo_close() was called. If that is followed by ndo open(), then the MSI-X will be still

[PATCH net-next 02/13] net: ena: add hardware hints capability to the driver

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> With this patch, ENA device can update the ena driver about the desired timeout values: These values are part of the "hardware hints" which are transmitted to the driver as Asynchronous event through ENA async event notification queue.

[PATCH net-next 01/13] net: ena: change return value for unsupported features unsupported return value

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> return -EOPNOTSUPP instead of -EPERM. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 22 +++--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 +++---

[PATCH net-next 00/13] update ena ethernet driver to version 1.2.0

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains some new features/improvements that were added to the ENA driver to increase its robustness and are based on experience of wide ENA deployment. Depends on: [PATCH net-next 0/8] Bug fixes in ena ethernet driver Netanel Be

[PATCH net-next 06/13] net: ena: allow the driver to work with small number of msix vectors

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Current driver tries to allocate msix vectors as the number of the negotiated io queues. (with another msix vector for management). If pci_alloc_irq_vectors() fails, the driver aborts the probe and the ENA network device is never brou

[PATCH net-next 05/13] net: ena: add support for out of order rx buffers refill

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> ENA driver post Rx buffers through the Rx submission queue for the ENA device to fill them with receive packets. Each Rx buffer is marked with req_id in the Rx descriptor. Newer ENA devices could consume the posted Rx buffer in out of

[PATCH net-next 07/13] net: ena: use napi_schedule_irqoff when possible

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/etherne

[PATCH net-next 04/13] net: ena: add reset reason for each device FLR

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For each device reset, log to the device what is the cause the reset occur. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++- drivers/net/ethernet/amazon/ena/ena_com.

[PATCH net-next 6/8] net: ena: fix theoretical Rx hang on low memory systems

2017-06-08 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers t

[PATCH net 2/9] net: ena: fix bug that might cause hang after consecutive open/close interface.

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Fixing a bug that the driver does not unmask the IO interrupts in ndo_open(): occasionally, the MSI-X interrupt (for one or more IO queues) can be masked when ndo_close() was called. If that is followed by ndo open(), then the MSI-X will be still

[PATCH net 6/9] net: ena: fix theoretical Rx hang on low memory systems

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For the rare case where the device runs out of free rx buffer descriptors (in case of pressure on kernel memory), and the napi handler continuously fail to refill new Rx descriptors until device rx queue totally runs out of all free rx buffers t

[PATCH net 8/9] net: ena: bug fix in lost tx packets detection mechanism

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> check_for_missing_tx_completions() is called from a timer task and looking for lost tx packets. The old implementation accumulate all the lost tx packets and did not check if those packets were retrieved on a later stage. This cause to a situation

[PATCH net 3/9] net: ena: add missing return when ena_com_get_io_handlers() fails

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 1 file changed, 2 insertions(+) di

[PATCH net 0/9] Bugs fixes in ena ethernet driver

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains fixes for the bugs that were discovered so far. Netanel Belgazal (9): net: ena: fix rare uncompleted admin command false alarm net: ena: fix bug that might cause hang after consecutive open/close interface. ne

[PATCH net 4/9] net: ena: fix race condition between submit and completion admin command

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Bug: "Completion context is occupied" error printout will be noticed in dmesg. This error will cause the admin command to fail, which will lead to an ena_probe() failure or a watchdog reset (depends on which admin command fail

[PATCH net 1/9] net: ena: fix rare uncompleted admin command false alarm

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> The current flow to detect admin completion is: while (command_not_completed) { if (timeout) error check_for_completion() sleep() } So in case the sleep took more than the timeout (in case the

[PATCH net 5/9] net: ena: add missing unmap bars on device removal

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patch also change the mapping functions to devm_ functions Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon

[PATCH net 9/9] net: ena: update ena driver to version 1.1.7

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/etherne

[PATCH net 7/9] net: ena: disable admin msix while working in polling mode

2017-06-11 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Fixes: 1738cd3ed342 ("Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 8 1 file changed, 8 insertions(+) di

[PATCH net-next 05/13] net: ena: add support for out of order rx buffers refill

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> ENA driver post Rx buffers through the Rx submission queue for the ENA device to fill them with receive packets. Each Rx buffer is marked with req_id in the Rx descriptor. Newer ENA devices could consume the posted Rx buffer in out of

[PATCH net-next 02/13] net: ena: add hardware hints capability to the driver

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> With this patch, ENA device can update the ena driver about the desired timeout values: These values are part of the "hardware hints" which are transmitted to the driver as Asynchronous event through ENA async event notification queue.

[PATCH net-next 12/13] net: ena: change validate_tx_req_id() to be inline function

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> for optimization purpose, change validate_tx_req_id() to be inline function. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH net-next 10/13] net: ena: add mtu limitation in ena_change_mtu()

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/

[PATCH net-next 13/13] net: ena: update ena driver to version 1.2.0

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/eth

[PATCH net-next 09/13] net: ena: adding missing cast in ena_com_mem_addr_set()

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/etherne

[PATCH net-next 08/13] net: ena: separate skb allocation to dedicated function

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 44 +--- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena

[PATCH net-next 06/13] net: ena: allow the driver to work with small number of msix vectors

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Current driver tries to allocate msix vectors as the number of the negotiated io queues. (with another msix vector for management). If pci_alloc_irq_vectors() fails, the driver aborts the probe and the ENA network device is never brou

[PATCH net-next 07/13] net: ena: use napi_schedule_irqoff when possible

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/etherne

[PATCH net-next 04/13] net: ena: add reset reason for each device FLR

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> For each device reset, log to the device what is the cause the reset occur. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++- drivers/net/ethernet/amazon/ena/ena_com.

[PATCH net-next 11/13] net: ena: update driver's rx drop statistics

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> rx drop counter is reported by the device in the keep-alive event. update the driver's counter with the device counter. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 9 + 1

[PATCH net-next 01/13] net: ena: change return value for unsupported features unsupported return value

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> return -EOPNOTSUPP instead of -EPERM. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 22 +++--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 +++---

[PATCH net-next 00/13] update ena ethernet driver to version 1.2.0

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains some new features/improvements that were added to the ENA driver to increase its robustness and are based on experience of wide ENA deployment. Netanel Belgazal (13): net: ena: change return value for unsupported fe

[PATCH net-next 03/13] net: ena: change sizeof() argument to be the type pointer

2017-06-18 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Instead of using: memset(ptr, 0x0, sizeof(struct ...)) use: memset(ptr, 0x0, sizeor(*ptr)) Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 16 1 file changed, 8 inse

[PATCH net 2/3] net: ena: fix rare kernel crash when bar memory remap fails

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This failure is rare and only found on testing where deliberately fail devm_ioremap() [ 451.170464] ena :04:00.0: failed to remap regs bar 451.170549] Workqueue: pciehp-1 pciehp_power_thread [ 451.170551] task: 88085a5f2d00 task

[PATCH net 3/3] net: ena: fix wrong max Tx/Rx queues on ethtool

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> ethtool ena_get_channels() expose the max number of queues as the max number of queues ENA supports (128 queues) and not the actual number of created queues. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/etherne

[PATCH net-next 2/6] net: ena: remove legacy suspend suspend/resume support

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Remove ena_device_io_suspend/resume() methods Those methods were intend to be used by the device to trigger suspend/resume but eventually it was dropped. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/etherne

[PATCH net-next 1/6] net: ena: improve ENA driver boot time.

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> The ena admin commands timeout is in resolutions of 100ms. Therefore, When the driver works in polling mode, it sleeps for 100ms each time. The overall boot time of the ENA driver is ~1.5 sec. To reduce the boot time, This change mo

[PATCH net-next 3/6] net: ena: add power management ops to the ENA driver

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 117 -- drivers/net/ethernet/amazon/ena/ena_netdev.h

[PATCH net 0/3] ENA ethernet driver bug fixes

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Some fixes for ENA ethernet driver Netanel Belgazal (3): net: ena: reduce the severity of some printouts net: ena: fix rare kernel crash when bar memory remap fails net: ena: fix wrong max Tx/Rx queues on ethtool drivers/net/ethernet/amaz

[PATCH net-next 6/6] net: ena: increase ena driver version to 1.3.0

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/eth

[PATCH net-next 5/6] net: ena: add new admin define for future support of IPv6 RSS

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h b/drivers/net/etherne

[PATCH net-next 0/6] update ENA driver to releawse 1.3.0

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Netanel Belgazal (6): net: ena: improve ENA driver boot time. net: ena: remove legacy suspend suspend/resume support net: ena: add power management ops to the ENA driver net: ena: add statistics for missed tx packets net: ena: add new

[PATCH net 1/3] net: ena: reduce the severity of some printouts

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Decrease log level of checksum errors as these messages can be triggered remotely by bad packets. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 ++-- 1 file changed, 2 inse

[PATCH net-next 4/6] net: ena: add statistics for missed tx packets

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Add a new statistic to ethtool stats that show the number of packets without transmit acknowledgement from ENA device. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/

[PATCH net-next] MAINTAINERS: change ENA driver maintainers email domain

2017-10-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> ENA driver was developed by developers from Annapurna Labs. Annapurna Labs was acquired by Amazon and the company's domain (@annapurnalabs.com) will become deprecated soon. Update the email addresses of the maintainers to the alternative amazon

[PATCH net] net: ena: fix race condition between device reset and link up setup

2017-11-19 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> In rare cases, ena driver would reset and re-start the device, for example, in case of misbehaving application that causes transmit timeout The first step in the reset procedure is to stop the Tx traffic by calling ena_carrier_off(). After the

[PATCH net] net: ena: fix race condition between device reset and link up setup

2017-11-17 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> In rare cases, ena driver would reset and re-start the device, for example, in case of misbehaving application that causes transmit timeout The first step in the reset procedure is to stop the Tx traffic by calling ena_carrier_off(). After the

[PATCH net 3/3] eet: ena: invoke netif_carrier_off() only after netdev registered

2017-12-28 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> netif_carrier_off() should be called only after register netdev. Move the function's call after the registration. Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 ++-- 1 fil

[PATCH net 2/3] net: ena: fix error handling in ena_down() sequence

2017-12-28 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> ENA admin command queue errors are not handled as part of ena_down(). As a result, in case of error admin queue transitions to non-running state and aborts all subsequent commands including those coming from ena_up(). Reset scheduled by the drive

[PATCH net 1/3] net: ena: unmask MSI-X only after device initialization is completed

2017-12-28 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Under certain conditions MSI-X interrupt might arrive right after it was unmasked in ena_up(). There is a chance it would be processed by the driver before device ENA_FLAG_DEV_UP flag is set. In such a case the interrupt is ignored. ENA device op

[PATCH net 0/3] bug fixes for ENA Ethernet driver

2017-12-28 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains 3 bug fixes: * handle rare race condition during MSI-X initialization * fix error processing in ena_down() * call netif_carrier_off() only after netdev is registered Netanel Belgazal (3): net: ena: unmask MSI-X only

[PATCH net-next 1/2] update ENA driver to version 1.5.0

2017-12-28 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> This patchset contains two changes: * Add a robust mechanism for detection of stuck Rx/Tx rings due to missed or misrouted MSI-X * Increase the driver version to 1.5.0 Netanel Belgazal (2): net: ena: add detection and recovery mec

[PATCH net-next 2/2] net: ena: increase ena driver version to 1.5.0

2017-12-28 Thread netanel
From: Netanel Belgazal <neta...@amazon.com> Signed-off-by: Netanel Belgazal <neta...@amazon.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/etherne

  1   2   3   >