[dpdk-dev] [PATCH v4 30/32] net/ice: support basic RX/TX

Ferruh Yigit ferruh.yigit at intel.com
Fri Dec 14 14:00:15 CET 2018


On 12/14/2018 8:35 AM, Wenzhuo Lu wrote:
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> Signed-off-by: Qiming Yang <qiming.yang at intel.com>
> Signed-off-by: Xiaoyun Li <xiaoyun.li at intel.com>
> Signed-off-by: Jingjing Wu <jingjing.wu at intel.com>

<...>

> +
> +	/* Check to make sure the last descriptor to clean is done */
> +	desc_to_clean_to = sw_ring[desc_to_clean_to].last_id;
> +	if (!(txd[desc_to_clean_to].cmd_type_offset_bsz &
> +	    rte_cpu_to_le_64(ICE_TX_DESC_DTYPE_DESC_DONE))) {
> +		PMD_TX_FREE_LOG(DEBUG, "TX descriptor %4u is not done "
> +				"(port=%d queue=%d) value=0x%lx\n",
> +				desc_to_clean_to,
> +				txq->port_id, txq->queue_id,
> +				txd[desc_to_clean_to].cmd_type_offset_bsz);

Causing build error for i686 [1], should use PRIx64 for 64bit variables.

Perhaps we should create a rule in checkpatch to check and warn %lx %lu formats
`git grep -n '%l[xud]' drivers/net/ice/` shows only this occurrence in 'ice' but
there are more in other drivers...


[1]
In file included from .../i686-native-linuxapp-gcc/include/rte_ethdev.h:150,
                 from .../i686-native-linuxapp-gcc/include/rte_ethdev_driver.h:18,
                 from .../drivers/net/ice/ice_lan_rxtx.c:5:
.../drivers/net/ice/ice_lan_rxtx.c: In function ‘ice_xmit_cleanup’:
.../drivers/net/ice/ice_lan_rxtx.c:1776:46: error: format ‘%lx’ expects argument
of type ‘long unsigned int’, but argument 8 has type ‘uint64_t’ {aka ‘volatile
long long unsigned int’} [-Werror=format=]
     txd[desc_to_clean_to].cmd_type_offset_bsz);
                                              ^
.../i686-native-linuxapp-gcc/include/rte_log.h:322:25: note: in definition of
macro ‘RTE_LOG’
    RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__)
                         ^
.../drivers/net/ice/ice_lan_rxtx.c:1772:3: note: in expansion of macro
‘PMD_TX_FREE_LOG’
   PMD_TX_FREE_LOG(DEBUG, "TX descriptor %4u is not done "
   ^~~~~~~~~~~~~~~


More information about the dev mailing list