Soft Patch Panel
 help / color / Atom feed
From: Yasufumi Ogawa <yasufum.o@gmail.com>
To: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>,
	x-fn-spp@sl.ntt-tx.co.jp
Cc: dpdk-spp <spp@dpdk.org>
Subject: [spp] Failed to init ring_latency_stats_info
Date: Wed, 11 Sep 2019 15:46:58 +0900
Message-ID: <5cb48b3f-7b69-9c8e-66ee-84e04a03487b@gmail.com> (raw)

Hi Hideyuki,

I have a problem in initializing SPP ringlatencystats. rte_zmalloc() in 
spp_ringlatencystats_init() returns NULL and process is terminated with 
log as below.

...
SPP_RING_LATENCY_STATS: Cannot allocate memory for ring latency stats info
SPP_VF: Exit spp_vf

I made some changes to this file for refactoring, but it might not 
related to the error from `git blame`. It is simply calling 
rte_zmalloc() with sizeof() and I cannot understand why error is happened.

spp_ringlatencystats_init(uint64_t samp_intvl, uint16_t stats_count)
{
	/* allocate memory for ring latency statistics information */
	g_stats_info = rte_zmalloc(
			"global ring_latency_stats_info",
			sizeof(struct ring_latency_stats_info) * stats_count,
			0);
	if (unlikely(g_stats_info == NULL)) {
		RTE_LOG(ERR, SPP_RING_LATENCY_STATS, "Cannot allocate memory "
				"for ring latency stats info\n");
		return SPPWK_RET_NG;
	}

Although ringlatencystats is not activated by default and almost no one 
use, it should be fixed.

Thanks,
Yasufumi

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically 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=5cb48b3f-7b69-9c8e-66ee-84e04a03487b@gmail.com \
    --to=yasufum.o@gmail.com \
    --cc=spp@dpdk.org \
    --cc=x-fn-spp@sl.ntt-tx.co.jp \
    --cc=yamashita.hideyuki@po.ntt-tx.co.jp \
    /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

Soft Patch Panel

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/spp/0 spp/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 spp spp/ http://inbox.dpdk.org/spp \
		spp@dpdk.org
	public-inbox-index spp


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.spp


AGPL code for this site: git clone https://public-inbox.org/ public-inbox