[dpdk-dev] [PATCH v2 3/3] testpmd: remove the dev event callback register

2018-07-08 Thread Jeff Guo
Since now we can use driver to management the eal event for hotplug, so no need to register dev event callback in app anymore. This patch remove the related code. Signed-off-by: Jeff Guo --- v2->v1: no change. --- app/test-pmd/testpmd.c | 76 -- 1

[dpdk-dev] [PATCH v2 2/3] net/i40e: enable hotplug detect in i40e

2018-07-08 Thread Jeff Guo
This patch aim to enable hotplug detect in i40e pmd driver. Firstly it set the flags RTE_PCI_DRV_INTR_RMV in drv_flags to announce the hotplug ability, and then use rte_dev_event_callback_register to register the hotplug event callback to eal. When eal detect the hotplug event, it will call the cal

[dpdk-dev] [PATCH v2 1/3] net/ixgbe: enable hotplug detect in ixgbe

2018-07-08 Thread Jeff Guo
This patch aim to enable hotplug detect in ixgbe pmd driver. Firstly it set the flags RTE_PCI_DRV_INTR_RMV in drv_flags to announce the hotplug ability, and then use rte_dev_event_callback_register to register the hotplug event callback to eal. When eal detect the hotplug event, it will call the ca

[dpdk-dev] [PATCH v2 0/3] Enable eal hotplug event detect for i40e/ixgbe

2018-07-08 Thread Jeff Guo
As we may know, we have eal event for rte device hotplug and ethdev event for ethdev hotplug. Some ethdev need to use eal event to detect hotplug behaviors, the privors way is register eal event callback in app, but seems that it will have some race between these 2 event process. In oder to fix the

[dpdk-dev] [PATCH v6 6/7] eal: add failure handle mechanism for hotplug

2018-07-08 Thread Jeff Guo
This patch introduces a failure handle mechanism to handle device hotplug removal event. First it can register sigbus handler when enable device event monitor. Once sigbus error be captured, it will check the failure address and accordingly remap the invalid memory for the corresponding device. Be

[dpdk-dev] [PATCH v6 7/7] igb_uio: fix uio release issue when hot unplug

2018-07-08 Thread Jeff Guo
When hotplug out device, the kernel will release the device resource in the kernel side, such as the fd sys file will disappear, and the irq will be released. At this time, if igb uio driver still try to release this resource, it will cause kernel crash. On the other hand, something like interrupt

[dpdk-dev] [PATCH v6 5/7] bus: add helper to handle sigbus

2018-07-08 Thread Jeff Guo
This patch aim to add a helper to iterate all buses to find the corresponding bus to handle the sigbus error. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v6->v5: refine some coding style. --- lib/librte_eal/common/eal_common_bus.c | 42 ++ lib/librte_eal/co

[dpdk-dev] [PATCH v6 3/7] bus: add sigbus handler

2018-07-08 Thread Jeff Guo
When device be hotplug out, if data path still read/write device, the sigbus error will occur, this error need to be handled. So a handler need to be here to capture the signal and handle it correspondingly. This patch introduces a bus ops to handle sigbus error, it is a bus specific behavior, so

[dpdk-dev] [PATCH v6 4/7] bus/pci: implement sigbus handler operation

2018-07-08 Thread Jeff Guo
This patch implements the ops of sigbus handler for PCI bus, it is functional to find the corresponding pci device which is been hotplug out, and then call the bus ops of hotplug failure handler to handle the failure for the device. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v6->v5: refin

[dpdk-dev] [PATCH v6 2/7] bus/pci: implement hotplug failure handler ops

2018-07-08 Thread Jeff Guo
This patch implements the ops of hotplug failure handler for PCI bus, it is functional to remap a new dummy memory which overlap to the failure memory to avoid MMIO read/write error. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v6->v5: refine some typo --- drivers/bus/pci/pci_common.c

[dpdk-dev] [PATCH v6 0/7] hotplug failure handle mechanism

