History log of /dpdk/drivers/raw/skeleton/skeleton_rawdev.c (Results 1 – 10 of 10)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1, v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1, v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2
# eeded204 26-Apr-2021 David Marchand <[email protected]>

log: register with standardized names

Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new

log: register with standardized names

Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
used in a component. It is associated to the default name provided
by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
and then the passed name is appended to the default name,

RTE_LOG_REGISTER is left untouched for existing external users
and for components that do not comply with the convention.

There is a new Meson variable log_prefix to adapt the default name
for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.

Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5, regex/mlx5

$ git grep -l RTE_LOG_REGISTER drivers/ |
while read file; do
pattern=${file##drivers/};
class=${pattern%%/*};
pattern=${pattern#$class/};
drv=${pattern%%/*};
case "$class" in
baseband) pattern=pmd.bb.$drv;;
bus) pattern=bus.$drv;;
mempool) pattern=mempool.$drv;;
*) pattern=pmd.$class.$drv;;
esac
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done

$ git grep -l RTE_LOG_REGISTER lib/ |
while read file; do
pattern=${file##lib/};
pattern=lib.${pattern%%/*};
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
done

Signed-off-by: David Marchand <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Bruce Richardson <[email protected]>

show more ...


Revision tags: v21.05-rc1
# b1641987 06-Apr-2021 Thomas Monjalon <[email protected]>

drivers: align log names

The log levels are configured by using the name of the logs.
Some drivers are aligned to follow a common log name standard:
pmd.class.driver[.sub]
Some "common" drivers ski

drivers: align log names

The log levels are configured by using the name of the logs.
Some drivers are aligned to follow a common log name standard:
pmd.class.driver[.sub]
Some "common" drivers skip the "class" part:
pmd.driver.sub

Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Rosen Xu <[email protected]>
Acked-by: Xiao Wang <[email protected]>
Acked-by: Hemant Agrawal <[email protected]>
Acked-by: Ajit Khaparde <[email protected]>
Acked-by: Min Hu (Connor) <[email protected]>

show more ...


Revision tags: v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2, v21.02-rc1, v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2, v20.11-rc1
# e640362b 21-Sep-2020 Lukasz Wojciechowski <[email protected]>

raw/skeleton: allow closing already closed device

This patch return OK code (0) from skeleton_rawdev_close function
if firmware is in SKELETON_FW_READY state. Formerly it returned
-EINVAL error code

raw/skeleton: allow closing already closed device

This patch return OK code (0) from skeleton_rawdev_close function
if firmware is in SKELETON_FW_READY state. Formerly it returned
-EINVAL error code.

Returning an error here is troublesome as it disallows proper release
of the rawdev. The rte_rawdev_pmd_release function from librte_rawdev
library calls drivers' rawdev_close handler and continues execution
only in case of errorless call.
(see lib/librte_rawdev/rte_rawdev.c:540)

The SKELETON_FW_READY state is reached after creation, reset, unload
or close of the device. The device should be ok to be released in
such situations.

To reproduce issue fixed by this patch, call rawdev_autotest
from dpdk-test app for few times. As the device is not properly
released, the next calls will fail.

Fixes: 61c592a8d035 ("raw/skeleton: introduce skeleton rawdev driver")
Cc: [email protected]

Signed-off-by: Lukasz Wojciechowski <[email protected]>

show more ...


# 13f8e4a2 10-Sep-2020 Bruce Richardson <[email protected]>

rawdev: allow queue config query to return error

The driver APIs for returning the queue default config can fail if the
parameters are invalid, or other reasons, so allow them to return error
codes

rawdev: allow queue config query to return error

The driver APIs for returning the queue default config can fail if the
parameters are invalid, or other reasons, so allow them to return error
codes to the rawdev layer and from hence to the app.

Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Nipun Gupta <[email protected]>

show more ...


# f574ed81 10-Sep-2020 Bruce Richardson <[email protected]>

rawdev: add private data size to queue config inputs

The queue setup and queue defaults query functions take a void * parameter
as configuration data, preventing any compile-time checking of the
par

rawdev: add private data size to queue config inputs

The queue setup and queue defaults query functions take a void * parameter
as configuration data, preventing any compile-time checking of the
parameters and limiting runtime checks. Adding in the length of the
expected structure provides a measure of typechecking, and can also be used
for ABI compatibility in future, since ABI changes involving structs almost
always involve a change in size.

Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Nipun Gupta <[email protected]>

show more ...


# 8db9dce7 10-Sep-2020 Bruce Richardson <[email protected]>

rawdev: add private data size to config inputs

Currently with the rawdev API there is no way to check that the structure
passed in via the dev_private pointer in the structure passed to configure
AP

rawdev: add private data size to config inputs

Currently with the rawdev API there is no way to check that the structure
passed in via the dev_private pointer in the structure passed to configure
API is of the correct type - it's just checked that it is non-NULL. Adding
in the length of the expected structure provides a measure of typechecking,
and can also be used for ABI compatibility in future, since ABI changes
involving structs almost always involve a change in size.

Signed-off-by: Bruce Richardson <[email protected]>
Reviewed-by: Rosen Xu <[email protected]>
Acked-by: Nipun Gupta <[email protected]>

show more ...


# f150dd88 10-Sep-2020 Bruce Richardson <[email protected]>

rawdev: allow drivers to return error from info query

Since we now allow some parameter checking inside the driver info_get()
functions, it makes sense to allow error return from those functions to

rawdev: allow drivers to return error from info query

Since we now allow some parameter checking inside the driver info_get()
functions, it makes sense to allow error return from those functions to the
caller. Therefore we change the driver callback return type from void to
int.

Signed-off-by: Bruce Richardson <[email protected]>
Reviewed-by: Rosen Xu <[email protected]>
Acked-by: Nipun Gupta <[email protected]>

show more ...


# 10b71cae 10-Sep-2020 Bruce Richardson <[email protected]>

rawdev: add private data size to info query

Currently with the rawdev API there is no way to check that the structure
passed in via the dev_private pointer in the dev_info structure is of the
correc

rawdev: add private data size to info query

Currently with the rawdev API there is no way to check that the structure
passed in via the dev_private pointer in the dev_info structure is of the
correct type - it's just checked that it is non-NULL. Adding in the length
of the expected structure provides a measure of typechecking, and can also
be used for ABI compatibility in future, since ABI changes involving
structs almost always involve a change in size.

Signed-off-by: Bruce Richardson <[email protected]>
Reviewed-by: Rosen Xu <[email protected]>
Acked-by: Rosen Xu <[email protected]>
Acked-by: Nipun Gupta <[email protected]>

show more ...


Revision tags: v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2, v20.08-rc1
# 9c99878a 01-Jul-2020 Jerin Jacob <[email protected]>

log: introduce logtype register macro

Introduce the RTE_LOG_REGISTER macro to avoid the code duplication
in the logtype registration process.

It is a wrapper macro for declaring the logtype, regist

log: introduce logtype register macro

Introduce the RTE_LOG_REGISTER macro to avoid the code duplication
in the logtype registration process.

It is a wrapper macro for declaring the logtype, registering it and
setting its level in the constructor context.

Signed-off-by: Jerin Jacob <[email protected]>
Acked-by: Adam Dybkowski <[email protected]>
Acked-by: Sachin Saxena <[email protected]>
Acked-by: Akhil Goyal <[email protected]>

show more ...


Revision tags: v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3, v20.02-rc2, v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2, v19.11-rc1, v19.08, v19.08-rc4, v19.08-rc3, v19.08-rc2, v19.08-rc1
# 473c88f9 05-Jul-2019 Bruce Richardson <[email protected]>

drivers/raw: remove rawdev from directory names

The ifpga and skeleton rawdev drivers included "rawdev" in their directory
names, which was superfluous given that they were in the drivers/raw
direct

drivers/raw: remove rawdev from directory names

The ifpga and skeleton rawdev drivers included "rawdev" in their directory
names, which was superfluous given that they were in the drivers/raw
directory. Shorten the names via this patch.

For meson builds, this will rename the final library .so/.a files
produced, but those will be renamed again later via a patch to
standardize rawdev names.

Signed-off-by: Bruce Richardson <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>

show more ...