[PATCH V4 net-next 3/4] net: ena: ethtool: add stats printing to XDP queues

2020-09-10 Thread sameehj
From: Sameeh Jubran Added statistics for TX queues that are used for XDP TX. The statistics are the same as the ones printed for regular non-XDP TX queues. The XDP queue statistics can be queried using `ethtool -S ` Signed-off-by: Shay Agroskin Signed-off-by: Sameeh Jubran --- drivers/net/et

[PATCH V4 net-next 0/4] Enhance current features in ena driver

2020-09-10 Thread sameehj
From: Sameeh Jubran This series adds the following: * Exposes new device stats using ethtool. * Adds and exposes the stats of xdp TX queues through ethtool. V3: Fix indentation in patches #3 and #4 V2: Drop the need for casting stat_offset V1: Use unsigned long for pointer math instead of uintpt

[PATCH V4 net-next 1/4] net: ena: ethtool: convert stat_offset to 64 bit resolution

2020-09-10 Thread sameehj
From: Sameeh Jubran The type of all stat fields is u64, therefore when iterating over stat fields in a stats struct, it makes sense to use an offset in 64 bit resolution. Doing so allows us to drop some of the casting that is currently used when referencing stats. Signed-off-by: Sameeh Jubran -

[PATCH V4 net-next 4/4] net: ena: xdp: add queue counters for xdp actions

2020-09-10 Thread sameehj
From: Sameeh Jubran When using XDP every ingress packet is passed to an eBPF (xdp) program which returns an action for this packet. This patch adds counters for the number of times each such action was received. It also counts all the invalid actions received from the eBPF program. Signed-off-b

[PATCH V4 net-next 2/4] net: ena: ethtool: Add new device statistics

2020-09-10 Thread sameehj
From: Sameeh Jubran The new metrics provide granular visibility along multiple network dimensions and enable troubleshooting and remediation of issues caused by instances exceeding network performance allowances. The new statistics can be queried using ethtool command. Signed-off-by: Guy Tzalik

[PATCH V3 net-next 3/4] net: ena: ethtool: add stats printing to XDP queues

2020-09-08 Thread sameehj
From: Sameeh Jubran Added statistics for TX queues that are used for XDP TX. The statistics are the same as the ones printed for regular non-XDP TX queues. The XDP queue statistics can be queried using `ethtool -S ` Signed-off-by: Shay Agroskin Signed-off-by: Sameeh Jubran --- drivers/net/et

[PATCH V3 net-next 4/4] net: ena: xdp: add queue counters for xdp actions

2020-09-08 Thread sameehj
From: Sameeh Jubran When using XDP every ingress packet is passed to an eBPF (xdp) program which returns an action for this packet. This patch adds counters for the number of times each such action was received. It also counts all the invalid actions received from the eBPF program. Signed-off-b

[PATCH V3 net-next 1/4] net: ena: ethtool: convert stat_offset to 64 bit resolution

2020-09-08 Thread sameehj
From: Sameeh Jubran The type of all stat fields is u64, therefore when iterating over stat fields in a stats struct, it makes sense to use an offset in 64 bit resolution. Doing so allows us to drop some of the casting that is currently used when referencing stats. Signed-off-by: Sameeh Jubran -

[PATCH V3 net-next 0/4] Enhance current features in ena driver

2020-09-08 Thread sameehj
From: Sameeh Jubran This series adds the following: * Exposes new device stats using ethtool. * Adds and exposes the stats of xdp TX queues through ethtool. V2: Drop the need for casting stat_offset V1: Use unsigned long for pointer math instead of uintptr_t Sameeh Jubran (4): net: ena: ethto

[PATCH V3 net-next 2/4] net: ena: ethtool: Add new device statistics

2020-09-08 Thread sameehj
From: Sameeh Jubran The new metrics provide granular visibility along multiple network dimensions and enable troubleshooting and remediation of issues caused by instances exceeding network performance allowances. The new statistics can be queried using ethtool command. Signed-off-by: Guy Tzalik

[PATCH V2 net-next 0/4] Enhance current features in ena driver

2020-08-19 Thread sameehj
From: Sameeh Jubran This series adds the following: * Exposes new device stats using ethtool. * Adds and exposes the stats of xdp TX queues through ethtool. V1: Use unsigned long for pointer math instead of uintptr_t Sameeh Jubran (4): net: ena: ethtool: use unsigned long for pointer arithmet

[PATCH V2 net-next 4/4] net: ena: xdp: add queue counters for xdp actions

2020-08-19 Thread sameehj
From: Sameeh Jubran When using XDP every ingress packet is passed to an eBPF (xdp) program which returns an action for this packet. This patch adds counters for the number of times each such action was received. It also counts all the invalid actions received from the eBPF program. Signed-off-b

