From: Nithin Dabilpuram <ndabilpuram@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <jerinj@marvell.com>, <dev@dpdk.org>
Subject: [PATCH 02/11] net/cnxk: register callback to get queue errors
Date: Mon, 28 Nov 2022 15:24:33 +0530 [thread overview]
Message-ID: <20221128095442.3185112-2-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20221128095442.3185112-1-ndabilpuram@marvell.com>
From: Satha Rao <skoteshwar@marvell.com>
Register a callback mechanism to get SQ error interrupts, add
call ethdev event RTE_ETH_EVENT_INTR_RESET.
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
---
drivers/net/cnxk/cnxk_ethdev.c | 13 +++++++++++++
drivers/net/cnxk/cnxk_ethdev.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index bf1585fe67..104aad7b51 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1750,6 +1750,16 @@ struct eth_dev_ops cnxk_eth_dev_ops = {
.cman_config_get = cnxk_nix_cman_config_get,
};
+void
+cnxk_eth_dev_q_err_cb(struct roc_nix *nix, void *data)
+{
+ struct cnxk_eth_dev *dev = (struct cnxk_eth_dev *)nix;
+ struct rte_eth_dev *eth_dev = dev->eth_dev;
+
+ /* Set the flag and execute application callbacks */
+ rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_RESET, data);
+}
+
static int
cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)
{
@@ -1804,6 +1814,9 @@ cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)
roc_nix_mac_link_info_get_cb_register(nix,
cnxk_eth_dev_link_status_get_cb);
+ /* Register up msg callbacks */
+ roc_nix_q_err_cb_register(nix, cnxk_eth_dev_q_err_cb);
+
/* Register callback for inline meta pool create */
roc_nix_inl_meta_pool_cb_register(cnxk_nix_inl_meta_pool_cb);
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index 651ef45ea8..a86e9dba80 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -599,6 +599,7 @@ void cnxk_eth_dev_link_status_cb(struct roc_nix *nix,
struct roc_nix_link_info *link);
void cnxk_eth_dev_link_status_get_cb(struct roc_nix *nix,
struct roc_nix_link_info *link);
+void cnxk_eth_dev_q_err_cb(struct roc_nix *nix, void *data);
int cnxk_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete);
int cnxk_nix_queue_stats_mapping(struct rte_eth_dev *dev, uint16_t queue_id,
uint8_t stat_idx, uint8_t is_rx);
--
2.25.1
next prev parent reply other threads:[~2022-11-28 9:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 9:54 [PATCH 01/11] common/cnxk: free pending sqe buffers Nithin Dabilpuram
2022-11-28 9:54 ` Nithin Dabilpuram [this message]
2022-11-28 9:54 ` [PATCH 03/11] common/cnxk: set default SQ TC value Nithin Dabilpuram
2022-11-28 9:54 ` [PATCH 04/11] common/cnxk: split NIX TM hierarchy enable API Nithin Dabilpuram
2022-11-28 9:54 ` [PATCH 05/11] event/cnxk: net/cnxk: support transmit completion Nithin Dabilpuram
2022-11-28 9:54 ` [PATCH 06/11] net/cnxk: fix packet type for IPv6 packets post decryption Nithin Dabilpuram
2022-11-28 9:54 ` [PATCH 07/11] net/cnxk: add late backpressure support for cn10kb Nithin Dabilpuram
2022-11-28 9:54 ` [PATCH 08/11] common/cnxk: use lcore LMT line for CPT context write Nithin Dabilpuram
2022-11-28 9:54 ` [PATCH 09/11] common/cnxk: convert aura handle to aura Nithin Dabilpuram
2022-11-28 9:54 ` [PATCH 10/11] net/cnxk: mark HW errors as bad checksum Nithin Dabilpuram
2022-11-28 9:54 ` [PATCH 11/11] common/cnxk: disable drop re in A1 chip revision Nithin Dabilpuram
2023-01-06 13:22 ` Jerin Jacob
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=20221128095442.3185112-2-ndabilpuram@marvell.com \
--to=ndabilpuram@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).