[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204160853.tLrEcpJe-lkp@intel.com>
Date: Sat, 16 Apr 2022 08:45:50 +0800
From: kernel test robot <lkp@...el.com>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
linux-kernel@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>
Subject: [ammarfaizi2-block:bpf/bpf-next/master 9/17]
drivers/net/ethernet/intel/i40e/i40e_xsk.c:192:3: error: fallthrough
annotation does not directly precede switch label
tree: https://github.com/ammarfaizi2/linux-block bpf/bpf-next/master
head: 0fb53aabc5fcdf848ec7adc777baff25a1c6c335
commit: b8aef650e54982728660919a0cf9cdacb079ef86 [9/17] i40e, xsk: Terminate Rx side of NAPI when XSK Rx queue gets full
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220416/202204160853.tLrEcpJe-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8e43cbab33765c476337571e5ed11b005199dd0d)
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/ammarfaizi2/linux-block/commit/b8aef650e54982728660919a0cf9cdacb079ef86
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block bpf/bpf-next/master
git checkout b8aef650e54982728660919a0cf9cdacb079ef86
# 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
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/net/ethernet/intel/i40e/i40e_xsk.c:192:3: error: fallthrough annotation does not directly precede switch label
fallthrough; /* handle aborts by dropping packet */
^
include/linux/compiler_attributes.h:222:41: note: expanded from macro 'fallthrough'
# define fallthrough __attribute__((__fallthrough__))
^
1 error generated.
vim +192 drivers/net/ethernet/intel/i40e/i40e_xsk.c
0a714186d3c0f7c Björn Töpel 2018-08-28 141
0a714186d3c0f7c Björn Töpel 2018-08-28 142 /**
0a714186d3c0f7c Björn Töpel 2018-08-28 143 * i40e_run_xdp_zc - Executes an XDP program on an xdp_buff
0a714186d3c0f7c Björn Töpel 2018-08-28 144 * @rx_ring: Rx ring
0a714186d3c0f7c Björn Töpel 2018-08-28 145 * @xdp: xdp_buff used as input to the XDP program
0a714186d3c0f7c Björn Töpel 2018-08-28 146 *
0a714186d3c0f7c Björn Töpel 2018-08-28 147 * Returns any of I40E_XDP_{PASS, CONSUMED, TX, REDIR}
0a714186d3c0f7c Björn Töpel 2018-08-28 148 **/
0a714186d3c0f7c Björn Töpel 2018-08-28 149 static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp)
0a714186d3c0f7c Björn Töpel 2018-08-28 150 {
0a714186d3c0f7c Björn Töpel 2018-08-28 151 int err, result = I40E_XDP_PASS;
0a714186d3c0f7c Björn Töpel 2018-08-28 152 struct i40e_ring *xdp_ring;
0a714186d3c0f7c Björn Töpel 2018-08-28 153 struct bpf_prog *xdp_prog;
0a714186d3c0f7c Björn Töpel 2018-08-28 154 u32 act;
0a714186d3c0f7c Björn Töpel 2018-08-28 155
0a714186d3c0f7c Björn Töpel 2018-08-28 156 /* NB! xdp_prog will always be !NULL, due to the fact that
0a714186d3c0f7c Björn Töpel 2018-08-28 157 * this path is enabled by setting an XDP program.
0a714186d3c0f7c Björn Töpel 2018-08-28 158 */
0a714186d3c0f7c Björn Töpel 2018-08-28 159 xdp_prog = READ_ONCE(rx_ring->xdp_prog);
0a714186d3c0f7c Björn Töpel 2018-08-28 160 act = bpf_prog_run_xdp(xdp_prog, xdp);
2f86c806a8a89f3 Kevin Laatz 2019-08-27 161
346497c78d15cdd Magnus Karlsson 2020-12-02 162 if (likely(act == XDP_REDIRECT)) {
346497c78d15cdd Magnus Karlsson 2020-12-02 163 err = xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog);
b8aef650e549827 Maciej Fijalkowski 2022-04-13 164 if (!err)
f6c10b48f8c8da4 Magnus Karlsson 2021-05-10 165 return I40E_XDP_REDIR;
b8aef650e549827 Maciej Fijalkowski 2022-04-13 166 if (xsk_uses_need_wakeup(rx_ring->xsk_pool) && err == -ENOBUFS)
b8aef650e549827 Maciej Fijalkowski 2022-04-13 167 result = I40E_XDP_EXIT;
b8aef650e549827 Maciej Fijalkowski 2022-04-13 168 else
b8aef650e549827 Maciej Fijalkowski 2022-04-13 169 result = I40E_XDP_CONSUMED;
b8aef650e549827 Maciej Fijalkowski 2022-04-13 170 goto out_failure;
346497c78d15cdd Magnus Karlsson 2020-12-02 171 }
346497c78d15cdd Magnus Karlsson 2020-12-02 172
0a714186d3c0f7c Björn Töpel 2018-08-28 173 switch (act) {
0a714186d3c0f7c Björn Töpel 2018-08-28 174 case XDP_PASS:
0a714186d3c0f7c Björn Töpel 2018-08-28 175 break;
0a714186d3c0f7c Björn Töpel 2018-08-28 176 case XDP_TX:
0a714186d3c0f7c Björn Töpel 2018-08-28 177 xdp_ring = rx_ring->vsi->xdp_rings[rx_ring->queue_index];
0a714186d3c0f7c Björn Töpel 2018-08-28 178 result = i40e_xmit_xdp_tx_ring(xdp, xdp_ring);
f6c10b48f8c8da4 Magnus Karlsson 2021-05-10 179 if (result == I40E_XDP_CONSUMED)
f6c10b48f8c8da4 Magnus Karlsson 2021-05-10 180 goto out_failure;
0a714186d3c0f7c Björn Töpel 2018-08-28 181 break;
b8aef650e549827 Maciej Fijalkowski 2022-04-13 182 case XDP_DROP:
b8aef650e549827 Maciej Fijalkowski 2022-04-13 183 result = I40E_XDP_CONSUMED;
b8aef650e549827 Maciej Fijalkowski 2022-04-13 184 break;
0a714186d3c0f7c Björn Töpel 2018-08-28 185 default:
c8064e5b4adac5e Paolo Abeni 2021-11-30 186 bpf_warn_invalid_xdp_action(rx_ring->netdev, xdp_prog, act);
5463fce643e8d04 Jeff Kirsher 2020-06-03 187 fallthrough;
0a714186d3c0f7c Björn Töpel 2018-08-28 188 case XDP_ABORTED:
b8aef650e549827 Maciej Fijalkowski 2022-04-13 189 result = I40E_XDP_CONSUMED;
f6c10b48f8c8da4 Magnus Karlsson 2021-05-10 190 out_failure:
0a714186d3c0f7c Björn Töpel 2018-08-28 191 trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
5463fce643e8d04 Jeff Kirsher 2020-06-03 @192 fallthrough; /* handle aborts by dropping packet */
0a714186d3c0f7c Björn Töpel 2018-08-28 193 }
0a714186d3c0f7c Björn Töpel 2018-08-28 194 return result;
0a714186d3c0f7c Björn Töpel 2018-08-28 195 }
0a714186d3c0f7c Björn Töpel 2018-08-28 196
:::::: The code at line 192 was first introduced by commit
:::::: 5463fce643e8d041f54378b28b35940fd5e5a5a4 ethernet/intel: Convert fallthrough code comments
:::::: TO: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
:::::: CC: Tony Nguyen <anthony.l.nguyen@...el.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists