netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, Alice Michael <alice.michael@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jeffrey.t.kirsher@intel.com, Alan Brady <Alan.Brady@intel.com>,
	Phani Burra <phani.r.burra@intel.com>,
	Joshua Hay <joshua.a.hay@intel.com>,
	Madhu Chittim <madhu.chittim@intel.com>,
	Pavan Kumar Linga <Pavan.Kumar.Linga@intel.com>,
	Donald Skidmore <donald.c.skidmore@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>
Subject: Re: [net-next v5 01/15] virtchnl: Extend AVF ops
Date: Mon, 24 Aug 2020 12:42:31 -0700	[thread overview]
Message-ID: <20200824124231.61c1a04f@kicinski-fedora-PC1C0HJN> (raw)
In-Reply-To: <20200824173306.3178343-2-anthony.l.nguyen@intel.com>

On Mon, 24 Aug 2020 10:32:52 -0700 Tony Nguyen wrote:
> +struct virtchnl_rss_hash {
> +	u64 hash;
> +	u16 vport_id;
> +};
> +
> +VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);

I've added 32bit builds to my local setup since v4 was posted - 
looks like there's a number of errors here. You can't assume u64 
forces a 64bit alignment. Best to specify the padding explicitly.

FWIW these are the errors I got but there may be more:

In file included from ../drivers/net/ethernet/intel/ice/ice.h:37,
                 from ../drivers/net/ethernet/intel/ice/ice_common.h:7,
                 from ../drivers/net/ethernet/intel/ice/ice_sched.h:7,
                 from ../drivers/net/ethernet/intel/ice/ice_sched.c:4:
../include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                    ^
../include/linux/avf/virtchnl.h:809:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:809:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_get_capabilities’ is not an integer constant
  809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:175:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                                     ^
../include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                    ^
../include/linux/avf/virtchnl.h:891:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:891:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_txq_info_v2’ is not an integer constant
  891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
      |                               ^~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:175:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                                     ^
../include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                    ^
../include/linux/avf/virtchnl.h:907:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:907:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_config_tx_queues’ is not an integer constant
  907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:175:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                                     ^
../include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                    ^
../include/linux/avf/virtchnl.h:937:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:937:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_rxq_info_v2’ is not an integer constant
  937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
      |                               ^~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:175:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                                     ^
../include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                    ^
../include/linux/avf/virtchnl.h:952:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:952:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_config_rx_queues’ is not an integer constant
  952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:175:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                                     ^
../include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
      |                                    ^
../include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
 1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:1090:31: error: enumerator value for ‘virtchnl_static_assert_virtchnl_rss_hash’ is not an integer constant
 1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
      |                               ^~~~~~~~~~~~~~~~~
../include/linux/avf/virtchnl.h:175:53: note: in definition of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’
  175 |  { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }

  reply	other threads:[~2020-08-24 19:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24 17:32 [net-next v5 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2020-08-24 Tony Nguyen
2020-08-24 17:32 ` [net-next v5 01/15] virtchnl: Extend AVF ops Tony Nguyen
2020-08-24 19:42   ` Jakub Kicinski [this message]
2020-08-27 17:16     ` Brady, Alan
2020-09-10 21:06       ` Brady, Alan
2020-09-11 15:08         ` Jakub Kicinski
2020-08-24 17:32 ` [net-next v5 02/15] iecm: Add framework set of header files Tony Nguyen
2020-08-24 17:32 ` [net-next v5 03/15] iecm: Add TX/RX " Tony Nguyen
2020-08-24 17:32 ` [net-next v5 04/15] iecm: Common module introduction and function stubs Tony Nguyen
2020-08-24 20:41   ` Jakub Kicinski
2020-08-27 17:18     ` Brady, Alan
2020-08-24 17:32 ` [net-next v5 05/15] iecm: Add basic netdevice functionality Tony Nguyen
2020-08-24 17:32 ` [net-next v5 06/15] iecm: Implement mailbox functionality Tony Nguyen
2020-08-24 20:35   ` Brady, Alan
2020-08-24 20:40     ` Jakub Kicinski
2020-08-24 17:32 ` [net-next v5 07/15] iecm: Implement virtchnl commands Tony Nguyen
2020-08-24 17:32 ` [net-next v5 08/15] iecm: Implement vector allocation Tony Nguyen
2020-08-24 20:41   ` Jakub Kicinski
2020-08-27 17:28     ` Brady, Alan
2020-08-27 18:19       ` Jakub Kicinski
2020-08-24 17:33 ` [net-next v5 09/15] iecm: Init and allocate vport Tony Nguyen
2020-08-24 17:33 ` [net-next v5 10/15] iecm: Deinit vport Tony Nguyen
2020-08-24 17:33 ` [net-next v5 11/15] iecm: Add splitq TX/RX Tony Nguyen
2020-08-24 20:40   ` Jakub Kicinski
2020-08-27 17:17     ` Brady, Alan
2020-08-24 17:33 ` [net-next v5 12/15] iecm: Add singleq TX/RX Tony Nguyen
2020-08-24 17:33 ` [net-next v5 13/15] iecm: Add ethtool Tony Nguyen
2020-08-24 21:44   ` Michal Kubecek
2020-08-27 17:29     ` Brady, Alan
2020-08-24 17:33 ` [net-next v5 14/15] iecm: Add iecm to the kernel build system Tony Nguyen
2020-08-24 17:33 ` [net-next v5 15/15] idpf: Introduce idpf driver Tony Nguyen

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=20200824124231.61c1a04f@kicinski-fedora-PC1C0HJN \
    --to=kuba@kernel.org \
    --cc=Alan.Brady@intel.com \
    --cc=Pavan.Kumar.Linga@intel.com \
    --cc=alice.michael@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=donald.c.skidmore@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=joshua.a.hay@intel.com \
    --cc=madhu.chittim@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=phani.r.burra@intel.com \
    --cc=sassmann@redhat.com \
    --cc=sridhar.samudrala@intel.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).