From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 807C2293B for ; Tue, 5 Sep 2017 06:28:18 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2017 21:28:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,478,1498546800"; d="scan'208";a="307957658" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 04 Sep 2017 21:28:17 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 21:28:17 -0700 Received: from bgsmsx102.gar.corp.intel.com (10.223.4.172) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 21:28:17 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.62]) by BGSMSX102.gar.corp.intel.com ([169.254.2.11]) with mapi id 14.03.0319.002; Tue, 5 Sep 2017 09:58:14 +0530 From: "Yang, Zhiyong" To: Stephen Hemminger CC: "dev@dpdk.org" , "thomas@monjalon.net" , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH] librte_mbuf: modify the port initialization value Thread-Index: AQHTJUrxFOzMvVlbPk+iYTHKLQpu0KKlSoKAgABpJzA= Date: Tue, 5 Sep 2017 04:28:14 +0000 Message-ID: References: <20170904065532.13055-1-zhiyong.yang@intel.com> <20170904203959.727ea76a@xeon-e3> In-Reply-To: <20170904203959.727ea76a@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDRjMTg2OGUtYTY5Ni00YjFiLTgwYmEtMjM4ODE2N2YzZDVlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InBRbVhnd1FLelYzaDBiSGVJQUxDamMrYkJtQmNkVDlOdVN1eXUrcGRIaDA9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 04:28:18 -0000 Hi, Stephen: > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Tuesday, September 5, 2017 11:40 AM > To: Yang, Zhiyong > Cc: dev@dpdk.org; thomas@monjalon.net; Yigit, Ferruh > Subject: Re: [dpdk-dev] [PATCH] librte_mbuf: modify the port initializati= on value >=20 > > @@ -144,7 +144,7 @@ rte_pktmbuf_init(struct rte_mempool *mp, > > /* init some constant fields */ > > m->pool =3D mp; > > m->nb_segs =3D 1; > > - m->port =3D 0xff; > > + m->port =3D 0xffff; > > rte_mbuf_refcnt_set(m, 1); > > m->next =3D 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_m= buf > *m) > > m->vlan_tci =3D 0; > > m->vlan_tci_outer =3D 0; > > m->nb_segs =3D 1; > > - m->port =3D 0xff; > > + m->port =3D 0xffff; > > > > m->ol_flags =3D 0; > > m->packet_type =3D 0; >=20 > Maybe introduce MBUF_INVALID_PORT as a constant? >=20 > #define MBUF_INVALID_PORT 0xffff Make sense. Thanks for your suggestion. Thanks Zhiyong