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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 31 Jul 2021 05:10:08 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vadym Kochan <vadym.kochan@...ision.eu>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vladimir Oltean <olteanv@...il.com>,
        Serhiy Boiko <serhiy.boiko@...ision.eu>,
        Volodymyr Mytnyk <volodymyr.mytnyk@...ision.eu>,
        Taras Chornyi <taras.chornyi@...ision.eu>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 4/4] net: marvell: prestera: Offload
 FLOW_ACTION_POLICE

Hi Vadym,

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/Vadym-Kochan/Marvell-Prestera-add-policer-support/20210730-214316
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 3e12361b6d23f793580a50a6008633501c56ea1d
config: parisc-randconfig-p001-20210730 (attached as .config)
compiler: hppa-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/57041b87fd209b43060824a451a3fbf0eee0ab89
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vadym-Kochan/Marvell-Prestera-add-policer-support/20210730-214316
        git checkout 57041b87fd209b43060824a451a3fbf0eee0ab89
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=parisc 

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 >>):

>> drivers/net/ethernet/marvell/prestera/prestera_hw.c:1020:5: warning: no previous prototype for '__prestera_hw_acl_rule_add' [-Wmissing-prototypes]
    1020 | int __prestera_hw_acl_rule_add(struct prestera_switch *sw,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/marvell/prestera/prestera_hw.c:1074:5: warning: no previous prototype for '__prestera_hw_acl_rule_ext_add' [-Wmissing-prototypes]
    1074 | int __prestera_hw_acl_rule_ext_add(struct prestera_switch *sw,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/__prestera_hw_acl_rule_add +1020 drivers/net/ethernet/marvell/prestera/prestera_hw.c

  1019	
> 1020	int __prestera_hw_acl_rule_add(struct prestera_switch *sw,
  1021				       struct prestera_acl_rule *rule,
  1022				       u32 *rule_id)
  1023	{
  1024		struct prestera_msg_acl_action *actions;
  1025		struct prestera_msg_acl_match *matches;
  1026		struct prestera_msg_acl_rule_resp resp;
  1027		struct prestera_msg_acl_rule_req *req;
  1028		u8 n_actions;
  1029		u8 n_matches;
  1030		void *buff;
  1031		u32 size;
  1032		int err;
  1033	
  1034		n_actions = prestera_acl_rule_action_len(rule);
  1035		n_matches = prestera_acl_rule_match_len(rule);
  1036	
  1037		size = sizeof(*req) + sizeof(*actions) * n_actions +
  1038			sizeof(*matches) * n_matches;
  1039	
  1040		buff = kzalloc(size, GFP_KERNEL);
  1041		if (!buff)
  1042			return -ENOMEM;
  1043	
  1044		req = buff;
  1045		actions = buff + sizeof(*req);
  1046		matches = buff + sizeof(*req) + sizeof(*actions) * n_actions;
  1047	
  1048		/* put acl actions into the message */
  1049		err = prestera_hw_acl_actions_put(actions, rule);
  1050		if (err)
  1051			goto free_buff;
  1052	
  1053		/* put acl matches into the message */
  1054		err = prestera_hw_acl_matches_put(matches, rule);
  1055		if (err)
  1056			goto free_buff;
  1057	
  1058		req->ruleset_id = prestera_acl_rule_ruleset_id_get(rule);
  1059		req->priority = prestera_acl_rule_priority_get(rule);
  1060		req->n_actions = prestera_acl_rule_action_len(rule);
  1061		req->n_matches = prestera_acl_rule_match_len(rule);
  1062	
  1063		err = prestera_cmd_ret(sw, PRESTERA_CMD_TYPE_ACL_RULE_ADD,
  1064				       &req->cmd, size, &resp.ret, sizeof(resp));
  1065		if (err)
  1066			goto free_buff;
  1067	
  1068		*rule_id = resp.id;
  1069	free_buff:
  1070		kfree(buff);
  1071		return err;
  1072	}
  1073	
> 1074	int __prestera_hw_acl_rule_ext_add(struct prestera_switch *sw,
  1075					   struct prestera_acl_rule *rule,
  1076					   u32 *rule_id)
  1077	{
  1078		struct prestera_msg_acl_action_ext *actions;
  1079		struct prestera_msg_acl_rule_ext_req *req;
  1080		struct prestera_msg_acl_match *matches;
  1081		struct prestera_msg_acl_rule_resp resp;
  1082		u8 n_actions;
  1083		u8 n_matches;
  1084		void *buff;
  1085		u32 size;
  1086		int err;
  1087	
  1088		n_actions = prestera_acl_rule_action_len(rule);
  1089		n_matches = prestera_acl_rule_match_len(rule);
  1090	
  1091		size = sizeof(*req) + sizeof(*actions) * n_actions +
  1092			sizeof(*matches) * n_matches;
  1093	
  1094		buff = kzalloc(size, GFP_KERNEL);
  1095		if (!buff)
  1096			return -ENOMEM;
  1097	
  1098		req = buff;
  1099		actions = buff + sizeof(*req);
  1100		matches = buff + sizeof(*req) + sizeof(*actions) * n_actions;
  1101	
  1102		/* put acl actions into the message */
  1103		err = prestera_hw_acl_actions_ext_put(actions, rule);
  1104		if (err)
  1105			goto free_buff;
  1106	
  1107		/* put acl matches into the message */
  1108		err = prestera_hw_acl_matches_put(matches, rule);
  1109		if (err)
  1110			goto free_buff;
  1111	
  1112		req->ruleset_id = prestera_acl_rule_ruleset_id_get(rule);
  1113		req->priority = prestera_acl_rule_priority_get(rule);
  1114		req->n_actions = prestera_acl_rule_action_len(rule);
  1115		req->n_matches = prestera_acl_rule_match_len(rule);
  1116		req->hw_tc = prestera_acl_rule_hw_tc_get(rule);
  1117	
  1118		err = prestera_cmd_ret(sw, PRESTERA_CMD_TYPE_ACL_RULE_ADD,
  1119				       &req->cmd, size, &resp.ret, sizeof(resp));
  1120		if (err)
  1121			goto free_buff;
  1122	
  1123		*rule_id = resp.id;
  1124	free_buff:
  1125		kfree(buff);
  1126		return err;
  1127	}
  1128	

---
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" (37492 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