From: kernel test robot <lkp@intel.com>
To: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>,
Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org
Cc: kbuild-all@lists.01.org, mathy.vanhoef@nyu.edu
Subject: Re: [PATCH] mac80211: keep non-zero sequence counter of injected frames
Date: Mon, 29 Jun 2020 17:38:08 +0800 [thread overview]
Message-ID: <202006291719.mLEgf0kH%lkp@intel.com> (raw)
In-Reply-To: <20200628220512.28535ebc@mathy-work.localhost>
[-- Attachment #1: Type: text/plain, Size: 4335 bytes --]
Hi Mathy,
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.8-rc3 next-20200626]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Mathy-Vanhoef/mac80211-keep-non-zero-sequence-counter-of-injected-frames/20200629-021517
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
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 >>):
In file included from include/linux/kernel.h:11,
from net/mac80211/tx.c:13:
net/mac80211/tx.c: In function 'ieee80211_tx_h_sequence':
>> net/mac80211/tx.c:817:21: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
817 | (info->flags & IEEE80211_TX_CTL_INJECTED != 0 &&
| ^
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
vim +817 net/mac80211/tx.c
802
803 static ieee80211_tx_result debug_noinline
804 ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx)
805 {
806 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
807 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
808 int tid;
809
810 /*
811 * Packet injection may want to control the sequence number.
812 * Do not assign one ourselves, and do not ask the driver to,
813 * if there is no matching interface or if the injected frame
814 * was already assigned a non-zero sequence number.
815 */
816 if (unlikely(info->control.vif->type == NL80211_IFTYPE_MONITOR ||
> 817 (info->flags & IEEE80211_TX_CTL_INJECTED != 0 &&
818 hdr->seq_ctrl != 0)))
819 return TX_CONTINUE;
820
821 if (unlikely(ieee80211_is_ctl(hdr->frame_control)))
822 return TX_CONTINUE;
823
824 if (ieee80211_hdrlen(hdr->frame_control) < 24)
825 return TX_CONTINUE;
826
827 if (ieee80211_is_qos_nullfunc(hdr->frame_control))
828 return TX_CONTINUE;
829
830 /*
831 * Anything but QoS data that has a sequence number field
832 * (is long enough) gets a sequence number from the global
833 * counter. QoS data frames with a multicast destination
834 * also use the global counter (802.11-2012 9.3.2.10).
835 */
836 if (!ieee80211_is_data_qos(hdr->frame_control) ||
837 is_multicast_ether_addr(hdr->addr1)) {
838 if (tx->flags & IEEE80211_TX_NO_SEQNO)
839 return TX_CONTINUE;
840 /* driver should assign sequence number */
841 info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
842 /* for pure STA mode without beacons, we can do it */
843 hdr->seq_ctrl = cpu_to_le16(tx->sdata->sequence_number);
844 tx->sdata->sequence_number += 0x10;
845 if (tx->sta)
846 tx->sta->tx_stats.msdu[IEEE80211_NUM_TIDS]++;
847 return TX_CONTINUE;
848 }
849
850 /*
851 * This should be true for injected/management frames only, for
852 * management frames we have set the IEEE80211_TX_CTL_ASSIGN_SEQ
853 * above since they are not QoS-data frames.
854 */
855 if (!tx->sta)
856 return TX_CONTINUE;
857
858 /* include per-STA, per-TID sequence counter */
859 tid = ieee80211_get_tid(hdr);
860 tx->sta->tx_stats.msdu[tid]++;
861
862 hdr->seq_ctrl = ieee80211_tx_next_seq(tx->sta, tid);
863
864 return TX_CONTINUE;
865 }
866
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62154 bytes --]
next prev parent reply other threads:[~2020-06-29 19:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-28 18:05 [PATCH] mac80211: keep non-zero sequence counter of injected frames Mathy Vanhoef
2020-06-28 18:59 ` Johannes Berg
2020-07-01 7:32 ` Mathy Vanhoef
2020-06-29 9:38 ` kernel test robot [this message]
2020-06-29 11:19 ` kernel test robot
2020-06-29 12:30 ` kernel test robot
2020-07-07 13:45 ` Dan Carpenter
2020-07-07 13:55 ` Mathy Vanhoef
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=202006291719.mLEgf0kH%lkp@intel.com \
--to=lkp@intel.com \
--cc=Mathy.Vanhoef@kuleuven.be \
--cc=johannes@sipsolutions.net \
--cc=kbuild-all@lists.01.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mathy.vanhoef@nyu.edu \
/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;
as well as URLs for NNTP newsgroup(s).