From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 3/3] drivers/net/virtio_net: Added RSS hash report.
Date: Thu, 19 Aug 2021 08:48:39 +0800 [thread overview]
Message-ID: <202108190855.JyNXgyWJ-lkp@intel.com> (raw)
In-Reply-To: <20210818175440.128691-4-andrew@daynix.com>
[-- Attachment #1: Type: text/plain, Size: 9389 bytes --]
Hi Andrew,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on vhost/linux-next]
[also build test WARNING on net-next/master net/master linus/master v5.14-rc6 next-20210818]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andrew-Melnychenko/drivers-net-virtio_net-Added-RSS-support/20210819-015744
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: i386-randconfig-a015-20210818 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d2b574a4dea5b718e4386bf2e26af0126e5978ce)
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/2205ca0b751f734cf3ea53258d9b8e3f3849fe16
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andrew-Melnychenko/drivers-net-virtio_net-Added-RSS-support/20210819-015744
git checkout 2205ca0b751f734cf3ea53258d9b8e3f3849fe16
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
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 >>):
>> drivers/net/virtio_net.c:2278:6: warning: no previous prototype for function 'virtnet_get_hashflow' [-Wmissing-prototypes]
void virtnet_get_hashflow(const struct virtnet_info *vi, struct ethtool_rxnfc *info)
^
drivers/net/virtio_net.c:2278:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void virtnet_get_hashflow(const struct virtnet_info *vi, struct ethtool_rxnfc *info)
^
static
>> drivers/net/virtio_net.c:2330:6: warning: no previous prototype for function 'virtnet_set_hashflow' [-Wmissing-prototypes]
bool virtnet_set_hashflow(struct virtnet_info *vi, struct ethtool_rxnfc *info)
^
drivers/net/virtio_net.c:2330:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool virtnet_set_hashflow(struct virtnet_info *vi, struct ethtool_rxnfc *info)
^
static
drivers/net/virtio_net.c:2627:5: warning: no previous prototype for function 'virtnet_get_rxfh_key_size' [-Wmissing-prototypes]
u32 virtnet_get_rxfh_key_size(struct net_device *dev)
^
drivers/net/virtio_net.c:2627:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u32 virtnet_get_rxfh_key_size(struct net_device *dev)
^
static
drivers/net/virtio_net.c:2632:5: warning: no previous prototype for function 'virtnet_get_rxfh_indir_size' [-Wmissing-prototypes]
u32 virtnet_get_rxfh_indir_size(struct net_device *dev)
^
drivers/net/virtio_net.c:2632:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u32 virtnet_get_rxfh_indir_size(struct net_device *dev)
^
static
drivers/net/virtio_net.c:2637:5: warning: no previous prototype for function 'virtnet_get_rxfh' [-Wmissing-prototypes]
int virtnet_get_rxfh(struct net_device *dev, u32 *indir, u8 *key, u8 *hfunc)
^
drivers/net/virtio_net.c:2637:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int virtnet_get_rxfh(struct net_device *dev, u32 *indir, u8 *key, u8 *hfunc)
^
static
drivers/net/virtio_net.c:2656:5: warning: no previous prototype for function 'virtnet_set_rxfh' [-Wmissing-prototypes]
int virtnet_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key, const u8 hfunc)
^
drivers/net/virtio_net.c:2656:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int virtnet_set_rxfh(struct net_device *dev, const u32 *indir, const u8 *key, const u8 hfunc)
^
static
drivers/net/virtio_net.c:2676:5: warning: no previous prototype for function 'virtnet_get_rxnfc' [-Wmissing-prototypes]
int virtnet_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
^
drivers/net/virtio_net.c:2676:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int virtnet_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
^
static
7 warnings generated.
vim +/virtnet_get_hashflow +2278 drivers/net/virtio_net.c
2277
> 2278 void virtnet_get_hashflow(const struct virtnet_info *vi, struct ethtool_rxnfc *info)
2279 {
2280 info->data = 0;
2281 switch (info->flow_type) {
2282 case TCP_V4_FLOW:
2283 if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_TCPv4) {
2284 info->data = RXH_IP_SRC | RXH_IP_DST |
2285 RXH_L4_B_0_1 | RXH_L4_B_2_3;
2286 } else if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_IPv4) {
2287 info->data = RXH_IP_SRC | RXH_IP_DST;
2288 }
2289 break;
2290 case TCP_V6_FLOW:
2291 if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_TCPv6) {
2292 info->data = RXH_IP_SRC | RXH_IP_DST |
2293 RXH_L4_B_0_1 | RXH_L4_B_2_3;
2294 } else if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_IPv6) {
2295 info->data = RXH_IP_SRC | RXH_IP_DST;
2296 }
2297 break;
2298 case UDP_V4_FLOW:
2299 if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_UDPv4) {
2300 info->data = RXH_IP_SRC | RXH_IP_DST |
2301 RXH_L4_B_0_1 | RXH_L4_B_2_3;
2302 } else if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_IPv4) {
2303 info->data = RXH_IP_SRC | RXH_IP_DST;
2304 }
2305 break;
2306 case UDP_V6_FLOW:
2307 if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_UDPv6) {
2308 info->data = RXH_IP_SRC | RXH_IP_DST |
2309 RXH_L4_B_0_1 | RXH_L4_B_2_3;
2310 } else if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_IPv6) {
2311 info->data = RXH_IP_SRC | RXH_IP_DST;
2312 }
2313 break;
2314 case IPV4_FLOW:
2315 if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_IPv4)
2316 info->data = RXH_IP_SRC | RXH_IP_DST;
2317
2318 break;
2319 case IPV6_FLOW:
2320 if (vi->rss_hash_types_saved & VIRTIO_NET_RSS_HASH_TYPE_IPv4)
2321 info->data = RXH_IP_SRC | RXH_IP_DST;
2322
2323 break;
2324 default:
2325 info->data = 0;
2326 break;
2327 }
2328 }
2329
> 2330 bool virtnet_set_hashflow(struct virtnet_info *vi, struct ethtool_rxnfc *info)
2331 {
2332 u64 is_iphash = info->data & (RXH_IP_SRC | RXH_IP_DST);
2333 u64 is_porthash = info->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3);
2334 u32 new_hashtypes = vi->rss_hash_types_saved;
2335
2336 if ((is_iphash && (is_iphash != (RXH_IP_SRC | RXH_IP_DST))) ||
2337 (is_porthash && (is_porthash != (RXH_L4_B_0_1 | RXH_L4_B_2_3)))) {
2338 return false;
2339 }
2340
2341 if (!is_iphash && is_porthash)
2342 return false;
2343
2344 switch (info->flow_type) {
2345 case TCP_V4_FLOW:
2346 case UDP_V4_FLOW:
2347 case IPV4_FLOW:
2348 new_hashtypes &= ~VIRTIO_NET_RSS_HASH_TYPE_IPv4;
2349 if (is_iphash)
2350 new_hashtypes |= VIRTIO_NET_RSS_HASH_TYPE_IPv4;
2351
2352 break;
2353 case TCP_V6_FLOW:
2354 case UDP_V6_FLOW:
2355 case IPV6_FLOW:
2356 new_hashtypes &= ~VIRTIO_NET_RSS_HASH_TYPE_IPv6;
2357 if (is_iphash)
2358 new_hashtypes |= VIRTIO_NET_RSS_HASH_TYPE_IPv6;
2359
2360 break;
2361 default:
2362 break;
2363 }
2364
2365 switch (info->flow_type) {
2366 case TCP_V4_FLOW:
2367 new_hashtypes &= ~VIRTIO_NET_RSS_HASH_TYPE_TCPv4;
2368 if (is_porthash)
2369 new_hashtypes |= VIRTIO_NET_RSS_HASH_TYPE_TCPv4;
2370
2371 break;
2372 case UDP_V4_FLOW:
2373 new_hashtypes &= ~VIRTIO_NET_RSS_HASH_TYPE_UDPv4;
2374 if (is_porthash)
2375 new_hashtypes |= VIRTIO_NET_RSS_HASH_TYPE_UDPv4;
2376
2377 break;
2378 case TCP_V6_FLOW:
2379 new_hashtypes &= ~VIRTIO_NET_RSS_HASH_TYPE_TCPv6;
2380 if (is_porthash)
2381 new_hashtypes |= VIRTIO_NET_RSS_HASH_TYPE_TCPv6;
2382
2383 break;
2384 case UDP_V6_FLOW:
2385 new_hashtypes &= ~VIRTIO_NET_RSS_HASH_TYPE_UDPv6;
2386 if (is_porthash)
2387 new_hashtypes |= VIRTIO_NET_RSS_HASH_TYPE_UDPv6;
2388
2389 break;
2390 default:
2391 break;
2392 }
2393
2394 if (new_hashtypes != vi->rss_hash_types_saved) {
2395 vi->rss_hash_types_saved = new_hashtypes;
2396 vi->ctrl->rss.table_info.hash_types = vi->rss_hash_types_saved;
2397 if (vi->dev->features & NETIF_F_RXHASH)
2398 return virtnet_commit_rss_command(vi);
2399 }
2400
2401 return true;
2402 }
2403
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33204 bytes --]
next prev parent reply other threads:[~2021-08-19 0:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 17:54 [RFC PATCH 0/3] drivers/net/virtio_net: Added RSS support Andrew Melnychenko
2021-08-18 17:54 ` Andrew Melnychenko
2021-08-18 17:54 ` [RFC PATCH 1/3] drivers/net/virtio_net: Fixed vheader to use v1 Andrew Melnychenko
2021-08-18 17:54 ` Andrew Melnychenko
2021-09-01 6:52 ` Jason Wang
2021-09-01 6:52 ` Jason Wang
2021-08-18 17:54 ` [RFC PATCH 2/3] drivers/net/virtio_net: Added basic RSS support Andrew Melnychenko
2021-08-18 17:54 ` Andrew Melnychenko
2021-08-18 22:38 ` kernel test robot
2021-09-01 7:35 ` Jason Wang
2021-09-01 7:35 ` Jason Wang
2021-08-18 17:54 ` [RFC PATCH 3/3] drivers/net/virtio_net: Added RSS hash report Andrew Melnychenko
2021-08-18 17:54 ` Andrew Melnychenko
2021-08-18 21:33 ` kernel test robot
2021-08-18 21:33 ` [RFC PATCH] drivers/net/virtio_net: virtnet_get_hashflow() can be static kernel test robot
2021-08-19 0:48 ` kernel test robot [this message]
2021-09-01 7:40 ` [RFC PATCH 3/3] drivers/net/virtio_net: Added RSS hash report Jason Wang
2021-09-01 7:40 ` Jason Wang
2021-08-31 12:10 ` [RFC PATCH 0/3] drivers/net/virtio_net: Added RSS support Andrew Melnichenko
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=202108190855.JyNXgyWJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.