History log of /dpdk/drivers/bus/vdev/vdev.c (Results 26 – 46 of 46)
Revision Date Author Comments
# 9ffe2f4e 22-Oct-2018 Qi Zhang <qi.z.zhang@intel.com>

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: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>

show more ...


# e9d159c3 19-Sep-2018 Thomas Monjalon <thomas@monjalon.net>

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 <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>

show more ...


# 52897e7e 25-Sep-2018 Thomas Monjalon <thomas@monjalon.net>

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 <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>

show more ...


# 391797f0 25-Sep-2018 Thomas Monjalon <thomas@monjalon.net>

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 <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>

show more ...


# 6844d146 02-Oct-2018 Thomas Monjalon <thomas@monjalon.net>

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 <thomas@monjalon.net>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>

show more ...


# 2effa126 19-Sep-2018 Thomas Monjalon <thomas@monjalon.net>

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 <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>

show more ...


# ac91bc49 19-Sep-2018 Gaetan Rivet <gaetan.rivet@6wind.com>

bus/vdev: implement device iteration

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>


# 23f1c424 03-Sep-2018 Qi Zhang <qi.z.zhang@intel.com>

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: stable@dpdk.org

Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Gage Eads <gage.eads@intel.com>

show more ...


# f14b264f 22-May-2018 Thomas Monjalon <thomas@monjalon.net>

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 <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Matan Azrad <matan@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

show more ...


# 999951c8 16-May-2018 Stephen Hemminger <stephen@networkplumber.org>

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: stable@dpdk.org

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: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

show more ...


# 3701b792 27-Apr-2018 Gaetan Rivet <gaetan.rivet@6wind.com>

bus/vdev: fix find device implementation

If start is set and a device before it matches the data,
this device is returned.

This induces potentially infinite loops.

Fixes: c7fe1eea8a74 ("bus: simpl

bus/vdev: fix find device implementation

If start is set and a device before it matches the data,
this device is returned.

This induces potentially infinite loops.

Fixes: c7fe1eea8a74 ("bus: simplify finding starting point")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>

show more ...


# 8e6c3b79 23-Apr-2018 Gaetan Rivet <gaetan.rivet@6wind.com>

devargs: use proper namespace prefix

rte_eal_devargs is useless, rte_devargs is sufficient.

Only experimental functions are changed for now.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Ac

devargs: use proper namespace prefix

rte_eal_devargs is useless, rte_devargs is sufficient.

Only experimental functions are changed for now.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>

show more ...


# 1f6d16ee 23-Apr-2018 Gaetan Rivet <gaetan.rivet@6wind.com>

bus/vdev: do not reference devargs list

This list should not be operated upon by drivers.
Use the public API to achieve the same functionalities.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com

bus/vdev: do not reference devargs list

This list should not be operated upon by drivers.
Use the public API to achieve the same functionalities.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>

show more ...


# cdb068f0 24-Apr-2018 Jianfeng Tan <jianfeng.tan@intel.com>

bus/vdev: scan by multi-process channel

To scan the vdevs in primary, we send request to primary process
to obtain the names for vdevs.

Only the name is shared from the primary. In probe(), the dev

bus/vdev: scan by multi-process channel

To scan the vdevs in primary, we send request to primary process
to obtain the names for vdevs.

Only the name is shared from the primary. In probe(), the device
driver is supposed to locate (or request more) the detail
information from the primary.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>

show more ...


# 35f46283 24-Apr-2018 Jianfeng Tan <jianfeng.tan@intel.com>

bus/vdev: add lock on device list

As we could add virtual devices from different threads now, we
add a spin lock to protect the vdev device list.

Suggested-by: Anatoly Burakov <anatoly.burakov@inte

bus/vdev: add lock on device list

As we could add virtual devices from different threads now, we
add a spin lock to protect the vdev device list.

Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

show more ...


# 27d8b826 09-Apr-2018 Jan Viktorin <viktorin@rehivetech.com>

use SPDX tag for RehiveTech copyright files

Replace the BSD license header with the SPDX tag for files
with only an RehiveTech copyright on them.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.co

use SPDX tag for RehiveTech copyright files

Replace the BSD license header with the SPDX tag for files
with only an RehiveTech copyright on them.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

show more ...


# fada6963 12-Mar-2018 Nachiketa Prachanda <nprachan@vyatta.att-mail.com>

bus/vdev: fix finding device by name

Use strcmp to compare device names as the strncmp in original code
causes find_vdev to return -EEXIST for names that are prefix
of another. The creation of inte

bus/vdev: fix finding device by name

Use strcmp to compare device names as the strncmp in original code
causes find_vdev to return -EEXIST for names that are prefix
of another. The creation of interfaces fails unpredictably based
on the order of their creation. An easy way hit this bug is to create
eth_vhost1 after eth_vhost11.

Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct")
Cc: stable@dpdk.org

Signed-off-by: Nachiketa Prachanda <nprachan@vyatta.att-mail.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>

show more ...


# 9576ded3 05-Feb-2018 Moti Haimovsky <motih@mellanox.com>

bus/vdev: continue probing after a device failure

This commit modifies vdev_probe to continue probing all the devices
regardless of device probing failures.

Cc: stable@dpdk.org

Signed-off-by: Moti

bus/vdev: continue probing after a device failure

This commit modifies vdev_probe to continue probing all the devices
regardless of device probing failures.

Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>

show more ...


# 3b792ed9 01-Dec-2017 Thomas Monjalon <thomas@monjalon.net>

bus/vdev: add custom scan hook

The scan callback allows to spawn a vdev automatically
given some custom scan rules.
It is especially useful to create a TAP device automatically
connected to a netdev

bus/vdev: add custom scan hook

The scan callback allows to spawn a vdev automatically
given some custom scan rules.
It is especially useful to create a TAP device automatically
connected to a netdevice as remote.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>

show more ...


# d22fcb22 07-Nov-2017 Jianfeng Tan <jianfeng.tan@intel.com>

bus/vdev: change log type

Use specialized dynamic log type for vdev bus logging.

Suggested-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Suggested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off

bus/vdev: change log type

Use specialized dynamic log type for vdev bus logging.

Suggested-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Suggested-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>

show more ...


# d4a586d2 07-Nov-2017 Jianfeng Tan <jianfeng.tan@intel.com>

bus/vdev: move code from EAL into a new driver

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those help

bus/vdev: move code from EAL into a new driver

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>

show more ...


12