Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-06-21 Thread Netanel Belgazal
On 06/21/2016 01:43 AM, Francois Romieu wrote: > Netanel Belgazal <neta...@annapurnalabs.com> : > [...] >>> diff --git a/drivers/net/ethernet/amazon/ena/ena_com.h >>> b/drivers/net/ethernet/amazon/ena/ena_com.h >>> new file mode 100644 >&

Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-06-20 Thread Netanel Belgazal
On 06/18/2016 12:11 AM, Francois Romieu wrote: > Netanel Belgazal <neta...@annapurnalabs.com> : > [...] > > More stuff below. > >> diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c >> b/drivers/net/ethernet/amazon/ena/ena_com.c >> new file mode 10064

Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-06-20 Thread Netanel Belgazal
On 06/20/2016 08:20 AM, Rosen, Rami wrote: > Hi all, > > A very limited review below. > > + > + /* get capabilities of particular feature */ > + ENA_ADMIN_GET_FEATURE = 8, > > Instead /* get capabilities SHOULD BE: /* set capabilities . > + > + /* get capabilities of

Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-06-20 Thread Netanel Belgazal
On 06/17/2016 04:09 AM, Matt Wilson wrote: > On Thu, Jun 16, 2016 at 10:46:23PM +0200, Francois Romieu wrote: >> Netanel Belgazal <neta...@annapurnalabs.com> : >> [...] >> >> Very limited review below. > I'll comment on the documentation (since I edit

Re: [PATCH net-next V3] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-07-19 Thread Netanel Belgazal
On 07/15/2016 08:00 AM, Leon Romanovsky wrote: > On Thu, Jul 14, 2016 at 09:46:14AM +0300, Netanel Belgazal wrote: >> This is a driver for the ENA family of networking devices. >> >> Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> >> --- >> >

Re: [PATCH net-next V3] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-07-19 Thread Netanel Belgazal
On 07/19/2016 08:26 PM, Leon Romanovsky wrote: > On Tue, Jul 19, 2016 at 02:09:25PM +0300, Netanel Belgazal wrote: >> >> On 07/15/2016 08:00 AM, Leon Romanovsky wrote: >>> On Thu, Jul 14, 2016 at 09:46:14AM +0300, Netanel Belgazal wrote: >>>> This is a dri

Re: [PATCH net-next V2] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-07-07 Thread Netanel Belgazal
On 07/07/2016 12:56 PM, Ben Hutchings wrote: > On Thu, 2016-07-07 at 08:58 +0300, Netanel Belgazal wrote: > [...] >> +int ena_get_sset_count(struct net_device *netdev, int sset) >> +{ >> + if (sset != ETH_SS_STATS) >> + return -EOPNOTSUPP;

Re: [PATCH V3 net-next 02/14] net/ena: fix error handling when probe fails

2017-01-31 Thread Netanel Belgazal
Hi, You are right. I'll remove this patch. Regards, Netanel On 01/28/2017 01:33 AM, Lino Sanfilippo wrote: Hi, On 26.01.2017 23:18, Netanel Belgazal wrote: When driver fails in probe, it will release all resources, including adapter. In case of probe failure, ena_remove should not try

[PATCH V3 net-next 05/14] net/ena: fix RSS default hash configuration

2017-01-26 Thread Netanel Belgazal
ENA default hash configures IPv4_frag hash twice instead of configure non-IP packets. The bug caused IPv4 fragmented packets to be calculated based on L2 source and destination address instead of L3 source and destination. IPv4 packets can reach to the wrong Rx queue. Signed-off-by: Netanel

[PATCH V3 net-next 08/14] net/ena: fix potential access to freed memory during device reset

2017-01-26 Thread Netanel Belgazal
to the driver's memory space. To overcome this potential race, move the reset before the device resources are freed. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 56 +--- 1 file changed, 43 insertions(

[PATCH V3 net-next 06/14] net/ena: fix NULL dereference when removing the driver after device reset failed

2017-01-26 Thread Netanel Belgazal
6] RIP [] ena_com_reg_bar_read32+0x8a/0x180 [ena_drv] [ 54.244186] RSP [ 54.244186] CR2: [ 54.244186] ---[ end trace 18dd9889b6497810 ]--- Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +- 1 file changed,

[PATCH V3 net-next 07/14] net/ena: refactor ena_get_stats64 to be atomic context safe

2017-01-26 Thread Netanel Belgazal
counters, and to obtain the rx drop counter from the asynchronous keep alive (heart bit) event. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 8 drivers/net/ethernet/amazon/ena/ena_netdev.c

[PATCH V3 net-next 04/14] net/ena: fix ethtool RSS flow configuration

2017-01-26 Thread Netanel Belgazal
and will configure wrong hash fields in set. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h b/d

[PATCH V3 net-next 09/14] net/ena: use napi_complete_done() return value

2017-01-26 Thread Netanel Belgazal
Do not unamsk interrupts if we are in busy poll mode. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 44 ++-- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/amaz

[PATCH V3 net-next 03/14] net/ena: fix queues number calculation

2017-01-26 Thread Netanel Belgazal
The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus() while it should have use num_online_cpus() instead. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-

[PATCH V3 net-next 01/14] net/ena: remove ntuple filter support from device feature list

2017-01-26 Thread Netanel Belgazal
Remove NETIF_F_NTUPLE from netdev->features. The ENA device driver does not support ntuple filtering. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/a

[PATCH V3 net-next 13/14] net/ena: change condition for host attribute configuration

2017-01-26 Thread Netanel Belgazal
admin command. If set host info is not supported an error will be returned by the device. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 8 +++- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- 2 files changed, 6 inse

[PATCH V3 net-next 12/14] net/ena: change driver's default timeouts

2017-01-26 Thread Netanel Belgazal
The timeouts were too agressive and sometimes cause false alarms. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 4 ++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)

[PATCH V3 net-next 11/14] net/ena: reduce the severity of ena printouts

2017-01-26 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 27 +-- drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 +++--- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/net/et

[PATCH V3 net-next 10/14] net/ena: use READ_ONCE to access completion descriptors

2017-01-26 Thread Netanel Belgazal
Completion descriptors are accessed from the driver and from the device. To avoid reading the old value, use READ_ONCE macro. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.h | 1 + drivers/net/ethernet/amazon/ena/ena_eth_com

[PATCH V3 net-next 02/14] net/ena: fix error handling when probe fails

2017-01-26 Thread Netanel Belgazal
When driver fails in probe, it will release all resources, including adapter. In case of probe failure, ena_remove should not try to free the adapter resources. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file chan

[PATCH V3 net-next 14/14] net/ena: update driver version to 1.1.2

2017-01-26 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.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/ethernet/amazon/ena/ena_netdev.h index efe0ea1..e

[PATCH V3 net-next 00/14] Bug Fixes in ENA driver.

2017-01-26 Thread Netanel Belgazal
only. * Give example in the commit message for kernel crashes. * Use BIT(x) instead of use the value explicitly. Netanel Belgazal (14): net/ena: remove ntuple filter support from device feature list net/ena: fix error handling when probe fails net/ena: fix queues number calculation net/ena

[PATCH V4 net-next 05/13] net/ena: fix NULL dereference when removing the driver after device reset failed

2017-02-09 Thread Netanel Belgazal
6] RIP [] ena_com_reg_bar_read32+0x8a/0x180 [ena_drv] [ 54.244186] RSP [ 54.244186] CR2: [ 54.244186] ---[ end trace 18dd9889b6497810 ]--- Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +- 1 file changed,

[PATCH V4 net-next 07/13] net/ena: fix potential access to freed memory during device reset

2017-02-09 Thread Netanel Belgazal
to the driver's memory space. To overcome this potential race, move the reset before the device resources are freed. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 56 +--- 1 file changed, 43 insertions(

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

2017-02-09 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.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/ethernet/amazon/ena/ena_netdev.h index efe0ea1..e

[PATCH V4 net-next 09/13] net/ena: use READ_ONCE to access completion descriptors

2017-02-09 Thread Netanel Belgazal
Completion descriptors are accessed from the driver and from the device. To avoid reading the old value, use READ_ONCE macro. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.h | 1 + drivers/net/ethernet/amazon/ena/ena_eth_com

[PATCH V4 net-next 08/13] net/ena: use napi_complete_done() return value

2017-02-09 Thread Netanel Belgazal
Do not unamsk interrupts if we are in busy poll mode. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 44 ++-- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/amaz

[PATCH V4 net-next 12/13] net/ena: change condition for host attribute configuration

2017-02-09 Thread Netanel Belgazal
admin command. If set host info is not supported an error will be returned by the device. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 8 +++- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- 2 files changed, 6 inse

[PATCH V4 net-next 10/13] net/ena: reduce the severity of ena printouts

2017-02-09 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 27 +-- drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 +++--- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/net/et

[PATCH V4 net-next 00/13] Bug Fixes in ENA driver

2017-02-09 Thread Netanel Belgazal
Changes from V3: * Rebase patchset to master and solve merge conflicts. * Remove redundant bug fix (fix error handling when probe fails) Netanel Belgazal (13): net/ena: remove ntuple filter support from device feature list net/ena: fix queues number calculation net/ena: fix ethtool RSS flow

[PATCH V4 net-next 06/13] net/ena: refactor ena_get_stats64 to be atomic context safe

2017-02-09 Thread Netanel Belgazal
counters, and to obtain the rx drop counter from the asynchronous keep alive (heart bit) event. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 8 drivers/net/ethernet/amazon/ena/ena_netdev.c

[PATCH V4 net-next 03/13] net/ena: fix ethtool RSS flow configuration

2017-02-09 Thread Netanel Belgazal
and will configure wrong hash fields in set. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h b/d

[PATCH V4 net-next 02/13] net/ena: fix queues number calculation

2017-02-09 Thread Netanel Belgazal
The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus() while it should have use num_online_cpus() instead. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-

[PATCH V4 net-next 11/13] net/ena: change driver's default timeouts

2017-02-09 Thread Netanel Belgazal
The timeouts were too agressive and sometimes cause false alarms. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 4 ++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)

[PATCH V4 net-next 01/13] net/ena: remove ntuple filter support from device feature list

2017-02-09 Thread Netanel Belgazal
Remove NETIF_F_NTUPLE from netdev->features. The ENA device driver does not support ntuple filtering. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/a

[PATCH V4 net-next 04/13] net/ena: fix RSS default hash configuration

2017-02-09 Thread Netanel Belgazal
ENA default hash configures IPv4_frag hash twice instead of configure non-IP packets. The bug caused IPv4 fragmented packets to be calculated based on L2 source and destination address instead of L3 source and destination. IPv4 packets can reach to the wrong Rx queue. Signed-off-by: Netanel

[PATCH net 12/18] net/ena: refactor skb allocation

2016-11-20 Thread Netanel Belgazal
To increase readability, refactor skb allocation to dedicated function This change does not impact the performance since the compiler optimize the code and elimitate the if condition. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_ne

[PATCH net 03/18] net/ena: use napi_schedule_irqoff when possible

2016-11-20 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.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/ethernet/amazon/ena/ena_netdev.c index 8815217..e

[PATCH net 10/18] net/ena: use READ_ONCE to access completion descriptors

2016-11-20 Thread Netanel Belgazal
Completion descriptors are accessed from the driver and from the device. To avoid reading the old value, use READ_ONCE macro. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.h | 1 + drivers/net/ethernet/amazon/ena/ena_eth_com

[PATCH net 17/18] net/ena: fix NULL dereference when removing the driver after device reset faild

2016-11-20 Thread Netanel Belgazal
this issue perform the device reset in the remove function only if the device is runnig. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amaz

[PATCH net 06/18] net/ena: fix ethtool RSS flow configuration

2016-11-20 Thread Netanel Belgazal
ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type treat the ena_flow_hash_to_flow_type enum as power of two values. Change the values of ena_admin_flow_hash_fields to be power of two values. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amaz

[PATCH net 11/18] net/ena: fix potential access to freed memory during device reset

2016-11-20 Thread Netanel Belgazal
to the driver's memory space. To overcome this potential race, move the reset before the device resources are freed. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 56 +--- 1 file changed, 43 insertions(

[PATCH net 00/18] Update ENA driver to version 1.1.2

2016-11-20 Thread Netanel Belgazal
Update Amazon's Elastic Network Adapter (ENA) driver version from 1.0.2 to 1.1.2 Netanel Belgazal (18): net/ena: remove RFS support from device feature list net/ena: fix queues number calculation net/ena: use napi_schedule_irqoff when possible net/ena: reduce the severity of ena printouts

[PATCH net 15/18] net/ena: remove affinity hint from the driver

2016-11-20 Thread Netanel Belgazal
To allow irqbalance to better distribute the napi handler, remove the smp affinity hint from the driver. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH net 14/18] net/ena: add IPv6 extended protocols to ena_admin_flow_hash_proto

2016-11-20 Thread Netanel Belgazal
We intend to use those fields in the future. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.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/ethernet/

[PATCH net 01/18] net/ena: remove RFS support from device feature list

2016-11-20 Thread Netanel Belgazal
Remove NETIF_F_NTUPLE from netdev->features. The ENA device driver does not support RFS acceleration. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/a

[PATCH net 09/18] net/ena: change condition for host attribute configuration

2016-11-20 Thread Netanel Belgazal
admin command. If set host info is not supported an error will be returned by the device. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 8 +++- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- 2 files changed, 6 inse

[PATCH net 13/18] net/ena: remove redundant logic in napi callback for busy poll mode

2016-11-20 Thread Netanel Belgazal
napi_complete_done will remove napi from the schedule list so napi will be rescheduled (by ena_intr_msix_io) and interrupt will be unmasked as desire in the 2nd napi call. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.

[PATCH net 04/18] net/ena: reduce the severity of ena printouts

2016-11-20 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 27 +-- drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 +++--- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/net/et

[PATCH net 02/18] net/ena: fix queues number calculation

2016-11-20 Thread Netanel Belgazal
The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus while it should have use num_online_cpus instead. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-

[PATCH net 05/18] net/ena: add hardware hints capability to the driver

2016-11-20 Thread Netanel Belgazal
The ENA device can update the ena driver about the desire timeouts. The hardware hints are transmitted as Asynchronous event to the driver. In case the device does not support this capability, the driver will use its own defines. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.

[PATCH net 08/18] net/ena: change sizeof() argument to be the type pointer

2016-11-20 Thread Netanel Belgazal
Instead of using: memset(ptr, 0x0, sizeof(struct ...)) use: memset(ptr, 0x0, sizeor(*ptr)) Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drive

[PATCH net 18/18] net/ena: change driver's default timeouts and increase driver version

2016-11-20 Thread Netanel Belgazal
Driver version was increased to 1.1.2 Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 4 ++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 9 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drive

[PATCH net 16/18] net/ena: fix error handling when probe fails

2016-11-20 Thread Netanel Belgazal
When driver fails in probe, it will release all resources, including adapter. In case of probe failure, ena_remove should not try to free the adapter resources. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file chan

[PATCH net 07/18] net/ena: refactor ena_get_stats64 to be atomic context safe

2016-11-20 Thread Netanel Belgazal
and to take the rx drops counter from the asynchronous keep alive (heart bit) event. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 8 drivers/net/ethernet/amazon/ena/ena_netdev.c | 57 +--- drive

Re: [PATCH net 07/18] net/ena: refactor ena_get_stats64 to be atomic context safe

2016-11-20 Thread Netanel Belgazal
hub.com/0day-ci/linux/commits/Netanel-Belgazal/Update-ENA-driver-to-version-1-1-2/20161120-165649 > config: i386-randconfig-x009-201647 (attached as .config) > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 > reproduce: > # save the attached .config to linux build tree >

Re: [PATCH net 00/18] Update ENA driver to version 1.1.2

2016-11-20 Thread Netanel Belgazal
descriptors *net/ena: refactor skb allocation I'll add the above description in V2 (I would like to wait a couple of days to collect more feedback about those patches). Regards, Netanel On 11/20/2016 05:24 PM, David Miller wrote: > From: Netanel Belgazal <neta...@annapurnalabs.com> > Date:

[PATCH V2 net 12/20] net/ena: reduce the severity of ena printouts

2016-12-04 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 27 +-- drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 +++--- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/net/et

[PATCH V2 net 17/20] net/ena: add IPv6 extended protocols to ena_admin_flow_hash_proto

2016-12-04 Thread Netanel Belgazal
We intend to use those fields in the future. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.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/ethernet/

[PATCH V2 net 00/20] Increase ENA driver version to 1.1.2

2016-12-04 Thread Netanel Belgazal
when possible net/ena: add IPv6 extended protocols to ena_admin_flow_hash_proto net/ena: remove affinity hint from the driver net/ena: restructure skb allocation net/ena: increase driver version to 1.1.2 Netanel Belgazal (20): net/ena: remove ntuple filter support from device feature list net

[PATCH V2 net 06/20] net/ena: fix NULL dereference when removing the driver after device reset faild

2016-12-04 Thread Netanel Belgazal
this issue perform the device reset in the remove function only if the device is runnig. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amaz

[PATCH V2 net 04/20] net/ena: fix ethtool RSS flow configuration

2016-12-04 Thread Netanel Belgazal
ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type treat the ena_flow_hash_to_flow_type enum as power of two values. Change the values of ena_admin_flow_hash_fields to be power of two values. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amaz

[PATCH V2 net 20/20] net/ena: increase driver version to 1.1.2

2016-12-04 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.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/ethernet/amazon/ena/ena_netdev.h index ed42e07..d

[PATCH V2 net 10/20] net/ena: remove redundant logic in napi callback for busy poll mode

2016-12-04 Thread Netanel Belgazal
napi_complete_done will remove napi from the schedule list so napi will be rescheduled (by ena_intr_msix_io) and interrupt will be unmasked as desire in the 2nd napi call. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.

[PATCH V2 net 13/20] net/ena: change driver's default timeouts

2016-12-04 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 4 ++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 7 --- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drive

[PATCH V2 net 18/20] net/ena: remove affinity hint from the driver

2016-12-04 Thread Netanel Belgazal
To allow irqbalance to better distribute the napi handler, remove the smp affinity hint from the driver. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH V2 net 19/20] net/ena: restructure skb allocation

2016-12-04 Thread Netanel Belgazal
To increase readability, refactor skb allocation to dedicated function This change does not impact the performance since the compiler optimize the code and elimitate the if condition. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_ne

[PATCH V2 net 01/20] net/ena: remove ntuple filter support from device feature list

2016-12-04 Thread Netanel Belgazal
Remove NETIF_F_NTUPLE from netdev->features. The ENA device driver does not support ntuple filtering. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/a

[PATCH V2 net 03/20] net/ena: fix queues number calculation

2016-12-04 Thread Netanel Belgazal
The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus while it should have use num_online_cpus instead. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +-

Re: [PATCH V2 net 03/20] net/ena: fix queues number calculation

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 06:11 AM, Matt Wilson wrote: On Sun, Dec 04, 2016 at 03:19:21PM +0200, Netanel Belgazal wrote: The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus while it should have use num_online_cpus instead. use () when

Re: [PATCH V2 net 05/20] net/ena: fix RSS default hash configuration

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 06:20 AM, Matt Wilson wrote: On Sun, Dec 04, 2016 at 03:19:23PM +0200, Netanel Belgazal wrote: ENA default hash configure IPv4_frag hash twice instead of configure -> configures. You may want to include "erroneously". What is the consequence of this bug? I'll fix

Re: [PATCH V2 net 08/20] net/ena: add hardware hints capability to the driver

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 06:31 AM, Matt Wilson wrote: On Sun, Dec 04, 2016 at 03:19:26PM +0200, Netanel Belgazal wrote: The ENA device can update the ena driver about the desire timeouts. The hardware hints are transmitted as Asynchronous event to the driver. This is really a new feature, not a bugfix

Re: [PATCH V2 net 04/20] net/ena: fix ethtool RSS flow configuration

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 06:18 AM, Matt Wilson wrote: On Sun, Dec 04, 2016 at 03:19:22PM +0200, Netanel Belgazal wrote: ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type treat the ena_flow_hash_to_flow_type enum as power of two values. Change the values of ena_admin_flow_hash_fields to be power

Re: [PATCH V2 net 07/20] net/ena: refactor ena_get_stats64 to be atomic context safe

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 06:24 AM, Matt Wilson wrote: On Sun, Dec 04, 2016 at 03:19:25PM +0200, Netanel Belgazal wrote: ndo_get_stat64 can be called from atomic context. However the current implementation sends an admin command to retrieve the statistics from the device. This admin commands uses sleep

Re: [PATCH V2 net 06/20] net/ena: fix NULL dereference when removing the driver after device reset faild

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 06:29 AM, Matt Wilson wrote: On Sun, Dec 04, 2016 at 03:19:24PM +0200, Netanel Belgazal wrote: If for some reason the device stop responding and the device reset failed to recover the device, the mmio register read datastructure will not be reinitialized. If for some reason

Re: [PATCH V2 net 10/20] net/ena: remove redundant logic in napi callback for busy poll mode

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 07:45 AM, Eric Dumazet wrote: On Sun, 2016-12-04 at 15:19 +0200, Netanel Belgazal wrote: sk_busy_loop can call the napi callback few million times a sec. For each call there is unmask interrupt. We want to reduce the number of unmasks. Add an atomic variable that will tell

Re: [PATCH V2 net 02/20] net/ena: fix error handling when probe fails

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 06:09 AM, Matt Wilson wrote: On Sun, Dec 04, 2016 at 03:19:20PM +0200, Netanel Belgazal wrote: When driver fails in probe, it will release all resources, including adapter. In case of probe failure, ena_remove should not try to free the adapter resources. Please word wrap your

Re: [PATCH V2 net 13/20] net/ena: change driver's default timeouts

2016-12-05 Thread Netanel Belgazal
On 12/05/2016 06:35 AM, Matt Wilson wrote: On Sun, Dec 04, 2016 at 03:19:31PM +0200, Netanel Belgazal wrote: ... because? (they turned out to be too aggressive, I believe.) Yes, The timeout were too aggressive on some specific machines. Signed-off-by: Netanel Belgazal <n

[PATCH V2 net 14/20] net/ena: change condition for host attribute configuration

2016-12-04 Thread Netanel Belgazal
admin command. If set host info is not supported an error will be returned by the device. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c| 8 +++- drivers/net/ethernet/amazon/ena/ena_netdev.c | 5 +++-- 2 files changed, 6 inse

[PATCH V2 net 02/20] net/ena: fix error handling when probe fails

2016-12-04 Thread Netanel Belgazal
When driver fails in probe, it will release all resources, including adapter. In case of probe failure, ena_remove should not try to free the adapter resources. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file chan

[PATCH V2 net 11/20] net/ena: use READ_ONCE to access completion descriptors

2016-12-04 Thread Netanel Belgazal
Completion descriptors are accessed from the driver and from the device. To avoid reading the old value, use READ_ONCE macro. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.h | 1 + drivers/net/ethernet/amazon/ena/ena_eth_com

[PATCH V2 net 05/20] net/ena: fix RSS default hash configuration

2016-12-04 Thread Netanel Belgazal
ENA default hash configure IPv4_frag hash twice instead of configure non ip packets. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amaz

[PATCH V2 net 09/20] net/ena: fix potential access to freed memory during device reset

2016-12-04 Thread Netanel Belgazal
to the driver's memory space. To overcome this potential race, move the reset before the device resources are freed. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 56 +--- 1 file changed, 43 insertions(

[PATCH V2 net 07/20] net/ena: refactor ena_get_stats64 to be atomic context safe

2016-12-04 Thread Netanel Belgazal
and to take the rx drops counter from the asynchronous keep alive (heart bit) event. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 8 drivers/net/ethernet/amazon/ena/ena_netdev.c | 57 +--- drive

[PATCH V2 net 08/20] net/ena: add hardware hints capability to the driver

2016-12-04 Thread Netanel Belgazal
The ENA device can update the ena driver about the desire timeouts. The hardware hints are transmitted as Asynchronous event to the driver. In case the device does not support this capability, the driver will use its own defines. Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.

[PATCH V2 net 16/20] net/ena: use napi_schedule_irqoff when possible

2016-12-04 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.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/ethernet/amazon/ena/ena_netdev.c index 8c1e14b..6

[PATCH V2 net 15/20] net/ena: change sizeof() argument to be the type pointer

2016-12-04 Thread Netanel Belgazal
Instead of using: memset(ptr, 0x0, sizeof(struct ...)) use: memset(ptr, 0x0, sizeor(*ptr)) Signed-off-by: Netanel Belgazal <neta...@annapurnalabs.com> --- drivers/net/ethernet/amazon/ena/ena_com.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drive

[PATCH net 12/18] net/ena: refactor skb allocation

2016-11-20 Thread Netanel Belgazal
To increase readability, refactor skb allocation to dedicated function This change does not impact the performance since the compiler optimize the code and elimitate the if condition. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 46

[PATCH net 03/18] net/ena: use napi_schedule_irqoff when possible

2016-11-20 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal --- 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/ethernet/amazon/ena/ena_netdev.c index 8815217..e3acf76 100644 --- a/drivers/net

[PATCH net 10/18] net/ena: use READ_ONCE to access completion descriptors

2016-11-20 Thread Netanel Belgazal
Completion descriptors are accessed from the driver and from the device. To avoid reading the old value, use READ_ONCE macro. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.h | 1 + drivers/net/ethernet/amazon/ena/ena_eth_com.c | 8 2 files changed, 5

[PATCH net 17/18] net/ena: fix NULL dereference when removing the driver after device reset faild

2016-11-20 Thread Netanel Belgazal
this issue perform the device reset in the remove function only if the device is runnig. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net

[PATCH net 06/18] net/ena: fix ethtool RSS flow configuration

2016-11-20 Thread Netanel Belgazal
ena_flow_data_to_flow_hash and ena_flow_hash_to_flow_type treat the ena_flow_hash_to_flow_type enum as power of two values. Change the values of ena_admin_flow_hash_fields to be power of two values. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 12

[PATCH net 07/18] net/ena: refactor ena_get_stats64 to be atomic context safe

2016-11-20 Thread Netanel Belgazal
and to take the rx drops counter from the asynchronous keep alive (heart bit) event. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 8 drivers/net/ethernet/amazon/ena/ena_netdev.c | 57 +--- drivers/net/ethernet/amazon/ena

[PATCH net 08/18] net/ena: change sizeof() argument to be the type pointer

2016-11-20 Thread Netanel Belgazal
Instead of using: memset(ptr, 0x0, sizeof(struct ...)) use: memset(ptr, 0x0, sizeor(*ptr)) Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c

[PATCH net 18/18] net/ena: change driver's default timeouts and increase driver version

2016-11-20 Thread Netanel Belgazal
Driver version was increased to 1.1.2 Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c| 4 ++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 9 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c

[PATCH net 16/18] net/ena: fix error handling when probe fails

2016-11-20 Thread Netanel Belgazal
When driver fails in probe, it will release all resources, including adapter. In case of probe failure, ena_remove should not try to free the adapter resources. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH net 05/18] net/ena: add hardware hints capability to the driver

2016-11-20 Thread Netanel Belgazal
The ENA device can update the ena driver about the desire timeouts. The hardware hints are transmitted as Asynchronous event to the driver. In case the device does not support this capability, the driver will use its own defines. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon

[PATCH net 04/18] net/ena: reduce the severity of ena printouts

2016-11-20 Thread Netanel Belgazal
Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_com.c| 27 +-- drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 +++--- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b

[PATCH net 02/18] net/ena: fix queues number calculation

2016-11-20 Thread Netanel Belgazal
The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus while it should have use num_online_cpus instead. Signed-off-by: Netanel Belgazal --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1

  1   2   >