Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jiri Pirko <jpirko@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH net-2.6] net/ipv6/udp.c: fix typo in flush_stack()
Date: Thu, 09 Dec 2010 14:48:08 +0100	[thread overview]
Message-ID: <1291902488.4063.28.camel@edumazet-laptop> (raw)
In-Reply-To: <20101209134029.GB2820@psychotron.brq.redhat.com>

Le jeudi 09 décembre 2010 à 14:40 +0100, Jiri Pirko a écrit :
> skb1 should be passed as parameter to sk_rcvqueues_full() here.
> 
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> 
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index 91def93..d2b268e 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -602,7 +602,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
>  
>  		sk = stack[i];
>  		if (skb1) {
> -			if (sk_rcvqueues_full(sk, skb)) {
> +			if (sk_rcvqueues_full(sk, skb1)) {
>  				kfree_skb(skb1);
>  				goto drop;
>  			}

net-2.6 ? Its the same truesize anyway...

So it's not a bug, but a cosmetic change.
(I am ok with it, but for net-next-2.6)

/*
 * Take into account size of receive queue and backlog queue
 */
static inline bool sk_rcvqueues_full(const struct sock *sk, const struct sk_buff *skb)
{
        unsigned int qsize = sk->sk_backlog.len + atomic_read(&sk->sk_rmem_alloc);

        return qsize + skb->truesize > sk->sk_rcvbuf;
}



  reply	other threads:[~2010-12-09 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 13:40 [PATCH net-2.6] net/ipv6/udp.c: fix typo in flush_stack() Jiri Pirko
2010-12-09 13:48 ` Eric Dumazet [this message]
2010-12-09 14:28   ` Jiri Pirko
2010-12-10 22:05   ` 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=1291902488.4063.28.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jpirko@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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