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 E38272BBD for ; Fri, 20 Jan 2017 13:08:47 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP; 20 Jan 2017 04:08:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,258,1477983600"; d="scan'208";a="924744657" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga003.jf.intel.com with ESMTP; 20 Jan 2017 04:08:45 -0800 To: Ilya Matveychikov , dev@dpdk.org References: <7181C1FE-0FB9-4FB8-9A12-08AB4506880E@gmail.com> From: Ferruh Yigit Message-ID: Date: Fri, 20 Jan 2017 12:08:45 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <7181C1FE-0FB9-4FB8-9A12-08AB4506880E@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] mbuf: remove redundant line in rte_pktmbuf_attach 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: Fri, 20 Jan 2017 12:08:48 -0000 On 1/20/2017 12:19 AM, Ilya Matveychikov wrote: > mi->next will be assigned to NULL few lines later, trivial patch > > Signed-off-by: Ilya V. Matveychikov > --- > lib/librte_mbuf/rte_mbuf.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index ead7c6e..5589d54 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -1139,7 +1139,6 @@ static inline void rte_pktmbuf_attach(struct rte_mbuf *mi, struct rte_mbuf *m) > mi->buf_addr = m->buf_addr; > mi->buf_len = m->buf_len; > > - mi->next = m->next; Do you know why attaching mbuf is not supporting multi-segment? Perhaps this can be documented in function comment, as one of the "not supported" items. Also, should we check mi->next before overwriting, in case it is not NULL? > mi->data_off = m->data_off; > mi->data_len = m->data_len; > mi->port = m->port; >