From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) by dpdk.org (Postfix) with ESMTP id 811BA37B4 for ; Wed, 29 Mar 2017 09:32:31 +0200 (CEST) Received: by mail-wr0-f179.google.com with SMTP id w43so4653666wrb.0 for ; Wed, 29 Mar 2017 00:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Xnagvk4f+0z/MoNcc9R3ynkR4yukVfrifXKp8GLsBOc=; b=Ko4TFs4pMatfP+QPern7l4L4Rs60cZ4s8BDrCcQBfUnrfTEEaNHThJGLLvUasLt+U1 l2mA71Xui1m4E4bwiJWojnKW8L+jLP+UpXTbzf+cUHR650lBpnBWQqtOY16gDfJVgUkh jOnTgr1Ow0JC6+KaJlAm6opd0Q+dXqmenDq1wK7BXuJFasZArZYkkPTwlsph5PzIjjJa kzy+nn3IO7O24vtHKODbQ2fKaA77n0WlsorKSTID4Wng5ua1wuDa5FjwdxfbKQL/ryti nLbFCpOgSFs4EA4xRMmbcQ5pzSql4fMY/ndOrRNv1iSLJ9XWkaSwQfsls0oJzGs9nyg4 7iTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Xnagvk4f+0z/MoNcc9R3ynkR4yukVfrifXKp8GLsBOc=; b=hTvAHfVzp5UQgrWMTPufc5F6cFtS27hMPmqF3fW8HIcWbCNj/o9EKq1gPOJayIAo/k cU765Yl5HG74tOrP2yJHKhZj1i2J9OnLlBV/ZHu8J1UeTxN8RMoZkwC01fMlnapgOIrD MUCN8SLIKk1dhr7LGwI3a6lwlcV2CEzCs8CBcBV4cIQ05DcvpM+2sIUrhVZYVTzgBdIB j7SzCJcIbGVAzCy5MbZihwwo8u6O7ELaYAyp6tF+CuZlRiOj64Sp9Rro3DQQghbi2oaP h1ytspSN9CV2zX4+b1g9EvtGg2IZC/Vi1kuyqbhbkwer2ekOzAQrBQaERX8y3tcLRc94 gRlg== X-Gm-Message-State: AFeK/H2hXVvSY3lwoodAhv4BQxQInYyFa/LhxraSsyl57hZeUXbJt/2T8R1zm3x54cYXaX6q X-Received: by 10.223.176.175 with SMTP id i44mr29896616wra.96.1490772751241; Wed, 29 Mar 2017 00:32:31 -0700 (PDT) Received: from ping.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id t68sm2638992wrc.55.2017.03.29.00.32.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Mar 2017 00:32:30 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Adrien Mazarguil , Yongseok Koh , stable@dpdk.org Date: Wed, 29 Mar 2017 09:32:10 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 Subject: [dpdk-stable] [PATCH] net/mlx5: fix Tx when first segment size is too short 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: Wed, 29 Mar 2017 07:32:31 -0000 First segment size must be 18 bytes, packets not respecting this are silently not sent by the NIC but counted as sent by the PMD. The only way to figure out is compiling the PMD in debug mode. Cc: stable@dpdk.org Fixes: 6579c27c11a5 ("net/mlx5: remove gather loop on segments") Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 823aac8..e2e8a22 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -485,7 +485,8 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) #ifdef MLX5_PMD_SOFT_COUNTERS total_length = length; #endif - assert(length >= MLX5_WQE_DWORD_SIZE); + if (length < (MLX5_WQE_DWORD_SIZE + 2)) + break; /* Update element. */ (*txq->elts)[elts_head] = buf; elts_head = (elts_head + 1) & (elts_n - 1); -- 2.1.4