From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754928AbdDMQk3 (ORCPT ); Thu, 13 Apr 2017 12:40:29 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:33028 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753386AbdDMQkZ (ORCPT ); Thu, 13 Apr 2017 12:40:25 -0400 Date: Thu, 13 Apr 2017 12:40:23 -0400 (EDT) Message-Id: <20170413.124023.506336754463093992.davem@davemloft.net> To: niklas.cassel@axis.com Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com, Joao.Pinto@synopsys.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, niklass@axis.com Subject: Re: [PATCH net-next] net: stmmac: set total length of the packet to be transmitted in TDES3 From: David Miller In-Reply-To: <20170410183329.28847-1-niklass@axis.com> References: <20170410183329.28847-1-niklass@axis.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 13 Apr 2017 08:59:05 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Niklas Cassel Date: Mon, 10 Apr 2017 20:33:29 +0200 > From: Niklas Cassel > > Field FL/TPL in register TDES3 is not correctly set on GMAC4. > TX appears to be functional on GMAC 4.10a even if this field is not set, > however, to avoid relying on undefined behavior, set the length in TDES3. > > The field has a different meaning depending on if the TSE bit in TDES3 > is set or not (TSO). However, regardless of the TSE bit, the field is > not optional. The field is already set correctly when the TSE bit is set. > > Since there is no limit for the number of descriptors that can be > used for a single packet, the field should be set to the sum of > the buffers contained in: > [ ... ... > ], which should be equal to skb->len. > > Signed-off-by: Niklas Cassel Applied, thanks.