From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 2816A1B012 for ; Thu, 14 Dec 2017 12:54:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Dec 2017 03:54:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,400,1508828400"; d="scan'208";a="158674542" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga004.jf.intel.com with ESMTP; 14 Dec 2017 03:54:04 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.67]) by IRSMSX104.ger.corp.intel.com ([163.33.3.159]) with mapi id 14.03.0319.002; Thu, 14 Dec 2017 11:54:03 +0000 From: "Ananyev, Konstantin" To: "Liu, Chunmei" , "dev@dpdk.org" CC: "Liu, Chunmei" Thread-Topic: [dpdk-dev] [PATCH] fix ceph async messenger runtime bug based on spdk/dpdk Thread-Index: AQHTdGxxBLGCSieRMUOrNwT04erEPqNCqKWw Date: Thu, 14 Dec 2017 11:54:02 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAC980C@irsmsx105.ger.corp.intel.com> References: <1513208695-65016-1-git-send-email-chunmei.liu@intel.com> In-Reply-To: <1513208695-65016-1-git-send-email-chunmei.liu@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTMwMmFjYmItNDFjMC00MTc0LWJiOGMtMzEyY2ZkMjYzNTBhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkJOMHBJbUhrVllLQmdmTzFsYXFNRUpmakd0OFVxeVF1MXVrUG03NjN3OEE9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 11:54:07 -0000 Hi Chunmei, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of chunmei Liu > Sent: Wednesday, December 13, 2017 11:45 PM > To: dev@dpdk.org > Cc: Liu, Chunmei > Subject: [dpdk-dev] [PATCH] fix ceph async messenger runtime bug based on= spdk/dpdk >=20 > From: chunmei >=20 > ceph async messenger has some run time error with this dpdk library, > 1) need set rxm->next=3D 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. >=20 > 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(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxt= x.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 =3D next_rxe->mbuf; > next_sc_entry->fbuf =3D first_seg; > goto next_desc; > - } > + } else > + rxm->next =3D NULL; Shouldn't be a problem I think, but wonder why do we need it at all? As I remember, rte_pktmbuf_free_seg() always sets m->next to NULL. Konstantin=20 >=20 > /* 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 *o= paque_arg) > } >=20 > RTE_ASSERT(mp->elt_size >=3D sizeof(struct rte_mbuf) + > - user_mbp_priv->mbuf_data_room_size + > user_mbp_priv->mbuf_priv_size); >=20 > mbp_priv =3D rte_mempool_get_priv(mp); > @@ -233,6 +232,8 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int i= s_header) > } > if (nb_segs !=3D 0) > rte_panic("bad nb_segs\n"); > + if (m_seg !=3D NULL) > + rte_panic("bad m_seg\n"); > } >=20 > /* dump a mbuf on console */ > -- > 2.7.4