[PATCH V2 net-next 1/4] net: ena: ethtool: use unsigned long for pointer arithmetics

2020-08-19 Thread sameehj
From: Sameeh Jubran unsigned long is the type for doing maths on pointers. Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/driver

[PATCH V2 net-next 2/4] net: ena: ethtool: Add new device statistics

2020-08-19 Thread sameehj
From: Sameeh Jubran The new metrics provide granular visibility along multiple network dimensions and enable troubleshooting and remediation of issues caused by instances exceeding network performance allowances. The new statistics can be queried using ethtool command. Signed-off-by: Guy Tzalik

[PATCH V2 net-next 3/4] net: ena: ethtool: add stats printing to XDP queues

2020-08-19 Thread sameehj
From: Sameeh Jubran Added statistics for TX queues that are used for XDP TX. The statistics are the same as the ones printed for regular non-XDP TX queues. The XDP queue statistics can be queried using `ethtool -S ` Signed-off-by: Shay Agroskin Signed-off-by: Sameeh Jubran --- drivers/net/et

[PATCH V1 net-next 3/3] net: ena: xdp: add queue counters for xdp actions

2020-08-01 Thread sameehj
From: Sameeh Jubran When using XDP every ingress packet is passed to an eBPF (xdp) program which returns an action for this packet. This patch adds counters for the number of times each such action was received. It also counts all the invalid actions received from the eBPF program. Signed-off-b

[PATCH V1 net-next 2/3] net: ena: ethtool: add stats printing to XDP queues

2020-08-01 Thread sameehj
From: Sameeh Jubran Added statistics for TX queues that are used for XDP TX. The statistics are the same as the ones printed for regular non-XDP TX queues. The XDP queue statistics can be queried using `ethtool -S ` Signed-off-by: Shay Agroskin Signed-off-by: Sameeh Jubran --- drivers/net/et

[PATCH V1 net-next 0/3] Enhance current features in ena driver

2020-08-01 Thread sameehj
From: Sameeh Jubran This series adds the following: * Exposes new device stats using ethtool. * Adds and exposes the stats of xdp TX queues through ethtool. Sameeh Jubran (3): net: ena: ethtool: Add new device statistics net: ena: ethtool: add stats printing to XDP queues net: ena: xdp: ad

[PATCH V1 net-next 1/3] net: ena: ethtool: Add new device statistics

2020-08-01 Thread sameehj
From: Sameeh Jubran The new metrics provide granular visibility along multiple network dimensions and enable troubleshooting and remediation of issues caused by instances exceeding network performance allowances. The new statistics can be queried using ethtool command. Signed-off-by: Guy Tzalik

[PATCH RFC net-next 1/2] xdp: helpers: add multibuffer support

2020-07-27 Thread sameehj
From: Sameeh Jubran The implementation is based on this [0] draft by Jesper D. Brouer. Provided two helpers: * bpf_xdp_get_frag() * bpf_xdp_get_frag_count() [0] xdp mb design - https://github.com/xdp-project/xdp-project/blob/master/areas/core/xdp-multi-buffer01-design.org Signed-off-by: Samee

[PATCH RFC net-next 0/2] XDP multi buffer helpers

2020-07-27 Thread sameehj
From: Sameeh Jubran This series is based on the series that Lorenzo sent [0]. This series simply adds new bpf helpers for xdp mb support as well as introduces a sample program that uses them. [0] - [RFC net-next 00/22] Introduce mb bit in xdp_buff/xdp_frame Sameeh Jubran (2): xdp: helpers: a

[PATCH RFC net-next 2/2] samples/bpf: add bpf program that uses xdp mb helpers

2020-07-27 Thread sameehj
From: Sameeh Jubran The bpf program returns XDP_PASS for every packet and calculates the total number of bytes in its linear and paged parts. The program is executed with: ./xdp_mb [if name] and has the following output format: [if index]: [rx packet count] pkt/sec, [number of bytes] bytes/sec

[PATCH V2 net 2/2] net: ena: xdp: update napi budget for DROP and ABORTED

2020-06-03 Thread sameehj
From: Sameeh Jubran This patch fixes two issues with XDP: 1. If the XDP verdict is XDP_ABORTED we break the loop, which results in us handling one buffer per napi cycle instead of the total budget (usually 64). To overcome this simply change the xdp_verdict check to != XDP_PASS. When th

[PATCH V2 net 1/2] net: ena: xdp: XDP_TX: fix memory leak

