From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 77C471B5F4 for ; Thu, 2 Nov 2017 14:43:14 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id r196so11217178wmf.2 for ; Thu, 02 Nov 2017 06:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=em2L6dBuNAuDNJXms1gqXJhPYBEm/ufL/ll+Up28jY0=; b=QAI8LiktjpAgx8eJR12qfe/asWZRsUfkGS909X/Nf1DdGCJI7F2SN/SL42ls6mTmBK rk9sIsYCm6bsMdcDI6dG16/tvduKvKlJaHjIXZkgLFkQlNhWeghtUqf5FbN9aZR3nLoJ WkUipAJRO7iqsMgYbTqsC/vlP85P1WqHPP0SDJRpQYnlTqGs4aUpDyD4/tSjmBkO3GkD 0Aq0MEvFhqpF/+c5BPXoT8C6Pr5rhG62wcFCwtnLcnVrGtVlRRifv13q3x5vX8Szvuyh pK0mCvnYUcO14DBUSyPgFunNjEW+XUolatebc1RdokySbh2R+3i98ZuwIf/kkRFf86lH tN8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=em2L6dBuNAuDNJXms1gqXJhPYBEm/ufL/ll+Up28jY0=; b=RYJATimAW8993Twp7EkRcSvQfcPWSKaQOZd1n6gV0n/SPL09zYvOdKYLY9tcxouQfn 2yZFvBviHf1mEUZwRBvXAAASH/NqyEshm73L/b1k9nE9b5ZB2nkt3hn4Kzw97TQIgxQD FOAX3S7ATAS6pcNw1Og4y1pfKDgnE0qL4bo/OPd2agmW+kALjk5r1NYowBaBD5Aw8xUG s3LsmVDQDNOby1DbBSFjjT6Gy2+gLqf4QQLQHgKAT9pZ9yfoSJ5sUBHRcAhmLuHoKLaO MlRmHaPkMyHAic0Nn7xAYgD9PKnQm5/aXWVXQqGpOO+ELJnVCapoKm3fvYQkzfala/o+ vojA== X-Gm-Message-State: AMCzsaWBMPa8tbW2CokMPylV9txSP21YEY7NXJJ2XI6vFfJqN/iN/2N3 cwttPTj24otbTqoGcNkWznofAFrC X-Google-Smtp-Source: ABhQp+SnMMdKA9Kg46gMDIFCjHCww9ts8ZszGZ0MrhLaKG6wims57fONt3d7VeJH8Mn5RNcz5qk2GA== X-Received: by 10.80.187.44 with SMTP id y41mr4444906ede.154.1509630194260; Thu, 02 Nov 2017 06:43:14 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id y21sm3095482edi.25.2017.11.02.06.43.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 06:43:13 -0700 (PDT) Date: Thu, 2 Nov 2017 14:43:02 +0100 From: Adrien Mazarguil To: Matan Azrad Cc: dev@dpdk.org, Ophir Munk Message-ID: <20171102134302.GE24849@6wind.com> References: <1509358049-18854-1-git-send-email-matan@mellanox.com> <1509474093-31388-1-git-send-email-matan@mellanox.com> <1509474093-31388-7-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1509474093-31388-7-git-send-email-matan@mellanox.com> Subject: Re: [dpdk-dev] [PATCH v4 6/8] net/mlx4: separate Tx segment cases 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: Thu, 02 Nov 2017 13:43:14 -0000 On Tue, Oct 31, 2017 at 06:21:31PM +0000, Matan Azrad wrote: > Optimize single segment case by processing it in different block which > prevents checks, calculations and barriers relevant only for multi > segment case. > > Call a dedicated function for handling multi segments case. > > Signed-off-by: Matan Azrad > Signed-off-by: Ophir Munk One remaining comment below, besides that: Acked-by: Adrien Mazarguil > --- > drivers/net/mlx4/mlx4_rxtx.c | 236 +++++++++++++++++++++++++++---------------- > 1 file changed, 151 insertions(+), 85 deletions(-) > > diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c > + /* Write the first DWORD of each TXBB save earlier. */ > + if (pv_counter) { > + /* Need a barrier here before writing the byte_count. */ > + rte_io_wmb(); > + for (--pv_counter; pv_counter >= 0; pv_counter--) > + pv[pv_counter].dseg->byte_count = pv[pv_counter].val; > + } > + /* Fill the control parameters for this packet. */ > + ctrl->fence_size = (wqe_real_size >> 4) & 0x3f; > + return nr_txbbs; > +} Missing empty line here. > /** > * DPDK callback for Tx. > * > @@ -261,10 +374,11 @@ struct pv { > unsigned int i; > unsigned int max; > struct mlx4_sq *sq = &txq->msq; > - struct pv *pv = (struct pv *)txq->bounce_buf; > + int nr_txbbs; -- Adrien Mazarguil 6WIND