Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vadym Kochan <vadym.kochan@plvision.eu>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
	Serhiy Boiko <serhiy.boiko@plvision.eu>,
	Volodymyr Mytnyk <volodymyr.mytnyk@plvision.eu>,
	Taras Chornyi <taras.chornyi@plvision.eu>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 4/4] net: marvell: prestera: Offload FLOW_ACTION_POLICE
Date: Sat, 31 Jul 2021 07:35:16 +0800	[thread overview]
Message-ID: <202107310747.VeWeGgQk-lkp@intel.com> (raw)
In-Reply-To: <20210730133925.18851-5-vadym.kochan@plvision.eu>

[-- Attachment #1: Type: text/plain, Size: 11280 bytes --]

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: s390-randconfig-r032-20210730 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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 s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # 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=clang make.cross ARCH=s390 

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 drivers/net/ethernet/marvell/prestera/prestera_hw.c:4:
   In file included from include/linux/etherdevice.h:20:
   In file included from include/linux/if_ether.h:19:
   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/s390/include/asm/io.h:75:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
                                                             ^
   include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
   #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
                                                        ^
   In file included from drivers/net/ethernet/marvell/prestera/prestera_hw.c:4:
   In file included from include/linux/etherdevice.h:20:
   In file included from include/linux/if_ether.h:19:
   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/s390/include/asm/io.h:75:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
   #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                        ^
   In file included from drivers/net/ethernet/marvell/prestera/prestera_hw.c:4:
   In file included from include/linux/etherdevice.h:20:
   In file included from include/linux/if_ether.h:19:
   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/s390/include/asm/io.h:75:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
>> drivers/net/ethernet/marvell/prestera/prestera_hw.c:1020:5: warning: no previous prototype for function '__prestera_hw_acl_rule_add' [-Wmissing-prototypes]
   int __prestera_hw_acl_rule_add(struct prestera_switch *sw,
       ^
   drivers/net/ethernet/marvell/prestera/prestera_hw.c:1020:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __prestera_hw_acl_rule_add(struct prestera_switch *sw,
   ^
   static 
>> drivers/net/ethernet/marvell/prestera/prestera_hw.c:1074:5: warning: no previous prototype for function '__prestera_hw_acl_rule_ext_add' [-Wmissing-prototypes]
   int __prestera_hw_acl_rule_ext_add(struct prestera_switch *sw,
       ^
   drivers/net/ethernet/marvell/prestera/prestera_hw.c:1074:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __prestera_hw_acl_rule_ext_add(struct prestera_switch *sw,
   ^
   static 
   14 warnings generated.


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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35018 bytes --]

      parent reply	other threads:[~2021-07-30 23:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 13:39 [PATCH net-next 0/4] Marvell Prestera add policer support Vadym Kochan
2021-07-30 13:39 ` [PATCH net-next 1/4] net: marvell: prestera: do not fail if FW reply is bigger Vadym Kochan
2021-07-30 13:39 ` [PATCH net-next 2/4] net: marvell: prestera: turn FW supported versions into an array Vadym Kochan
2021-07-30 13:39 ` [PATCH net-next 3/4] net: sched: introduce __tc_classid_to_hwtc() helper Vadym Kochan
2021-07-30 13:39 ` [PATCH net-next 4/4] net: marvell: prestera: Offload FLOW_ACTION_POLICE Vadym Kochan
2021-07-30 17:02   ` Jakub Kicinski
2021-07-30 21:10   ` kernel test robot
2021-07-30 23:35   ` kernel test robot [this message]

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=202107310747.VeWeGgQk-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=serhiy.boiko@plvision.eu \
    --cc=taras.chornyi@plvision.eu \
    --cc=vadym.kochan@plvision.eu \
    --cc=volodymyr.mytnyk@plvision.eu \
    --cc=xiyou.wangcong@gmail.com \
    --subject='Re: [PATCH net-next 4/4] net: marvell: prestera: Offload FLOW_ACTION_POLICE' \
    /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

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