From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 39D6B2A7 for ; Wed, 25 Jun 2014 02:04:51 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 24 Jun 2014 16:59:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,541,1400050800"; d="scan'208";a="533629469" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga001.jf.intel.com with ESMTP; 24 Jun 2014 17:05:07 -0700 Received: from irsmsx151.ger.corp.intel.com (163.33.192.59) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 25 Jun 2014 01:05:07 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.31]) by IRSMSX151.ger.corp.intel.com ([163.33.192.59]) with mapi id 14.03.0123.003; Wed, 25 Jun 2014 01:05:07 +0100 From: "Richardson, Bruce" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [RFC PATCH DRAFT 1/2] ethdev: add buffered single pkt TX function to API Thread-Index: AQHPj/xB+AyOqWM0lEWZjoOLvdUXWJuA0OyAgAAgkyA= Date: Wed, 25 Jun 2014 00:05:06 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B02CEE35C9@IRSMSX103.ger.corp.intel.com> References: <1403649136-23551-1-git-send-email-bruce.richardson@intel.com> <1403649136-23551-2-git-send-email-bruce.richardson@intel.com> <20140624160545.136ad9e4@nehalam.linuxnetplumber.net> In-Reply-To: <20140624160545.136ad9e4@nehalam.linuxnetplumber.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [RFC PATCH DRAFT 1/2] ethdev: add buffered single pkt TX function to API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2014 00:04:51 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Tuesday, June 24, 2014 4:06 PM > To: Richardson, Bruce > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [RFC PATCH DRAFT 1/2] ethdev: add buffered single= pkt > TX function to API >=20 > On Tue, 24 Jun 2014 23:32:15 +0100 > Bruce Richardson wrote: >=20 > > > > +static void > > +free_unsent_pkts(struct rte_mbuf **pkts, uint16_t unsent, > > + void *userdata __rte_unused) > > +{ > > + unsigned i; > > + for (i =3D 0; i < unsent; i++) > > + rte_pktmbuf_free(pkts[i]); > > +} > > + >=20 > This should be moved into mbuf layer, and there it could be > optimized to do a rte_mempool_mp_put_bulk. This would speed > up operations becuase it would mean a single ring operation > per set rather per mbuf segment. >=20 > Of course, the optimization would have to handle the refcnt > issues. I'm not sure how we can improve this by bringing it into the mbuf layer. As= well as handling of refcounts, we also have no guarantee than each mbuf qu= eued up for a particular port comes from the same mempool. Can you please clarify how you think this might be better done?