All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: 答复: [PATCH] net: convert gro_count to bitmask
Date: Thu, 12 Jul 2018 03:03:51 +0000	[thread overview]
Message-ID: <2AD939572F25A448A3AE3CAEA61328C23784EDEB@BC-MAIL-M28.internal.baidu.com> (raw)
In-Reply-To: <20180711.194920.590731873210311426.davem@davemloft.net>



> -----邮件原件-----
> 发件人: David Miller [mailto:davem@davemloft.net]
> 发送时间: 2018年7月12日 10:49
> 收件人: Li,Rongqing <lirongqing@baidu.com>
> 抄送: netdev@vger.kernel.org
> 主题: Re: [PATCH] net: convert gro_count to bitmask
> 
> From: Li RongQing <lirongqing@baidu.com>
> Date: Wed, 11 Jul 2018 17:15:53 +0800
> 
> > +		clear_bit(index, &napi->gro_bitmask);
> 
> Please don't use atomics here, at least use __clear_bit().
> 

Thanks, this is same as Eric's suggestion.


> This is why I did the operations by hand in my version of the patch.
> Also, if you are going to preempt my patch, at least retain the comment I
> added around the GRO_HASH_BUCKETS definitions which warns the reader
> about the limit.
> 

I add BUILD_BUG_ON in netdev_init, so I think we need not to add comment

@@ -9151,6 +9159,9 @@ static struct hlist_head * __net_init netdev_create_hash(void)
 /* Initialize per network namespace state */  static int __net_init netdev_init(struct net *net)  {
+	BUILD_BUG_ON(GRO_HASH_BUCKETS >
+			FIELD_SIZEOF(struct napi_struct, gro_bitmask));
+


-RongQing

> Thanks.

  reply	other threads:[~2018-07-12  3:11 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
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 [this message]
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=2AD939572F25A448A3AE3CAEA61328C23784EDEB@BC-MAIL-M28.internal.baidu.com \
    --to=lirongqing@baidu.com \
    --cc=davem@davemloft.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.