git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common/sfc_efx/base: support getting virtq doorbell offset
[dpdk.git]
/
drivers
/
raw
/
skeleton
/
skeleton_rawdev.c
diff --git
a/drivers/raw/skeleton/skeleton_rawdev.c
b/drivers/raw/skeleton/skeleton_rawdev.c
index
531d045
..
aa3beaa
100644
(file)
--- a/
drivers/raw/skeleton/skeleton_rawdev.c
+++ b/
drivers/raw/skeleton/skeleton_rawdev.c
@@
-190,9
+190,11
@@
static int skeleton_rawdev_close(struct rte_rawdev *dev)
}
break;
case SKELETON_FW_READY:
}
break;
case SKELETON_FW_READY:
+ SKELETON_PMD_DEBUG("Device already in stopped state");
+ break;
case SKELETON_FW_ERROR:
default:
case SKELETON_FW_ERROR:
default:
- SKELETON_PMD_DEBUG("Device
already in stopped
state");
+ SKELETON_PMD_DEBUG("Device
in impossible
state");
ret = -EINVAL;
break;
}
ret = -EINVAL;
break;
}
@@
-220,17
+222,19
@@
static int skeleton_rawdev_reset(struct rte_rawdev *dev)
return 0;
}
return 0;
}
-static void skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev,
- uint16_t queue_id,
- rte_rawdev_obj_t queue_conf)
+static int skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev,
+ uint16_t queue_id,
+ rte_rawdev_obj_t queue_conf,
+ size_t conf_size)
{
struct skeleton_rawdev *skeldev;
struct skeleton_rawdev_queue *skelq;
SKELETON_PMD_FUNC_TRACE();
{
struct skeleton_rawdev *skeldev;
struct skeleton_rawdev_queue *skelq;
SKELETON_PMD_FUNC_TRACE();
- if (!dev || !queue_conf)
- return;
+ if (!dev || !queue_conf ||
+ conf_size != sizeof(struct skeleton_rawdev_queue))
+ return -EINVAL;
skeldev = skeleton_rawdev_get_priv(dev);
skelq = &skeldev->queues[queue_id];
skeldev = skeleton_rawdev_get_priv(dev);
skelq = &skeldev->queues[queue_id];
@@
-238,6
+242,8
@@
static void skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev,
if (queue_id < SKELETON_MAX_QUEUES)
rte_memcpy(queue_conf, skelq,
sizeof(struct skeleton_rawdev_queue));
if (queue_id < SKELETON_MAX_QUEUES)
rte_memcpy(queue_conf, skelq,
sizeof(struct skeleton_rawdev_queue));
+
+ return 0;
}
static void
}
static void
@@
-252,7
+258,8
@@
clear_queue_bufs(int queue_id)
static int skeleton_rawdev_queue_setup(struct rte_rawdev *dev,
uint16_t queue_id,
static int skeleton_rawdev_queue_setup(struct rte_rawdev *dev,
uint16_t queue_id,
- rte_rawdev_obj_t queue_conf)
+ rte_rawdev_obj_t queue_conf,
+ size_t conf_size)
{
int ret = 0;
struct skeleton_rawdev *skeldev;
{
int ret = 0;
struct skeleton_rawdev *skeldev;
@@
-260,7
+267,8
@@
static int skeleton_rawdev_queue_setup(struct rte_rawdev *dev,
SKELETON_PMD_FUNC_TRACE();
SKELETON_PMD_FUNC_TRACE();
- if (!dev || !queue_conf)
+ if (!dev || !queue_conf ||
+ conf_size != sizeof(struct skeleton_rawdev_queue))
return -EINVAL;
skeldev = skeleton_rawdev_get_priv(dev);
return -EINVAL;
skeldev = skeleton_rawdev_get_priv(dev);