Netdev List
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: "Li,Rongqing" <lirongqing@baidu.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH] net: convert gro_count to bitmask
Date: Thu, 12 Jul 2018 11:48:11 +0200	[thread overview]
Message-ID: <20180712114811.04e6f2e0@epycfail> (raw)
In-Reply-To: <2AD939572F25A448A3AE3CAEA61328C23784EC2E@BC-MAIL-M28.internal.baidu.com>

On Thu, 12 Jul 2018 02:31:10 +0000
"Li,Rongqing" <lirongqing@baidu.com> wrote:

> > -----邮件原件-----
> > 发件人: Stefano Brivio [mailto:sbrivio@redhat.com]
> > 发送时间: 2018年7月11日 18:52
> > 收件人: Li,Rongqing <lirongqing@baidu.com>
> > 抄送: netdev@vger.kernel.org; Eric Dumazet <edumazet@google.com>
> > 主题: Re: [PATCH] net: convert gro_count to bitmask
> > 
> > On Wed, 11 Jul 2018 17:15:53 +0800
> > Li RongQing <lirongqing@baidu.com> wrote:
> >   
> > > @@ -5380,6 +5382,12 @@ static enum gro_result dev_gro_receive(struct  
> > napi_struct *napi, struct sk_buff  
> > >  	if (grow > 0)
> > >  		gro_pull_from_frag0(skb, grow);
> > >  ok:
> > > +	if (napi->gro_hash[hash].count)
> > > +		if (!test_bit(hash, &napi->gro_bitmask))
> > > +			set_bit(hash, &napi->gro_bitmask);
> > > +	else if (test_bit(hash, &napi->gro_bitmask))
> > > +		clear_bit(hash, &napi->gro_bitmask);  
> > 
> > This might not do what you want.
> > 
> > --  
> 
> could you show detail ?

$ cat if1.c; gcc -o if1 if1.c
#include <stdio.h>

int main()
{
	if (1)
		if (0)
			;
	else if (2)
		printf("whoops\n");

	return 0;
}
$ ./if1
whoops

$ cat if2.c; gcc -o if2 if2.c
#include <stdio.h>

int main()
{
	if (1) {
		if (0)
			;
	} else if (2) {
		printf("whoops\n");
	}

	return 0;
}
$ ./if2

-- 
Stefano

  reply	other threads:[~2018-07-12  9:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  9:15 [PATCH] net: convert gro_count to bitmask Li RongQing
2018-07-11 10:51 ` Stefano Brivio
2018-07-12  2:31   ` 答复: " Li,Rongqing
2018-07-12  9:48     ` Stefano Brivio [this message]
2018-07-11 11:32 ` Eric Dumazet
2018-07-12  2:31   ` 答复: " Li,Rongqing
2018-07-12  2:49 ` David Miller
2018-07-12  3:03   ` 答复: " Li,Rongqing
2018-07-12  3:51     ` 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=20180712114811.04e6f2e0@epycfail \
    --to=sbrivio@redhat.com \
    --cc=edumazet@google.com \
    --cc=lirongqing@baidu.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