From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] mbuf: fix for incomplete nb_segs/port types change Date: Fri, 10 Nov 2017 08:26:02 +0900 Message-ID: <20171110082602.643503bf@shemminger-XPS-13-9360> References: <04EF52DF-6CE8-4EF4-96AA-711184F8379F@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Ilya Matveychikov Return-path: Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by dpdk.org (Postfix) with ESMTP id 9679B1B392 for ; Fri, 10 Nov 2017 00:26:49 +0100 (CET) Received: by mail-pf0-f193.google.com with SMTP id b85so5376353pfj.13 for ; Thu, 09 Nov 2017 15:26:49 -0800 (PST) In-Reply-To: <04EF52DF-6CE8-4EF4-96AA-711184F8379F@gmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 9 Nov 2017 17:51:41 +0400 Ilya Matveychikov wrote: > Update types of variables to correspond to nb_segs type change from > uint8_t to uint16_t. Also, use 0xffff instead of 0xff to specify > invalid port value. > > Fixes: 97cb466d ("mbuf: use 2 bytes for port and nb segments") > Signed-off-by: Ilya V. Matveychikov > --- > lib/librte_mbuf/rte_mbuf.c | 6 +++--- > lib/librte_mbuf/rte_mbuf.h | 13 ++++++++----- > lib/librte_pdump/rte_pdump.c | 2 +- > 3 files changed, 12 insertions(+), 9 deletions(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index 26a62b8..f2213a4 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -144,7 +144,7 @@ rte_pktmbuf_init(struct rte_mempool *mp, > /* init some constant fields */ > m->pool = mp; > m->nb_segs = 1; > - m->port = 0xff; > + m->port = 0xffff; In current code this now uses MBUF_INVALID_PORT here