History log of /dpdk/drivers/bus/vdev/vdev.c (Results 1 – 25 of 36)
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
# f1f6ebc0 24-Aug-2021 William Tu <[email protected]>

eal: remove sys/queue.h from public headers

Currently there are some public headers that include 'sys/queue.h', which
is not POSIX, but usually provided by the Linux/BSD system library.
(Not in POSI

eal: remove sys/queue.h from public headers

Currently there are some public headers that include 'sys/queue.h', which
is not POSIX, but usually provided by the Linux/BSD system library.
(Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs.)
The file is missing on Windows. During the Windows build, DPDK uses a
bundled copy, so building a DPDK library works fine. But when OVS or other
applications use DPDK as a library, because some DPDK public headers
include 'sys/queue.h', on Windows, it triggers an error due to no such
file.

One solution is to install the 'lib/eal/windows/include/sys/queue.h' into
Windows environment, such as [1]. However, this means DPDK exports the
functionalities of 'sys/queue.h' into the environment, which might cause
symbols, macros, headers clashing with other applications.

The patch fixes it by removing the "#include <sys/queue.h>" from
DPDK public headers, so programs including DPDK headers don't depend
on the system to provide 'sys/queue.h'. When these public headers use
macros such as TAILQ_xxx, we replace it by the ones with RTE_ prefix.
For Windows, we copy the definitions from <sys/queue.h> to rte_os.h
in Windows EAL. Note that these RTE_ macros are compatible with
<sys/queue.h>, both at the level of API (to use with <sys/queue.h>
macros in C files) and ABI (to avoid breaking it).

Additionally, the TAILQ_FOREACH_SAFE is not part of <sys/queue.h>,
the patch replaces it with RTE_TAILQ_FOREACH_SAFE.

[1] http://mails.dpdk.org/archives/dev/2021-August/216304.html

Suggested-by: Nick Connolly <[email protected]>
Suggested-by: Dmitry Kozlyuk <[email protected]>
Signed-off-by: William Tu <[email protected]>
Acked-by: Dmitry Kozlyuk <[email protected]>
Acked-by: Narcisa Vasile <[email protected]>

show more ...


Revision tags: 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
# 64051bb1 13-Apr-2021 Xueming Li <[email protected]>

devargs: unify scratch buffer storage

In current design, legacy parser rte_devargs_parse() saved scratch
buffer to devargs.args while new parser rte_devargs_layers_parse() saved
to devargs.data. Cod

devargs: unify scratch buffer storage

In current design, legacy parser rte_devargs_parse() saved scratch
buffer to devargs.args while new parser rte_devargs_layers_parse() saved
to devargs.data. Code using devargs had to know the difference and
cleaned up memory accordingly - error prone.

This patch unifies scratch buffer to data field, introduces
rte_devargs_reset() function to wrap the memory clean up logic.

Signed-off-by: Xueming Li <[email protected]>
Acked-by: Ray Kinsella <[email protected]>
Reviewed-by: Gaetan Rivet <[email protected]>

show more ...


Revision tags: v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2
# 8d935fff 26-Jan-2021 Maxime Coquelin <[email protected]>

bus/vdev: add driver IOVA VA mode requirement

This patch adds driver flag in vdev bus driver so that
vdev drivers can require VA IOVA mode to be used, which
for example the case of Virtio-user PMD.

bus/vdev: add driver IOVA VA mode requirement

This patch adds driver flag in vdev bus driver so that
vdev drivers can require VA IOVA mode to be used, which
for example the case of Virtio-user PMD.

The patch implements the .get_iommu_class() callback, that
is called before devices probing to determine the IOVA mode
to be used, and adds a check right before the device is
probed to ensure compatible IOVA mode has been selected.

It also adds a ABI exception rule to accommodate with an
update on the driver registration API

Signed-off-by: Maxime Coquelin <[email protected]>
Acked-by: David Marchand <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>

show more ...


Revision tags: v21.02-rc1, v20.11, v20.11-rc5
# c753160d 16-Nov-2020 David Marchand <[email protected]>

bus/vdev: fix comment

RTE_DEV_WHITELISTED is now replaced with RTE_DEV_ALLOWED.

Fixes: a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums")

Signed-off-by: David Marchand <david.marc

bus/vdev: fix comment

RTE_DEV_WHITELISTED is now replaced with RTE_DEV_ALLOWED.

Fixes: a65a34a85ebf ("eal: replace usage of blacklist/whitelist in enums")

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

show more ...


Revision tags: v20.11-rc4, v20.11-rc3, v20.11-rc2, v20.11-rc1
# 6a2288ed 29-Sep-2020 Maxime Coquelin <[email protected]>

bus/vdev: add DMA mapping ops

Add DMA map/unmap operation callbacks to the vdev bus, which
could be used by DMA capable vdev drivers.

Signed-off-by: Maxime Coquelin <[email protected]>
Rev

bus/vdev: add DMA mapping ops

Add DMA map/unmap operation callbacks to the vdev bus, which
could be used by DMA capable vdev drivers.

Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Chenbo Xia <[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, v19.05, v19.05-rc4, v19.05-rc3
# edf73dd3 25-Apr-2019 Anatoly Burakov <[email protected]>

ipc: handle unsupported IPC in action register

Currently, IPC API will silently ignore unsupported IPC.
Fix the API call and its callers to explicitly handle
unsupported IPC cases.

For primary proc

ipc: handle unsupported IPC in action register

Currently, IPC API will silently ignore unsupported IPC.
Fix the API call and its callers to explicitly handle
unsupported IPC cases.

For primary processes, it is OK to not have IPC because
there may not be any secondary processes in the first place,
and there are valid use cases that disable IPC support, so
all primary process usages are fixed up to ignore IPC
failures.

For secondary processes, IPC will be crucial, so leave all
of the error handling as is.

Signed-off-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v19.05-rc2, v19.05-rc1
# f9acaf84 03-Apr-2019 Bruce Richardson <[email protected]>

replace snprintf with strlcpy without adding extra include

For files that already have rte_string_fns.h included in them, we can
do a straight replacement of snprintf(..."%s",...) with strlcpy. The

replace snprintf with strlcpy without adding extra include

For files that already have rte_string_fns.h included in them, we can
do a straight replacement of snprintf(..."%s",...) with strlcpy. The
changes in this patch were auto-generated via command:

spatch --sp-file devtools/cocci/strlcpy-with-header.cocci --dir . --in-place

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

show more ...


# e892fa59 21-Feb-2019 Raslan Darawsheh <[email protected]>

bus/vdev: fix hotplug twice

In case vdev was already probed, it shouldn't be probed again,
and it should return -EEXIST as error.
There are some checks in vdev_probe() and insert_vdev(),
but a check

bus/vdev: fix hotplug twice

In case vdev was already probed, it shouldn't be probed again,
and it should return -EEXIST as error.
There are some checks in vdev_probe() and insert_vdev(),
but a check was missing in vdev_plug().
The check is moved in vdev_probe_all_drivers() which is called
in all code paths.

Fixes: e9d159c3d534 ("eal: allow probing a device again")
Cc: [email protected]

Signed-off-by: Raslan Darawsheh <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>

show more ...


# 4169ed6e 21-Feb-2019 Thomas Monjalon <[email protected]>

bus/vdev: fix debug message on probing

The log was printing the device name two times,
first one being supposed to be the driver name.
As we don't know yet the driver name, the log is simplified.

F

bus/vdev: fix debug message on probing

The log was printing the device name two times,
first one being supposed to be the driver name.
As we don't know yet the driver name, the log is simplified.

Fixes: 9bf4901d1a11 ("bus/vdev: remove probe with driver name option")
Cc: [email protected]

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Rami Rosen <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>

show more ...


Revision tags: v19.02, v19.02-rc4, v19.02-rc3, v19.02-rc2, v19.02-rc1, v18.11, v18.11-rc5, v18.11-rc4, v18.11-rc3
# c7ad7754 07-Nov-2018 Thomas Monjalon <[email protected]>

devargs: do not replace already inserted device

The devargs of a device can be replaced by a newly allocated one
when trying to probe again the same device (multi-process or
multi-ports scenarios).

devargs: do not replace already inserted device

The devargs of a device can be replaced by a newly allocated one
when trying to probe again the same device (multi-process or
multi-ports scenarios). This is breaking some pointer references.

It can be avoided by copying the new content, freeing the new devargs,
and returning the already inserted pointer.

Signed-off-by: Thomas Monjalon <[email protected]>
Tested-by: Darek Stojaczyk <[email protected]>
Tested-by: Qi Zhang <[email protected]>
Tested-by: Viacheslav Ovsiienko <[email protected]>

show more ...


Revision tags: v18.11-rc2, v18.11-rc1
# b74fd6b8 28-Oct-2018 Ferruh Yigit <[email protected]>

add missing static keyword to globals

Some global variables can indeed be static, add static keyword to them.

Signed-off-by: Ferruh Yigit <[email protected]>
Acked-by: Jerin Jacob <jerin.jacob

add missing static keyword to globals

Some global variables can indeed be static, add static keyword to them.

Signed-off-by: Ferruh Yigit <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
Acked-by: Shreyansh Jain <[email protected]>

show more ...


# f5b2eff0 25-Oct-2018 Qi Zhang <[email protected]>

bus/vdev: fix devargs after multi-process bus scan

It's not necessary to insert device argment to devargs_list
during bus scan, but this happens when we try to attach a
device on secondary process.

bus/vdev: fix devargs after multi-process bus scan

It's not necessary to insert device argment to devargs_list
during bus scan, but this happens when we try to attach a
device on secondary process. The patch fix the issue.

Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Cc: [email protected]

Signed-off-by: Qi Zhang <[email protected]>

show more ...


# 66fd3a3b 21-Sep-2018 Paul Luse <[email protected]>

bus/vdev: fix multi-process IPC buffer leak on scan

This patch fixes an issue caught with ASAN where a vdev_scan()
to a secondary bus was failing to free some memory.

The doxygen comment in EAL is

bus/vdev: fix multi-process IPC buffer leak on scan

This patch fixes an issue caught with ASAN where a vdev_scan()
to a secondary bus was failing to free some memory.

The doxygen comment in EAL is fixed at the same time.

Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")
Cc: [email protected]

Signed-off-by: Paul Luse <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>
Acked-by: Ferruh Yigit <[email protected]>

show more ...


# 9ffe2f4e 22-Oct-2018 Qi Zhang <[email protected]>

bus/vdev: fix uninitialized device bus

Device bus should be initialized after bus scan.
While it does not happened when scan vdev from secondary process,
that cause segment fault at rte_dev_probe wh

bus/vdev: fix uninitialized device bus

Device bus should be initialized after bus scan.
While it does not happened when scan vdev from secondary process,
that cause segment fault at rte_dev_probe when call dev->bus->xxx.

Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Cc: [email protected]

Signed-off-by: Qi Zhang <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>

show more ...


# e9d159c3 19-Sep-2018 Thomas Monjalon <[email protected]>

eal: allow probing a device again

In the devargs syntax for device representors, it is possible to add
several devices at once: -w dbdf,representor=[0-3]
It will become a more frequent case when int

eal: allow probing a device again

In the devargs syntax for device representors, it is possible to add
several devices at once: -w dbdf,representor=[0-3]
It will become a more frequent case when introducing wildcards
and ranges in the new devargs syntax.

If a devargs string is provided for probing, and updated with a bigger
range for a new probing, then we do not want it to fail because
part of this range was already probed previously.
There can be new ports to create from an existing rte_device.

That's why the check for an already probed device
is moved as bus responsibility.
In the case of vdev, a global check is kept in insert_vdev(),
assuming that a vdev will always have only one port.
In the case of ifpga and vmbus, already probed devices are checked.
In the case of NXP buses, the probing is done only once (no hotplug),
though a check is added at bus level for consistency.
In the case of PCI, a driver flag is added to allow PMD probing again.
Only the PMD knows the ports attached to one rte_device.

As another consequence of being able to probe in several steps,
the field rte_device.devargs must not be considered as a full
representation of the rte_device, but only the latest probing args.
Anyway, the field rte_device.devargs is used only for probing.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
Tested-by: Andrew Rybchenko <[email protected]>
Acked-by: Shreyansh Jain <[email protected]>

show more ...


# 52897e7e 25-Sep-2018 Thomas Monjalon <[email protected]>

eal: add function to query device status

The function rte_dev_is_probed() is added in order to improve semantic
and enforce proper check of the probing status of a device.

It will answer this rte_d

eal: add function to query device status

The function rte_dev_is_probed() is added in order to improve semantic
and enforce proper check of the probing status of a device.

It will answer this rte_device query:
Is it already successfully probed or not?

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
Tested-by: Andrew Rybchenko <[email protected]>

show more ...


# 391797f0 25-Sep-2018 Thomas Monjalon <[email protected]>

drivers/bus: move driver assignment to end of probing

The PCI mapping requires to know the PCI driver to use,
even before the probing is done. That's why the PCI driver is
referenced early inside th

drivers/bus: move driver assignment to end of probing

The PCI mapping requires to know the PCI driver to use,
even before the probing is done. That's why the PCI driver is
referenced early inside the PCI device structure. See
commit 1d20a073fa5e ("bus/pci: reference driver structure before mapping")

However the rte_driver does not need to be referenced in rte_device
before the device probing is done.
By moving back this assignment at the end of the device probing,
it becomes possible to make clear the status of a rte_device.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
Tested-by: Andrew Rybchenko <[email protected]>
Reviewed-by: Rosen Xu <[email protected]>

show more ...


# 6844d146 02-Oct-2018 Thomas Monjalon <[email protected]>

eal: add bus pointer in device structure

When a device is added with a devargs (hotplug or whitelist),
the bus pointer can be retrieved via its devargs.
But there is no such devargs.bus in case of s

eal: add bus pointer in device structure

When a device is added with a devargs (hotplug or whitelist),
the bus pointer can be retrieved via its devargs.
But there is no such devargs.bus in case of standard scan.

A pointer to the rte_bus handle is added to rte_device.
When a device is allocated (during a scan),
the pointer to its bus is assigned.

It will make possible to remove a rte_device,
using the function pointer from its bus.

The function rte_bus_find_by_device() becomes useless,
and may be removed later.

Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: Gaetan Rivet <[email protected]>
Reviewed-by: Stephen Hemminger <[email protected]>

show more ...


# 2effa126 19-Sep-2018 Thomas Monjalon <[email protected]>

devargs: simplify parameters of removal function

The function rte_devargs_remove(), which is intended to be internal,
can take a devargs structure as argument.
The matching is still using string com

devargs: simplify parameters of removal function

The function rte_devargs_remove(), which is intended to be internal,
can take a devargs structure as argument.
The matching is still using string comparison of bus name and
device name.
It is simpler and may allow a different devargs matching in future.

Signed-off-by: Thomas Monjalon <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
Acked-by: Gaetan Rivet <[email protected]>
Reviewed-by: Stephen Hemminger <[email protected]>

show more ...


# ac91bc49 19-Sep-2018 Gaetan Rivet <[email protected]>

bus/vdev: implement device iteration

Signed-off-by: Gaetan Rivet <[email protected]>


# 23f1c424 03-Sep-2018 Qi Zhang <[email protected]>

bus/vdev: fix error log on secondary device scan

When a secondary process handles VDEV_SCAN_ONE mp action, it is possible
the device is already be inserted. This happens when we have multiple
second

bus/vdev: fix error log on secondary device scan

When a secondary process handles VDEV_SCAN_ONE mp action, it is possible
the device is already be inserted. This happens when we have multiple
secondary processes which cause multiple broadcasts from primary during
bus->scan. So we don't need to log any error for -EEXIST.

Bugzilla ID: 84
Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Cc: [email protected]

Reported-by: Gage Eads <[email protected]>
Signed-off-by: Qi Zhang <[email protected]>
Acked-by: Gage Eads <[email protected]>

show more ...


Revision tags: v18.08, v18.08-rc3, v18.08-rc2, v18.08-rc1, v18.05, v18.05-rc6, v18.05-rc5
# f14b264f 22-May-2018 Thomas Monjalon <[email protected]>

bus/vdev: replace device list lock by a recursive one

A device like failsafe can manage sub-devices.
When removing such device, it removes its sub-devices
and try to take the same vdev_device_list_l

bus/vdev: replace device list lock by a recursive one

A device like failsafe can manage sub-devices.
When removing such device, it removes its sub-devices
and try to take the same vdev_device_list_lock.
It was causing a deadlock because the lock was not recursive.

Fixes: 35f462839b69 ("bus/vdev: add lock on device list")

Suggested-by: Anatoly Burakov <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>
Tested-by: Matan Azrad <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


# 999951c8 16-May-2018 Stephen Hemminger <[email protected]>

bus/vdev: fix double space in logs

The VDEV_LOG() macro already adds a newline, don't duplicate.

Fixes: d22fcb225c24 ("bus/vdev: change log type")
Cc: [email protected]

Signed-off-by: Stephen Hemmin

bus/vdev: fix double space in logs

The VDEV_LOG() macro already adds a newline, don't duplicate.

Fixes: d22fcb225c24 ("bus/vdev: change log type")
Cc: [email protected]

Signed-off-by: Stephen Hemminger <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


12