From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 23F182030 for ; Thu, 14 Dec 2017 10:24:49 +0100 (CET) Received: from lfbn-lil-1-110-231.w90-45.abo.wanadoo.fr ([90.45.197.231] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ePPr9-0007CD-3V; Thu, 14 Dec 2017 10:31:08 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Thu, 14 Dec 2017 10:24:41 +0100 Date: Thu, 14 Dec 2017 10:24:41 +0100 From: Olivier MATZ To: chunmei Liu Cc: dev@dpdk.org Message-ID: <20171214092440.b6gmpmmu734lotmy@platinum> References: <1513208695-65016-1-git-send-email-chunmei.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513208695-65016-1-git-send-email-chunmei.liu@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] fix ceph async messenger runtime bug based on spdk/dpdk X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 09:24:49 -0000 Hi Chunmei, On Wed, Dec 13, 2017 at 03:44:55PM -0800, chunmei Liu wrote: > From: chunmei > > ceph async messenger has some run time error with this dpdk library, > 1) need set rxm->next= null at end of packet since not init it to 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. > > Signed-off-by: chunmei Liu > --- > drivers/net/ixgbe/ixgbe_rxtx.c | 3 ++- > lib/librte_mbuf/rte_mbuf.c | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c > index 1e07895..918946b 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > @@ -2190,7 +2190,8 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts, > rxm->next = next_rxe->mbuf; > next_sc_entry->fbuf = first_seg; > goto next_desc; > - } > + } else > + rxm->next = NULL; > > /* Initialize the first mbuf of the returned packet */ > ixgbe_fill_cluster_head_buf(first_seg, &rxd, rxq, staterr); > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index 0e3e36a..c01da19 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); I don't see the point here. Many parts of dpdk rely on this code without issue. I enabled the asserts and see no issue with testpmd. Can you give more details? > @@ -233,6 +232,8 @@ 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"); > } A similar check was recently sumbitted in another patch. Please see: https://dpdk.org/dev/patchwork/patch/32057/