[3/4] net/ena: remove deprecated notifications
Checks
Commit Message
From: Shai Brandes <shaibran@amazon.com>
Remove deprecated asynchronous event notifications that may arrive
from the device. The removal ensures that only supported event
handling mechanisms are in use.
Signed-off-by: Wajeeh Atrash <atrwajee@amazon.com>
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 51 ------------------------------------
1 file changed, 51 deletions(-)
@@ -1924,10 +1924,7 @@ static int ena_device_init(struct ena_adapter *adapter,
}
aenq_groups = BIT(ENA_ADMIN_LINK_CHANGE) |
- BIT(ENA_ADMIN_NOTIFICATION) |
BIT(ENA_ADMIN_KEEP_ALIVE) |
- BIT(ENA_ADMIN_FATAL_ERROR) |
- BIT(ENA_ADMIN_WARNING) |
BIT(ENA_ADMIN_CONF_NOTIFICATIONS);
aenq_groups &= get_feat_ctx->aenq.supported_groups;
@@ -3050,29 +3047,6 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
return i;
}
-static void ena_update_hints(struct ena_adapter *adapter,
- struct ena_admin_ena_hw_hints *hints)
-{
- if (hints->admin_completion_tx_timeout)
- adapter->ena_dev.admin_queue.completion_timeout =
- hints->admin_completion_tx_timeout * 1000;
-
- if (hints->mmio_read_timeout)
- /* convert to usec */
- adapter->ena_dev.mmio_read.reg_read_to =
- hints->mmio_read_timeout * 1000;
-
- if (hints->driver_watchdog_timeout) {
- if (hints->driver_watchdog_timeout == ENA_HW_HINTS_NO_TIMEOUT)
- adapter->keep_alive_timeout = ENA_HW_HINTS_NO_TIMEOUT;
- else
- // Convert msecs to ticks
- adapter->keep_alive_timeout =
- (hints->driver_watchdog_timeout *
- rte_get_timer_hz()) / 1000;
- }
-}
-
static void ena_tx_map_mbuf(struct ena_ring *tx_ring,
struct ena_tx_buffer *tx_info,
struct rte_mbuf *mbuf,
@@ -4078,30 +4052,6 @@ static void ena_update_on_link_change(void *adapter_data,
rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
}
-static void ena_notification(void *adapter_data,
- struct ena_admin_aenq_entry *aenq_e)
-{
- struct rte_eth_dev *eth_dev = adapter_data;
- struct ena_adapter *adapter = eth_dev->data->dev_private;
- struct ena_admin_ena_hw_hints *hints;
-
- if (aenq_e->aenq_common_desc.group != ENA_ADMIN_NOTIFICATION)
- PMD_DRV_LOG_LINE(WARNING, "Invalid AENQ group: %x. Expected: %x",
- aenq_e->aenq_common_desc.group,
- ENA_ADMIN_NOTIFICATION);
-
- switch (aenq_e->aenq_common_desc.syndrome) {
- case ENA_ADMIN_UPDATE_HINTS:
- hints = (struct ena_admin_ena_hw_hints *)
- (&aenq_e->inline_data_w4);
- ena_update_hints(adapter, hints);
- break;
- default:
- PMD_DRV_LOG_LINE(ERR, "Invalid AENQ notification link state: %d",
- aenq_e->aenq_common_desc.syndrome);
- }
-}
-
static void ena_keep_alive(void *adapter_data,
__rte_unused struct ena_admin_aenq_entry *aenq_e)
{
@@ -4156,7 +4106,6 @@ static void unimplemented_aenq_handler(__rte_unused void *data,
static struct ena_aenq_handlers aenq_handlers = {
.handlers = {
[ENA_ADMIN_LINK_CHANGE] = ena_update_on_link_change,
- [ENA_ADMIN_NOTIFICATION] = ena_notification,
[ENA_ADMIN_KEEP_ALIVE] = ena_keep_alive,
[ENA_ADMIN_CONF_NOTIFICATIONS] = ena_suboptimal_configuration
},