From: kernel test robot <lkp@intel.com>
To: Simon Horman <simon.horman@corigine.com>,
David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
netdev@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@mellanox.com>,
oss-drivers@corigine.com,
Baowen Zheng <baowen.zheng@corigine.com>,
Louis Peens <louis.peens@corigine.com>,
Simon Horman <simon.horman@corigine.com>
Subject: Re: [PATCH net-next 2/3] flow_offload: add process to delete offloaded actions from net device
Date: Fri, 23 Jul 2021 01:07:43 +0800 [thread overview]
Message-ID: <202107230134.p5ZGMhSt-lkp@intel.com> (raw)
In-Reply-To: <20210722091938.12956-3-simon.horman@corigine.com>
[-- Attachment #1: Type: text/plain, Size: 12844 bytes --]
Hi Simon,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Simon-Horman/flow_offload-hardware-offload-of-TC-actions/20210722-172229
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git c2255ff47768c94a0ebc3968f007928bb47ea43b
config: powerpc-randconfig-r016-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/a8e2d0acfc98c127ab0b5189f7635049515c43f3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Simon-Horman/flow_offload-hardware-offload-of-TC-actions/20210722-172229
git checkout a8e2d0acfc98c127ab0b5189f7635049515c43f3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:238:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/sched/act_api.c:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:2:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/sched/act_api.c:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:4:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/sched/act_api.c:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:6:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/sched/act_api.c:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:8:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from net/sched/act_api.c:13:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:10:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> net/sched/act_api.c:1063:5: warning: no previous prototype for function 'tcf_action_offload_cmd_pre' [-Wmissing-prototypes]
int tcf_action_offload_cmd_pre(struct tc_action *actions[],
^
net/sched/act_api.c:1063:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tcf_action_offload_cmd_pre(struct tc_action *actions[],
^
static
>> net/sched/act_api.c:1091:5: warning: no previous prototype for function 'tcf_action_offload_cmd_post' [-Wmissing-prototypes]
int tcf_action_offload_cmd_post(struct flow_offload_action *fl_act,
^
net/sched/act_api.c:1091:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tcf_action_offload_cmd_post(struct flow_offload_action *fl_act,
^
static
net/sched/act_api.c:1105:5: warning: no previous prototype for function 'tcf_action_offload_cmd' [-Wmissing-prototypes]
int tcf_action_offload_cmd(struct tc_action *actions[],
^
net/sched/act_api.c:1105:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tcf_action_offload_cmd(struct tc_action *actions[],
^
static
>> net/sched/act_api.c:1123:5: warning: no previous prototype for function 'tcf_action_offload_del_post' [-Wmissing-prototypes]
int tcf_action_offload_del_post(struct flow_offload_action *fl_act,
^
net/sched/act_api.c:1123:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int tcf_action_offload_del_post(struct flow_offload_action *fl_act,
^
static
16 warnings generated.
vim +/tcf_action_offload_cmd_pre +1063 net/sched/act_api.c
1062
> 1063 int tcf_action_offload_cmd_pre(struct tc_action *actions[],
1064 enum flow_act_command cmd,
1065 struct netlink_ext_ack *extack,
1066 struct flow_offload_action **fl_act)
1067 {
1068 struct flow_offload_action *fl_act_p;
1069 int err = 0;
1070
1071 fl_act_p = flow_action_alloc(tcf_act_num_actions(actions));
1072 if (!fl_act_p)
1073 return -ENOMEM;
1074
1075 fl_act_p->extack = extack;
1076 fl_act_p->command = cmd;
1077 err = tc_setup_action(&fl_act_p->action, actions);
1078 if (err) {
1079 NL_SET_ERR_MSG_MOD(extack,
1080 "Failed to setup tc actions for offload\n");
1081 goto err_out;
1082 }
1083 *fl_act = fl_act_p;
1084 return 0;
1085 err_out:
1086 kfree(fl_act_p);
1087 return err;
1088 }
1089 EXPORT_SYMBOL(tcf_action_offload_cmd_pre);
1090
> 1091 int tcf_action_offload_cmd_post(struct flow_offload_action *fl_act,
1092 struct netlink_ext_ack *extack)
1093 {
1094 if (IS_ERR(fl_act))
1095 return PTR_ERR(fl_act);
1096
1097 flow_indr_dev_setup_offload(NULL, NULL, TC_SETUP_ACT, fl_act, NULL, NULL);
1098
1099 tc_cleanup_flow_action(&fl_act->action);
1100 kfree(fl_act);
1101 return 0;
1102 }
1103
1104 /* offload the tc command after inserted */
1105 int tcf_action_offload_cmd(struct tc_action *actions[],
1106 struct netlink_ext_ack *extack)
1107 {
1108 struct flow_offload_action *fl_act;
1109 int err = 0;
1110
1111 err = tcf_action_offload_cmd_pre(actions,
1112 FLOW_ACT_REPLACE,
1113 extack,
1114 &fl_act);
1115 if (err)
1116 return err;
1117
1118 return tcf_action_offload_cmd_post(fl_act, extack);
1119 }
1120 EXPORT_SYMBOL(tcf_action_offload_cmd);
1121
1122 /* offload the tc command after deleted */
> 1123 int tcf_action_offload_del_post(struct flow_offload_action *fl_act,
1124 struct tc_action *actions[],
1125 struct netlink_ext_ack *extack,
1126 int fallback_num)
1127 {
1128 int fallback_entries = 0;
1129 struct tc_action *act;
1130 int total_entries = 0;
1131 int i;
1132
1133 if (!fl_act)
1134 return -EINVAL;
1135
1136 if (fallback_num) {
1137 /* for each the actions to fallback the action entries remain in the actions */
1138 for (i = 0; i < TCA_ACT_MAX_PRIO; i++) {
1139 act = actions[i];
1140 if (!act)
1141 continue;
1142
1143 fallback_entries += tcf_act_num_actions_single(act);
1144 }
1145 fallback_entries += fallback_num;
1146 }
1147 total_entries = fl_act->action.num_entries;
1148 if (total_entries > fallback_entries) {
1149 /* just offload the actions that is not fallback and start with the actions */
1150 fl_act->action.num_entries -= fallback_entries;
1151 flow_indr_dev_setup_offload(NULL, NULL, TC_SETUP_ACT, fl_act, NULL, NULL);
1152
1153 /* recovery num_entries for cleanup */
1154 fl_act->action.num_entries = total_entries;
1155 } else {
1156 NL_SET_ERR_MSG(extack, "no entries to offload when deleting the tc actions");
1157 }
1158
1159 tc_cleanup_flow_action(&fl_act->action);
1160
1161 kfree(fl_act);
1162 return 0;
1163 }
1164 EXPORT_SYMBOL(tcf_action_offload_del_post);
1165
---
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: 44151 bytes --]
next prev parent reply other threads:[~2021-07-22 17:08 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 9:19 [PATCH net-next 0/3] flow_offload: hardware offload of TC actions Simon Horman
2021-07-22 9:19 ` [PATCH net-next 1/3] flow_offload: allow user to offload tc action to net device Simon Horman
2021-07-22 12:24 ` Roi Dayan
2021-07-22 13:19 ` Simon Horman
2021-07-22 13:29 ` Vlad Buslov
2021-07-22 13:33 ` Jamal Hadi Salim
2021-07-27 13:04 ` Simon Horman
2021-07-27 14:38 ` Vlad Buslov
2021-07-27 16:13 ` Jamal Hadi Salim
2021-07-27 16:47 ` Vlad Buslov
2021-07-28 7:46 ` Simon Horman
2021-07-28 8:05 ` Vlad Buslov
2021-07-28 13:51 ` Jamal Hadi Salim
2021-07-28 14:46 ` Simon Horman
2021-07-30 10:17 ` Jamal Hadi Salim
2021-07-30 11:40 ` Vlad Buslov
2021-08-03 9:57 ` Jamal Hadi Salim
2021-08-03 12:02 ` tc offload debug-ability Jamal Hadi Salim
2021-08-03 12:14 ` Vlad Buslov
2021-08-03 12:50 ` Jamal Hadi Salim
2021-08-03 13:34 ` Ido Schimmel
2021-07-30 13:20 ` [PATCH net-next 1/3] flow_offload: allow user to offload tc action to net device Simon Horman
2021-08-03 10:14 ` Jamal Hadi Salim
2021-08-03 11:36 ` Simon Horman
2021-08-03 11:45 ` Jamal Hadi Salim
2021-08-03 12:31 ` Simon Horman
2021-08-03 13:01 ` Jamal Hadi Salim
2021-08-03 14:46 ` Simon Horman
2021-07-22 13:57 ` kernel test robot
2021-07-22 15:31 ` kernel test robot
2021-08-03 10:50 ` Jamal Hadi Salim
2021-08-03 11:05 ` Jamal Hadi Salim
2021-08-03 11:31 ` Simon Horman
2021-07-22 9:19 ` [PATCH net-next 2/3] flow_offload: add process to delete offloaded actions from " Simon Horman
2021-07-22 14:25 ` Vlad Buslov
2021-07-22 14:50 ` kernel test robot
2021-07-22 17:07 ` kernel test robot [this message]
2021-08-03 10:59 ` Jamal Hadi Salim
2021-07-22 9:19 ` [PATCH net-next 3/3] flow_offload: add process to update action stats from hardware Simon Horman
2021-07-22 14:55 ` Vlad Buslov
2021-08-03 11:24 ` Jamal Hadi Salim
2021-08-03 11:35 ` Simon Horman
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=202107230134.p5ZGMhSt-lkp@intel.com \
--to=lkp@intel.com \
--cc=baowen.zheng@corigine.com \
--cc=clang-built-linux@googlegroups.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=louis.peens@corigine.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=simon.horman@corigine.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 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).