| 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 ...
|
| 403f21fe | 21-Apr-2021 |
Chengwen Feng <[email protected]> |
raw/ntb: check memory allocations
This patch adds checking for rte_zmalloc() result when init Intel ntb device, also fix the same bug when start ntb device.
Fixes: 034c328eb025 ("raw/ntb: support I
raw/ntb: check memory allocations
This patch adds checking for rte_zmalloc() result when init Intel ntb device, also fix the same bug when start ntb device.
Fixes: 034c328eb025 ("raw/ntb: support Intel NTB") Fixes: c39d1e082a4b ("raw/ntb: setup queues") Cc: [email protected]
Signed-off-by: Chengwen Feng <[email protected]> Signed-off-by: Min Hu (Connor) <[email protected]> Acked-by: Xiaoyun Li <[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 ...
|
| 86083fcc | 26-Sep-2019 |
Xiaoyun Li <[email protected]> |
raw/ntb: support xstats
Add xstats support for NTB rawdev. Support tx-packets, tx-bytes, tx-errors and rx-packets, rx-bytes, rx-missed.
Signed-off-by: Xiaoyun Li <[email protected]> Acked-by: Ji
raw/ntb: support xstats
Add xstats support for NTB rawdev. Support tx-packets, tx-bytes, tx-errors and rx-packets, rx-bytes, rx-missed.
Signed-off-by: Xiaoyun Li <[email protected]> Acked-by: Jingjing Wu <[email protected]>
show more ...
|