From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) by dpdk.org (Postfix) with ESMTP id 8F3A27D22 for ; Thu, 24 Aug 2017 15:23:15 +0200 (CEST) Received: by mail-wr0-f176.google.com with SMTP id i33so2335928wri.3 for ; Thu, 24 Aug 2017 06:23:15 -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:content-transfer-encoding:in-reply-to :user-agent; bh=oHQT08FfSaeNisP0tnwGymDxZY5+mef7j2Cd3ykhNsQ=; b=Dreq7rNGKrxG2m59WKXAVKF+9sMN321hPShlp0R82Kt1WKnTkwcrjRYmtdca4vhL/K K0VsrB6QYURKZYTp27QVEmjrhkKSGX0IXugKMtnjy0soaYuJElciz+tpSDFNd6CikXLB /9rYkSchXyw+gg59mOSxMqoZnarblLqqciA7ee80jSDNO+uuJ0+GCt4L7pe9qulAIL9M fGJ3oSBd5AVEy4QKgxLODY6eWZTQ0Vj6fd+A6hYkfl3Mvs4XEItD+Rvld0GNO4G4RzXM U1pJcN2NZuPTXR4l4FAZBqtt8eDCpIF8F2D1b+bEKuayHDrtFs3CoImRG52QEGp0QiGF wKyw== 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:content-transfer-encoding :in-reply-to:user-agent; bh=oHQT08FfSaeNisP0tnwGymDxZY5+mef7j2Cd3ykhNsQ=; b=aXW/yll51ZpyT6dJsMUjmao7u8Qk6sxZluIrgjqBfB8eOsIM0KRyF/Wlu6Hy3MivfQ m5BKVtaHRTxEEcO4sIhcZZbCx3bB3y8CEwXfMd0Kowuspg7Rmc2x00GvotBJO/iQVe0H c4fyTFugxi5953j8re6fR9zXdYMbgrCF7CdPGt9semKcLn4P3PLV2j/qwIDq1XG6dzX4 FKLe+cxrztuJ8xAu1Ub48Htjue+yTxnLpUg9F8IcVgNxM4/FTBqcTnNU1JlZV8wxUIh9 40Pw78zD6nfbS8PiyAZ0U43cup2L7O8lIrzILp9a8p8WC8Y+SYBvuZ+hipm+PScAs6/v UQiw== X-Gm-Message-State: AHYfb5jhXKwWIme2QDEnubHXvKH2EbPriPjf65iUSZmkgiywStFLNkqc YA+9yjv4t3o5G/DM X-Received: by 10.223.199.134 with SMTP id l6mr1672233wrg.84.1503580995156; Thu, 24 Aug 2017 06:23:15 -0700 (PDT) Received: from autoinstall.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id s1sm3384308wra.75.2017.08.24.06.23.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 06:23:14 -0700 (PDT) Date: Thu, 24 Aug 2017 15:23:05 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Shahaf Shuler Cc: adrien.mazarguil@6wind.com, dev@dpdk.org, yskoh@mellanox.com, stable@dpdk.org Message-ID: <20170824132305.GJ4544@autoinstall.dev.6wind.com> References: <20170823073358.116786-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170823073358.116786-1-shahafs@mellanox.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-stable] [PATCH 1/2] net/mlx5: fix num seg assumption on vPMD X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 13:23:15 -0000 On Wed, Aug 23, 2017 at 10:33:57AM +0300, Shahaf Shuler wrote: > vPMD Tx function assumes that after the scatter of the > multi-segment packets the next packet will be a single segment packet. > > This is not current as the function can return due to lack of resources > without sending all of the multi-segment mbufs sequence. > > Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86") > Cc: stable@dpdk.org > > Signed-off-by: Shahaf Shuler > --- > > This patch should be applied only after the series: > http://dpdk.org/dev/patchwork/patch/27367/ > > --- > drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c > index 8560f745a..30727e6dd 100644 > --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c > +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c > @@ -119,8 +119,7 @@ txq_wr_dseg_v(struct txq *txq, __m128i *dseg, > } > > /** > - * Count the number of continuous single segment packets. The first packet must > - * be a single segment packet. > + * Count the number of continuous single segment packets. > * > * @param pkts > * Pointer to array of packets. > @@ -137,7 +136,8 @@ txq_check_multiseg(struct rte_mbuf **pkts, uint16_t pkts_n) > > if (!pkts_n) > return 0; > - assert(NB_SEGS(pkts[0]) == 1); > + if (NB_SEGS(pkts[0]) > 1) > + return 0; > /* Count the number of continuous single segment packets. */ > for (pos = 1; pos < pkts_n; ++pos) > if (NB_SEGS(pkts[pos]) > 1) > @@ -502,6 +502,8 @@ mlx5_tx_burst_vec(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) > n = RTE_MIN((uint16_t)(pkts_n - nb_tx), MLX5_VPMD_TX_MAX_BURST); > if (!(txq->flags & ETH_TXQ_FLAGS_NOMULTSEGS)) > n = txq_check_multiseg(&pkts[nb_tx], n); > + if (!n) > + break; > if (!(txq->flags & ETH_TXQ_FLAGS_NOOFFLOADS)) > n = txq_calc_offload(txq, &pkts[nb_tx], n, &cs_flags); > ret = txq_burst_v(txq, &pkts[nb_tx], n, cs_flags); > -- > 2.12.0 Acked-by: Nelio Laranjeiro -- Nélio Laranjeiro 6WIND