DPDK patches and discussions
 help / color / mirror / Atom feed
From: Megha Ajmera <megha.ajmera@intel.com>
To: dev@dpdk.org, jasvinder.singh@intel.com, cristian.dumitrescu@intel.com
Cc: stable@dpdk.org
Subject: [PATCH] sched: fix for demo failure in debug mode
Date: Thu,  5 Jan 2023 12:28:53 +0000	[thread overview]
Message-ID: <20230105122853.144440-1-megha.ajmera@intel.com> (raw)

This issue is happening due to non-initialization of some
fields in “rte_eth_rxconf” structure in our application.
Doing a memset to zero before initialization in HQoS application.

Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
---
 examples/qos_sched/init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 0709aec10c..d28350e14a 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -79,6 +79,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	if (app_inited_port_mask & (1u << portid))
 		return 0;
 
+	memset(&rx_conf, 0, sizeof(struct rte_eth_rxconf));
 	rx_conf.rx_thresh.pthresh = rx_thresh.pthresh;
 	rx_conf.rx_thresh.hthresh = rx_thresh.hthresh;
 	rx_conf.rx_thresh.wthresh = rx_thresh.wthresh;
@@ -86,6 +87,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 	rx_conf.rx_drop_en = 0;
 	rx_conf.rx_deferred_start = 0;
 
+	memset(&tx_conf, 0, sizeof(struct rte_eth_txconf));
 	tx_conf.tx_thresh.pthresh = tx_thresh.pthresh;
 	tx_conf.tx_thresh.hthresh = tx_thresh.hthresh;
 	tx_conf.tx_thresh.wthresh = tx_thresh.wthresh;
-- 
2.25.1


             reply	other threads:[~2023-01-05 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 12:28 Megha Ajmera [this message]
2023-01-09 13:27 ` Dumitrescu, Cristian
2023-02-06  7:39   ` Thomas Monjalon

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=20230105122853.144440-1-megha.ajmera@intel.com \
    --to=megha.ajmera@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=stable@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 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).