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 CDE30A499 for ; Tue, 16 Jan 2018 12:03:30 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2018 03:03:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,368,1511856000"; d="scan'208";a="20189118" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 16 Jan 2018 03:03:29 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 16 Jan 2018 03:03:29 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 16 Jan 2018 03:03:29 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Tue, 16 Jan 2018 19:03:27 +0800 From: "Wang, Xiao W" To: Olivier Matz CC: "yliu@fridaylinux.org" , "thomas@monjalon.net" , "Bie, Tiwei" , "dev@dpdk.org" , "stephen@networkplumber.org" , "maxime.coquelin@redhat.com" Thread-Topic: [dpdk-dev] [PATCH v10 3/5] net: add a helper for making RARP packet Thread-Index: AQHTibHnzBQFt0UasEaReUsWAXIo76N1t6gAgACPExD//404AIAAiCYQ Date: Tue, 16 Jan 2018 11:03:26 +0000 Message-ID: References: <20180109160918.29173-4-xiao.w.wang@intel.com> <20180110012356.57456-1-xiao.w.wang@intel.com> <20180110012356.57456-4-xiao.w.wang@intel.com> <20180116090122.fsvqrgzu5rjqcgre@platinum> <20180116104238.n4uzmby46zlyogjn@platinum> In-Reply-To: <20180116104238.n4uzmby46zlyogjn@platinum> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2YxOTQ4MTAtNWVhZC00OTE1LTgzYTItZTMxYTJmYjM0YTFiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJ3RmxNdmZ1SnAwOEtweGhMWUlCejlmcjh4NDRnUGJObTlsUmhOb0VPTHg1MXVLaXB5TGxoa2M4Z1E2QTVSMGVtIn0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v10 3/5] net: add a helper for making RARP packet 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, 16 Jan 2018 11:03:31 -0000 Hi Olivier, > -----Original Message----- > From: Olivier Matz [mailto:olivier.matz@6wind.com] > Sent: Tuesday, January 16, 2018 6:43 PM > To: Wang, Xiao W > Cc: yliu@fridaylinux.org; thomas@monjalon.net; Bie, Tiwei > ; dev@dpdk.org; stephen@networkplumber.org; > maxime.coquelin@redhat.com > Subject: Re: [dpdk-dev] [PATCH v10 3/5] net: add a helper for making RARP > packet >=20 > Hi Xiao, >=20 > On Tue, Jan 16, 2018 at 09:43:43AM +0000, Wang, Xiao W wrote: > > Hi Olivier, > > > You can also use rte_pktmbuf_append() to check for the tailroom and > > > update data_len/pkt_len: > > > > > > m =3D rte_pktmbuf_alloc(); I just realized that if we let this function to allocate mbuf, it may restr= ict this api's applicability. E.g. the caller just has a mbuf, without a mempool. How do you think? > > > if (m =3D=3D NULL) > > > return NULL; > > > eth_hdr =3D rte_pktmbuf_append(m, RARP_PKT_SIZE); > > > > When data_len is not enough, we need to rte_pktmbuf_append(m, > RARP_PKT_SIZE - m->data_len); >=20 > Sorry, I don't get your point here. I mean we just need to extend the data_len by "RARP_PKT_SIZE - m->data_len"= when the room is not big enough. BRs, Xiao