#
eeded204 |
| 26-Apr-2021 |
David Marchand <david.marchand@redhat.com> |
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 <david.marchand@redhat.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
978bb0b3 |
| 29-Apr-2021 |
Wei Huang <wei.huang@intel.com> |
raw/ifpga: fix device name format
The device name format used in ifpga_rawdev_create() was changed to "IFPGA:%02x:%02x.%x", but the format used in ifpga_rawdev_destroy() was left as "IFPGA:%x:%02x.%
raw/ifpga: fix device name format
The device name format used in ifpga_rawdev_create() was changed to "IFPGA:%02x:%02x.%x", but the format used in ifpga_rawdev_destroy() was left as "IFPGA:%x:%02x.%x", it should be changed synchronously.
To prevent further similar errors, macro "IFPGA_RAWDEV_NAME_FMT" is defined to replace this format string.
Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree") Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com> Acked-by: Tianfei Zhang <tianfei.zhang@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
9734f50e |
| 17-Apr-2021 |
Chengwen Feng <fengchengwen@huawei.com> |
raw/ifpga: set monitor thread name
This patch supports set monitor thread name which is helpful for debugging.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Min Hu (Connor)
raw/ifpga: set monitor thread name
This patch supports set monitor thread name which is helpful for debugging.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
show more ...
|
#
b1641987 |
| 06-Apr-2021 |
Thomas Monjalon <thomas@monjalon.net> |
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 <thomas@monjalon.net> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Xiao Wang <xiao.w.wang@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Min Hu (Connor) <humin29@huawei.com>
show more ...
|
#
f724a802 |
| 03-Mar-2021 |
Wei Huang <wei.huang@intel.com> |
raw/ifpga: add miscellaneous APIs
Below miscellaneous APIs are used to implement OPAE application. 1. rte_pmd_ifpga_get_pci_bus() get PCI bus ifpga driver registered. 2. rte_pmd_ifpga_partial_reconf
raw/ifpga: add miscellaneous APIs
Below miscellaneous APIs are used to implement OPAE application. 1. rte_pmd_ifpga_get_pci_bus() get PCI bus ifpga driver registered. 2. rte_pmd_ifpga_partial_reconfigure() do partial reconfiguration. 3. rte_pmd_ifpga_cleanup() free software resources allocated by driver. 4. rte_pmd_ifpga_set_rsu_status() set status of rsu process.
Signed-off-by: Wei Huang <wei.huang@intel.com> Acked-by: Tianfei Zhang <tianfei.zhang@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
ceccbcd7 |
| 30-Oct-2020 |
Wei Huang <wei.huang@intel.com> |
raw/ifpga: use trusted buffer to free
In rte_fpga_do_pr, calling function read() may taints argument buffer which turn to an untrusted value as argument of rte_free().
Coverity issue: 279449 Fixes:
raw/ifpga: use trusted buffer to free
In rte_fpga_do_pr, calling function read() may taints argument buffer which turn to an untrusted value as argument of rte_free().
Coverity issue: 279449 Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver") Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
show more ...
|
#
5a906909 |
| 30-Oct-2020 |
Wei Huang <wei.huang@intel.com> |
raw/ifpga: terminate string filled by readlink with null
readlink() does not terminate string, add a null character at the end of the string if readlink() succeeds.
Coverity issue: 362820 Fixes: 9c
raw/ifpga: terminate string filled by readlink with null
readlink() does not terminate string, add a null character at the end of the string if readlink() succeeds.
Coverity issue: 362820 Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree") Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
show more ...
|
#
82255e03 |
| 23-Oct-2020 |
Wei Huang <wei.huang@intel.com> |
raw/ifpga/base: free resources when destroying device
Add two functions to complete the resource free work, one is 'ifpga_adapter_destroy()', the other is 'ifpga_bus_uinit()'.
Then call 'opae_adapt
raw/ifpga/base: free resources when destroying device
Add two functions to complete the resource free work, one is 'ifpga_adapter_destroy()', the other is 'ifpga_bus_uinit()'.
Then call 'opae_adapter_destroy()' and 'opae_adapter_data_free()' in 'ifpga_rawdev_close()' to free resources.
Also 'opae_adapter_free()' is removed from 'ifpga_rawdev_destroy()', because opae adapter is pointed by dev_private member in raw_dev, it will be freed in 'rte_rawdev_pmd_release()'.
Signed-off-by: Wei Huang <wei.huang@intel.com> Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
93824cad |
| 23-Oct-2020 |
Wei Huang <wei.huang@intel.com> |
raw/ifpga/base: fix return of IRQ unregister
Since 'rte_intr_callback_unregister()' can return positive value as success, but 'ifpga_rawdev_destroy()' handle it as an error.
Instead, only negative
raw/ifpga/base: fix return of IRQ unregister
Since 'rte_intr_callback_unregister()' can return positive value as success, but 'ifpga_rawdev_destroy()' handle it as an error.
Instead, only negative return is treated as failure.
Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions") Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com> Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
50957920 |
| 23-Oct-2020 |
Wei Huang <wei.huang@intel.com> |
raw/ifpga/base: handle unsupported interrupt type
Handle unsupported interrupt type requests properly, on unsupported interrupt case: 'ifpga_unregister_msix_irq()' returns success, 'ifpga_register_m
raw/ifpga/base: handle unsupported interrupt type
Handle unsupported interrupt type requests properly, on unsupported interrupt case: 'ifpga_unregister_msix_irq()' returns success, 'ifpga_register_msix_irq()' return failure.
Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions") Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com> Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
df016da7 |
| 23-Oct-2020 |
Wei Huang <wei.huang@intel.com> |
raw/ifpga/base: fix interrupt handler instance usage
Interrupt handler copied to the local 'intr_handle' variable by value before passing it to IRQ functions. This leads IRQ functions update the loc
raw/ifpga/base: fix interrupt handler instance usage
Interrupt handler copied to the local 'intr_handle' variable by value before passing it to IRQ functions. This leads IRQ functions update the local variable instead of 'ifpga_irq_handle'.
Instead, using 'intr_handle' local variable as pointer to 'ifpga_irq_handle' as intended.
Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions") Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com> Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com>
show more ...
|
#
e00d2b4c |
| 25-Sep-2020 |
Manish Chopra <manishc@marvell.com> |
bus/pci: query PCI extended capabilities
By adding generic API, this patch removes individual functions/defines implemented by drivers to find extended PCI capabilities.
Signed-off-by: Manish Chopr
bus/pci: query PCI extended capabilities
By adding generic API, this patch removes individual functions/defines implemented by drivers to find extended PCI capabilities.
Signed-off-by: Manish Chopra <manishc@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Reviewed-by: Gaetan Rivet <grive@u256.net> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
show more ...
|
#
8db9dce7 |
| 10-Sep-2020 |
Bruce Richardson <bruce.richardson@intel.com> |
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 <bruce.richardson@intel.com> Reviewed-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
show more ...
|
#
f150dd88 |
| 10-Sep-2020 |
Bruce Richardson <bruce.richardson@intel.com> |
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 <bruce.richardson@intel.com> Reviewed-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
show more ...
|
#
10b71cae |
| 10-Sep-2020 |
Bruce Richardson <bruce.richardson@intel.com> |
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 <bruce.richardson@intel.com> Reviewed-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
show more ...
|
#
9c99878a |
| 01-Jul-2020 |
Jerin Jacob <jerinj@marvell.com> |
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 <jerinj@marvell.com> Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com> Acked-by: Sachin Saxena <sachin.saxena@nxp.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
show more ...
|
#
e0a1aafe |
| 14-Nov-2019 |
Tianfei Zhang <tianfei.zhang@intel.com> |
raw/ifpga: introduce IRQ functions
Introducing new register and unregister API for ifpga interrupt. 1. register FME and AFU interrupt ifpga_register_msix_irq()
2. unregister FME and AFU interrup
raw/ifpga: introduce IRQ functions
Introducing new register and unregister API for ifpga interrupt. 1. register FME and AFU interrupt ifpga_register_msix_irq()
2. unregister FME and AFU interrupt ifpga_unregister_msix_irq()
On PAC N3000 card, there is one PCIe MSIX interrupt for FME management, like the error report, thermal management, we use this interrupt in ifpga_rawdev device driver. on the other hand, there are about 4 PCIe MSIX interrupts are reserved for AFU which end-user can use those interrupts in their AFU logic design. End-user can use those APIs to register interrupt handler in their AFU drivers.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
show more ...
|
#
4a19f891 |
| 14-Nov-2019 |
Tianfei Zhang <tianfei.zhang@intel.com> |
raw/ifpga/base: support multiple cards
In PAC N3000 card, there is one MAX10 chip in each card, and all of the sensors are connected to MAX10 chip. To support multiple cards in one server, we introd
raw/ifpga/base: support multiple cards
In PAC N3000 card, there is one MAX10 chip in each card, and all of the sensors are connected to MAX10 chip. To support multiple cards in one server, we introducing a sensor device list under intel_max10_device instead of a global list. On the other hand, we using separate intel_max10_device instance for each opae_adatper.
Add mutex lock on do_transaction() function for SPI driver to avoid race condition.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
show more ...
|
#
e21346c4 |
| 14-Nov-2019 |
Andy Pei <andy.pei@intel.com> |
raw/ifpga: support lightweight FPGA image
if fpga image support lightweight feature, set afu uuid to all 0, ipn3ke representor will not be probed.
Signed-off-by: Andy Pei <andy.pei@intel.com>
|
#
4858f8a5 |
| 14-Nov-2019 |
Tianfei Zhang <tianfei.zhang@intel.com> |
raw/ifpga/base: clean FME errors
Clean fme errors register when some fme errors occurred.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
|
#
8418c928 |
| 14-Nov-2019 |
Rosen Xu <rosen.xu@intel.com> |
net/ipn3ke: remove configuration for i40e port bonding
The ipn3ke board FPGA and i40e BDF scan has added in ifpga_rawdev, so it doesn't need to provide configuration for i40e port bonding.
Signed-o
net/ipn3ke: remove configuration for i40e port bonding
The ipn3ke board FPGA and i40e BDF scan has added in ifpga_rawdev, so it doesn't need to provide configuration for i40e port bonding.
Signed-off-by: Rosen Xu <rosen.xu@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
show more ...
|
#
9c006c45 |
| 14-Nov-2019 |
Rosen Xu <rosen.xu@intel.com> |
raw/ifpga: scan PCIe BDF device tree
Add PCIe BDF devices tree scan for ipn3ke.
Signed-off-by: Rosen Xu <rosen.xu@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
|
#
82ce05d8 |
| 14-Nov-2019 |
Rosen Xu <rosen.xu@intel.com> |
raw/ifpga: add SEU error handler
Add SEU interrupt support for FPGA.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Rosen Xu <rosen.xu@intel.com> Signed-off-by: Andy Pei <and
raw/ifpga: add SEU error handler
Add SEU interrupt support for FPGA.
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> Signed-off-by: Rosen Xu <rosen.xu@intel.com> Signed-off-by: Andy Pei <andy.pei@intel.com>
show more ...
|
#
8ac35916 |
| 12-Aug-2019 |
David Marchand <david.marchand@redhat.com> |
remove useless include of EAL memory config header
Restrict this header inclusion to its real users.
Fixes: 028669bc9f0d ("eal: hide shared memory config") Cc: stable@dpdk.org
Signed-off-by: David
remove useless include of EAL memory config header
Restrict this header inclusion to its real users.
Fixes: 028669bc9f0d ("eal: hide shared memory config") Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
473c88f9 |
| 05-Jul-2019 |
Bruce Richardson <bruce.richardson@intel.com> |
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 <bruce.richardson@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
show more ...
|