All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH] mac80211: enable QoS support for nl80211 ctrl port
Date: Thu, 10 Dec 2020 21:02:17 +0800	[thread overview]
Message-ID: <202012102007.t0pc5bJq-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 9341 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20201209225214.127548-1-markus.theil@tu-ilmenau.de>
References: <20201209225214.127548-1-markus.theil@tu-ilmenau.de>
TO: Markus Theil <markus.theil@tu-ilmenau.de>
TO: johannes(a)sipsolutions.net
CC: linux-wireless(a)vger.kernel.org
CC: Markus Theil <markus.theil@tu-ilmenau.de>

Hi Markus,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on mac80211/master v5.10-rc7 next-20201209]
[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/Markus-Theil/mac80211-enable-QoS-support-for-nl80211-ctrl-port/20201210-065717
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
config: i386-randconfig-m021-20201209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
net/mac80211/tx.c:1206 ieee80211_tx_prepare() warn: add some parenthesis here?
net/mac80211/tx.c:1206 ieee80211_tx_prepare() warn: maybe use && instead of &

Old smatch warnings:
net/mac80211/tx.c:1830 invoke_tx_handlers_late() warn: variable dereferenced before check 'tx->skb' (see line 1808)
net/mac80211/tx.c:3417 ieee80211_xmit_fast_finish() error: we previously assumed 'key' could be null (see line 3385)
include/linux/u64_stats_sync.h:128 u64_stats_update_begin() warn: statement has no effect 31

vim +1206 net/mac80211/tx.c

a622ab72b4dcfdf Johannes Berg    2010-06-10  1156  
58d4185e36913d4 Johannes Berg    2007-09-26  1157  /*
58d4185e36913d4 Johannes Berg    2007-09-26  1158   * initialises @tx
7c10770f995820e Johannes Berg    2015-03-20  1159   * pass %NULL for the station if unknown, a valid pointer if known
7c10770f995820e Johannes Berg    2015-03-20  1160   * or an ERR_PTR() if the station is known not to exist
58d4185e36913d4 Johannes Berg    2007-09-26  1161   */
9ae54c8463691b6 Johannes Berg    2008-01-31  1162  static ieee80211_tx_result
3b8d81e020f77c9 Johannes Berg    2009-06-17  1163  ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
3b8d81e020f77c9 Johannes Berg    2009-06-17  1164  		     struct ieee80211_tx_data *tx,
7c10770f995820e Johannes Berg    2015-03-20  1165  		     struct sta_info *sta, struct sk_buff *skb)
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1166  {
3b8d81e020f77c9 Johannes Berg    2009-06-17  1167  	struct ieee80211_local *local = sdata->local;
58d4185e36913d4 Johannes Berg    2007-09-26  1168  	struct ieee80211_hdr *hdr;
e039fa4a4195ac4 Johannes Berg    2008-05-15  1169  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
68f2b517bcbd81c Johannes Berg    2011-10-07  1170  	int tid;
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1171  
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1172  	memset(tx, 0, sizeof(*tx));
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1173  	tx->skb = skb;
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1174  	tx->local = local;
3b8d81e020f77c9 Johannes Berg    2009-06-17  1175  	tx->sdata = sdata;
252b86c43225d06 Johannes Berg    2011-11-16  1176  	__skb_queue_head_init(&tx->skbs);
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1177  
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1178  	/*
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1179  	 * If this flag is set to true anywhere, and we get here,
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1180  	 * we are doing the needed processing, so remove the flag
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1181  	 * now.
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1182  	 */
cc20ff2c6b5d3e2 Felix Fietkau    2020-09-08  1183  	info->control.flags &= ~IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1184  
58d4185e36913d4 Johannes Berg    2007-09-26  1185  	hdr = (struct ieee80211_hdr *) skb->data;
58d4185e36913d4 Johannes Berg    2007-09-26  1186  
7c10770f995820e Johannes Berg    2015-03-20  1187  	if (likely(sta)) {
7c10770f995820e Johannes Berg    2015-03-20  1188  		if (!IS_ERR(sta))
7c10770f995820e Johannes Berg    2015-03-20  1189  			tx->sta = sta;
7c10770f995820e Johannes Berg    2015-03-20  1190  	} else {
3f0e0b220f80075 Felix Fietkau    2010-01-08  1191  		if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
f14543ee4d0681d Felix Fietkau    2009-11-10  1192  			tx->sta = rcu_dereference(sdata->u.vlan.sta);
7c10770f995820e Johannes Berg    2015-03-20  1193  			if (!tx->sta && sdata->wdev.use_4addr)
3f0e0b220f80075 Felix Fietkau    2010-01-08  1194  				return TX_DROP;
514b314825e19f7 Markus Theil     2020-12-09  1195  		} else if (tx->sdata->control_port_protocol == tx->skb->protocol) {
b4d57adb727ec7c Felix Fietkau    2010-01-31  1196  			tx->sta = sta_info_get_bss(sdata, hdr->addr1);
3f0e0b220f80075 Felix Fietkau    2010-01-08  1197  		}
9d6b106b54e02ad Johannes Berg    2015-02-24  1198  		if (!tx->sta && !is_multicast_ether_addr(hdr->addr1))
abe60632f311d51 Johannes Berg    2009-11-25  1199  			tx->sta = sta_info_get(sdata, hdr->addr1);
7c10770f995820e Johannes Berg    2015-03-20  1200  	}
58d4185e36913d4 Johannes Berg    2007-09-26  1201  
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1202  	if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) &&
49a59543eb5a5d2 Johannes Berg    2011-09-29  1203  	    !ieee80211_is_qos_nullfunc(hdr->frame_control) &&
30686bf7f5b3c30 Johannes Berg    2015-06-02  1204  	    ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION) &&
514b314825e19f7 Markus Theil     2020-12-09  1205  	    !ieee80211_hw_check(&local->hw, TX_AMPDU_SETUP_IN_HW) &&
514b314825e19f7 Markus Theil     2020-12-09 @1206  	    !info->flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO) {
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1207  		struct tid_ampdu_tx *tid_tx;
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1208  
a1f2ba04cc92414 Sara Sharon      2018-02-19  1209  		tid = ieee80211_get_tid(hdr);
8b30b1fe368ab03 Sujith           2008-10-24  1210  
a622ab72b4dcfdf Johannes Berg    2010-06-10  1211  		tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]);
a622ab72b4dcfdf Johannes Berg    2010-06-10  1212  		if (tid_tx) {
a622ab72b4dcfdf Johannes Berg    2010-06-10  1213  			bool queued;
a622ab72b4dcfdf Johannes Berg    2010-06-10  1214  
a622ab72b4dcfdf Johannes Berg    2010-06-10  1215  			queued = ieee80211_tx_prep_agg(tx, skb, info,
a622ab72b4dcfdf Johannes Berg    2010-06-10  1216  						       tid_tx, tid);
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1217  
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1218  			if (unlikely(queued))
cd8ffc800ce18e5 Johannes Berg    2009-03-23  1219  				return TX_QUEUED;
8b30b1fe368ab03 Sujith           2008-10-24  1220  		}
a622ab72b4dcfdf Johannes Berg    2010-06-10  1221  	}
8b30b1fe368ab03 Sujith           2008-10-24  1222  
badffb725c86cc2 Jiri Slaby       2007-08-28  1223  	if (is_multicast_ether_addr(hdr->addr1)) {
5cf121c3cdb9555 Johannes Berg    2008-02-25  1224  		tx->flags &= ~IEEE80211_TX_UNICAST;
e039fa4a4195ac4 Johannes Berg    2008-05-15  1225  		info->flags |= IEEE80211_TX_CTL_NO_ACK;
6fd67e937ece538 Simon Wunderlich 2011-11-18  1226  	} else
5cf121c3cdb9555 Johannes Berg    2008-02-25  1227  		tx->flags |= IEEE80211_TX_UNICAST;
58d4185e36913d4 Johannes Berg    2007-09-26  1228  
a26eb27ab430147 Johannes Berg    2011-10-07  1229  	if (!(info->flags & IEEE80211_TX_CTL_DONTFRAG)) {
a26eb27ab430147 Johannes Berg    2011-10-07  1230  		if (!(tx->flags & IEEE80211_TX_UNICAST) ||
a26eb27ab430147 Johannes Berg    2011-10-07  1231  		    skb->len + FCS_LEN <= local->hw.wiphy->frag_threshold ||
a26eb27ab430147 Johannes Berg    2011-10-07  1232  		    info->flags & IEEE80211_TX_CTL_AMPDU)
a26eb27ab430147 Johannes Berg    2011-10-07  1233  			info->flags |= IEEE80211_TX_CTL_DONTFRAG;
58d4185e36913d4 Johannes Berg    2007-09-26  1234  	}
58d4185e36913d4 Johannes Berg    2007-09-26  1235  
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1236  	if (!tx->sta)
e039fa4a4195ac4 Johannes Berg    2008-05-15  1237  		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
f7418bc10d84027 Felix Fietkau    2015-09-24  1238  	else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) {
e039fa4a4195ac4 Johannes Berg    2008-05-15  1239  		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
f7418bc10d84027 Felix Fietkau    2015-09-24  1240  		ieee80211_check_fast_xmit(tx->sta);
f7418bc10d84027 Felix Fietkau    2015-09-24  1241  	}
58d4185e36913d4 Johannes Berg    2007-09-26  1242  
e039fa4a4195ac4 Johannes Berg    2008-05-15  1243  	info->flags |= IEEE80211_TX_CTL_FIRST_FRAGMENT;
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1244  
9ae54c8463691b6 Johannes Berg    2008-01-31  1245  	return TX_CONTINUE;
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1246  }
e2ebc74d7e3d716 Johannes Berg    2007-07-27  1247  

---
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: 36260 bytes --]

             reply	other threads:[~2020-12-10 13:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 13:02 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-10 10:28 [PATCH] mac80211: enable QoS support for nl80211 ctrl port kernel test robot
2020-12-09 22:52 Markus Theil
2020-12-10 11:04 ` Dan Carpenter
2020-12-10 13:59 ` Johannes Berg
2020-12-11  3:00 ` kernel test robot
2020-12-11  3:00   ` 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=202012102007.t0pc5bJq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@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.