Re: [PATCH net-next 6/6] sfc: bare bones TC offload on EF100
From: kernel test robot <hidden>
Date: 2022-09-24 02:10:36
Hi, I love your patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/intel-lab-lkp/linux/commits/ecree-xilinx-com/sfc-bare-bones-TC-offload/20220924-053109 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4dfa5f05fffac3a8fa4f9a68a671b5b7e6d3b411 config: loongarch-allyesconfig compiler: loongarch64-linux-gcc (GCC) 12.1.0 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/intel-lab-lkp/linux/commit/0a6226d58af6328939729e2eac025932aaaf16d8 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review ecree-xilinx-com/sfc-bare-bones-TC-offload/20220924-053109 git checkout 0a6226d58af6328939729e2eac025932aaaf16d8 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/net/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot [off-list ref] All warnings (new ones prefixed by >>): drivers/net/ethernet/sfc/tc.c:24:17: warning: no previous prototype for 'efx_tc_flower_lookup_efv' [-Wmissing-prototypes] 24 | struct efx_rep *efx_tc_flower_lookup_efv(struct efx_nic *efx, | ^~~~~~~~~~~~~~~~~~~~~~~~
quoted
drivers/net/ethernet/sfc/tc.c:47:5: warning: no previous prototype for 'efx_tc_flower_external_mport' [-Wmissing-prototypes]
47 | s64 efx_tc_flower_external_mport(struct efx_nic *efx, struct efx_rep *efv)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/efx_tc_flower_external_mport +47 drivers/net/ethernet/sfc/tc.c
18
19 #define EFX_EFV_PF NULL
20 /* Look up the representor information (efv) for a device.
21 * May return NULL for the PF (us), or an error pointer for a device that
22 * isn't supported as a TC offload endpoint
23 */
> 24 struct efx_rep *efx_tc_flower_lookup_efv(struct efx_nic *efx,
25 struct net_device *dev)
26 {
27 struct efx_rep *efv;
28
29 if (!dev)
30 return ERR_PTR(-EOPNOTSUPP);
31 /* Is it us (the PF)? */
32 if (dev == efx->net_dev)
33 return EFX_EFV_PF;
34 /* Is it an efx vfrep at all? */
35 if (dev->netdev_ops != &efx_ef100_rep_netdev_ops)
36 return ERR_PTR(-EOPNOTSUPP);
37 /* Is it ours? We don't support TC rules that include another
38 * EF100's netdevices (not even on another port of the same NIC).
39 */
40 efv = netdev_priv(dev);
41 if (efv->parent != efx)
42 return ERR_PTR(-EOPNOTSUPP);
43 return efv;
44 }
45
46 /* Convert a driver-internal vport ID into an external device (wire or VF) */
> 47 s64 efx_tc_flower_external_mport(struct efx_nic *efx, struct efx_rep *efv)
48 {
49 u32 mport;
50
51 if (IS_ERR(efv))
52 return PTR_ERR(efv);
53 if (!efv) /* device is PF (us) */
54 efx_mae_mport_wire(efx, &mport);
55 else /* device is repr */
56 efx_mae_mport_mport(efx, efv->mport, &mport);
57 return mport;
58 }
59
--
0-DAY CI Kernel Test Service
https://01.org/lkp