From: chunmei Liu <chunmei.liu@intel.com>
To: dev@dpdk.org
Cc: chunmei <chunmei.liu@intel.com>
Subject: [dpdk-dev] [PATCH] fix ceph async messenger runtime bug based on spdk/dpdk
Date: Wed, 13 Dec 2017 11:28:14 -0800 [thread overview]
Message-ID: <1513193294-159494-1-git-send-email-chunmei.liu@intel.com> (raw)
From: chunmei <chunmei.liu@intel.com>
ceph async messenger has some run time error with this dpdk library,
1) need init mb->next= null when allocate a buffer other wise
rte_mbuf_sanity_check will report error.
2) when check the size, can't calculate mbuf_data_room_size
because async messenger dpdk will allocate this part later
not at create mempool.
---
drivers/net/ixgbe/ixgbe_rxtx.c | 1 +
lib/librte_mbuf/rte_mbuf.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 1e07895..30fdbc1 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1589,6 +1589,7 @@ ixgbe_rx_alloc_bufs(struct ixgbe_rx_queue *rxq, bool reset_mbuf)
}
rte_mbuf_refcnt_set(mb, 1);
+ mb->next = NULL;
mb->data_off = RTE_PKTMBUF_HEADROOM;
/* populate the descriptors */
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 0e3e36a..2b1a3d1 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -102,7 +102,6 @@ rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg)
}
RTE_ASSERT(mp->elt_size >= sizeof(struct rte_mbuf) +
- user_mbp_priv->mbuf_data_room_size +
user_mbp_priv->mbuf_priv_size);
mbp_priv = rte_mempool_get_priv(mp);
@@ -233,6 +232,9 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
}
if (nb_segs != 0)
rte_panic("bad nb_segs\n");
+ if (m_seg != NULL)
+ rte_panic("bad m_seg\n");
+
}
/* dump a mbuf on console */
--
2.7.4
next reply other threads:[~2017-12-13 19:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 19:28 chunmei Liu [this message]
2017-12-13 19:32 chunmei Liu
2017-12-13 21:18 ` Thomas Monjalon
2017-12-13 21:31 ` Stephen Hemminger
2017-12-13 22:34 ` Liu, Chunmei
2017-12-13 22:46 ` Liu, Chunmei
2017-12-13 22:51 ` Stephen Hemminger
2017-12-13 23:40 chunmei Liu
2017-12-13 23:44 chunmei Liu
2017-12-14 7:47 ` Thomas Monjalon
2017-12-14 9:24 ` Olivier MATZ
2017-12-14 11:54 ` Ananyev, Konstantin
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=1513193294-159494-1-git-send-email-chunmei.liu@intel.com \
--to=chunmei.liu@intel.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 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).