lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 22 Jul 2021 22:50:33 +0800
From:   kernel test robot <lkp@...el.com>
To:     Simon Horman <simon.horman@...igine.com>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...lanox.com>, oss-drivers@...igine.com,
        Baowen Zheng <baowen.zheng@...igine.com>,
        Louis Peens <louis.peens@...igine.com>,
        Simon Horman <simon.horman@...igine.com>
Subject: Re: [PATCH net-next 2/3] flow_offload: add process to delete
 offloaded actions from net device

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: microblaze-randconfig-r011-20210722 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 10.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
        # 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=gcc-10.3.0 make.cross ARCH=microblaze 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> net/sched/act_api.c:1063:5: warning: no previous prototype for 'tcf_action_offload_cmd_pre' [-Wmissing-prototypes]
    1063 | int tcf_action_offload_cmd_pre(struct tc_action *actions[],
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/sched/act_api.c:1091:5: warning: no previous prototype for 'tcf_action_offload_cmd_post' [-Wmissing-prototypes]
    1091 | int tcf_action_offload_cmd_post(struct flow_offload_action *fl_act,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/sched/act_api.c:1105:5: warning: no previous prototype for 'tcf_action_offload_cmd' [-Wmissing-prototypes]
    1105 | int tcf_action_offload_cmd(struct tc_action *actions[],
         |     ^~~~~~~~~~~~~~~~~~~~~~
>> net/sched/act_api.c:1123:5: warning: no previous prototype for 'tcf_action_offload_del_post' [-Wmissing-prototypes]
    1123 | int tcf_action_offload_del_post(struct flow_offload_action *fl_act,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Download attachment ".config.gz" of type "application/gzip" (39738 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