Skip to content

Commit

Permalink
linux/ena update ENA linux driver to version 2.2.0
Browse files Browse the repository at this point in the history
**New Features**
* Implement XDP support for DROP and TX actions.
* Add VXLAN TX checksum offloading support.
* Map rx buffers bidirectionally to support traffic mirroring.
* Introduce disable meta descriptor caching feature required by llq
  accelerated mode.
* Revert extra_properties feature implementation via ethtool priv-flags.
* Support set_channels() callback in ethtool.

**Bug Fixes**
* Fix multiple issues with the RSS feature.
* Fix uses of round_jiffies() in timer_service.
* Add missing ethtool TX timestamping indication.
* Fix ENA_REGS_RESET_DRIVER_INVALID_STATE error during hibernation.
* Fix race condition causing an incorrect wake up of a TX queue when it is
  down.
* Fix dim exported symbols conflicts by removing all EXPORT_SYMBOL directives
  from dim files.
* Fix first interrupt accounting in XDP by adding first_interrupt field to
  napi struct.
* Fix napi handler misbehavior when the napi budget is zero.
* Add max value check in ena_set_channels() to disalow setting the number
  of queues to a higher than allowed maximum number.
* Fix race condition when setting the number of queues immediately after
  loading the driver, which caused a crash when changing the number of queues
  to a larger number than currently set.
* Fix incorrect setting of number of msix vectors according to num_io_queues,
  causing crash when changing the number of queues to a larger number after
  driver reset.
* Fix ena_tx_timeout() signature for kernels >= 5.5

**Minor Changes**
* Add RX drops and TX drops counters to ethtool -S command.
* Aggregate accelerated mode features under struct ena_admin_accel_mode_req
  currently including the new disable meta descriptor caching feature and
  the existing max tx burst size feature.
* Add debug prints to failed commands.
* Make ena rxfh support ETH_RSS_HASH_NO_CHANGE.
* Change MTU parameter to be unsigned in ena_com_set_dev_mtu().
* Remove unused ena_restore_ethtool_params() and relevant fields.
* Use combined channels instead of separate RX/TX channels in ethtool -l/L.
* Use SHUTDOWN as reset reason when closing interface.
* Change RSS default function on probe to Toeplitz.
* Enable setting the RSS hash function only without changing the key in
  ethtool.
* Remove superfulous print of number of queues during ena_up().
* Remove unnecessary parentheses to pass checkpatch.
* Add unmask interrupts statistics to ethtool.
* Arrange local variables in ena_com_fill_hash_function() in reverse christmas
  tree order.
* Separate RSS hash function retrieval and RSS key retreival into 2 different
  functions.

Signed-off-by: Saeed Bshara <saeedb@amazon.com>
Signed-off-by: Guy Tzalik <gtzalik@amazon.com>
Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: Noam Dagan <ndagan@amazon.com>
Signed-off-by: Igor Chauskin <igorch@amazon.com>
Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
  • Loading branch information
akiyano committed Jan 16, 2020
1 parent 6e89da2 commit d7c11ce
Show file tree
Hide file tree
Showing 16 changed files with 1,554 additions and 514 deletions.
57 changes: 51 additions & 6 deletions kernel/linux/common/ena_com/ena_admin_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ struct ena_admin_basic_stats {
u32 rx_drops_low;

u32 rx_drops_high;

u32 tx_drops_low;

u32 tx_drops_high;
};

struct ena_admin_acq_get_stats_resp {
Expand Down Expand Up @@ -491,6 +495,36 @@ enum ena_admin_llq_stride_ctrl {
ENA_ADMIN_MULTIPLE_DESCS_PER_ENTRY = 2,
};

enum ena_admin_accel_mode_feat {
ENA_ADMIN_DISABLE_META_CACHING = 0,
ENA_ADMIN_LIMIT_TX_BURST = 1,
};

struct ena_admin_accel_mode_get {
/* bit field of enum ena_admin_accel_mode_feat */
u16 supported_flags;

/* maximum burst size between two doorbells. The size is in bytes */
u16 max_tx_burst_size;
};

struct ena_admin_accel_mode_set {
/* bit field of enum ena_admin_accel_mode_feat */
u16 enabled_flags;

u16 reserved;
};

struct ena_admin_accel_mode_req {
union {
u32 raw[2];

struct ena_admin_accel_mode_get get;

struct ena_admin_accel_mode_set set;
} u;
};

struct ena_admin_feature_llq_desc {
u32 max_llq_num;

Expand Down Expand Up @@ -536,10 +570,13 @@ struct ena_admin_feature_llq_desc {
/* the stride control the driver selected to use */
u16 descriptors_stride_ctrl_enabled;

/* Maximum size in bytes taken by llq entries in a single tx burst.
* Set to 0 when there is no such limit.
/* reserved */
u32 reserved1;

/* accelerated low latency queues requirment. driver needs to
* support those requirments in order to use accelerated llq
*/
u32 max_tx_burst_size;
struct ena_admin_accel_mode_req accel_mode;
};

struct ena_admin_queue_ext_feature_fields {
Expand Down Expand Up @@ -821,10 +858,11 @@ struct ena_admin_host_info {

u16 reserved;

/* 0 : reserved
/* 0 : mutable_rss_table_size
* 1 : rx_offset
* 2 : interrupt_moderation
* 31:3 : reserved
* 3 : map_rx_buf_bidirectional
* 31:4 : reserved
*/
u32 driver_supported_features;
};
Expand Down Expand Up @@ -906,7 +944,7 @@ struct ena_admin_queue_ext_feature_desc {
struct ena_admin_queue_ext_feature_fields max_queue_ext;

u32 raw[10];
};
} ;
};

struct ena_admin_get_feat_resp {
Expand Down Expand Up @@ -1039,6 +1077,10 @@ struct ena_admin_aenq_keep_alive_desc {
u32 rx_drops_low;

u32 rx_drops_high;

u32 tx_drops_low;

u32 tx_drops_high;
};

struct ena_admin_ena_mmio_req_read_less_resp {
Expand Down Expand Up @@ -1138,10 +1180,13 @@ struct ena_admin_ena_mmio_req_read_less_resp {
#define ENA_ADMIN_HOST_INFO_DEVICE_MASK GENMASK(7, 3)
#define ENA_ADMIN_HOST_INFO_BUS_SHIFT 8
#define ENA_ADMIN_HOST_INFO_BUS_MASK GENMASK(15, 8)
#define ENA_ADMIN_HOST_INFO_MUTABLE_RSS_TABLE_SIZE_MASK BIT(0)
#define ENA_ADMIN_HOST_INFO_RX_OFFSET_SHIFT 1
#define ENA_ADMIN_HOST_INFO_RX_OFFSET_MASK BIT(1)
#define ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_SHIFT 2
#define ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_MASK BIT(2)
#define ENA_ADMIN_HOST_INFO_MAP_RX_BUF_BIDIRECTIONAL_SHIFT 3
#define ENA_ADMIN_HOST_INFO_MAP_RX_BUF_BIDIRECTIONAL_MASK BIT(3)

/* feature_rss_ind_table */
#define ENA_ADMIN_FEATURE_RSS_IND_TABLE_ONE_ENTRY_UPDATE_MASK BIT(0)
Expand Down
Loading

0 comments on commit d7c11ce

Please sign in to comment.