From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by dpdk.org (Postfix) with ESMTP id 848862C55 for ; Wed, 29 Mar 2017 09:51:56 +0200 (CEST) Received: by mail-wr0-f169.google.com with SMTP id w43so4979075wrb.0 for ; Wed, 29 Mar 2017 00:51:56 -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:in-reply-to:references; bh=kn0jH8lz14Z/e91SYNp8ZvWI7P5+hDLqrxMjJoqjRqY=; b=wj8eYfHr1VIPnzUM9mwO+aixxsLP4ZFFwRr0Bctd8HL1Zb1/WGnxKnHbE8CcoIX3Hl AGcsmoq2Hq5ZGghPJeKKklP5Xbxqf7nxeBar+GYeePvSItEZzcB/ee9067j6EMWNu2G/ splQkb0uy1d7ZmMi8nrrJg0Vrd8dkrnDjihENCEalAeoh96Aoihw38ieqWT5hpggWnnu YOrfSbSGWcnbbnvp2czW2EEH+MgyP7BleNpHHeBYmAW8TCcaLLjnqecItrkWN47F7TdG u1Hx8QbFW9whuwWNQRVBCwU5cplHhnx4GodkwnkJuGy4Q0KwyQJ+5Prz+c2gULcKc3p8 6jGQ== 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:in-reply-to :references; bh=kn0jH8lz14Z/e91SYNp8ZvWI7P5+hDLqrxMjJoqjRqY=; b=WrtO19ryg8zjGBzg2Ai36ic+I8lc1jvRscGBstoBHraNK74ZdrpTo8p2O/q6+NbCMQ uoNohvbdSjI/nohMBM7XdJZI/hx9qKpGAeHCFUJJ7tnee3jMor/GVr8mxnFohwWVA4zp IvMzW8o5U+BBRskTMQ/mJCQjF63sXgg/S1hmyjQiI0iMCfHsk/YvXXxlS2Iqp0WGmUkc ZSw/JQ3jjzs4EzlsPmL9nw0VZAVSIxMt8AEUh7FpbhgHP/qv8DbgNghg96JX7DQO5j6H p0uhYV7M6Gw9Z3D6UPzZHSNTZx6Rzdofxe5q5HIkOI013rZ3UZSttcDjx1Qz4eT3zVql ERNg== X-Gm-Message-State: AFeK/H36piTxsfOXvnSaotR7vnVvK4wcrwVSctFh6p5/IHrnUgWmi4cRyisxI+cmEe8RmeK8 X-Received: by 10.223.146.132 with SMTP id 4mr5095115wrn.91.1490773916253; Wed, 29 Mar 2017 00:51:56 -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 z40sm8128774wrz.67.2017.03.29.00.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Mar 2017 00:51:55 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Adrien Mazarguil , Yongseok Koh , stable@dpdk.org Date: Wed, 29 Mar 2017 09:51:39 +0200 Message-Id: <0765108e11b5128da9f6d403d87e3e42d0adffdd.1490773336.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: 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:51:56 -0000 First segment size must be at least 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 --- v2: fix the commit log. --- 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