2020-06-03 Thread sameehj
From: Sameeh Jubran When sending very high packet rate, the XDP tx queues can get full and start dropping packets. In this case we don't free the pages which results in ena driver draining the system memory. Fix: Simply free the pages when necessary. Fixes: 548c4940b9f1 ("net: ena: Implement XD

[PATCH V2 net 0/2] Fix xdp in ena driver

2020-06-03 Thread sameehj
From: Sameeh Jubran This patchset includes 2 XDP related bug fixes Difference from v1: * Fixed "Fixes" tag Sameeh Jubran (2): net: ena: xdp: XDP_TX: fix memory leak net: ena: xdp: update napi budget for DROP and ABORTED drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 +- 1 file

[PATCH V1 net 2/2] net: ena: xdp: update napi budget for DROP and ABORTED

2020-06-02 Thread sameehj
From: Sameeh Jubran This patch fixes two issues with XDP: 1. If the XDP verdict is XDP_ABORTED we break the loop, which results in us handling one buffer per napi cycle instead of the total budget (usually 64). To overcome this simply change the xdp_verdict check to != XDP_PASS. When th

[PATCH V1 net 1/2] net: ena: xdp: XDP_TX: fix memory leak

2020-06-02 Thread sameehj
From: Sameeh Jubran When sending very high packet rate, the XDP tx queues can get full and start dropping packets. In this case we don't free the pages which results in ena driver draining the system memory. Fix: Simply free the pages when necessary. Fixes: cad451dd2427 ("net: ena: Implement XD

[PATCH V1 net 0/2] Fix xdp in ena driver

2020-06-02 Thread sameehj
From: Sameeh Jubran This patchset includes 2 XDP related bug fixes. Sameeh Jubran (2): net: ena: xdp: XDP_TX: fix memory leak net: ena: xdp: update napi budget for DROP and ABORTED drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCH V3 net-next 11/12] net: ena: cosmetic: remove unnecessary spaces and tabs in ena_com.h macros

2020-05-03 Thread sameehj
From: Sameeh Jubran The macros in ena_com.h have inconsistent spaces between the macro name and it's value. This commit sets all the macros to have a single space between the name and value. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena

[PATCH V3 net-next 03/12] net: ena: allow setting the hash function without changing the key

2020-05-03 Thread sameehj
From: Sameeh Jubran Current code does not allow setting the hash function without changing the key. This commit enables it. To achieve this we separate ena_com_get_hash_function() to 2 functions: ena_com_get_hash_function() - which gets only the hash function, and ena_com_get_hash_key() - which

[PATCH V3 net-next 07/12] net: ena: add unmask interrupts statistics to ethtool

2020-05-03 Thread sameehj
From: Sameeh Jubran Add unmask interrupts statistics to ethtool. Signed-off-by: Netanel Belgazal Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 +++ drivers/net/ethernet/

[PATCH V3 net-next 01/12] net: ena: avoid unnecessary admin command when RSS function set fails

2020-05-03 Thread sameehj
From: Arthur Kiyanovski Currently when ena_set_hash_function() fails the hash function is restored to the previous value by calling an admin command to get the hash function from the device. In this commit we avoid the admin command, by saving the previous hash function before calling ena_set_ha

[PATCH V3 net-next 12/12] net: ena: cosmetic: extract code to ena_indirection_table_set()

2020-05-03 Thread sameehj
From: Arthur Kiyanovski Extract code to ena_indirection_table_set() to make the code cleaner. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 48 --- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git

[PATCH V3 net-next 06/12] net: ena: remove code that does nothing

2020-05-03 Thread sameehj
From: Sameeh Jubran Both key and func parameters are pointers on the stack. Setting them to NULL does nothing. The original intent was to leave the key and func unset in this case, but for this to happen nothing needs to be done as the calling function ethtool_get_rxfh() already clears key and fu

[PATCH V3 net-next 00/12] Enhance current features in ena driver

2020-05-03 Thread sameehj
From: Sameeh Jubran Difference from v2: * dropped patch "net: ena: move llq configuration from ena_probe to ena_device_init()" * reworked patch ""net: ena: implement ena_com_get_admin_polling_mode() to drop the prototype Difference from v1: * reodered paches #01 and #02. * dropped adding Rx/

[PATCH V3 net-next 05/12] net: ena: changes to RSS hash key allocation

2020-05-03 Thread sameehj
From: Sameeh Jubran This commit contains 2 cosmetic changes: 1. Use ena_com_check_supported_feature_id() in ena_com_hash_key_fill_default_key() instead of rewriting its implementation. This also saves us a superfluous admin command by using the cached value. 2. Change if conditions in

[PATCH V3 net-next 08/12] net: ena: add support for reporting of packet drops