2018-07-08 Thread Jeff Guo
As we know, hot plug is an importance feature, either use for the datacenter device’s fail-safe, or use for SRIOV Live Migration in SDN/NFV. It could bring the higher flexibility and continuality to the networking services in multiple use cases in industry. So let we see, dpdk as an importance netw

[dpdk-dev] [PATCH v6 1/7] bus: add hotplug failure handler

2018-07-08 Thread Jeff Guo
When device be hotplug out, if app still continue to access device by mmio, it will cause of memory failure and result the system crash. This patch introduces a bus ops to handle device hotplug failure, it is a bus specific behavior, so each kind of bus can implement its own logic case by case. S

Re: [dpdk-dev] [PATCH v6 6/7] eal: add failure handle mechanism for hotplug

2018-07-08 Thread Andrew Rybchenko
CC Shreyansh On 09.07.2018 09:01, Jeff Guo wrote: This patch introduces a failure handle mechanism to handle device hotplug removal event. First it can register sigbus handler when enable device event monitor. Once sigbus error be captured, it will check the failure address and accordingly rema

Re: [dpdk-dev] [PATCH] net/qede: move SPDX tags to source files

2018-07-08 Thread Hemant Agrawal
Hi Rasesh, There is a problem with these patches. The SPDX shall be first line for *.c, *.h and Makefiles. It shall come before the copyright statements. Regards, Hemant diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile index c30a867..45ad579 100644 --- a/drivers/net/q

Re: [dpdk-dev] [PATCH v6 5/7] bus: add helper to handle sigbus

2018-07-08 Thread Andrew Rybchenko
On 09.07.2018 09:01, Jeff Guo wrote: This patch aim to add a helper to iterate all buses to find the corresponding bus to handle the sigbus error. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v6->v5: refine some coding style. --- lib/librte_eal/common/eal_common_bus.c | 42 +

[dpdk-dev] [PATCH v6 7/7] igb_uio: fix uio release issue when hot unplug

2018-07-08 Thread Jeff Guo
When hotplug out device, the kernel will release the device resource in the kernel side, such as the fd sys file will disappear, and the irq will be released. At this time, if igb uio driver still try to release this resource, it will cause kernel crash. On the other hand, something like interrupt

[dpdk-dev] [PATCH v6 4/7] bus/pci: implement sigbus handler operation

2018-07-08 Thread Jeff Guo
This patch implements the ops of sigbus handler for PCI bus, it is functional to find the corresponding pci device which is been hotplug out, and then call the bus ops of hotplug failure handler to handle the failure for the device. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v6->v5: refin

[dpdk-dev] [PATCH v6 6/7] eal: add failure handle mechanism for hotplug

2018-07-08 Thread Jeff Guo
This patch introduces a failure handle mechanism to handle device hotplug removal event. First it can register sigbus handler when enable device event monitor. Once sigbus error be captured, it will check the failure address and accordingly remap the invalid memory for the corresponding device. Be

[dpdk-dev] [PATCH v6 5/7] bus: add helper to handle sigbus

2018-07-08 Thread Jeff Guo
This patch aim to add a helper to iterate all buses to find the corresponding bus to handle the sigbus error. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v6->v5: refine some coding style. --- lib/librte_eal/common/eal_common_bus.c | 42 ++ lib/librte_eal/co

[dpdk-dev] [PATCH v6 2/7] bus/pci: implement hotplug failure handler ops

2018-07-08 Thread Jeff Guo
This patch implements the ops of hotplug failure handler for PCI bus, it is functional to remap a new dummy memory which overlap to the failure memory to avoid MMIO read/write error. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v6->v5: refine some typo --- drivers/bus/pci/pci_common.c

[dpdk-dev] [PATCH v6 3/7] bus: add sigbus handler

2018-07-08 Thread Jeff Guo
When device be hotplug out, if data path still read/write device, the sigbus error will occur, this error need to be handled. So a handler need to be here to capture the signal and handle it correspondingly. This patch introduces a bus ops to handle sigbus error, it is a bus specific behavior, so

