From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by dpdk.org (Postfix) with ESMTP id 2A2793238 for ; Fri, 15 Sep 2017 10:11:39 +0200 (CEST) Received: by mail-wr0-f172.google.com with SMTP id l22so1158471wrc.10 for ; Fri, 15 Sep 2017 01:11:39 -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=0wMkSgf05U2EHeMGWvyyJMw8JvE4OYaXAy1rbgxmuFw=; b=TtG3IM5ngBgs1G8S+OiMWZHqU0ihvdoN2Nu9ce45lzV3aIgfyKhjtN+hLWhyv1Wsht oY7GTSSwrPI/ZVHfG/X/3Yo5yZt74Wnt3bBg+ZOQ0YvHa1hVe/y7HD+3aX38tugkHrQR Zm9gtWpAJpYhx8H/2pW6oRxQmhOAZsqMA7hIk3HQV/YS2WQHwz9cVzncZewajqqmnifP 11trRtzPVC6/beKT0HpkVlLu6xlFap0MK7bBQ89CxLuA2esBwVwfIDIMQ3OrwrXtO/6m ltVBEgsCfCE4xeTcyUyOUDkt4k1lJ+12Z3E+x3Igukx/TwGVRj8iq8aEe52fCkciiZeu fbew== 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=0wMkSgf05U2EHeMGWvyyJMw8JvE4OYaXAy1rbgxmuFw=; b=E3oGbGRXh0X4RhxxhMKzYhX5PMbE1N/MeiMkysnOlV3QzhppZhoRjT3MCBQVBjW3iy 0nufpPcm24sKhltC2J1jPwgXfhGmcwdsJcS3qpYtZBrl4F5dIy1+1p1QJfF4GOKdC96W AxnRGQLCM7jH6OA9BGoStoxPOJS0X3+e+vRFtJpb3Lly/CIvTMVZWJJcpOiAiofQyCdd lR/vDhVBlk2dJR/16xBEOGU6HEEJQJ6tUy1HzgkGBQeL8PShPsiRGJt8Qi678P/Ckm7Y iiBDHtFnNylIF6Qb+rToKiz/ouFWuInD2eoOULyy6c4tHwvzFahFbDSaviU/823B328Y nERA== X-Gm-Message-State: AHPjjUhrC8aJu8sw3dOtteo7AB4oKikW11RVBtYmkZe9dYvRLQZDlqdd t4f4Lg6v4vdJ403w X-Google-Smtp-Source: ADKCNb5w/ef9zmmZKsZb96n0d+WWn+nMayjNr+6GUGiRksnnFKAUQabmWcEWI6JWdmcXziZQziER4w== X-Received: by 10.223.165.73 with SMTP id j9mr20821871wrb.62.1505463098591; Fri, 15 Sep 2017 01:11:38 -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 188sm496324wmg.45.2017.09.15.01.11.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Sep 2017 01:11:37 -0700 (PDT) Date: Fri, 15 Sep 2017 10:11:27 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Shahaf Shuler Cc: yskoh@mellanox.com, adrien.mazarguil@6wind.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20170915081127.GC2160@autoinstall.dev.6wind.com> References: <5046c30c96938a590412ce03dcad1434824cd952.1505385989.git.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: <5046c30c96938a590412ce03dcad1434824cd952.1505385989.git.shahafs@mellanox.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v5 4/4] net/mlx5: enforce Tx num of segments limitation 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: Fri, 15 Sep 2017 08:11:39 -0000 On Thu, Sep 14, 2017 at 01:50:39PM +0300, Shahaf Shuler wrote: > Mellanox NICs has a limitation on the number of mbuf segments a multi > segment mbuf can have. The max number depends on the Tx offloads requested. > > The current code not enforce such limitation, which might cause > malformed work requests to be written to the device. > > This commit adds verification for the number of mbuf segments posted > to the device. In case of overflow the packet will not be sent. > > In addition update the nic documentation with the limitation. > Considering device limitation is 63 data segments in a work request, the > maximum number of segment in mbuf was calculated taking TSO as the worst > case: > > max_nb_segs = 63 - (control_segment + ethernet segment + > TSO headers inline + inline segment + > extra inline to align to cacheline) > > Cc: stable@dpdk.org > > Signed-off-by: Shahaf Shuler Acked-by: Nelio Laranjeiro -- Nélio Laranjeiro 6WIND