2020-05-03 Thread sameehj
From: Sameeh Jubran 1. Add support for getting tx drops from the device and saving them in the driver. 2. Report tx via netdev stats. Signed-off-by: Igor Chauskin Signed-off-by: Guy Tzalik Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_

[PATCH V3 net-next 10/12] net: ena: use SHUTDOWN as reset reason when closing interface

2020-05-03 Thread sameehj
From: Sameeh Jubran The 'ENA_REGS_RESET_SHUTDOWN' enum indicates a normal driver shutdown / removal procedure. Also, a comment is added to one of the reset reason assignments for code clarity. Signed-off-by: Shay Agroskin Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- dri

[PATCH V3 net-next 04/12] net: ena: change default RSS hash function to Toeplitz

2020-05-03 Thread sameehj
From: Arthur Kiyanovski Currently in the driver we are setting the hash function to be CRC32. Starting with this commit we want to change the default behaviour so that we set the hash function to be Toeplitz instead. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/ne

[PATCH V3 net-next 09/12] net: ena: drop superfluous prototype

2020-05-03 Thread sameehj
From: Arthur Kiyanovski Before this commit there was a function prototype named ena_com_get_ena_admin_polling_mode() that was never implemented. This patch simply deletes it. Signed-off-by: Igor Chauskin Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_com.h | 12

[PATCH V3 net-next 02/12] net: ena: fix error returning in ena_com_get_hash_function()

2020-05-03 Thread sameehj
From: Arthur Kiyanovski In case the "func" parameter is NULL we now return "-EINVAL". This shouldn't happen in general, but when it does happen, this is the proper way to handle it. We also check func for NULL in the beginning of the function, as there is no reason to do all the work and realize

[PATCH V2 net-next 05/13] net: ena: changes to RSS hash key allocation

2020-04-28 Thread sameehj
From: Sameeh Jubran This commit contains 2 cosmetic changes: 1. Use ena_com_check_supported_feature_id() in ena_com_hash_key_fill_default_key() instead of rewriting its implementation. This also saves us a superfluous admin command by using the cached value. 2. Change if conditions in

[PATCH V2 net-next 06/13] net: ena: remove code that does nothing

2020-04-28 Thread sameehj
From: Sameeh Jubran Both key and func parameters are pointers on the stack. Setting them to NULL does nothing. The original intent was to leave the key and func unset in this case, but for this to happen nothing needs to be done as the calling function ethtool_get_rxfh() already clears key and fu

[PATCH V2 net-next 12/13] net: ena: cosmetic: remove unnecessary spaces and tabs in ena_com.h macros

2020-04-28 Thread sameehj
From: Sameeh Jubran The macros in ena_com.h have inconsistent spaces between the macro name and it's value. This commit sets all the macros to have a single space between the name and value. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena

[PATCH V2 net-next 02/13] net: ena: fix error returning in ena_com_get_hash_function()

2020-04-28 Thread sameehj
From: Arthur Kiyanovski In case the "func" parameter is NULL we now return "-EINVAL". This shouldn't happen in general, but when it does happen, this is the proper way to handle it. We also check func for NULL in the beginning of the function, as there is no reason to do all the work and realize

[PATCH V2 net-next 13/13] net: ena: cosmetic: extract code to ena_indirection_table_set()

2020-04-28 Thread sameehj
From: Arthur Kiyanovski Extract code to ena_indirection_table_set() to make the code cleaner. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 48 --- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git

[PATCH V2 net-next 08/13] net: ena: add support for reporting of packet drops

2020-04-28 Thread sameehj
From: Sameeh Jubran 1. Add support for getting tx drops from the device and saving them in the driver. 2. Report tx via netdev stats. Signed-off-by: Igor Chauskin Signed-off-by: Guy Tzalik Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_

[PATCH V2 net-next 04/13] net: ena: change default RSS hash function to Toeplitz

2020-04-28 Thread sameehj
From: Arthur Kiyanovski Currently in the driver we are setting the hash function to be CRC32. Starting with this commit we want to change the default behaviour so that we set the hash function to be Toeplitz instead. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski --- drivers/ne

[PATCH V2 net-next 09/13] net: ena: implement ena_com_get_admin_polling_mode()

2020-04-28 Thread sameehj
From: Arthur Kiyanovski Before this commit there was a function prototype named ena_com_get_ena_admin_polling_mode() that was never implemented. This commit: 1. Changes the name of the function by removing the redundant double "ena_" in it. 2. Adds an implementation to the function. 3. Fixes a

[PATCH V2 net-next 00/13] Enhance current features in ena driver