[dpdk-dev] [PATCH v6 1/7] bus: add hotplug failure handler

2018-07-08 Thread Jeff Guo
When device be hotplug out, if app still continue to access device by mmio, it will cause of memory failure and result the system crash. This patch introduces a bus ops to handle device hotplug failure, it is a bus specific behavior, so each kind of bus can implement its own logic case by case. S

[dpdk-dev] [PATCH v6 0/7] hotplug failure handle mechanism

2018-07-08 Thread Jeff Guo
As we know, hot plug is an importance feature, either use for the datacenter device’s fail-safe, or use for SRIOV Live Migration in SDN/NFV. It could bring the higher flexibility and continuality to the networking services in multiple use cases in industry. So let we see, dpdk as an importance netw

Re: [dpdk-dev] [PATCH v4 1/4] lib/cryptodev: add asymmetric algos in cryptodev

2018-07-08 Thread Verma, Shally
HI Declan, Pablo Could we please close on this asap? Thanks Shally >-Original Message- >From: Verma, Shally >Sent: 06 July 2018 19:59 >To: 'Doherty, Declan' ; >pablo.de.lara.gua...@intel.com >Cc: dev@dpdk.org; Athreya, Narayana Prasad >; Murthy, Nidadavolu >; Sahu, Sunila ; Gupta, >As

Re: [dpdk-dev] [PATCH V5 6/7] eal: add failure handle mechanism for hotplug

2018-07-08 Thread Jeff Guo
On 7/8/2018 9:46 PM, Andrew Rybchenko wrote: On 05.07.2018 10:38, Jeff Guo wrote: This patch introduces a failure handler mechanism to handle device hot plug removal event. First register sigbus handler, once sigbus error be captured, will check the failure address and accordingly remap the

Re: [dpdk-dev] [PATCH V5 5/7] bus: add helper to handle sigbus

2018-07-08 Thread Jeff Guo
hi, andrew Thanks for your reviewing. On 7/8/2018 9:30 PM, Andrew Rybchenko wrote: On 05.07.2018 10:38, Jeff Guo wrote: This patch aim to add a helper to iterate all buses to find the corresponding bus to handle the sigbus error. Signed-off-by: Jeff Guo --- v5->v4: refine the errno restore l

Re: [dpdk-dev] [PATCH V5 5/7] bus: add helper to handle sigbus

2018-07-08 Thread Jeff Guo
hi, shaopeng thanks for your review. On 7/6/2018 11:22 PM, He, Shaopeng wrote: -Original Message- From: Guo, Jia Sent: Thursday, July 5, 2018 3:39 PM This patch aim to add a helper to iterate all buses to find the corresponding bus to handle the sigbus error. [...] + bus = r

Re: [dpdk-dev] [PATCH V5 2/7] bus/pci: implement hotplug failure handler ops

