[dpdk-dev,v4,07/10] drivers/raw: introduce skeleton rawdev driver
Checks
Commit Message
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@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:
@@ -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;
}