2020-04-28 Thread sameehj
From: Sameeh Jubran Difference from v1: * reodered paches #01 and #02. * dropped adding Rx/Tx drops to ethtool in patch #08 V1: This patchset introduces the following: * minor changes to RSS feature * add total rx and tx drop counter * add unmask_interrupt counter for ethtool statistics * add mi

[PATCH V2 net-next 01/13] net: ena: avoid unnecessary admin command when RSS function set fails

2020-04-28 Thread sameehj
From: Arthur Kiyanovski Currently when ena_set_hash_function() fails the hash function is restored to the previous value by calling an admin command to get the hash function from the device. In this commit we avoid the admin command, by saving the previous hash function before calling ena_set_ha

[PATCH V2 net-next 11/13] net: ena: move llq configuration from ena_probe to ena_device_init()

2020-04-28 Thread sameehj
From: Arthur Kiyanovski This refactor is done as preparation for an upcoming feature of allowing to increase the header size when LLQ is on. Such a change needs to survive a device reset (for instance due to some recoverable error). In order to do that, llq initialization needs to happen both at

[PATCH V2 net-next 07/13] net: ena: add unmask interrupts statistics to ethtool

2020-04-28 Thread sameehj
From: Sameeh Jubran Add unmask interrupts statistics to ethtool. Signed-off-by: Netanel Belgazal Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 +++ drivers/net/ethernet/

[PATCH V2 net-next 10/13] net: ena: use SHUTDOWN as reset reason when closing interface

2020-04-28 Thread sameehj
From: Sameeh Jubran The 'ENA_REGS_RESET_SHUTDOWN' enum indicates a normal driver shutdown / removal procedure. Also, a comment is added to one of the reset reason assignments for code clarity. Signed-off-by: Shay Agroskin Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- dri

[PATCH V2 net-next 03/13] net: ena: allow setting the hash function without changing the key

2020-04-28 Thread sameehj
From: Sameeh Jubran Current code does not allow setting the hash function without changing the key. This commit enables it. To achieve this we separate ena_com_get_hash_function() to 2 functions: ena_com_get_hash_function() - which gets only the hash function, and ena_com_get_hash_key() - which

[RFC V2 net-next v2 1/3] net: ena: implement XDP drop support

2019-10-16 Thread sameehj
From: Sameeh Jubran This commit implements the basic functionality of drop/pass logic in the ena driver. Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 132 +-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 29 2 files changed, 152 insert

[RFC V2 net-next v2 3/3] net: ena: Add first_interrupt field to napi struct

2019-10-16 Thread sameehj
From: Sameeh Jubran The first_interrupt field is accessed in ena_intr_msix_io() upon receiving an interrupt.The rx_ring and tx_ring fields of napi can be NULL when receiving interrupt for xdp queues. This patch fixes the issue by moving the field to the ena_napi struct. Signed-off-by: Sameeh Jub

[RFC V2 net-next v2 0/3] Introduce XDP to ena

2019-10-16 Thread sameehj
From: Sameeh Jubran This patchset includes 3 patches: * XDP_DROP implementation * XDP_TX implementation * A fix for an issue which might occur due to the XDP_TX patch. I see fit to place it as a standalone patch for clarity. Difference from RFC v1 (XDP_DROP patch): * Initialized xdp.rxq pointe

[PATCH V3 net-next 4/6] net: ena: make ethtool -l show correct max number of queues

2019-10-06 Thread sameehj
From: Sameeh Jubran - Update ena_ethtool:ena_get_channels() to return adapter->max_io_queues so that ethtool -l returns the correct maximum queue number. - Change the name of ena_calc_io_queue_num() to ena_calc_max_io_queue_num() as it returns the maximum number of io queues and actual num

[PATCH V3 net-next 6/6] net: ena: ethtool: support set_channels callback

2019-10-06 Thread sameehj
From: Sameeh Jubran Set channels callback enables the user to change the count of queues used by the driver using ethtool. We decided to currently support only equal number of rx and tx queues, this might change in the future. Also rename dev_up to dev_was_up in ena_update_queue_count() to make

[PATCH V3 net-next 5/6] net: ena: remove redundant print of number of queues

2019-10-06 Thread sameehj
From: Sameeh Jubran The number of queues can be derived using ethtool, no need to print it in ena_probe() Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_ne

[PATCH V3 net-next 3/6] net: ena: ethtool: get_channels: use combined only

2019-10-06 Thread sameehj
From: Sameeh Jubran Since we use the same IRQ and NAPI to service RX and TX then we need to use a combined channel instead of rx and tx channels. Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) dif

[PATCH V3 net-next 1/6] net: ena: change num_queues to num_io_queues for clarity and consistency

2019-10-06 Thread sameehj
From: Sameeh Jubran Most places in the code refer to the IO queues as io_queues and not simply queues. Examples - max_io_queues_per_vf, ENA_MAX_NUM_IO_QUEUES, ena_destroy_all_io_queues() etc.. We are also adding the new max_num_io_queues field to struct ena_adapter in the following commit. The

[PATCH V3 net-next 0/6]

2019-10-06 Thread sameehj
From: Sameeh Jubran Difference from v2: * ethtool's set/get channels: Switched to using combined instead of separate rx/tx * Fixed error handling in set_channels * Fixed indentation and cosmetic issues as requested by Jakub Kicinski Difference from v1: * Dropped the print from patch 0002 - "n

[PATCH V3 net-next 2/6] net: ena: multiple queue creation related cleanups

2019-10-06 Thread sameehj
From: Sameeh Jubran - Rename ena_calc_queue_size() to ena_calc_io_queue_size() for clarity and consistency - Remove redundant number of io queues parameter in functions ena_enable_msix() and ena_enable_msix_and_set_admin_interrupts(), which already get adapter parameter, so use adapter->num

[PATCH V2 net-next 4/5] net: ena: remove redundant print of number of queues

2019-10-02 Thread sameehj
From: Sameeh Jubran The number of queues can be derived using ethtool, no need to print it in ena_probe() Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_ne

[PATCH V2 net-next 0/5] Introduce ethtool's set_channels

2019-10-02 Thread sameehj
From: Sameeh Jubran Difference from v1: * Dropped the print from patch 0002 - "net: ena: multiple queue creation related cleanups" as requested by David Miller Sameeh Jubran (5): net: ena: change num_queues to num_io_queues for clarity and consistency net: ena: multiple queue creation

[PATCH V2 net-next 5/5] net: ena: ethtool: support set_channels callback

2019-10-02 Thread sameehj
From: Sameeh Jubran Set channels callback enables the user to change the count of queues used by the driver using ethtool. We decided to currently support only equal number of rx and tx queues, this might change in the future. Also rename dev_up to dev_was_up in ena_update_queue_count() to make

[PATCH V2 net-next 2/5] net: ena: multiple queue creation related cleanups

2019-10-02 Thread sameehj
From: Sameeh Jubran - Rename ena_calc_queue_size() to ena_calc_io_queue_size() for clarity and consistency - Remove redundant number of io queues parameter in functions ena_enable_msix() and ena_enable_msix_and_set_admin_interrupts(), which already get adapter parameter, so use adapter->num

[PATCH V2 net-next 1/5] net: ena: change num_queues to num_io_queues for clarity and consistency

2019-10-02 Thread sameehj
From: Sameeh Jubran Most places in the code refer to the IO queues as io_queues and not simply queues. Examples - max_io_queues_per_vf, ENA_MAX_NUM_IO_QUEUES, ena_destroy_all_io_queues() etc.. We are also adding the new max_num_io_queues field to struct ena_adapter in the following commit. The

[PATCH V2 net-next 3/5] net: ena: make ethtool -l show correct max number of queues

2019-10-02 Thread sameehj
From: Sameeh Jubran - Update ena_ethtool:ena_get_channels() to return adapter->max_io_queues so that ethtool -l returns the correct maximum queue number. - Change the name of ena_calc_io_queue_num() to ena_calc_max_io_queue_num() as it returns the maximum number of io queues and actual num

[PATCH V2 net-next 2/5] net: ena: multiple queue creation related cleanups

2019-09-19 Thread sameehj
From: Sameeh Jubran - Rename ena_calc_queue_size() to ena_calc_io_queue_size() for clarity and consistency - Remove redundant number of io queues parameter in functions ena_enable_msix() and ena_enable_msix_and_set_admin_interrupts(), which already get adapter parameter, so use adapter->num

[PATCH V2 net-next 4/5] net: ena: remove redundant print of number of queues

2019-09-19 Thread sameehj
From: Sameeh Jubran The number of queues can be derived using ethtool, no need to print it in ena_probe() Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_ne

[PATCH V2 net-next 5/5] net: ena: ethtool: support set_channels callback

2019-09-19 Thread sameehj
From: Sameeh Jubran Set channels callback enables the user to change the count of queues used by the driver using ethtool. We decided to currently support only equal number of rx and tx queues, this might change in the future. Also rename dev_up to dev_was_up in ena_update_queue_count() to make

[PATCH V2 net-next 0/5] Introduce ethtool's set_channels