2018-07-08 Thread Jeff Guo
hi, shaopeng On 7/6/2018 11:17 PM, He, Shaopeng wrote: -Original Message- From: Guo, Jia Sent: Thursday, July 5, 2018 3:39 PM [...] + switch (pdev->kdrv) { + case RTE_KDRV_IGB_UIO: + case RTE_KDRV_UIO_GENERIC: + case RTE_KDRV_NIC_UIO: + /* mmio r

[dpdk-dev] [PATCH v10 19/19] doc: update release notes for multi process hotplug

2018-07-08 Thread Qi Zhang
Update release notes for the new multi-process hotplug feature. Signed-off-by: Qi Zhang --- doc/guides/rel_notes/release_18_08.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index bc0124295..12

[dpdk-dev] [PATCH v10 18/19] examples/multi_process: add hotplug sample

2018-07-08 Thread Qi Zhang
The sample code demonstrates device (ethdev only) management at a multi-process environment. The user can attach/detach a device on primary process and see it is synced on secondary process automatically. How to start? ./hotplug_mp --proc-type=auto Command Line Example: >help >list /* attach a

[dpdk-dev] [PATCH v10 13/19] net/octeontx: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 16/19] net/tap: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 15/19] net/softnic: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 17/19] net/vhost: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 14/19] net/pcap: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 12/19] net/null: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 10/19] net/bonding: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 08/19] net/ixgbe: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to release a port. Signed-off-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++ 1 file changed, 3

[dpdk-dev] [PATCH v10 11/19] net/kni: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 09/19] net/af_packet: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Attach port from secondary should ignore devargs since the private device is not necessary to support. Also previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to

[dpdk-dev] [PATCH v10 07/19] net/i40e: enable hotplug on secondary process

2018-07-08 Thread Qi Zhang
Previously, detach port on a secondary process will mess primary process and cause the same device can't be attached back again. A secondary process should use rte_eth_release_port_private to release a port. Signed-off-by: Qi Zhang --- drivers/net/i40e/i40e_ethdev.c | 2 ++ 1 file changed, 2 ins

[dpdk-dev] [PATCH v10 06/19] eal: support attach or detach share device from secondary

2018-07-08 Thread Qi Zhang
This patch cover the multi-process hotplug case when a device attach/detach request be issued from a secondary process device attach on secondary: a) secondary send sync request to the primary. b) primary receive the request and attach the new device if failed goto i). c) primary forward attach

[dpdk-dev] [PATCH v10 04/19] vfio: remove uneccessary IPC for group fd clear

2018-07-08 Thread Qi Zhang
Clear vfio_group_fd is not necessary to involve any IPC. Also, current IPC implementation for SOCKET_CLR_GROUP is not correct. rte_vfio_clear_group on secondary will always fail, that prevent device be detached correctly on a secondary process. The patch simply removes all IPC related stuff in rte_

[dpdk-dev] [PATCH v10 02/19] bus/pci: fix PCI address compare

2018-07-08 Thread Qi Zhang
When use memcmp to compare two PCI address, sizeof(struct rte_pci_addr) is 4 bytes aligned, and it is 8. While only 7 byte of struct rte_pci_addr is valid. So compare the 8th byte will cause the unexpected result, which happens when repeatedly attach/detach a device. Fixes: c752998b5e2e ("pci: int

[dpdk-dev] [PATCH v10 05/19] eal: enable hotplug on multi-process

2018-07-08 Thread Qi Zhang
We are going to introduce the solution to handle hotplug in multi-process, it includes the below scenario: 1. Attach a device from the primary 2. Detach a device from the primary 3. Attach a device from a secondary 4. Detach a device from a secondary In the primary-secondary process model, we ass

[dpdk-dev] [PATCH v10 03/19] bus/pci: enable vfio unmap resource for secondary

2018-07-08 Thread Qi Zhang
Subroutine to unmap VFIO resource is shared by secondary and primary, and it does not work on the secondary process. The patch adds a dedicate function to handle the situation when a device is unmapped on a secondary process. Signed-off-by: Qi Zhang --- drivers/bus/pci/linux/pci_vfio.c | 75

[dpdk-dev] [PATCH v10 00/19] enable hotplug on multi-process

2018-07-08 Thread Qi Zhang
v10: Since hotplug add/remove a vdev on a secondary process will sync on all processes now, it is not necessary to support private vdev for a secondary process which is identified by a not-NULL devargs in "--vdev". So re-work on all vdev driver changes to simpified device probe scenario o

[dpdk-dev] [PATCH v10 01/19] ethdev: add function to release port in local process

2018-07-08 Thread Qi Zhang
Add driver API rte_eth_release_port_private to support the case when an ethdev need to be detached on a secondary process. Local state is set to unused and shared data will not be reset so the primary process can still use it. Signed-off-by: Qi Zhang Reviewed-by: Andrew Rybchenko Acked-by: Remy

Re: [dpdk-dev] [PATCH v9 03/15] vhost: vring address setup for packed queues

2018-07-08 Thread Tiwei Bie
On Fri, Jul 06, 2018 at 09:07:10AM +0200, Maxime Coquelin wrote: [...] > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c > index bea6a0428..dca43ff00 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -467,6 +467,27 @@ translate_ring_a

Re: [dpdk-dev] [PATCH v4 0/5] vhost: generalize buffer vectors

2018-07-08 Thread Tiwei Bie
On Fri, Jul 06, 2018 at 09:04:44AM +0200, Maxime Coquelin wrote: > This series is again preliminray work to ease packed ring > layout integration. > > Main changes are using vector buffres also in the dequeue > path, and perform IOVA to HVA translation at vectors fill > time. > > I still have to

Re: [dpdk-dev] [PATCH v9 00/15] Vhost: add support to packed ring layout

2018-07-08 Thread Tiwei Bie
On Fri, Jul 06, 2018 at 09:07:07AM +0200, Maxime Coquelin wrote: > This series is a handover from Jen's "[PATCH v4 00/20] > implement packed virtqueues", which only implements the > vhost side. Virtio PMD implementation will follow in a > next series. > > The series applies on top of previous rew

[dpdk-dev] [PATCH] LPM: add iterator over LPM rules

2018-07-08 Thread Qiaobin Fu
Add an iterator over the LPM rules. The iterator requires a prefix as a parameter and lists all entries as long as the given prefix (or longer). Signed-off-by: Qiaobin Fu Reviewed-by: Cody Doucette Reviewed-by: Michel Machado --- lib/librte_lpm/rte_lpm.c | 99 +

Re: [dpdk-dev] [PATCH v2] net/mlx5: add support for 32bit systems

2018-07-08 Thread Mordechay Haimovsky
Hi Ferruh, Can you please send me the output of "gcc -v" on your system ? Moti > -Original Message- > From: Ferruh Yigit [mailto:ferruh.yi...@intel.com] > Sent: Wednesday, July 4, 2018 4:49 PM > To: Mordechay Haimovsky ; Shahaf Shuler > > Cc: Adrien Mazarguil ; dev@dpdk.org > Subject: R

Re: [dpdk-dev] [PATCH V5 6/7] eal: add failure handle mechanism for hotplug

2018-07-08 Thread Andrew Rybchenko
On 05.07.2018 10:38, Jeff Guo wrote: This patch introduces a failure handler mechanism to handle device hot plug removal event. First register sigbus handler, once sigbus error be captured, will check the failure address and accordingly remap the invalid memory for the corresponding device. Bese

Re: [dpdk-dev] [PATCH V5 5/7] bus: add helper to handle sigbus

2018-07-08 Thread Andrew Rybchenko
On 05.07.2018 10:38, Jeff Guo wrote: This patch aim to add a helper to iterate all buses to find the corresponding bus to handle the sigbus error. Signed-off-by: Jeff Guo --- v5->v4: refine the errno restore logic --- lib/librte_eal/common/eal_common_bus.c | 36 +++

Re: [dpdk-dev] my git config file

2018-07-08 Thread Ori Kam
Sorry, please disregard this mail and delete it. Ori > -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Ori Kam > Sent: Sunday, July 8, 2018 1:23 PM > To: dev@dpdk.org > Subject: [dpdk-dev] my git config file > > [orika@vnc1 ~]$ cat .gitconfig > [user] >

[dpdk-dev] my git config file

2018-07-08 Thread Ori Kam
[orika@vnc1 ~]$ cat .gitconfig [user] email = or...@mellanox.com [sendemail] suppressfrom = true confirm = always suppresscc = self envelopsender = or...@mellanox.com smtpUser = or...@mellanox.com smtpEncryption = tls smtpServer = smt

Re: [dpdk-dev] [PATCH] maintainers: update for Mellanox PMDs

2018-07-08 Thread Shahaf Shuler
Adrien, Nelio, I will use this opportunity to thank you for all the hard work and investment on those PMD. You did a wonderful job maintaining those. Thursday, July 5, 2018 12:20 PM, Adrien Mazarguil: > Subject: [PATCH] maintainers: update for Mellanox PMDs > > Shahaf and Matan volunteered to