update ENA driver to releawse 1.3.0
Subsystems (3)
cover update ENA driver to releawse 1.3.0
From: Netanel Belgazal <[email protected]>
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 admin define for future support of IPv6 RSS
net: ena: increase ena driver version to 1.3.0
drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 6 + drivers/net/ethernet/amazon/ena/ena_com.c | 12 +- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 5 +- drivers/net/ethernet/amazon/ena/ena_netdev.c | 197 ++++++++++++----------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 12 +- 5 files changed, 130 insertions(+), 102 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/6 net: ena: improve ENA driver boot time.
From: Netanel Belgazal <[email protected]>
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 modifies the granularity of the sleeps to 5ms.
This change improves the boot time to 220ms.
--- drivers/net/ethernet/amazon/ena/ena_com.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/net/ethernet/amazon/ena/ena_com.c +8 -4
@@ -63,6 +63,8 @@#define ENA_REGS_ADMIN_INTR_MASK 1 +#define ENA_POLL_MS 5 +/*****************************************************************************/ /*****************************************************************************/ /*****************************************************************************/
@@ -533,7 +535,7 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c goto err; } -msleep (100 ); +msleep (ENA_POLL_MS ); }if (unlikely (comp_ctx->status ==ENA_CMD_ABORTED )) {
@@ -746,6 +748,9 @@ static int wait_for_reset_state(struct ena_com_dev *ena_dev, u32 timeout, {u32 val, i; +/* Convert timeout from resolution of 100ms to ENA_POLL_MS */ + timeout = (timeout *100 ) /ENA_POLL_MS ; +for (i =0 ; i < timeout; i++) { val =ena_com_reg_bar_read32 (ena_dev,ENA_REGS_DEV_STS_OFF );
@@ -758,8 +763,7 @@ static int wait_for_reset_state(struct ena_com_dev *ena_dev, u32 timeout, exp_state)return 0 ; -/* The resolution of the timeout is 100ms */ -msleep (100 ); +msleep (ENA_POLL_MS ); }return -ETIME ;
@@ -1253,7 +1257,7 @@ void ena_com_wait_for_abort_completion(struct ena_com_dev *ena_dev)spin_lock_irqsave (&admin_queue->q_lock, flags);while (atomic_read (&admin_queue->outstanding_cmds) !=0 ) {spin_unlock_irqrestore (&admin_queue->q_lock, flags); -msleep (20 ); +msleep (ENA_POLL_MS );spin_lock_irqsave (&admin_queue->q_lock, flags); }spin_unlock_irqrestore (&admin_queue->q_lock, flags);
Signature · 1 line
1.8.3.1
PATCH 2/6 net: ena: remove legacy suspend suspend/resume support
In reply to [email protected]From: Netanel Belgazal <[email protected]>
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.
--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 -- drivers/net/ethernet/amazon/ena/ena_netdev.c | 50 --------------------------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 --- 3 files changed, 56 deletions(-)
drivers/net/ethernet/amazon/ena/ena_ethtool.c +0 -2
@@ -60,8 +60,6 @@ struct ena_stats {static const struct ena_stats ena_stats_global_strings[] = {ENA_STAT_GLOBAL_ENTRY (tx_timeout), -ENA_STAT_GLOBAL_ENTRY (io_suspend), -ENA_STAT_GLOBAL_ENTRY (io_resume),ENA_STAT_GLOBAL_ENTRY (wd_expired),ENA_STAT_GLOBAL_ENTRY (interface_up),ENA_STAT_GLOBAL_ENTRY (interface_down),
drivers/net/ethernet/amazon/ena/ena_netdev.c +0 -50
80 lines not on this page · raw message
drivers/net/ethernet/amazon/ena/ena_netdev.h +0 -4
@@ -257,8 +257,6 @@ struct ena_ring {struct ena_stats_dev {u64 tx_timeout; -u64 io_suspend; -u64 io_resume;u64 wd_expired;u64 interface_up;u64 interface_down;
@@ -326,8 +324,6 @@ struct ena_adapter {/* timer service */ struct work_struct reset_task; -struct work_struct suspend_io_task; -struct work_struct resume_io_task;struct timer_list timer_service;bool wd_state;
Signature · 1 line
1.8.3.1
PATCH 3/6 net: ena: add power management ops to the ENA driver
In reply to [email protected]From: Netanel Belgazal <[email protected]>
--- 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 | 3 + 3 files changed, 95 insertions(+), 27 deletions(-)
drivers/net/ethernet/amazon/ena/ena_ethtool.c +2 -0
@@ -60,6 +60,8 @@ struct ena_stats {static const struct ena_stats ena_stats_global_strings[] = {ENA_STAT_GLOBAL_ENTRY (tx_timeout), +ENA_STAT_GLOBAL_ENTRY (suspend), +ENA_STAT_GLOBAL_ENTRY (resume),ENA_STAT_GLOBAL_ENTRY (wd_expired),ENA_STAT_GLOBAL_ENTRY (interface_up),ENA_STAT_GLOBAL_ENTRY (interface_down),
drivers/net/ethernet/amazon/ena/ena_netdev.c +90 -27
179 lines not on this page · raw message
drivers/net/ethernet/amazon/ena/ena_netdev.h +3 -0
@@ -257,6 +257,8 @@ struct ena_ring {struct ena_stats_dev {u64 tx_timeout; +u64 suspend; +u64 resume;u64 wd_expired;u64 interface_up;u64 interface_down;
@@ -327,6 +329,7 @@ struct ena_adapter {struct timer_list timer_service;bool wd_state; +bool dev_up_before_reset;unsigned long last_keep_alive_jiffies;struct u64_stats_sync syncp;
Signature · 1 line
1.8.3.1
PATCH 4/6 net: ena: add statistics for missed tx packets
In reply to [email protected]From: Netanel Belgazal <[email protected]>
Add a new statistic to ethtool stats that show the number of packets without transmit acknowledgement from ENA device.
--- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 30 +++++++++++++++------------ drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + 3 files changed, 19 insertions(+), 13 deletions(-)
drivers/net/ethernet/amazon/ena/ena_ethtool.c +1 -0
@@ -81,6 +81,7 @@ struct ena_stats {ENA_STAT_TX_ENTRY (doorbells),ENA_STAT_TX_ENTRY (prepare_ctx_err ),ENA_STAT_TX_ENTRY (bad_req_id ), + ENA_STAT_TX_ENTRY(missed_tx), };static const struct ena_stats ena_stats_rx_strings[] = {
drivers/net/ethernet/amazon/ena/ena_netdev.c +17 -13
@@ -2648,7 +2648,7 @@ static int check_missing_comp_in_queue(struct ena_adapter *adapter,struct ena_tx_buffer *tx_buf;unsigned long last_jiffies;u32 missed_tx =0 ; -int i; +int i, rc =0 ;for (i =0 ; i < tx_ring->ring_size; i++) { tx_buf = &tx_ring->tx_buffer_info[i];
@@ -2662,21 +2662,25 @@ static int check_missing_comp_in_queue(struct ena_adapter *adapter, tx_buf->print_once =1 ; missed_tx++; - -if (unlikely (missed_tx > adapter->missing_tx_completion_threshold)) { -netif_err (adapter, tx_err, adapter->netdev, -"The number of lost tx completions is above the threshold (%d > %d). Reset the device\n" , - missed_tx, - adapter->missing_tx_completion_threshold); - adapter->reset_reason = -ENA_REGS_RESET_MISS_TX_CMPL ; -set_bit (ENA_FLAG_TRIGGER_RESET , &adapter->flags); -return -EIO ; - } } } -return 0 ; +if (unlikely (missed_tx > adapter->missing_tx_completion_threshold)) { +netif_err (adapter, tx_err, adapter->netdev, +"The number of lost tx completions is above the threshold (%d > %d). Reset the device\n" , + missed_tx, + adapter->missing_tx_completion_threshold); + adapter->reset_reason = +ENA_REGS_RESET_MISS_TX_CMPL ; +set_bit (ENA_FLAG_TRIGGER_RESET , &adapter->flags); + rc = -EIO ; + } + +u64_stats_update_begin (&tx_ring->syncp); + tx_ring->tx_stats.missed_tx = missed_tx; +u64_stats_update_end (&tx_ring->syncp); + +return rc; }static void check_for_missing_tx_completions (struct ena_adapter *adapter)
drivers/net/ethernet/amazon/ena/ena_netdev.h +1 -0
@@ -185,6 +185,7 @@ struct ena_stats_tx {u64 tx_poll;u64 doorbells;u64 bad_req_id; +u64 missed_tx; };struct ena_stats_rx {
Signature · 1 line
1.8.3.1
PATCH 5/6 net: ena: add new admin define for future support of IPv6 RSS
In reply to [email protected]From: Netanel Belgazal <[email protected]>
--- drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/amazon/ena/ena_admin_defs.h +6 -0
@@ -627,6 +627,12 @@ enum ena_admin_flow_hash_proto {ENA_ADMIN_RSS_NOT_IP =7 , +/* TCPv6 with extension header */ +ENA_ADMIN_RSS_TCP6_EX =8 , + +/* IPv6 with extension header */ +ENA_ADMIN_RSS_IP6_EX =9 , + ENA_ADMIN_RSS_PROTO_NUM = 16, };
Signature · 1 line
1.8.3.1
PATCH 6/6 net: ena: increase ena driver version to 1.3.0
In reply to [email protected]From: Netanel Belgazal <[email protected]>
--- drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/amazon/ena/ena_netdev.h +2 -2
@@ -44,7 +44,7 @@#include "ena_eth_com.h" #define DRV_MODULE_VER_MAJOR 1 -#define DRV_MODULE_VER_MINOR 2 +#define DRV_MODULE_VER_MINOR 3#define DRV_MODULE_VER_SUBMINOR 0#define DRV_MODULE_NAME "ena"
@@ -52,7 +52,7 @@#define DRV_MODULE_VERSION \ __stringify(DRV_MODULE_VER_MAJOR) "." \ __stringify(DRV_MODULE_VER_MINOR) "." \ - __stringify(DRV_MODULE_VER_SUBMINOR) "k" + __stringify(DRV_MODULE_VER_SUBMINOR) "K"#endif #define DEVICE_NAME "Elastic Network Adapter (ENA)"
Signature · 1 line
1.8.3.1
David Miller
maintainerFrom: <[email protected]>
Date: Tue, 17 Oct 2017 07:33:55 +0000
Quoted 9 lines
From: Netanel Belgazal <[email protected]>
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 admin define for future support of IPv6 RSS
net: ena: increase ena driver version to 1.3.0
Series applied, but this is a terrible header posting.
You should have real content here. You need to provide text explaining, at a high level, what the patch series is doing, how it is doing it, and why it is doing it that way.
Please don't provide an empty header posting like this in the future.
Thank you.