2019-09-19 Thread sameehj
From: Sameeh Jubran Difference from v1: * Dropped the print from patch 0002 - "net: ena: multiple queue creation related cleanups" as requested by David Miller Sameeh Jubran (5): net: ena: change num_queues to num_io_queues for clarity and consistency net: ena: multiple queue creation

[PATCH V2 net-next 3/5] net: ena: make ethtool -l show correct max number of queues

2019-09-19 Thread sameehj
From: Sameeh Jubran - Update ena_ethtool:ena_get_channels() to return adapter->max_io_queues so that ethtool -l returns the correct maximum queue number. - Change the name of ena_calc_io_queue_num() to ena_calc_max_io_queue_num() as it returns the maximum number of io queues and actual num

[PATCH V2 net-next 1/5] net: ena: change num_queues to num_io_queues for clarity and consistency

2019-09-19 Thread sameehj
From: Sameeh Jubran Most places in the code refer to the IO queues as io_queues and not simply queues. Examples - max_io_queues_per_vf, ENA_MAX_NUM_IO_QUEUES, ena_destroy_all_io_queues() etc.. We are also adding the new max_num_io_queues field to struct ena_adapter in the following commit. The

[PATCH V1 net-next 3/5] make ethtool -l show correct max number of queues

2019-09-15 Thread sameehj
From: Sameeh Jubran - Update ena_ethtool:ena_get_channels() to return adapter->max_io_queues so that ethtool -l returns the correct maximum queue number. - Change the name of ena_calc_io_queue_num() to ena_calc_max_io_queue_num() as it returns the maximum number of io queues and actual num

[PATCH V1 net-next 4/5] net: ena:remove redundant print of number of queues and placement policy

2019-09-15 Thread sameehj
From: Sameeh Jubran The number of queues and the placement policy are printed in the process of queue creation in ena_up(). No need to print them in ena_probe() Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 10 ++ 1 fi

[PATCH V1 net-next 0/5] Introduce ethtool's set_channels

2019-09-15 Thread sameehj
From: Sameeh Jubran This patch series introduces the support of "ethtool --set-channels/-L" command to the ena driver. This series is also a preparation for the upcoming xdp support in the ena driver. This patch series has been rebased over the series: "net: ena: implement adaptive interrupt mo

[PATCH V1 net-next 5/5] net: ena: ethtool: support set_channels callback

2019-09-15 Thread sameehj
From: Sameeh Jubran Set channels callback enables the user to change the count of queues used by the driver using ethtool. We decided to currently support only equal number of rx and tx queues, this might change in the future. Also rename dev_up to dev_was_up in ena_update_queue_count() to make

[PATCH V1 net-next 2/5] net: ena: multiple queue creation related cleanups

2019-09-15 Thread sameehj
From: Sameeh Jubran - Move the print to dmesg of creating io queues from ena_probe to ena_up. ena_up is the place where queues are actually created. - Rename ena_calc_queue_size() to ena_calc_io_queue_size() for clarity and consistency - Remove redundant number of io queues parameter in funct

[PATCH V1 net-next 1/5] net: ena: change num_queues to num_io_queues for clarity and consistency

2019-09-15 Thread sameehj
From: Sameeh Jubran Most places in the code refer to the IO queues as io_queues and not simply queues. Examples - max_io_queues_per_vf, ENA_MAX_NUM_IO_QUEUES, ena_destroy_all_io_queues() etc.. We are also adding the new max_num_io_queues field to struct ena_adapter in the following commit. The

[PATCH V1 net] net: ena: don't wake up tx queue when down

2019-09-15 Thread sameehj
From: Sameeh Jubran There is a race condition that can occur when calling ena_down(). The ena_clean_tx_irq() - which is a part of the napi handler - function might wake up the tx queue when the queue is supposed to be down (during recovery or changing the size of the queues for example) This caus

[PATCH V1 net-next] net: ena: Fix bug where ring allocation backoff stopped too late

2019-06-23 Thread sameehj
From: Sameeh Jubran The current code of create_queues_with_size_backoff() allows the ring size to become as small as ENA_MIN_RING_SIZE/2. This is a bug since we don't want the queue ring to be smaller than ENA_MIN_RING_SIZE In this commit we change the loop's termination condition to look at the

[RFC V1 net-next 1/1] net: ena: implement XDP drop support

2019-06-23 Thread sameehj
From: Sameeh Jubran This commit implements the basic functionality of drop/pass logic in the ena driver. Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 83 +++- drivers/net/ethernet/amazon/ena/ena_netdev.h | 29 +++ 2 files changed, 111 inse

[RFC V1 net-next 0/1] Introduce xdp to ena

