From: kernel test robot <lkp@intel.com>
To: Sriram R <quic_srirrama@quicinc.com>,
johannes@sipsolutions.net, nbd@nbd.name
Cc: kbuild-all@lists.01.org, linux-wireless@vger.kernel.org,
Sriram R <quic_srirrama@quicinc.com>
Subject: Re: [PATCH v2] mac80211: Mesh Fast xmit support
Date: Wed, 3 Aug 2022 17:40:29 +0800 [thread overview]
Message-ID: <202208031727.gD3OOS6X-lkp@intel.com> (raw)
In-Reply-To: <20220801070418.5420-1-quic_srirrama@quicinc.com>
Hi Sriram,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 35610745d71df567297bb40c5e4263cda38dddd5]
url: https://github.com/intel-lab-lkp/linux/commits/Sriram-R/mac80211-Mesh-Fast-xmit-support/20220801-150754
base: 35610745d71df567297bb40c5e4263cda38dddd5
config: microblaze-randconfig-s033-20220803 (https://download.01.org/0day-ci/archive/20220803/202208031727.gD3OOS6X-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/0818e073d360fa23c2a1e61f49d67a7b3e99a4e6
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Sriram-R/mac80211-Mesh-Fast-xmit-support/20220801-150754
git checkout 0818e073d360fa23c2a1e61f49d67a7b3e99a4e6
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze SHELL=/bin/bash net/mac80211/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/mac80211/mesh_pathtbl.c:464:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> net/mac80211/mesh_pathtbl.c:464:17: sparse: struct mesh_path [noderef] __rcu *
>> net/mac80211/mesh_pathtbl.c:464:17: sparse: struct mesh_path *
net/mac80211/mesh_pathtbl.c:471:18: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/mac80211/mesh_pathtbl.c:471:18: sparse: struct mesh_path [noderef] __rcu *
net/mac80211/mesh_pathtbl.c:471:18: sparse: struct mesh_path *
net/mac80211/mesh_pathtbl.c:509:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> net/mac80211/mesh_pathtbl.c:509:25: sparse: struct ieee80211_key [noderef] __rcu *
>> net/mac80211/mesh_pathtbl.c:509:25: sparse: struct ieee80211_key *
net/mac80211/mesh_pathtbl.c:656:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/mac80211/mesh_pathtbl.c:656:9: sparse: struct mesh_path [noderef] __rcu *
net/mac80211/mesh_pathtbl.c:656:9: sparse: struct mesh_path *
net/mac80211/mesh_pathtbl.c:657:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/mac80211/mesh_pathtbl.c:657:9: sparse: struct mesh_path [noderef] __rcu *
net/mac80211/mesh_pathtbl.c:657:9: sparse: struct mesh_path *
net/mac80211/mesh_pathtbl.c:658:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/mac80211/mesh_pathtbl.c:658:9: sparse: struct ieee80211_key [noderef] __rcu *
net/mac80211/mesh_pathtbl.c:658:9: sparse: struct ieee80211_key *
net/mac80211/mesh_pathtbl.c:757:31: sparse: sparse: incompatible types in comparison expression (different address spaces):
net/mac80211/mesh_pathtbl.c:757:31: sparse: struct mesh_path [noderef] __rcu *
net/mac80211/mesh_pathtbl.c:757:31: sparse: struct mesh_path *
vim +464 net/mac80211/mesh_pathtbl.c
434
435 struct mhdr_cache_entry *mesh_fill_cached_hdr(struct ieee80211_sub_if_data *sdata,
436 struct sk_buff *skb)
437 {
438 struct mesh_hdr_cache *cache;
439 struct mhdr_cache_entry *entry;
440 struct mesh_path *mpath, *mppath;
441 struct ieee80211s_hdr *meshhdr;
442 struct ieee80211_hdr *hdr;
443 struct sta_info *new_nhop;
444 struct ieee80211_key *key;
445 struct ethhdr *eth;
446 u8 sa[ETH_ALEN];
447
448 u8 tid;
449
450 cache = &sdata->u.mesh.hdr_cache;
451
452 if (!cache->enabled)
453 return NULL;
454
455 entry = rhashtable_lookup(&cache->rhead, skb->data,
456 mesh_hdr_rht_params);
457 if (!entry)
458 return NULL;
459
460 /* Avoid extra work in this path */
461 if (skb_headroom(skb) < (entry->hdrlen - ETH_HLEN + 2))
462 return NULL;
463
> 464 mpath = rcu_dereference(entry->mpath);
465 if (!mpath)
466 return NULL;
467
468 /* This check is with assumption that only 6addr frames are
469 * supported currently for caching
470 */
471 mppath = rcu_dereference(entry->mppath);
472 if (!mppath)
473 return NULL;
474
475 if (!(mpath->flags & MESH_PATH_ACTIVE))
476 return NULL;
477
478 if (mpath_expired(mpath))
479 return NULL;
480
481 /* If the skb is shared we need to obtain our own copy */
482 if (skb_shared(skb)) {
483 struct sk_buff *tmp_skb = skb;
484
485 skb = skb_clone(skb, GFP_ATOMIC);
486 kfree_skb(tmp_skb);
487
488 if (!skb)
489 return NULL;
490 }
491
492 /* In case there was a path refresh and update after we last used
493 * update the next hop addr.
494 */
495 spin_lock_bh(&mpath->state_lock);
496 if (entry->path_change_count != mpath->path_change_count) {
497 new_nhop = rcu_dereference(mpath->next_hop);
498 if (!new_nhop) {
499 spin_unlock_bh(&mpath->state_lock);
500 return NULL;
501 }
502 memcpy(&entry->hdr[4], new_nhop->sta.addr, ETH_ALEN);
503
504 /* update key. pn_offs will be same */
505 if (entry->key) {
506 key = rcu_access_pointer(new_nhop->ptk[new_nhop->ptk_idx]);
507 if (!key)
508 key = rcu_access_pointer(sdata->default_unicast_key);
> 509 rcu_assign_pointer(entry->key, key);
510 }
511 entry->path_change_count = mpath->path_change_count;
512 }
513 spin_unlock_bh(&mpath->state_lock);
514
515 /* backup eth SA to copy as eaddr2/SA in the mesh header */
516 eth = (struct ethhdr *)skb->data;
517 ether_addr_copy(sa, eth->h_source);
518
519 /* Pull DA:SA */
520 skb_pull(skb, ETH_ALEN * 2);
521
522 memcpy(skb_push(skb, entry->hdrlen), entry->hdr, entry->hdrlen);
523
524 meshhdr = (struct ieee80211s_hdr *)(skb->data + entry->machdr_len);
525 hdr = (struct ieee80211_hdr *)skb->data;
526
527 /* Update mutables */
528 tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
529 *ieee80211_get_qos_ctl(hdr) = tid;
530
531 put_unaligned(cpu_to_le32(sdata->u.mesh.mesh_seqnum), &meshhdr->seqnum);
532 sdata->u.mesh.mesh_seqnum++;
533
534 memcpy(meshhdr->eaddr2, sa, ETH_ALEN);
535 meshhdr->ttl = sdata->u.mesh.mshcfg.dot11MeshTTL;
536
537 if (mpath->flags & (MESH_PATH_REQ_QUEUED | MESH_PATH_FIXED))
538 goto out;
539
540 /* Refresh the path, in case there is a change in nexthop after refresh
541 * hdr will be updated on next lookup
542 */
543 if (time_after(jiffies,
544 mpath->exp_time -
545 msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time)) &&
546 !(mpath->flags & MESH_PATH_RESOLVING) &&
547 !(mpath->flags & MESH_PATH_FIXED)) {
548 mesh_queue_preq(mpath, PREQ_Q_F_START | PREQ_Q_F_REFRESH);
549 }
550
551 out:
552 mppath->exp_time = jiffies;
553 entry->timestamp = jiffies;
554
555 return entry;
556 }
557
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-08-03 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 7:04 [PATCH v2] mac80211: Mesh Fast xmit support Sriram R
2022-08-01 9:54 ` Kalle Valo
2022-08-02 2:48 ` Sriram R (QUIC)
2022-08-03 9:40 ` kernel test robot [this message]
2022-08-14 16:42 ` kernel test robot
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=202208031727.gD3OOS6X-lkp@intel.com \
--to=lkp@intel.com \
--cc=johannes@sipsolutions.net \
--cc=kbuild-all@lists.01.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=quic_srirrama@quicinc.com \
/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