From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Subject: [PATCH 3/5] net/bnxt: register for more async events
Date: Sun, 21 Jan 2018 22:20:44 -0800 [thread overview]
Message-ID: <20180122062046.81908-4-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20180122062046.81908-1-ajit.khaparde@broadcom.com>
Register for async events from the FW.
New events we are registering for include Link speed config changes,
PF driver unload and VF config change. Also log a message when the
async event arrives on the completion ring.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_cpr.c | 11 ++++++++++-
drivers/net/bnxt/bnxt_hwrm.c | 9 +++++++--
drivers/net/bnxt/bnxt_hwrm.h | 11 +++++++++++
3 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 663a5223d..737bb060a 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -57,8 +57,17 @@ void bnxt_handle_async_event(struct bnxt *bp,
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
bnxt_link_update_op(bp->eth_dev, 1);
break;
+ case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
+ PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
+ break;
+ case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
+ PMD_DRV_LOG(INFO, "Async event: VF config changed\n");
+ break;
+ case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED:
+ PMD_DRV_LOG(INFO, "Port conn async event\n");
+ break;
default:
- PMD_DRV_LOG(DEBUG, "handle_async_event id = 0x%x\n", event_id);
+ PMD_DRV_LOG(INFO, "handle_async_event id = 0x%x\n", event_id);
break;
}
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index fdca424a9..75e03ad5d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -637,8 +637,13 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
sizeof(bp->pf.vf_req_fwd)));
}
- req.async_event_fwd[0] |= rte_cpu_to_le_32(0x1); /* TODO: Use MACRO */
- //memset(req.async_event_fwd, 0xff, sizeof(req.async_event_fwd));
+ req.async_event_fwd[0] |=
+ rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_LINK_STATUS_CHANGE |
+ ASYNC_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED |
+ ASYNC_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE);
+ req.async_event_fwd[1] |=
+ rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_PF_DRVR_UNLOAD |
+ ASYNC_CMPL_EVENT_ID_VF_CFG_CHANGE);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 46f6f3208..108f8e81d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -42,6 +42,17 @@ struct bnxt_filter_info;
struct bnxt_cp_ring_info;
#define HWRM_SEQ_ID_INVALID -1U
+/* Convert Bit field location to value */
+#define ASYNC_CMPL_EVENT_ID_LINK_STATUS_CHANGE \
+ (1 << HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE)
+#define ASYNC_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED \
+ (1 << HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED)
+#define ASYNC_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE \
+ (1 << HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE)
+#define ASYNC_CMPL_EVENT_ID_PF_DRVR_UNLOAD \
+ (1 << (HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD - 32))
+#define ASYNC_CMPL_EVENT_ID_VF_CFG_CHANGE \
+ (1 << (HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE - 32))
int bnxt_hwrm_cfa_l2_clear_rx_mask(struct bnxt *bp,
struct bnxt_vnic_info *vnic);
--
2.14.3 (Apple Git-98)
next prev parent reply other threads:[~2018-01-22 6:20 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 6:20 [PATCH 0/5] bnxt patchset Ajit Khaparde
2018-01-22 6:20 ` [PATCH 1/5] net/bnxt: fix size of tx ring in HW Ajit Khaparde
2018-01-22 12:22 ` Ferruh Yigit
2018-01-22 6:20 ` [PATCH 2/5] net/bnxt: use driver specific dynamic log type Ajit Khaparde
2018-01-22 12:23 ` Ferruh Yigit
2018-01-25 22:47 ` [PATCH v2 0/7] bnxt patchset Ajit Khaparde
2018-01-25 22:47 ` [PATCH v2 1/7] net/bnxt: fix size of tx ring in HW Ajit Khaparde
2018-01-25 22:47 ` [PATCH v2 2/7] net/bnxt: use driver specific dynamic log type Ajit Khaparde
2018-01-25 22:47 ` [PATCH v2 3/7] net/bnxt: register for more async events Ajit Khaparde
2018-01-25 22:47 ` [PATCH v2 4/7] net/bnxt: check if MAC address is all zeros Ajit Khaparde
2018-01-25 22:47 ` [PATCH v2 5/7] net/bnxt: support for rx/tx_queue_start/stop ops Ajit Khaparde
2018-01-25 22:47 ` [PATCH v2 6/7] net/bnxt: add 100G speed detection Ajit Khaparde
2018-01-26 17:08 ` Ferruh Yigit
2018-01-26 17:31 ` [PATCH v3 0/7] bnxt patchset Ajit Khaparde
2018-01-26 17:31 ` [PATCH v3 1/7] net/bnxt: fix size of tx ring in HW Ajit Khaparde
2018-01-26 17:31 ` [PATCH v3 2/7] net/bnxt: use driver specific dynamic log type Ajit Khaparde
2018-01-26 17:31 ` [PATCH v3 3/7] net/bnxt: register for more async events Ajit Khaparde
2018-01-26 17:31 ` [PATCH v3 4/7] net/bnxt: check if MAC address is all zeros Ajit Khaparde
2018-01-26 17:31 ` [PATCH v3 5/7] net/bnxt: support for rx/tx_queue_start/stop ops Ajit Khaparde
2018-01-26 17:31 ` [PATCH v3 6/7] net/bnxt: add 100G speed detection Ajit Khaparde
2018-01-26 17:32 ` [PATCH v3 7/7] net/bnxt: fix number of pools for RSS Ajit Khaparde
2018-01-26 18:00 ` [PATCH v3 0/7] bnxt patchset Ferruh Yigit
2018-01-26 17:33 ` [PATCH v2 6/7] net/bnxt: add 100G speed detection Ajit Khaparde
2018-01-25 22:47 ` [PATCH v2 7/7] net/bnxt: fix number of pools for RSS Ajit Khaparde
2018-01-26 17:35 ` [PATCH v2 0/7] bnxt patchset Ferruh Yigit
2018-01-26 17:37 ` Ferruh Yigit
2018-01-22 6:20 ` Ajit Khaparde [this message]
2018-01-22 6:20 ` [PATCH 4/5] net/bnxt: check if MAC address is all zeros Ajit Khaparde
2018-01-22 12:26 ` Ferruh Yigit
2018-01-22 6:20 ` [PATCH 5/5] net/bnxt: Support for rx/tx_queue_start/stop ops Ajit Khaparde
2018-01-22 12:25 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180122062046.81908-4-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.