From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Yang Subject: Re: [PATCH] ucc_geth: Add BQL support Date: Tue, 19 Jun 2018 13:24:45 -0500 Message-ID: References: <20180619163036.20578-1-joakim.tjernlund@infinera.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Netdev To: Joakim Tjernlund Return-path: Received: from mail-it0-f66.google.com ([209.85.214.66]:36983 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966449AbeFSSYr (ORCPT ); Tue, 19 Jun 2018 14:24:47 -0400 Received: by mail-it0-f66.google.com with SMTP id l6-v6so1802693iti.2 for ; Tue, 19 Jun 2018 11:24:47 -0700 (PDT) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com. [209.85.223.180]) by smtp.gmail.com with ESMTPSA id o140-v6sm164006ioe.3.2018.06.19.11.24.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jun 2018 11:24:46 -0700 (PDT) Received: by mail-io0-f180.google.com with SMTP id d22-v6so1079472iof.13 for ; Tue, 19 Jun 2018 11:24:46 -0700 (PDT) In-Reply-To: <20180619163036.20578-1-joakim.tjernlund@infinera.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jun 19, 2018 at 11:30 AM, Joakim Tjernlund wrote: > Signed-off-by: Joakim Tjernlund Acked-by: Li Yang > --- > drivers/net/ethernet/freescale/ucc_geth.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c > index f77ba9fa257b..6c99a9af6647 100644 > --- a/drivers/net/ethernet/freescale/ucc_geth.c > +++ b/drivers/net/ethernet/freescale/ucc_geth.c > @@ -3096,6 +3096,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) > > ugeth_vdbg("%s: IN", __func__); > > + netdev_sent_queue(dev, skb->len); > spin_lock_irqsave(&ugeth->lock, flags); > > dev->stats.tx_bytes += skb->len; > @@ -3242,6 +3243,8 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ) > struct ucc_geth_private *ugeth = netdev_priv(dev); > u8 __iomem *bd; /* BD pointer */ > u32 bd_status; > + int howmany = 0; > + unsigned int bytes_sent = 0; > > bd = ugeth->confBd[txQ]; > bd_status = in_be32((u32 __iomem *)bd); > @@ -3257,7 +3260,8 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ) > skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]]; > if (!skb) > break; > - > + howmany++; > + bytes_sent += skb->len; > dev->stats.tx_packets++; > > dev_consume_skb_any(skb); > @@ -3279,6 +3283,7 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ) > bd_status = in_be32((u32 __iomem *)bd); > } > ugeth->confBd[txQ] = bd; > + netdev_completed_queue(dev, howmany, bytes_sent); > return 0; > } > > -- > 2.13.6 >