All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	llvm@lists.linux.dev, kbuild-all@lists.01.org,
	 Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	 Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>,
	 Jonathan Lemon <jonathan.lemon@gmail.com>,
	Eric Dumazet <edumazet@google.com>,
	 Alexander Lobakin <alobakin@pm.me>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [net-next v2 2/2] net: sched: support hash/classid selecting tx queue
Date: Thu, 9 Dec 2021 09:51:17 +0800	[thread overview]
Message-ID: <CAMDZJNUBhpu6KLAL08+BKRCJg0JDHNCQAXtNXzcOZwTHzRgChg@mail.gmail.com> (raw)
In-Reply-To: <202112090603.PxlqXFRw-lkp@intel.com>

On Thu, Dec 9, 2021 at 6:22 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on net-next/master]
>
> url:    https://github.com/0day-ci/linux/commits/xiangxia-m-yue-gmail-com/net-sched-allow-user-to-select-txqueue/20211208-223656
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 1fe5b01262844be03de98afdd56d1d393df04d7e
> config: i386-randconfig-r023-20211207 (https://download.01.org/0day-ci/archive/20211209/202112090603.PxlqXFRw-lkp@intel.com/config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/0day-ci/linux/commit/522fbcfdde012bc46d29aa216bdfa73f512adcbd
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review xiangxia-m-yue-gmail-com/net-sched-allow-user-to-select-txqueue/20211208-223656
>         git checkout 522fbcfdde012bc46d29aa216bdfa73f512adcbd
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash mm/ net/sched/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> net/sched/act_skbedit.c:39:11: warning: variable 'hash' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>            else if (params->flags & SKBEDIT_F_QUEUE_MAPPING_HASH)
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    net/sched/act_skbedit.c:42:34: note: uninitialized use occurs here
>            queue_mapping = queue_mapping + hash % mapping_mod;
>                                            ^~~~
>    net/sched/act_skbedit.c:39:7: note: remove the 'if' if its condition is always true
>            else if (params->flags & SKBEDIT_F_QUEUE_MAPPING_HASH)
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    net/sched/act_skbedit.c:32:10: note: initialize the variable 'hash' to silence this warning
>            u32 hash;
>                    ^
>                     = 0
>    1 warning generated.
v1 has set the hash = 0, in v2, I remove it, because the hash will be
set by classid or skb-hash.
In next version, I will fix that warning.
>
> vim +39 net/sched/act_skbedit.c
>
>     26
>     27  static u16 tcf_skbedit_hash(struct tcf_skbedit_params *params,
>     28                              struct sk_buff *skb)
>     29  {
>     30          u16 queue_mapping = params->queue_mapping;
>     31          u16 mapping_mod = params->mapping_mod;
>     32          u32 hash;
>     33
>     34          if (!(params->flags & SKBEDIT_F_QUEUE_MAPPING_HASH_MASK))
>     35                  return netdev_cap_txqueue(skb->dev, queue_mapping);
>     36
>     37          if (params->flags & SKBEDIT_F_QUEUE_MAPPING_CLASSID)
>     38                  hash = jhash_1word(task_get_classid(skb), 0);
>   > 39          else if (params->flags & SKBEDIT_F_QUEUE_MAPPING_HASH)
>     40                  hash = skb_get_hash(skb);
>     41
>     42          queue_mapping = queue_mapping + hash % mapping_mod;
>     43          return netdev_cap_txqueue(skb->dev, queue_mapping);
>     44  }
>     45
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



-- 
Best regards, Tonghao

WARNING: multiple messages have this Message-ID (diff)
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
To: kbuild-all@lists.01.org
Subject: Re: [net-next v2 2/2] net: sched: support hash/classid selecting tx queue
Date: Thu, 09 Dec 2021 09:51:17 +0800	[thread overview]
Message-ID: <CAMDZJNUBhpu6KLAL08+BKRCJg0JDHNCQAXtNXzcOZwTHzRgChg@mail.gmail.com> (raw)
In-Reply-To: <202112090603.PxlqXFRw-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3784 bytes --]