2019-06-23 Thread sameehj
From: Sameeh Jubran This patch set has one patch which implements xdp drop support in the ena driver. Sameeh Jubran (1): net: ena: implement XDP drop support drivers/net/ethernet/amazon/ena/ena_netdev.c | 83 +++- drivers/net/ethernet/amazon/ena/ena_netdev.h | 29 +++ 2 f

[PATCH V3 net 7/7] net: ena: update driver version from 2.0.3 to 2.1.0

2019-06-11 Thread sameehj
From: Sameeh Jubran Update driver version to match device specification. Signed-off-by: Sameeh Jubran --- 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/ethernet/am

[PATCH V3 net 6/7] net: ena: remove inline keyword from functions in *.c

2019-06-11 Thread sameehj
From: Sameeh Jubran Let the compiler decide if the function should be inline in *.c files Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_com.c | 6 ++--- drivers/net/ethernet/amazon/ena/ena_eth_com.c | 26 +-- drivers/net/ethernet/amazon/ena/ena_netde

[PATCH V3 net 5/7] net: ena: add ethtool function for changing io queue sizes

2019-06-11 Thread sameehj
From: Sameeh Jubran Implement the set_ringparam() function of the ethtool interface to enable the changing of io queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 22 +++ drivers/net/ethernet/amazon/e

[PATCH V3 net 1/7] net: ena: add MAX_QUEUES_EXT get feature admin command

2019-06-11 Thread sameehj
From: Arthur Kiyanovski Add a new admin command to support different queue size for Tx/Rx queues (the change also support different SQ/CQ sizes) Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- .../net/ethernet/amazon/ena/ena_admin_defs.h | 56 +- drivers/net/eth

[PATCH V3 net 0/7] Support for dynamic queue size changes

2019-06-11 Thread sameehj
From: Sameeh Jubran This patchset introduces the following: * add new admin command for supporting different queue size for Tx/Rx * add support for Tx/Rx queues size modification through ethtool * allow queues allocation backoff when low on memory * update driver version Difference from v2: * Dr

[PATCH V3 net 4/7] net: ena: allow queue allocation backoff when low on memory

2019-06-11 Thread sameehj
From: Sameeh Jubran If there is not enough memory to allocate io queues the driver will try to allocate smaller queues. The backoff algorithm is as follows: 1. Try to allocate TX and RX and if successful. 1.1. return success 2. Divide by 2 the size of the larger of RX and TX queues (or both if

[PATCH V3 net 3/7] net: ena: make ethtool show correct current and max queue sizes

2019-06-11 Thread sameehj
From: Sameeh Jubran Currently ethtool -g shows the same size for current and max queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 -- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 2 files changed

[PATCH V3 net 2/7] net: ena: enable negotiating larger Rx ring size

2019-06-11 Thread sameehj
From: Sameeh Jubran Use MAX_QUEUES_EXT get feature capability to query the device. Signed-off-by: Netanel Belgazal Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_netdev.c | 144 --- drivers/net/ethernet/amazon/ena/ena_netdev.h | 15 ++ 2 files changed, 1

[PATCH V2 net-next 1/6] net: ena: add MAX_QUEUES_EXT get feature admin command

2019-06-10 Thread sameehj
From: Arthur Kiyanovski Add a new admin command to support different queue size for Tx/Rx queues (the change also support different SQ/CQ sizes) Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- .../net/ethernet/amazon/ena/ena_admin_defs.h | 56 +- drivers/net/eth

[PATCH V2 net-next 0/6] Support for dynamic queue size changes

2019-06-10 Thread sameehj
From: Sameeh Jubran This patchset introduces the following: * add new admin command for supporting different queue size for Tx/Rx * add support for Tx/Rx queues size modification through ethtool * allow queues allocation backoff when low on memory * update driver version Difference from v1: * Ch

[PATCH V2 net-next 4/6] net: ena: allow queue allocation backoff when low on memory

2019-06-10 Thread sameehj
From: Sameeh Jubran If there is not enough memory to allocate io queues the driver will try to allocate smaller queues. The backoff algorithm is as follows: 1. Try to allocate TX and RX and if successful. 1.1. return success 2. Divide by 2 the size of the larger of RX and TX queues (or both if

[PATCH V2 net-next 6/6] net: ena: update driver version from 2.0.3 to 2.1.0

2019-06-10 Thread sameehj
From: Sameeh Jubran Update driver version to match device specification. Signed-off-by: Sameeh Jubran --- 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/ethernet/am

[PATCH V2 net-next 3/6] net: ena: make ethtool show correct current and max queue sizes

2019-06-10 Thread sameehj
From: Sameeh Jubran Currently ethtool -g shows the same size for current and max queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran --- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 -- drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 2 files changed

  1   2   >