From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id 9B8EA685D for ; Wed, 25 Jun 2014 01:05:30 +0200 (CEST) Received: by mail-pa0-f46.google.com with SMTP id eu11so853619pac.5 for ; Tue, 24 Jun 2014 16:05:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=aZvwk5VPRBzySLgwpNGWSLzUl9nPw5WmBQoUDuOksSY=; b=c7074xOz/vn3BMQbGEgg7wgmKDVG5/3+sm30SjhQ3wwbJqHaV5EBhAmyvzfHIxW4S4 0s8JR7xszUKs/h/P5izqYBY984l7p53N3lTUy2Qz3NzFdoP9H9X6lL1PX8uRbTUHB344 gLVgZGnkp59ZksLtwt6pWGEZCxOlXe21qLOd30PzDQWKQQiRRnM9qKDIBkZ7JreCFYNd 2lofd9kGl18vDZ5e22gF7xzYbPdtDngnJ/f7lCYM9o+yLx9uv5kyHJAdjr15/BwXkCuM NXtOQZKRNR593SScI6pP8hh4RHMvwZzYXr/4nkx91cl++LXk2+eKYCn9dFylPljKzmnv 2sbA== X-Gm-Message-State: ALoCoQlk06ps/o4DUDz46AHTGA2LM90imdknEvGdt9DwFoBTQvdmf9VRZTVWTMJnn8mGy0gmqdVg X-Received: by 10.68.232.33 with SMTP id tl1mr5884612pbc.162.1403651148376; Tue, 24 Jun 2014 16:05:48 -0700 (PDT) Received: from nehalam.linuxnetplumber.net (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id ee5sm2088327pbc.47.2014.06.24.16.05.47 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 24 Jun 2014 16:05:47 -0700 (PDT) Date: Tue, 24 Jun 2014 16:05:45 -0700 From: Stephen Hemminger To: Bruce Richardson Message-ID: <20140624160545.136ad9e4@nehalam.linuxnetplumber.net> In-Reply-To: <1403649136-23551-2-git-send-email-bruce.richardson@intel.com> References: <1403649136-23551-1-git-send-email-bruce.richardson@intel.com> <1403649136-23551-2-git-send-email-bruce.richardson@intel.com> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Tue, 24 Jun 2014 23:05:31 -0000 On Tue, 24 Jun 2014 23:32:15 +0100 Bruce Richardson wrote: > > +static void > +free_unsent_pkts(struct rte_mbuf **pkts, uint16_t unsent, > + void *userdata __rte_unused) > +{ > + unsigned i; > + for (i = 0; i < unsent; i++) > + rte_pktmbuf_free(pkts[i]); > +} > + 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. Of course, the optimization would have to handle the refcnt issues.