From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2 3/4] vmxnet3: add TSO support Date: Mon, 4 Jan 2016 21:15:19 -0800 Message-ID: <20160104211519.52d76a3f@xeon-e3> References: <1451960899-26881-1-git-send-email-yongwang@vmware.com> <1451960899-26881-4-git-send-email-yongwang@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Yong Wang Return-path: Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 7865D9215 for ; Tue, 5 Jan 2016 06:15:13 +0100 (CET) Received: by mail-pf0-f182.google.com with SMTP id e65so160983691pfe.1 for ; Mon, 04 Jan 2016 21:15:13 -0800 (PST) In-Reply-To: <1451960899-26881-4-git-send-email-yongwang@vmware.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 4 Jan 2016 18:28:18 -0800 Yong Wang wrote: > +/* The number of descriptors that are needed for a packet. */ > +static unsigned > +txd_estimate(const struct rte_mbuf *m) > +{ > + return m->nb_segs; > +} > + A wrapper function only really clarifies if it is hiding some information. Why not just code this in place?