From: Eric Dumazet <eric.dumazet@gmail.com>
To: Oliver Neukum <oliver@neukum.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
Oliver Neukum <oneukum@suse.de>
Subject: Re: [PATCH] kaweth:BQL support
Date: Fri, 09 Nov 2012 05:15:44 -0800 [thread overview]
Message-ID: <1352466944.19779.556.camel@edumazet-glaptop> (raw)
In-Reply-To: <1352463587-23899-1-git-send-email-oliver@neukum.org>
On Fri, 2012-11-09 at 13:19 +0100, Oliver Neukum wrote:
> This adds the callbacks for the statistics necessary for BQL
>
> Signed-off-by: Oliver Neukum <oneukum@suse.de>
> ---
> drivers/net/usb/kaweth.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
> index afb117c..f30e07f 100644
> --- a/drivers/net/usb/kaweth.c
> +++ b/drivers/net/usb/kaweth.c
> @@ -715,6 +715,7 @@ static int kaweth_open(struct net_device *net)
> usb_kill_urb(kaweth->rx_urb);
> goto err_out;
> }
> + netdev_reset_queue(net);
> kaweth->opened = 1;
>
> netif_start_queue(net);
> @@ -783,6 +784,7 @@ static void kaweth_usb_transmit_complete(struct urb *urb)
> {
> struct kaweth_device *kaweth = urb->context;
> struct sk_buff *skb = kaweth->tx_skb;
> + struct net_device *net = kaweth->net;
> int status = urb->status;
>
> if (unlikely(status != 0))
> @@ -790,7 +792,8 @@ static void kaweth_usb_transmit_complete(struct urb *urb)
> dev_dbg(&urb->dev->dev, "%s: TX status %d.\n",
> kaweth->net->name, status);
>
> - netif_wake_queue(kaweth->net);
> + netif_wake_queue(net);
> + netdev_completed_queue(net, 1, skb->len - 2);
> dev_kfree_skb_irq(skb);
> }
>
> @@ -854,6 +857,7 @@ skip:
> {
> kaweth->stats.tx_packets++;
> kaweth->stats.tx_bytes += skb->len;
> + netdev_sent_queue(net, skb->len - 2);
> }
>
> spin_unlock_irq(&kaweth->device_lock);
I am curious to know if it changes anything on the behavior of this
network adapter ?
Because it seems queue is stopped anyway when a packet is in transmit.
(netif_stop_queue() in kaweth_start_xmit(), and netif_wake_queue() in
kaweth_usb_transmit_complete())
What I am missing ?
Thanks
next prev parent reply other threads:[~2012-11-09 13:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 12:19 [PATCH] kaweth:BQL support Oliver Neukum
2012-11-09 13:15 ` Eric Dumazet [this message]
2012-11-12 7:38 ` Oliver Neukum
2012-11-12 7:59 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352466944.19779.556.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=oneukum@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox