numam-dpdk/drivers/net/mlx5
Ophir Munk 3a8207423a net/mlx5: close all ports on remove
With the introduction of representors several eth devices are using
the same rte device (e.g. a PCI bus). When calling port detach on one
eth device it is required that all eth devices belonging to the
same rte device have been closed in advance, then the rte device
itself can be removed/detached.
This commit implements this requirement implicitly by adding a
remove callback to struct rte_pci_driver.
The new behavior can be demonstrated in testpmd.
First we attach a representor 0 using PCI address 0000:08:00.0
testpmd> port attach  0000:08:00.0,representor=[0]
Attaching a new port...
EAL: PCI device 0000:08:00.0 on NUMA socket 0
EAL:   probe driver: 15b3:1013 net_mlx5
Port 0 is attached.
Done
Port 1 is attached.
Done

Port 0 is the master device (PF) - an ethdev of the PCI address.
Port 1 is representor 0 - another ethdev (representing a VF) using the
same PCI address. Next we detach port 1
testpmd> port detach 1
Removing a device...
Port 0 is closed
Port 1 is closed
Now total ports is 0
Done

Since port 0 has been implicitly closed we cannot act on it anymore.
testpmd> port stop 0
Invalid port 0

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-10-26 22:14:06 +02:00
..
Makefile net/mlx5: introduce new flow counters configuration macro 2018-10-26 22:14:06 +02:00
meson.build net/mlx5: introduce new flow counters configuration macro 2018-10-26 22:14:06 +02:00
mlx5_defs.h net/mlx5: fix minimum number of Multi-Packet RQ buffers 2018-08-05 13:29:34 +02:00
mlx5_ethdev.c mk: build with _GNU_SOURCE defined by default 2018-10-22 11:28:27 +02:00
mlx5_flow_dv.c net/mlx5: fix bit width of item and action flags 2018-10-26 22:14:06 +02:00
mlx5_flow_tcf.c net/mlx5: fix bit width of item and action flags 2018-10-26 22:14:06 +02:00
mlx5_flow_verbs.c net/mlx5: fix bit width of item and action flags 2018-10-26 22:14:06 +02:00
mlx5_flow.c net/mlx5: fix bit width of item and action flags 2018-10-26 22:14:06 +02:00
mlx5_flow.h net/mlx5: fix bit width of item and action flags 2018-10-26 22:14:06 +02:00
mlx5_glue.c net/mlx5: add new flow counter Verbs API to glue library 2018-10-26 22:14:06 +02:00
mlx5_glue.h net/mlx5: add new flow counter Verbs API to glue library 2018-10-26 22:14:06 +02:00
mlx5_mac.c net/mlx5: always use representor ifindex for ioctl 2018-10-11 18:56:02 +02:00
mlx5_mr.c net/mlx5: support externally allocated static memory 2018-10-11 18:53:49 +02:00
mlx5_mr.h net/mlx5: clean-up developer logs 2018-07-03 01:35:57 +02:00
mlx5_nl.c net/mlx5: fix invalid network interface index 2018-07-26 14:05:52 +02:00
mlx5_prm.h net/mlx5: support metadata as flow rule criteria 2018-10-26 22:14:06 +02:00
mlx5_rss.c net/mlx5: use a macro for the RSS key size 2018-07-12 12:10:03 +02:00
mlx5_rxmode.c net/mlx5: preserve allmulticast flag for flow isolation mode 2018-08-05 08:47:41 +02:00
mlx5_rxq.c ethdev: make default behavior CRC strip on Rx 2018-09-14 20:08:41 +02:00
mlx5_rxtx_vec_neon.h net/mlx5: support metadata as flow rule criteria 2018-10-26 22:14:06 +02:00
mlx5_rxtx_vec_sse.h net/mlx5: support metadata as flow rule criteria 2018-10-26 22:14:06 +02:00
mlx5_rxtx_vec.c net/mlx5: support metadata as flow rule criteria 2018-10-26 22:14:06 +02:00
mlx5_rxtx_vec.h net/mlx5: support metadata as flow rule criteria 2018-10-26 22:14:06 +02:00
mlx5_rxtx.c net/mlx5: support metadata as flow rule criteria 2018-10-26 22:14:06 +02:00
mlx5_rxtx.h net/mlx5: support externally allocated static memory 2018-10-11 18:53:49 +02:00
mlx5_socket.c mk: build with _GNU_SOURCE defined by default 2018-10-22 11:28:27 +02:00
mlx5_stats.c net/mlx5: always use representor ifindex for ioctl 2018-10-11 18:56:02 +02:00
mlx5_trigger.c net/mlx5: fix queue rollback when starting device 2018-07-26 14:05:52 +02:00
mlx5_txq.c net/mlx5: support metadata as flow rule criteria 2018-10-26 22:14:06 +02:00
mlx5_utils.h net/mlx5: add hardware flow debug dump 2018-04-27 18:00:56 +01:00
mlx5_vlan.c align SPDX Mellanox copyrights 2018-04-11 01:47:47 +02:00
mlx5.c net/mlx5: close all ports on remove 2018-10-26 22:14:06 +02:00
mlx5.h net/mlx5: simplify flow counters support check 2018-10-26 22:14:06 +02:00
rte_pmd_mlx5_version.map