linux-wpan.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jukka Rissanen <jukka.rissanen@linux.intel.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org
Cc: patrik.flykt@linux.intel.com, aar@pengutronix.de,
	linux-wpan@vger.kernel.org
Subject: Re: [PATCH 2/6] Bluetooth: 6lowpan: Don't drop packets when run out of credits
Date: Wed, 12 Apr 2017 16:56:17 +0300	[thread overview]
Message-ID: <1492005377.2926.16.camel@linux.intel.com> (raw)
In-Reply-To: <20170411192103.3209-2-luiz.dentz@gmail.com>

Hi Luiz,

On Tue, 2017-04-11 at 22:20 +0300, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Since l2cap_chan_send will now queue the packets there is no point in
> checking the credits anymore.
> 
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> ---
>  net/bluetooth/6lowpan.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
> index 5b91e85..22bd936 100644
> --- a/net/bluetooth/6lowpan.c
> +++ b/net/bluetooth/6lowpan.c
> @@ -478,15 +478,8 @@ static int send_pkt(struct l2cap_chan *chan,
> struct sk_buff *skb,
>  		return 0;
>  	}
>  
> -	if (!err)
> -		err = (!chan->tx_credits ? -EAGAIN : 0);
> -
> -	if (err < 0) {
> -		if (err == -EAGAIN)
> -			netdev->stats.tx_dropped++;
> -		else
> -			netdev->stats.tx_errors++;
> -	}
> +	if (err < 0)
> +		netdev->stats.tx_errors++;
>  
>  	return err;
>  }


Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>


Cheers,
Jukka


  reply	other threads:[~2017-04-12 13:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 19:20 [PATCH 1/6] 6lowpan: Don't set IFF_NO_QUEUE Luiz Augusto von Dentz
2017-04-11 19:20 ` [PATCH 2/6] Bluetooth: 6lowpan: Don't drop packets when run out of credits Luiz Augusto von Dentz
2017-04-12 13:56   ` Jukka Rissanen [this message]
2017-04-11 19:21 ` [PATCH 3/6] Bluetooth: 6lowpan: Use netif APIs to flow control Luiz Augusto von Dentz
2017-04-12 13:57   ` Jukka Rissanen
2017-04-11 19:21 ` [PATCH 4/6] Bluetooth: L2CAP: Add l2cap_le_flowctl_send Luiz Augusto von Dentz
2017-04-12 13:57   ` Jukka Rissanen
2017-04-11 19:21 ` [PATCH 5/6] Bluetooth: 6lowpan: Set tx_queue_len to DEFAULT_TX_QUEUE_LEN Luiz Augusto von Dentz
2017-04-12 13:58   ` Jukka Rissanen
2017-04-11 19:21 ` [PATCH 6/6] bluetooth: Do not set IFF_POINTOPOINT Luiz Augusto von Dentz
2017-04-12 13:58   ` Jukka Rissanen
2017-04-12 13:55 ` [PATCH 1/6] 6lowpan: Don't set IFF_NO_QUEUE Jukka Rissanen
2017-04-12 19:58 ` Marcel Holtmann

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=1492005377.2926.16.camel@linux.intel.com \
    --to=jukka.rissanen@linux.intel.com \
    --cc=aar@pengutronix.de \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=patrik.flykt@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).