From: kernel test robot <lkp@intel.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Daniel Borkmann <daniel@iogearbox.net>,
linux-kernel@vger.kernel.org
Subject: [dborkman-bpf:pr/bpf-tstamp 3/3] drivers/net/ethernet/intel/fm10k/fm10k_main.c:878:16: warning: division by zero is undefined
Date: Sat, 6 Nov 2021 08:44:24 +0800 [thread overview]
Message-ID: <202111060812.myhLlHfB-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4108 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-tstamp
head: f7d619a946e981177777983af26e9e31163ffb38
commit: f7d619a946e981177777983af26e9e31163ffb38 [3/3] net: skb clock bases
config: x86_64-randconfig-a006-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git/commit/?id=f7d619a946e981177777983af26e9e31163ffb38
git remote add dborkman-bpf https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git
git fetch --no-tags dborkman-bpf pr/bpf-tstamp
git checkout f7d619a946e981177777983af26e9e31163ffb38
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
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 >>):
In file included from drivers/net/ethernet/intel/fm10k/fm10k_main.c:8:
include/net/tcp.h:812:27: error: no member named 'skb_mstamp_ns' in 'struct sk_buff'
return tcp_ns_to_ts(skb->skb_mstamp_ns);
~~~ ^
include/net/tcp.h:818:22: error: no member named 'skb_mstamp_ns' in 'struct sk_buff'
return div_u64(skb->skb_mstamp_ns, NSEC_PER_USEC);
~~~ ^
include/net/tcp.h:2367:8: error: no member named 'skb_mstamp_ns' in 'struct sk_buff'
skb->skb_mstamp_ns += (u64)tp->tcp_tx_delay * NSEC_PER_USEC;
~~~ ^
>> drivers/net/ethernet/intel/fm10k/fm10k_main.c:878:16: warning: division by zero is undefined [-Wdivision-by-zero]
desc_flags |= FM10K_SET_FLAG(tx_flags, FM10K_TX_FLAGS_CSUM,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/fm10k/fm10k_main.c:870:26: note: expanded from macro 'FM10K_SET_FLAG'
((u32)(_input & _flag) / (_flag / _result)))
^ ~~~~~~~~~~~~~~~~~
1 warning and 3 errors generated.
vim +878 drivers/net/ethernet/intel/fm10k/fm10k_main.c
76a540d4728a37 Alexander Duyck 2014-09-20 866
76a540d4728a37 Alexander Duyck 2014-09-20 867 #define FM10K_SET_FLAG(_input, _flag, _result) \
76a540d4728a37 Alexander Duyck 2014-09-20 868 ((_flag <= _result) ? \
76a540d4728a37 Alexander Duyck 2014-09-20 869 ((u32)(_input & _flag) * (_result / _flag)) : \
76a540d4728a37 Alexander Duyck 2014-09-20 870 ((u32)(_input & _flag) / (_flag / _result)))
76a540d4728a37 Alexander Duyck 2014-09-20 871
76a540d4728a37 Alexander Duyck 2014-09-20 872 static u8 fm10k_tx_desc_flags(struct sk_buff *skb, u32 tx_flags)
76a540d4728a37 Alexander Duyck 2014-09-20 873 {
76a540d4728a37 Alexander Duyck 2014-09-20 874 /* set type for advanced descriptor with frame checksum insertion */
76a540d4728a37 Alexander Duyck 2014-09-20 875 u32 desc_flags = 0;
76a540d4728a37 Alexander Duyck 2014-09-20 876
76a540d4728a37 Alexander Duyck 2014-09-20 877 /* set checksum offload bits */
76a540d4728a37 Alexander Duyck 2014-09-20 @878 desc_flags |= FM10K_SET_FLAG(tx_flags, FM10K_TX_FLAGS_CSUM,
76a540d4728a37 Alexander Duyck 2014-09-20 879 FM10K_TXD_FLAG_CSUM);
76a540d4728a37 Alexander Duyck 2014-09-20 880
76a540d4728a37 Alexander Duyck 2014-09-20 881 return desc_flags;
76a540d4728a37 Alexander Duyck 2014-09-20 882 }
76a540d4728a37 Alexander Duyck 2014-09-20 883
:::::: The code at line 878 was first introduced by commit
:::::: 76a540d4728a379e022fb2e2e8766d502b6d345c fm10k: Add support for netdev offloads
:::::: TO: Alexander Duyck <alexander.h.duyck@intel.com>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36122 bytes --]
reply other threads:[~2021-11-06 0:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202111060812.myhLlHfB-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel@iogearbox.net \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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