From: kernel test robot <lkp@intel.com>
To: Ma Ke <make_ruc2021@163.com>,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Ma Ke <make_ruc2021@163.com>
Subject: Re: [PATCH] net: sched: htb: dont intepret cls results when asked to drop
Date: Sat, 16 Sep 2023 15:12:40 +0800 [thread overview]
Message-ID: <202309161437.vLLafFXT-lkp@intel.com> (raw)
In-Reply-To: <20230915142719.3411733-1-make_ruc2021@163.com>
Hi Ma,
kernel test robot noticed the following build errors:
[auto build test ERROR on net-next/main]
[also build test ERROR on net/main linus/master v6.6-rc1 next-20230915]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ma-Ke/net-sched-htb-dont-intepret-cls-results-when-asked-to-drop/20230915-223020
base: net-next/main
patch link: https://lore.kernel.org/r/20230915142719.3411733-1-make_ruc2021%40163.com
patch subject: [PATCH] net: sched: htb: dont intepret cls results when asked to drop
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20230916/202309161437.vLLafFXT-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230916/202309161437.vLLafFXT-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309161437.vLLafFXT-lkp@intel.com/
All errors (new ones prefixed by >>):
>> net/sched/sch_htb.c:254:4: error: fallthrough annotation does not directly precede switch label
fallthrough;
^
include/linux/compiler_attributes.h:227:41: note: expanded from macro 'fallthrough'
# define fallthrough __attribute__((__fallthrough__))
^
1 error generated.
vim +254 net/sched/sch_htb.c
43d253781f6321 Randy Dunlap 2023-01-01 203
^1da177e4c3f41 Linus Torvalds 2005-04-16 204 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 205 * htb_classify - classify a packet into class
43d253781f6321 Randy Dunlap 2023-01-01 206 * @skb: the socket buffer
43d253781f6321 Randy Dunlap 2023-01-01 207 * @sch: the active queue discipline
43d253781f6321 Randy Dunlap 2023-01-01 208 * @qerr: pointer for returned status code
^1da177e4c3f41 Linus Torvalds 2005-04-16 209 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 210 * It returns NULL if the packet should be dropped or -1 if the packet
^1da177e4c3f41 Linus Torvalds 2005-04-16 211 * should be passed directly thru. In all other cases leaf class is returned.
^1da177e4c3f41 Linus Torvalds 2005-04-16 212 * We allow direct class selection by classid in priority. The we examine
^1da177e4c3f41 Linus Torvalds 2005-04-16 213 * filters in qdisc and in inner nodes (if higher filter points to the inner
^1da177e4c3f41 Linus Torvalds 2005-04-16 214 * node). If we end up with classid MAJOR:0 we enqueue the skb into special
^1da177e4c3f41 Linus Torvalds 2005-04-16 215 * internal fifo (direct). These packets then go directly thru. If we still
25985edcedea63 Lucas De Marchi 2011-03-30 216 * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessful
^1da177e4c3f41 Linus Torvalds 2005-04-16 217 * then finish and return direct queue.
^1da177e4c3f41 Linus Torvalds 2005-04-16 218 */
87990467d387f9 Stephen Hemminger 2006-08-10 219 static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,
87990467d387f9 Stephen Hemminger 2006-08-10 220 int *qerr)
^1da177e4c3f41 Linus Torvalds 2005-04-16 221 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 222 struct htb_sched *q = qdisc_priv(sch);
^1da177e4c3f41 Linus Torvalds 2005-04-16 223 struct htb_class *cl;
^1da177e4c3f41 Linus Torvalds 2005-04-16 224 struct tcf_result res;
^1da177e4c3f41 Linus Torvalds 2005-04-16 225 struct tcf_proto *tcf;
^1da177e4c3f41 Linus Torvalds 2005-04-16 226 int result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 227
^1da177e4c3f41 Linus Torvalds 2005-04-16 228 /* allow to select class by setting skb->priority to valid classid;
cc7ec456f82da7 Eric Dumazet 2011-01-19 229 * note that nfmark can be used too by attaching filter fw with no
cc7ec456f82da7 Eric Dumazet 2011-01-19 230 * rules in it
cc7ec456f82da7 Eric Dumazet 2011-01-19 231 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 232 if (skb->priority == sch->handle)
^1da177e4c3f41 Linus Torvalds 2005-04-16 233 return HTB_DIRECT; /* X:0 (direct flow) selected */
cc7ec456f82da7 Eric Dumazet 2011-01-19 234 cl = htb_find(skb->priority, sch);
29824310ce3e32 Harry Mason 2014-01-17 235 if (cl) {
29824310ce3e32 Harry Mason 2014-01-17 236 if (cl->level == 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 237 return cl;
29824310ce3e32 Harry Mason 2014-01-17 238 /* Start with inner filter chain if a non-leaf class is selected */
25d8c0d55f241c John Fastabend 2014-09-12 239 tcf = rcu_dereference_bh(cl->filter_list);
29824310ce3e32 Harry Mason 2014-01-17 240 } else {
25d8c0d55f241c John Fastabend 2014-09-12 241 tcf = rcu_dereference_bh(q->filter_list);
29824310ce3e32 Harry Mason 2014-01-17 242 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 243
c27f339af90bb8 Jarek Poplawski 2008-08-04 244 *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
3aa2605594556c Davide Caratti 2021-07-28 245 while (tcf && (result = tcf_classify(skb, NULL, tcf, &res, false)) >= 0) {
4505a19ed317f1 Ma Ke 2023-09-15 246 if (result == TC_ACT_SHOT)
4505a19ed317f1 Ma Ke 2023-09-15 247 return NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 248 #ifdef CONFIG_NET_CLS_ACT
^1da177e4c3f41 Linus Torvalds 2005-04-16 249 switch (result) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 250 case TC_ACT_QUEUED:
^1da177e4c3f41 Linus Torvalds 2005-04-16 251 case TC_ACT_STOLEN:
e25ea21ffa66a0 Jiri Pirko 2017-06-06 252 case TC_ACT_TRAP:
378a2f090f7a47 Jarek Poplawski 2008-08-04 253 *qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
964201de695b8a Gustavo A. R. Silva 2020-07-07 @254 fallthrough;
^1da177e4c3f41 Linus Torvalds 2005-04-16 255 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 256 #endif
cc7ec456f82da7 Eric Dumazet 2011-01-19 257 cl = (void *)res.class;
cc7ec456f82da7 Eric Dumazet 2011-01-19 258 if (!cl) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 259 if (res.classid == sch->handle)
^1da177e4c3f41 Linus Torvalds 2005-04-16 260 return HTB_DIRECT; /* X:0 (direct flow) */
cc7ec456f82da7 Eric Dumazet 2011-01-19 261 cl = htb_find(res.classid, sch);
cc7ec456f82da7 Eric Dumazet 2011-01-19 262 if (!cl)
^1da177e4c3f41 Linus Torvalds 2005-04-16 263 break; /* filter selected invalid classid */
^1da177e4c3f41 Linus Torvalds 2005-04-16 264 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 265 if (!cl->level)
^1da177e4c3f41 Linus Torvalds 2005-04-16 266 return cl; /* we hit leaf; return it */
^1da177e4c3f41 Linus Torvalds 2005-04-16 267
^1da177e4c3f41 Linus Torvalds 2005-04-16 268 /* we have got inner class; apply inner filter chain */
25d8c0d55f241c John Fastabend 2014-09-12 269 tcf = rcu_dereference_bh(cl->filter_list);
^1da177e4c3f41 Linus Torvalds 2005-04-16 270 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 271 /* classification failed; try to use default class */
^1da177e4c3f41 Linus Torvalds 2005-04-16 272 cl = htb_find(TC_H_MAKE(TC_H_MAJ(sch->handle), q->defcls), sch);
^1da177e4c3f41 Linus Torvalds 2005-04-16 273 if (!cl || cl->level)
^1da177e4c3f41 Linus Torvalds 2005-04-16 274 return HTB_DIRECT; /* bad default .. this is safe bet */
^1da177e4c3f41 Linus Torvalds 2005-04-16 275 return cl;
^1da177e4c3f41 Linus Torvalds 2005-04-16 276 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 277
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-09-16 7:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 14:27 [PATCH] net: sched: htb: dont intepret cls results when asked to drop Ma Ke
2023-09-15 14:40 ` Eric Dumazet
2023-09-16 7:12 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-09-15 10:56 Ma Ke
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=202309161437.vLLafFXT-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=make_ruc2021@163.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=xiyou.wangcong@gmail.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 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.