On Thu, Dec 9, 2021 at 6:22 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on net-next/master]
>
> url:    https://github.com/0day-ci/linux/commits/xiangxia-m-yue-gmail-com/net-sched-allow-user-to-select-txqueue/20211208-223656
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 1fe5b01262844be03de98afdd56d1d393df04d7e
> config: i386-randconfig-r023-20211207 (https://download.01.org/0day-ci/archive/20211209/202112090603.PxlqXFRw-lkp(a)intel.com/config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/0day-ci/linux/commit/522fbcfdde012bc46d29aa216bdfa73f512adcbd
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review xiangxia-m-yue-gmail-com/net-sched-allow-user-to-select-txqueue/20211208-223656
>         git checkout 522fbcfdde012bc46d29aa216bdfa73f512adcbd
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash mm/ net/sched/
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> net/sched/act_skbedit.c:39:11: warning: variable 'hash' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>            else if (params->flags & SKBEDIT_F_QUEUE_MAPPING_HASH)
>                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    net/sched/act_skbedit.c:42:34: note: uninitialized use occurs here
>            queue_mapping = queue_mapping + hash % mapping_mod;
>                                            ^~~~
>    net/sched/act_skbedit.c:39:7: note: remove the 'if' if its condition is always true
>            else if (params->flags & SKBEDIT_F_QUEUE_MAPPING_HASH)
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    net/sched/act_skbedit.c:32:10: note: initialize the variable 'hash' to silence this warning
>            u32 hash;
>                    ^
>                     = 0
>    1 warning generated.
v1 has set the hash = 0, in v2, I remove it, because the hash will be
set by classid or skb-hash.
In next version, I will fix that warning.
>
> vim +39 net/sched/act_skbedit.c
>
>     26
>     27  static u16 tcf_skbedit_hash(struct tcf_skbedit_params *params,
>     28                              struct sk_buff *skb)
>     29  {
>     30          u16 queue_mapping = params->queue_mapping;
>     31          u16 mapping_mod = params->mapping_mod;
>     32          u32 hash;
>     33
>     34          if (!(params->flags & SKBEDIT_F_QUEUE_MAPPING_HASH_MASK))
>     35                  return netdev_cap_txqueue(skb->dev, queue_mapping);
>     36
>     37          if (params->flags & SKBEDIT_F_QUEUE_MAPPING_CLASSID)
>     38                  hash = jhash_1word(task_get_classid(skb), 0);
>   > 39          else if (params->flags & SKBEDIT_F_QUEUE_MAPPING_HASH)
>     40                  hash = skb_get_hash(skb);
>     41
>     42          queue_mapping = queue_mapping + hash % mapping_mod;
>     43          return netdev_cap_txqueue(skb->dev, queue_mapping);
>     44  }
>     45
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org



-- 
Best regards, Tonghao

  reply	other threads:[~2021-12-09  1:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 14:34 [net-next v2 0/2] net: sched: allow user to select txqueue xiangxia.m.yue
2021-12-08 14:34 ` [net-next v2 1/2] net: sched: use queue_mapping to pick tx queue xiangxia.m.yue
2021-12-08 14:34 ` [net-next v2 2/2] net: sched: support hash/classid selecting " xiangxia.m.yue
2021-12-08 22:21   ` kernel test robot
2021-12-08 22:21     ` kernel test robot
2021-12-09  1:51     ` Tonghao Zhang [this message]
2021-12-09  1:51       ` Tonghao Zhang
2021-12-08 22:32   ` kernel test robot
2021-12-08 22:32     ` kernel test robot

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=CAMDZJNUBhpu6KLAL08+BKRCJg0JDHNCQAXtNXzcOZwTHzRgChg@mail.gmail.com \
    --to=xiangxia.m.yue@gmail.com \
    --cc=alobakin@pm.me \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=jonathan.lemon@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.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 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.