DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Michal Krawczyk <mk@semihalf.com>, dev@dpdk.org
Cc: gtzalik@amazon.com, mw@semihalf.com, matua@amazon.com,
	mba@semihalf.com, igorch@amazon.com
Subject: Re: [dpdk-dev] [PATCH 1/2] net/ena: upgrade HAL for new HW features
Date: Thu, 9 Jan 2020 14:30:03 +0000	[thread overview]
Message-ID: <5605ef14-eb5b-e6d1-c224-fc4d2fa532ca@intel.com> (raw)
In-Reply-To: <20191213133216.23572-2-mk@semihalf.com>

On 12/13/2019 1:32 PM, Michal Krawczyk wrote:
> This version of the HAL allows to use the latest HW features, like
> rx offsets.
> 
> Driver was adjusted to the new version to fix the build.
> 
> Signed-off-by: Michal Krawczyk <mk@semihalf.com>
> Signed-off-by: Maciej Bielski <mba@semihalf.com>

<...>

> @@ -2080,7 +2103,7 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *dev, void *data)
>  	struct ena_admin_aenq_entry *aenq_e;
>  	struct ena_admin_aenq_common_desc *aenq_common;
>  	struct ena_com_aenq *aenq  = &dev->aenq;
> -	unsigned long long timestamp;
> +	u64 timestamp;
>  	ena_aenq_handler handler_cb;
>  	u16 masked_head, processed = 0;
>  	u8 phase;
> @@ -2098,8 +2121,8 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *dev, void *data)
>  		 */
>  		dma_rmb();
>  
> -		timestamp = (unsigned long long)aenq_common->timestamp_low |
> -			((unsigned long long)aenq_common->timestamp_high << 32);
> +		timestamp = (u64)aenq_common->timestamp_low |
> +			((u64)aenq_common->timestamp_high << 32);
>  		ENA_TOUCH(timestamp); /* In case debug is disabled */
>  		ena_trc_dbg("AENQ! Group[%x] Syndrom[%x] timestamp: [%llus]\n",
>  			    aenq_common->group,

'u64 timestamp' is causing the build error when debug is enabled [1], and
because of fixed sized storage type (u64) you need to use PRIx64 as format
identifier to make sure it is correct for both 32-bits and 64-bits.

[1]
.../drivers/net/ena/base/ena_com.c:2130:8: error: format specifies type
'unsigned long long' but the argument has type 'u64' (aka 'unsigned long')
[-Werror,-Wformat]
                            timestamp);
                            ^~~~~~~~~
.../drivers/net/ena/base/ena_plat_dpdk.h:108:66: note: expanded from macro
'ena_trc_dbg'
#define ena_trc_dbg(format, arg...)     ena_trc_log(DEBUG, format, ##arg)
                                                           ~~~~~~    ^~~
.../drivers/net/ena/base/ena_plat_dpdk.h:106:36: note: expanded from macro
'ena_trc_log'
                "[ENA_COM: %s]" fmt, __func__, ##arg)
                                ~~~              ^~~

  parent reply	other threads:[~2020-01-09 14:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 13:32 [dpdk-dev] [PATCH 0/2] net/ena: add support for Rx offsets Michal Krawczyk
2019-12-13 13:32 ` [dpdk-dev] [PATCH 1/2] net/ena: upgrade HAL for new HW features Michal Krawczyk
2019-12-13 16:34   ` Stephen Hemminger
2019-12-13 20:01     ` Michał Krawczyk
2020-01-09 14:27       ` Ferruh Yigit
2020-01-09 15:26         ` Michał Krawczyk
2020-01-09 14:30   ` Ferruh Yigit [this message]
2020-01-09 15:39     ` [dpdk-dev] [PATCH v2 " Michal Krawczyk
2020-01-10  9:04       ` Ferruh Yigit
2020-01-10  9:39         ` Michał Krawczyk
2020-01-10 10:32       ` Ferruh Yigit
2019-12-13 13:32 ` [dpdk-dev] [PATCH 2/2] net/ena: add support for RX_OFFSET feature Michal Krawczyk
2020-01-10 10:32   ` Ferruh Yigit

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=5605ef14-eb5b-e6d1-c224-fc4d2fa532ca@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=gtzalik@amazon.com \
    --cc=igorch@amazon.com \
    --cc=matua@amazon.com \
    --cc=mba@semihalf.com \
    --cc=mk@semihalf.com \
    --cc=mw@semihalf.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).