[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 13 Dec 2023 04:25:05 +0800
From: kernel test robot <lkp@...el.com>
To: Jiawen Wu <jiawenwu@...stnetic.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
linux@...linux.org.uk, andrew@...n.ch, netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, mengyuanlou@...-swift.com,
Jiawen Wu <jiawenwu@...stnetic.com>
Subject: Re: [PATCH net-next v4 5/8] net: wangxun: add ethtool_ops for ring
parameters
Hi Jiawen,
kernel test robot noticed the following build errors:
[auto build test ERROR on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Jiawen-Wu/net-libwx-add-phylink-to-libwx/20231212-161804
base: net-next/main
patch link: https://lore.kernel.org/r/20231212080438.1361308-6-jiawenwu%40trustnetic.com
patch subject: [PATCH net-next v4 5/8] net: wangxun: add ethtool_ops for ring parameters
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20231213/202312130411.eLnRwdT9-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231213/202312130411.eLnRwdT9-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312130411.eLnRwdT9-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/net/ethernet/wangxun/ngbe/ngbe_ethtool.c: In function 'ngbe_set_ringparam':
>> drivers/net/ethernet/wangxun/ngbe/ngbe_ethtool.c:83:21: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
83 | temp_ring = vmalloc(i * sizeof(struct wx_ring));
| ^~~~~~~
| kvmalloc
>> drivers/net/ethernet/wangxun/ngbe/ngbe_ethtool.c:83:19: warning: assignment to 'struct wx_ring *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
83 | temp_ring = vmalloc(i * sizeof(struct wx_ring));
| ^
>> drivers/net/ethernet/wangxun/ngbe/ngbe_ethtool.c:90:9: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
90 | vfree(temp_ring);
| ^~~~~
| kvfree
cc1: some warnings being treated as errors
--
drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c: In function 'txgbe_set_ringparam':
>> drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c:50:21: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
50 | temp_ring = vmalloc(i * sizeof(struct wx_ring));
| ^~~~~~~
| kvmalloc
>> drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c:50:19: warning: assignment to 'struct wx_ring *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
50 | temp_ring = vmalloc(i * sizeof(struct wx_ring));
| ^
>> drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c:57:9: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
57 | vfree(temp_ring);
| ^~~~~
| kvfree
cc1: some warnings being treated as errors
vim +83 drivers/net/ethernet/wangxun/ngbe/ngbe_ethtool.c
46
47 static int ngbe_set_ringparam(struct net_device *netdev,
48 struct ethtool_ringparam *ring,
49 struct kernel_ethtool_ringparam *kernel_ring,
50 struct netlink_ext_ack *extack)
51 {
52 struct wx *wx = netdev_priv(netdev);
53 u32 new_rx_count, new_tx_count;
54 struct wx_ring *temp_ring;
55 int i, err = 0;
56
57 if (ring->rx_mini_pending || ring->rx_jumbo_pending)
58 return -EOPNOTSUPP;
59
60 new_tx_count = clamp_t(u32, ring->tx_pending, WX_MIN_TXD, WX_MAX_TXD);
61 new_tx_count = ALIGN(new_tx_count, WX_REQ_TX_DESCRIPTOR_MULTIPLE);
62
63 new_rx_count = clamp_t(u32, ring->rx_pending, WX_MIN_RXD, WX_MAX_RXD);
64 new_rx_count = ALIGN(new_rx_count, WX_REQ_RX_DESCRIPTOR_MULTIPLE);
65
66 if (new_tx_count == wx->tx_ring_count &&
67 new_rx_count == wx->rx_ring_count)
68 return 0;
69
70 if (!netif_running(wx->netdev)) {
71 for (i = 0; i < wx->num_tx_queues; i++)
72 wx->tx_ring[i]->count = new_tx_count;
73 for (i = 0; i < wx->num_rx_queues; i++)
74 wx->rx_ring[i]->count = new_rx_count;
75 wx->tx_ring_count = new_tx_count;
76 wx->rx_ring_count = new_rx_count;
77
78 return 0;
79 }
80
81 /* allocate temporary buffer to store rings in */
82 i = max_t(int, wx->num_tx_queues, wx->num_rx_queues);
> 83 temp_ring = vmalloc(i * sizeof(struct wx_ring));
84 if (!temp_ring)
85 return -ENOMEM;
86
87 ngbe_down(wx);
88
89 wx_set_ring(wx, new_tx_count, new_rx_count, temp_ring);
> 90 vfree(temp_ring);
91
92 wx_configure(wx);
93 ngbe_up(wx);
94
95 return err;
96 }
97
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists