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>] [day] [month] [year] [list]
Message-ID: <202105190343.vDjGkzB8-lkp@intel.com>
Date:   Wed, 19 May 2021 03:40:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     Qi Zhang <qi.z.zhang@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Tony Nguyen <anthony.l.nguyen@...el.com>,
        Jeff Guo <jia.guo@...el.com>, Yahui Cao <yahui.cao@...el.com>,
        Simei Su <simei.su@...el.com>,
        Beilei Xing <beilei.xing@...el.com>
Subject: include/linux/avf/virtchnl.h:833:33: error: enumerator value for
 'virtchnl_static_assert_virtchnl_proto_hdrs' is not an integer constant

Hi Qi,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: 1f7ea1cd6a3748427512ccc9582e18cd9efea966 ice: Enable FDIR Configure for AVF
date:   8 weeks ago
config: m68k-randconfig-r025-20210519 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1f7ea1cd6a3748427512ccc9582e18cd9efea966
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 1f7ea1cd6a3748427512ccc9582e18cd9efea966
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All error/warnings (new ones prefixed by >>):

   In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
                    from drivers/net/ethernet/intel/i40e/i40e.h:41,
                    from drivers/net/ethernet/intel/i40e/i40e_main.c:11:
>> include/linux/avf/virtchnl.h:150:36: warning: division by zero [-Wdiv-by-zero]
     150 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
         |                                    ^
   include/linux/avf/virtchnl.h:833:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
     833 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:833:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_proto_hdrs' is not an integer constant
     833 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
         |                                 ^~~~~~~~~~~~~~~~~~~
   include/linux/avf/virtchnl.h:150:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
     150 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
         |                                                     ^
>> include/linux/avf/virtchnl.h:150:36: warning: division by zero [-Wdiv-by-zero]
     150 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
         |                                    ^
   include/linux/avf/virtchnl.h:874:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
     874 | VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:874:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_fdir_rule' is not an integer constant
     874 | VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/avf/virtchnl.h:150:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
     150 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
         |                                                     ^
>> include/linux/avf/virtchnl.h:150:36: warning: division by zero [-Wdiv-by-zero]
     150 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
         |                                    ^
   include/linux/avf/virtchnl.h:928:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
     928 | VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:928:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_fdir_add' is not an integer constant
     928 | VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/avf/virtchnl.h:150:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
     150 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
         |                                                     ^


vim +/virtchnl_static_assert_virtchnl_proto_hdrs +833 include/linux/avf/virtchnl.h

   832	
 > 833	VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
   834	
   835	/* action configuration for FDIR */
   836	struct virtchnl_filter_action {
   837		enum virtchnl_action type;
   838		union {
   839			/* used for queue and qgroup action */
   840			struct {
   841				u16 index;
   842				u8 region;
   843			} queue;
   844			/* used for count action */
   845			struct {
   846				/* share counter ID with other flow rules */
   847				u8 shared;
   848				u32 id; /* counter ID */
   849			} count;
   850			/* used for mark action */
   851			u32 mark_id;
   852			u8 reserve[32];
   853		} act_conf;
   854	};
   855	
   856	VIRTCHNL_CHECK_STRUCT_LEN(36, virtchnl_filter_action);
   857	
   858	#define VIRTCHNL_MAX_NUM_ACTIONS  8
   859	
   860	struct virtchnl_filter_action_set {
   861		/* action number must be less then VIRTCHNL_MAX_NUM_ACTIONS */
   862		int count;
   863		struct virtchnl_filter_action actions[VIRTCHNL_MAX_NUM_ACTIONS];
   864	};
   865	
   866	VIRTCHNL_CHECK_STRUCT_LEN(292, virtchnl_filter_action_set);
   867	
   868	/* pattern and action for FDIR rule */
   869	struct virtchnl_fdir_rule {
   870		struct virtchnl_proto_hdrs proto_hdrs;
   871		struct virtchnl_filter_action_set action_set;
   872	};
   873	
 > 874	VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);
   875	
   876	/* Status returned to VF after VF requests FDIR commands
   877	 * VIRTCHNL_FDIR_SUCCESS
   878	 * VF FDIR related request is successfully done by PF
   879	 * The request can be OP_ADD/DEL.
   880	 *
   881	 * VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE
   882	 * OP_ADD_FDIR_FILTER request is failed due to no Hardware resource.
   883	 *
   884	 * VIRTCHNL_FDIR_FAILURE_RULE_EXIST
   885	 * OP_ADD_FDIR_FILTER request is failed due to the rule is already existed.
   886	 *
   887	 * VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT
   888	 * OP_ADD_FDIR_FILTER request is failed due to conflict with existing rule.
   889	 *
   890	 * VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST
   891	 * OP_DEL_FDIR_FILTER request is failed due to this rule doesn't exist.
   892	 *
   893	 * VIRTCHNL_FDIR_FAILURE_RULE_INVALID
   894	 * OP_ADD_FDIR_FILTER request is failed due to parameters validation
   895	 * or HW doesn't support.
   896	 *
   897	 * VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT
   898	 * OP_ADD/DEL_FDIR_FILTER request is failed due to timing out
   899	 * for programming.
   900	 */
   901	enum virtchnl_fdir_prgm_status {
   902		VIRTCHNL_FDIR_SUCCESS = 0,
   903		VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE,
   904		VIRTCHNL_FDIR_FAILURE_RULE_EXIST,
   905		VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT,
   906		VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST,
   907		VIRTCHNL_FDIR_FAILURE_RULE_INVALID,
   908		VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT,
   909	};
   910	
   911	/* VIRTCHNL_OP_ADD_FDIR_FILTER
   912	 * VF sends this request to PF by filling out vsi_id,
   913	 * validate_only and rule_cfg. PF will return flow_id
   914	 * if the request is successfully done and return add_status to VF.
   915	 */
   916	struct virtchnl_fdir_add {
   917		u16 vsi_id;  /* INPUT */
   918		/*
   919		 * 1 for validating a fdir rule, 0 for creating a fdir rule.
   920		 * Validate and create share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.
   921		 */
   922		u16 validate_only; /* INPUT */
   923		u32 flow_id;       /* OUTPUT */
   924		struct virtchnl_fdir_rule rule_cfg; /* INPUT */
   925		enum virtchnl_fdir_prgm_status status; /* OUTPUT */
   926	};
   927	
 > 928	VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);
   929	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