From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com [209.85.128.181]) by dpdk.org (Postfix) with ESMTP id 2873D2BBE for ; Fri, 15 Sep 2017 10:11:39 +0200 (CEST) Received: by mail-wr0-f181.google.com with SMTP id m18so1159782wrm.2 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=UBb2kqIA8oXYiT3xdBOv8OS5hK8aYvyxnZyHXFnlpHtPncfQOGWEqkSW+2Cx8ExLLd QjLTGJVWoOQdklgvB5HV6XhmVFIIZEhUJU4fMOh44tgDT2DmY0/jkmXLIR2P6DNMKTZv osJc6tWB+my1J9MDR3cnF32l9CHaUF7F8pgI/eHDvCm5qYCNG9v/rYsjXKeO55fWQRXN tpwkDdmyj1m8HEFBe2gEG37Qhj6j6oaHFcNn0iIqBTXnKAwWhfhM8D/Q/n4vlHIGuzpo z3Igy1qQOEn2cMbwup4ibS373I4YGtIhGSBFIOhv9oOryHcB8eWnszFw7/i6K2RnfmSJ qB3g== X-Gm-Message-State: AHPjjUjb4Ldef0DNW44DA7+XLnnowe5DMXVJwDhuKWp3HS5YIEHow1V1 JKi2tpSMjBv2Brhe 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-stable] [PATCH v5 4/4] net/mlx5: enforce Tx num of segments limitation 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: 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