From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com [74.125.83.42]) by dpdk.org (Postfix) with ESMTP id 8E39F2C01 for ; Tue, 5 Sep 2017 05:40:07 +0200 (CEST) Received: by mail-pg0-f42.google.com with SMTP id v66so5953539pgb.5 for ; Mon, 04 Sep 2017 20:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ujg+79IpQAEKZ6Mvee9xa1KateJEqDSwjFJqsEmK1aE=; b=ldrYyBlcziXFfz5rID4LjitPffiy5UqbuMVcuKtFY5caiF6b+9KZZ8mQnajJpb12mY kt67x3ZkPJk7W3mdY4wK2EOykWoV4LtiTSJ+fAnK59tLT5D4L+DuhMlgf4rFoSxUHBVy yJOyQxI5z4DL9PXn7qYd/AlShMo0hc74p5HLWd1Ecj07xKuhkl7wNn7VB8wp1aFXb0YB yu5FfXnjw5S6tZw7aS526fv+nuT3z1ZilZEQjXa+sQsUDYrC51NeB+n4S4O+LxxwazU0 VGzehTDZ150eKz1zanQb9BGjQnm2oxn6z5SQ9YJ8+SLxxB77XvmqKNz6wK2BwzFra9Bp 3fmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ujg+79IpQAEKZ6Mvee9xa1KateJEqDSwjFJqsEmK1aE=; b=qt45UZGRVmd2V76u7VaYnnqqMjOW+2ya8P1sMlHRP3BHCmfwGmBBVx9aU5KLKdYRMz TzyxSG4HhwiXHKWP5+DoBVUoMaNdR3WnmdzH/f0mZGcZPzXyj7YNBUqIPNDl/bEDoTVq cc1An5u2qbHQh7ujJR4K6tkHkXvQ0ZORGmGEiRgNtlXzaZv4vPQeUushpEDzkpb8cjZv mGUpxTkTzmfIfv5qPR/gcdN902P+FT2+Jr6zukXc3LC8eBkCOqPyK/RQY9NnZIQyt9eY Q6PKLejxm8RFQzQnhegr36JpIYfAvDevqOlZOgHPgd+bVlrAULm/ALevCiddfpZJc7UQ wwag== X-Gm-Message-State: AHPjjUj2zeifjj+weQDB6EXVcO5+KMiOTq1+raPIvmZ27wXRWQMvdM+U RakFuNH6z+jKlSIWt4XDJg== X-Google-Smtp-Source: ADKCNb7+Dqeeekh3XDOR+2NdmSIyEVcPfclKEbVaCbfjUfELru8ay+ab/oeHahynY+Fn134C/BxLhA== X-Received: by 10.84.211.42 with SMTP id b39mr2812539pli.150.1504582806532; Mon, 04 Sep 2017 20:40:06 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id m6sm11968978pfm.99.2017.09.04.20.40.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2017 20:40:06 -0700 (PDT) Date: Mon, 4 Sep 2017 20:39:59 -0700 From: Stephen Hemminger To: Zhiyong Yang Cc: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Message-ID: <20170904203959.727ea76a@xeon-e3> In-Reply-To: <20170904065532.13055-1-zhiyong.yang@intel.com> References: <20170904065532.13055-1-zhiyong.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] librte_mbuf: modify the port initialization value 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: Tue, 05 Sep 2017 03:40:08 -0000 On Mon, 4 Sep 2017 14:55:32 +0800 Zhiyong Yang wrote: > In order to support more than 256 virtual ports, the field "port" in > rte_mbuf has been increased to 16 bits. The initialization/reset > value of the field "port" should be changed from 0xff to 0xffff > accordingly. > > Signed-off-by: Zhiyong Yang > --- > lib/librte_mbuf/rte_mbuf.c | 2 +- > lib/librte_mbuf/rte_mbuf.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index 26a62b8e1..2e80ed9b1 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; > rte_mbuf_refcnt_set(m, 1); > m->next = NULL; > } > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index eaed7eee0..cdc70aa83 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -1095,7 +1095,7 @@ static inline void rte_pktmbuf_reset(struct rte_mbuf *m) > m->vlan_tci = 0; > m->vlan_tci_outer = 0; > m->nb_segs = 1; > - m->port = 0xff; > + m->port = 0xffff; > > m->ol_flags = 0; > m->packet_type = 0; Maybe introduce MBUF_INVALID_PORT as a constant? #define MBUF_INVALID_PORT 0xffff