[dpdk-dev] [PATCH v4 07/10] drivers/raw: introduce skeleton rawdev driver

Thomas Monjalon thomas at monjalon.net
Wed Jan 31 14:31:04 CET 2018


31/01/2018 14:20, Thomas Monjalon:
> 31/01/2018 10:13, Shreyansh Jain:
> > Skeleton rawdevice driver, on the lines of eventdev skeleton, is for
> > showcasing the rawdev library. This driver implements some of the
> > operations of the library based on which a test module can be
> > developed.
> > 
> > Design of skeleton involves a virtual device which is plugged into
> > VDEV bus on initialization.
> > 
> > Also, enable compilation of rawdev skeleton driver.
> > 
> > Signed-off-by: Shreyansh Jain <shreyansh.jain at nxp.com>
> > ---
> 
> It does not compile on 32-bit:
> 
> drivers/raw/skeleton_rawdev/skeleton_rawdev.h:13:51: error:
> 	format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t {aka long long unsigned int}’ [-Werror=format=]
>   rte_log(RTE_LOG_ ## level, skeleton_pmd_logtype, "%s(): " fmt "\n", \

Fixed when applying:

--- a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c
+++ b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c
@@ -7,6 +7,7 @@
 #include <stdbool.h>
 #include <errno.h>
 #include <stdint.h>
+#include <inttypes.h>
 #include <string.h>
 
 #include <rte_byteorder.h>
@@ -329,7 +330,7 @@ static int skeleton_rawdev_get_attr(struct rte_rawdev *dev,
                            SKELETON_ATTRIBUTE_NAME_MAX)) {
                        *attr_value = skeldev->attr[i].value;
                        done = 1;
-                       SKELETON_PMD_DEBUG("Attribute (%s) Value (%lu)",
+                       SKELETON_PMD_DEBUG("Attribute (%s) Value (%" PRIu64 ")",
                                           attr_name, *attr_value);
                        break;
                }



More information about the dev mailing list