[dpdk-dev,v3,17/27] net/ena: unimplemented handler error
diff mbox series

Message ID 20180607094322.14312-17-mk@semihalf.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • net/ena: new features and fixes
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Michał Krawczyk June 7, 2018, 9:43 a.m. UTC
From: Rafal Kozik <rk@semihalf.com>

Enable AENQ FATAL_ERROR and WARNING callbacks by setting flags
in aenq_groups. They are handled by "unimplemented handler".

If unimplemented handler is called, error is logged.

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index a88de2eca..5f4956078 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1415,7 +1415,9 @@  static int ena_device_init(struct ena_com_dev *ena_dev,
 
 	aenq_groups = BIT(ENA_ADMIN_LINK_CHANGE) |
 		      BIT(ENA_ADMIN_NOTIFICATION) |
-		      BIT(ENA_ADMIN_KEEP_ALIVE);
+		      BIT(ENA_ADMIN_KEEP_ALIVE) |
+		      BIT(ENA_ADMIN_FATAL_ERROR) |
+		      BIT(ENA_ADMIN_WARNING);
 
 	aenq_groups &= get_feat_ctx->aenq.supported_groups;
 	rc = ena_com_set_aenq_config(ena_dev, aenq_groups);
@@ -2196,7 +2198,8 @@  static void ena_keep_alive(void *adapter_data,
 static void unimplemented_aenq_handler(__rte_unused void *data,
 				       __rte_unused struct ena_admin_aenq_entry *aenq_e)
 {
-	// Unimplemented handler
+	RTE_LOG(ERR, PMD, "Unknown event was received or event with "
+			  "unimplemented handler\n");
 }
 
 static struct ena_aenq_handlers aenq_handlers = {