From: vanshika.shukla@nxp.com
To: dev@dpdk.org, Hemant Agrawal <hemant.agrawal@nxp.com>,
Sachin Saxena <sachin.saxena@nxp.com>
Cc: Vanshika Shukla <vanshika.shukla@nxp.com>
Subject: [v1 08/10] net/dpaa: add devargs for enabling err packets on main queue
Date: Wed, 28 May 2025 16:09:32 +0530 [thread overview]
Message-ID: <20250528103934.1001747-9-vanshika.shukla@nxp.com> (raw)
In-Reply-To: <20250528103934.1001747-1-vanshika.shukla@nxp.com>
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Currently, error queue is mapped to the Rx queue and enabled by default.
This patch adds the devargs to control the err packets on main queue.
Also, in VSP mode the error queue should be disabled because the error
packets from kernel are diverted to the Rx queue/err queue causing crash.
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
doc/guides/nics/dpaa.rst | 3 +++
drivers/net/dpaa/dpaa_ethdev.c | 29 +++++++++++++++++++++--------
2 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/doc/guides/nics/dpaa.rst b/doc/guides/nics/dpaa.rst
index de3ae96e07..cc9aef7f83 100644
--- a/doc/guides/nics/dpaa.rst
+++ b/doc/guides/nics/dpaa.rst
@@ -277,6 +277,9 @@ for details.
* Use dev arg option ``drv_ieee1588=1`` to enable IEEE 1588 support
at driver level, e.g. ``dpaa:fm1-mac3,drv_ieee1588=1``.
+* Use dev arg option ``recv_err_pkts=1`` to receive all packets including
+ error packets and thus disabling hardware based packet handing
+ at driver level, e.g. ``dpaa:fm1-mac3,recv_err_pkts=1``.
FMAN Config
-----------
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 7d0f830204..62cafb7073 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -52,9 +52,10 @@
#include <process.h>
#include <fmlib/fm_ext.h>
-#define DRIVER_IEEE1588 "drv_ieee1588"
-#define CHECK_INTERVAL 100 /* 100ms */
-#define MAX_REPEAT_TIME 90 /* 9s (90 * 100ms) in total */
+#define DRIVER_IEEE1588 "drv_ieee1588"
+#define CHECK_INTERVAL 100 /* 100ms */
+#define MAX_REPEAT_TIME 90 /* 9s (90 * 100ms) in total */
+#define DRIVER_RECV_ERR_PKTS "recv_err_pkts"
/* Supported Rx offloads */
static uint64_t dev_rx_offloads_sup =
@@ -87,6 +88,8 @@ static int is_global_init;
static int fmc_q = 1; /* Indicates the use of static fmc for distribution */
static int default_q; /* use default queue - FMC is not executed*/
int dpaa_ieee_1588; /* use to indicate if IEEE 1588 is enabled for the driver */
+bool dpaa_enable_recv_err_pkts; /* Enable main queue to receive error packets */
+
/* At present we only allow up to 4 push mode queues as default - as each of
* this queue need dedicated portal and we are short of portals.
*/
@@ -1273,10 +1276,12 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
}
}
- /* Enable main queue to receive error packets also by default */
+ /* Enable main queue to receive error packets */
if (fif->mac_type != fman_offline_internal &&
- fif->mac_type != fman_onic)
+ fif->mac_type != fman_onic &&
+ dpaa_enable_recv_err_pkts && !fif->is_shared_mac) {
fman_if_set_err_fqid(fif, rxq->fqid);
+ }
return 0;
}
@@ -2191,6 +2196,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
if (dpaa_get_devargs(dev->devargs, DRIVER_IEEE1588))
dpaa_ieee_1588 = 1;
+ if (dpaa_get_devargs(dev->devargs, DRIVER_RECV_ERR_PKTS))
+ dpaa_enable_recv_err_pkts = 1;
+
memset((char *)dev_rx_fqids, 0,
sizeof(uint32_t) * DPAA_MAX_NUM_PCD_QUEUES);
@@ -2418,8 +2426,12 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
fman_intf->mac_type != fman_offline_internal &&
fman_intf->mac_type != fman_onic) {
/* Configure error packet handling */
- fman_if_receive_rx_errors(fman_intf,
- FM_FD_RX_STATUS_ERR_MASK);
+#ifndef RTE_LIBRTE_DPAA_DEBUG_DRIVER
+ if (dpaa_enable_recv_err_pkts)
+#endif
+ fman_if_receive_rx_errors(fman_intf,
+ FM_FD_RX_STATUS_ERR_MASK);
+
/* Disable RX mode */
fman_if_disable_rx(fman_intf);
/* Disable promiscuous mode */
@@ -2619,5 +2631,6 @@ static struct rte_dpaa_driver rte_dpaa_pmd = {
RTE_PMD_REGISTER_DPAA(net_dpaa, rte_dpaa_pmd);
RTE_PMD_REGISTER_PARAM_STRING(net_dpaa,
- DRIVER_IEEE1588 "=<int>");
+ DRIVER_IEEE1588 "=<int>"
+ DRIVER_RECV_ERR_PKTS "=<int>");
RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_pmd, NOTICE);
--
2.25.1
next prev parent reply other threads:[~2025-05-28 10:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 10:39 [v1 00/10] DPAA specific fixes vanshika.shukla
2025-05-28 10:39 ` [v1 01/10] bus/dpaa: avoid using same structure and variable name vanshika.shukla
2025-05-28 10:39 ` [v1 02/10] bus/dpaa: add FMan node vanshika.shukla
2025-05-28 10:39 ` [v1 03/10] bus/dpaa: enhance DPAA SoC version vanshika.shukla
2025-05-28 14:28 ` Stephen Hemminger
2025-05-28 10:39 ` [v1 04/10] bus/dpaa: optimize bman acquire/release vanshika.shukla
2025-05-28 14:30 ` Stephen Hemminger
2025-05-28 14:50 ` [EXT] " Jun Yang
2025-05-28 10:39 ` [v1 05/10] mempool/dpaa: fast acquire and release vanshika.shukla
2025-05-28 10:39 ` [v1 06/10] mempool/dpaa: adjust pool element for LS1043A errata vanshika.shukla
2025-05-28 10:39 ` [v1 07/10] net/dpaa: add Tx rate limiting DPAA PMD API vanshika.shukla
2025-05-28 10:39 ` vanshika.shukla [this message]
2025-05-28 10:39 ` [v1 09/10] bus/dpaa: improve DPAA cleanup vanshika.shukla
2025-05-28 10:39 ` [v1 10/10] bus/dpaa: optimize qman enqueue check vanshika.shukla
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=20250528103934.1001747-9-vanshika.shukla@nxp.com \
--to=vanshika.shukla@nxp.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=sachin.saxena@nxp.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).