[dpdk-dev] [PATCH v2] net/i40e: illagel pactket checking

2018-06-07 Thread Yanglong Wu
Some illegal packets will lead to TX/RX hang and can't recover automatically. This pacth check those illegal packets and protect TX/RX from hanging. Signed-off-by: Yanglong Wu --- v2: fix coding style issue and error --- drivers/net/i40e/i40e_rxtx.c | 11 +++ drivers/net/i40e/i40e_rxtx.h

[dpdk-dev] [PATCH] doc: fix octeontx selftest vdev argument

2018-06-07 Thread Jerin Jacob
Fixes: 3516327e00fd ("event/octeontx: add selftest to device arguments") Cc: pbhagavat...@caviumnetworks.com Cc: sta...@dpdk.org Signed-off-by: Jerin Jacob --- doc/guides/eventdevs/octeontx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/eventdevs/octeontx.rst

[dpdk-dev] [PATCH v3 0/2] vhost: support host notifier

2018-06-07 Thread Tiwei Bie
The host notifier support in vhost-user has been merged into QEMU. This patch set enables the support for host notifier in DPDK vhost-user and ifcvf driver. The original subject is: Extend vhost to support VFIO based accelerator v3: - Address the changes in QEMU - Minor fixes and refinements Tiw

[dpdk-dev] [PATCH v3 2/2] net/ifcvf: enable the host notifier support

2018-06-07 Thread Tiwei Bie
The necessary vDPA ops have already been implemented in ifcvf driver. So just need to announce the necessary protocol features to enable the host notifier support. Signed-off-by: Tiwei Bie --- drivers/net/ifc/ifcvf_vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ifc/ifc

[dpdk-dev] [PATCH v3 1/2] vhost: support host notifier

2018-06-07 Thread Tiwei Bie
When a vDPA device is attached, vhost user will try to register host notifiers to QEMU to allow notifications to be delivered between the driver in the guest and the vDPA device in the host directly. Signed-off-by: Tiwei Bie --- lib/librte_vhost/rte_vhost.h | 8 ++ lib/librte_vhost/vhost.c

Re: [dpdk-dev] [RFC] net/tap: add queues when attaching from secondary process

2018-06-07 Thread Wiles, Keith
On Jun 7, 2018, at 4:24 PM, Raslan Darawsheh mailto:rasl...@mellanox.com>> wrote: Hi, As you know that currently TAP pmd support attaching a secondary process to a primary process. But, it's still lacking the ability to do Rx/Tx burst since it's lacking the necessary fds for RX/TX queues, An

Re: [dpdk-dev] [PATCH 0/7] support VIRTIO_F_IN_ORDER feature

2018-06-07 Thread Liu, Yong
Sorry, add missing loopback performance comparison. +-+--+++ |Loopback |1 Queue |2 Queues|4 Queues| +-+--+++ |Inorder |6.2Mpps |9.5 ~ 11.9Mpps |10.6 ~ 11.3Mpps |

[dpdk-dev] [PATCH 7/7] net/virtio: annouce VIRTIO_F_IN_ORDER support

2018-06-07 Thread Marvin Liu
Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index 25697c872..bc3d08532 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -36,6 +36,7 @@ 1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE | \

[dpdk-dev] [PATCH 6/7] net/virtio: add IN_ORDER Rx/Tx into selection

2018-06-07 Thread Marvin Liu
After IN_ORDER Rx/Tx paths added, need to update Rx/Tx path selection logic. Also need to handle device start up Rx queue descriptors flush action separately. Rx path select logic: If IN_ORDER is disabled will select normal Rx path. If IN_ORDER is enabled, Rx offload and merge-able are disabled wi

[dpdk-dev] [PATCH 4/7] net/virtio: free IN_ORDER descriptors

2018-06-07 Thread Marvin Liu
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotiated. There will be no need to utilize chain for descriptors management, only index update is enough. Signed-off-by: Marvin Liu diff --git a/drivers/net/virt

[dpdk-dev] [PATCH 0/7] support VIRTIO_F_IN_ORDER feature

2018-06-07 Thread Marvin Liu
In latest virtio-spec, new feature bit VIRTIO_F_IN_ORDER was introduced. When this feature has been negotiated, virtio driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Vhost devices will always use descriptors in the same o

[dpdk-dev] [PATCH 5/7] net/virtio: support IN_ORDER Rx and Tx

2018-06-07 Thread Marvin Liu
IN_ORDER Rx function can support merge-able feature. Descriptors allocation and free will be done in bulk. Virtio dequeue logic: dequeue_burst_rx(burst mbufs) for (each mbuf b) { if (b need merge) { merge remained mbufs add merged mbuf to

[dpdk-dev] [PATCH 1/7] vhost: announce VIRTIO_F_IN_ORDER support

2018-06-07 Thread Marvin Liu
If devices always use descriptors in the same order in which they have been made available. These devices can offer the VIRTIO_F_IN_ORDER feature. If negotiated, this knowledge allows devices to notify the use of a batch of buffers to virtio driver by only writing used ring index. Vhost user devic

[dpdk-dev] [PATCH 3/7] net/virtio-user: add mgr_rxbuf and in_order vdev parameters

2018-06-07 Thread Marvin Liu
Add parameters for configuring VIRTIO_NET_F_MRG_RXBUF and VIRTIO_F_IN_ORDER feature bits. These two features bits will impact virtio data path selection. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c in

[dpdk-dev] [PATCH 2/7] net/virtio: add VIRTIO_F_IN_ORDER definition

2018-06-07 Thread Marvin Liu
If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index a28ba8339..0493443

[dpdk-dev] [RFC v1] net/mlx5: support new completion field for Multi-Packet RQ

2018-06-07 Thread Yongseok Koh
Multi-Packet Receive Queue is to receive multiple packets on a single large buffer. As it is supposed to have Rx CQEs in order from HW, 'consumed_stride' in CQE is accumulated to keep track of the current stride index. However, it is safer to directly use 'stride_idx' in CQE to avoid out-of-order s

[dpdk-dev] [RFC v1] net/mlx5: improve out of box performance

2018-06-07 Thread Yongseok Koh
In mlx5 PMD, there are multiple Tx burst functions, mlx5_tx_burst() mlx5_tx_burst_mpw() mlx5_tx_burst_mpw_inline() mlx5_tx_burst_burst_empw() mlx5_tx_burst_raw_vec() mlx5_tx_burst_vec() To provide better user experience and the best out-of-box performance, those will need to be c

Re: [dpdk-dev] [RFC] testpmd: use RFC2544 reserved IP addresses

2018-06-07 Thread Stephen Hemminger
On Thu, 7 Jun 2018 12:52:59 + "Iremonger, Bernard" wrote: > Hi Stephen, > > > -Original Message- > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Stephen Hemminger > > Sent: Wednesday, March 21, 2018 3:45 AM > > To: dev@dpdk.org > > Cc: Stephen Hemminger > > Subject: [dpdk-d

[dpdk-dev] [PATCH 4/4] vhost/crypto: use rte fcn to access private area

2018-06-07 Thread Dan Gora
Use rte_mbuf_to_priv() to access the private data area in the mbuf. Signed-off-by: Dan Gora --- lib/librte_vhost/vhost_crypto.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index f1650738a..57341ef8f 1

[dpdk-dev] [PATCH 3/4] examples/ipsec-secgw: use ipsec fcn to access private area

2018-06-07 Thread Dan Gora
In inbound_sa_check(), use the application's get_priv() function to access the private area in the mbuf. Signed-off-by: Dan Gora --- examples/ipsec-secgw/sa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index d9dcc0e06

[dpdk-dev] [PATCH 2/4] examples/ipsec-secgw: use rte fcn to access private area

2018-06-07 Thread Dan Gora
Update get_priv() to use rte_mbuf_to_priv() to access the private area in the mbuf. Signed-off-by: Dan Gora --- examples/ipsec-secgw/ipsec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h index 9b87278c1..3b5c3ec8c

[dpdk-dev] [PATCH 1/4] mbuf: add accessor function for private data area

2018-06-07 Thread Dan Gora
Add an inline accessor function to return the starting address of the private data area in the supplied mbuf. If the user did not allocate space for a private data area in the mbuf's memory pool, then return NULL. This allows applications to easily access the private data area between the struct

[dpdk-dev] [PATCH 0/4] mbuf: Add new private data area accessor function.

2018-06-07 Thread Dan Gora
Hi All, Below is a series of patches to add a new API function to allow DPDK applications to access the private data area of the mbuf, if one exists. This eliminates the repeated code in applications to access the private data area and makes the API a bit more complete, since there are already ac

Re: [dpdk-dev] [RFC] net/tap: add queues when attaching from secondary process

2018-06-07 Thread Raslan Darawsheh
Hi, As you know that currently TAP pmd support attaching a secondary process to a primary process. But, it's still lacking the ability to do Rx/Tx burst since it's lacking the necessary fds for RX/TX queues, And the setting of Rx/Tx burst function. This patch the main purpose is to exchange th

Re: [dpdk-dev] 18.02.2 patches review and test

2018-06-07 Thread Raslan Darawsheh
Hi, We've tested this version and we don't see any new issues. Kindest regards, Raslan Darawsheh -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Luca Boccassi Sent: Monday, June 4, 2018 9:36 PM To: dpdk stable Cc: dev@dpdk.org Subject: Re: [dpdk-dev] 18.02.2 patch

Re: [dpdk-dev] 17.11.3 (LTS) patches review and test

2018-06-07 Thread Raslan Darawsheh
Hi, We've tested this version and we don't see new issues with it. Kindest regards, Raslan Darawsheh -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Yuanhan Liu Sent: Sunday, May 27, 2018 8:35 AM To: dpdk stable Cc: dev@dpdk.org; Thomas Monjalon Subject: [dpdk-d

Re: [dpdk-dev] [PATCH] net/bnxt: add missing ids in xstats

2018-06-07 Thread Ajit Khaparde
On Wed, Jun 6, 2018 at 10:36 PM, David Marchand wrote: > The xstats api expects that the driver fills both values and ids for each > filled entries. > > Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset") > > Signed-off-by: David Marchand > ​​ Acked-by: ​ Ajit Khaparde ​ > --- > drive

[dpdk-dev] [PATCH 7/7] autotest: properly parallelize unit tests

2018-06-07 Thread Anatoly Burakov
Now that everything else is in place, we can run unit tests in a different fashion to what they were running as before. Previously, we had all autotests as part of groups (largely obtained through trial and error) to ensure parallel execution while still limiting amounts of memory used by those tes

[dpdk-dev] [PATCH 6/7] autotest: remove autotest grouping

2018-06-07 Thread Anatoly Burakov
Previously, all autotests were grouped into (seemingly arbitrary) groups. The goal was to run all tests in parallel (so that autotest finishes faster), but we couldn't just do it willy-nilly because DPDK couldn't allocate and free hugepages on-demand, so we had to find autotest groupings that could

[dpdk-dev] [PATCH 2/7] autotest: fix invalid code on reports

2018-06-07 Thread Anatoly Burakov
There are no reports defined for any test, so this codepath was never triggered, but it's still wrong because it's referencing variables that aren't there. Fix it by passing target into the test function, and reference correct log variable. Fixes: e2cc79b75d9f ("app: rework autotest.py") Cc: sta..

[dpdk-dev] [PATCH 3/7] autotest: make autotest runner python 2/3 compliant

2018-06-07 Thread Anatoly Burakov
Autotest runner was still using python 2-style print syntax. Fix it by importing print function from the future, and fix the calls to be python-3 style. Fixes: 54ca545dce4b ("make python scripts python2/3 compliant") Cc: john.mcnam...@intel.com Cc: sta...@dpdk.org Signed-off-by: Anatoly Burakov

[dpdk-dev] [PATCH 5/7] autotest: improve filtering

2018-06-07 Thread Anatoly Burakov
Improve code for filtering test groups. Also, move reading binary symbols into filtering stage, so that tests that are meant to be skipped are never attempted to be executed in the first place. Before running tests, print out any tests that were skipped because they weren't compiled. Cc: sta...@dp

[dpdk-dev] [PATCH 4/7] autotest: visually separate different test categories

2018-06-07 Thread Anatoly Burakov
Help visually identify parallel vs. non-parallel autotests. Cc: sta...@dpdk.org Signed-off-by: Anatoly Burakov --- test/test/autotest_runner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test/autotest_runner.py b/test/test/autotest_runner.py index f6b669a2e..d9d5f7a97 100644 ---

[dpdk-dev] [PATCH 1/7] autotest: fix printing

2018-06-07 Thread Anatoly Burakov
Previously, printing was done using tuple syntax, which caused output to appear as a tuple as opposed to being one string. Fix this by using addition operator instead. Fixes: 54ca545dce4b ("make python scripts python2/3 compliant") Cc: john.mcnam...@intel.com Cc: sta...@dpdk.org Signed-off-by: An

[dpdk-dev] [PATCH 0/7] Make unit tests great again

2018-06-07 Thread Anatoly Burakov
Previously, unit tests were running in groups. There were technical reasons why that was the case (mostly having to do with limiting memory), but it was hard to maintain and update the autotest script. In 18.05, limiting of memory at DPDK startup was no longer necessary, as DPDK allocates memory a

Re: [dpdk-dev] [RFC] net/tap: add queues when attaching from secondary process

2018-06-07 Thread Wiles, Keith
> On Jun 7, 2018, at 5:29 AM, Raslan Darawsheh wrote: > > In the case where the device is created by the primary process. > Currently, secondary process only contains the eth dev without being > able to do any Rx/Tx. > > When attaching the device from secondary process this patch adds queues

Re: [dpdk-dev] [PATCH 20/22] net/tap: enable port detach on secondary process

2018-06-07 Thread Wiles, Keith
> On Jun 7, 2018, at 5:38 AM, Qi Zhang wrote: > > Previously, detach port on secondary process will mess primary > process and cause same device can't be attached again, by take > advantage of rte_eth_release_port_local, we can support this with > minor change. Previously, detach ports on sec

[dpdk-dev] [PATCH 1/2] net/qede: fix incorrect link status update

2018-06-07 Thread Rasesh Mody
From: Shahed Shaikh qede_link_update() always returns -1 i.e. link not changed, becasue it compares the variables which always hold same value. Fix this function by using rte_eth_linkstatus_set(). Fixes: 2ea6f76aff40 ("qede: add core driver") Cc: sta...@dpdk.org Signed-off-by: Shahed Shaikh -

[dpdk-dev] [PATCH 2/2] net/qede: fix link change event notification

2018-06-07 Thread Rasesh Mody
From: Shahed Shaikh As per existing behavior, when firmware sends a link change notification, PMD only updates the link structure but does not notify applications about it. This results in application sending packets even when link status is down. Fix this issue by issuing RTE_ETH_EVENT_INTR_LSC

[dpdk-dev] [PATCH] net/qede: fix memory alloc for multiple port reconfig

2018-06-07 Thread Rasesh Mody
Multiple port reconfigurations can lead to memory allocation failures due to hitting RTE memzone limit or no more room in config while reserving memzone. When freeing memzones, update the memzone mapping and the memzone count. Release Rx and Tx queue rings allocated during queue setup. Fixes: a39

Re: [dpdk-dev] [PATCH] net/i40e: illagel pactket checking

2018-06-07 Thread Ananyev, Konstantin
Hi Yanglong, > -Original Message- > From: Wu, Yanglong > Sent: Thursday, June 7, 2018 10:40 AM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Ananyev, Konstantin > ; Wu, Yanglong > > Subject: [PATCH] net/i40e: illagel pactket checking > > Some illegal packets will lead to TX/RX hang and > can't

[dpdk-dev] [PATCH] net/nfp: fix data offset initialization in TX descriptors

2018-06-07 Thread Alejandro Lucero
The mbuf struct allows to prepend metadata and the NFP TX descriptors needs to give the data offset to the NIC. There is no application using this metadata but it is possible the PMD itself using it in the future for supporting hardware offloads like OVS offload. Also, this patch fixes a potentia

[dpdk-dev] [PATCH v1 5/6] examples/vm_power: add thread for oob core monitor

2018-06-07 Thread David Hunt
Change the app to now require three cores, as the third core will be used to run the oob montoring thread. Signed-off-by: David Hunt --- examples/vm_power_manager/main.c | 37 +--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/examples/vm_power_manage

[dpdk-dev] [PATCH v1 6/6] examples/vm_power: add port-list to command line

2018-06-07 Thread David Hunt
add in the long form of -p, which is --port-list Signed-off-by: David Hunt --- examples/vm_power_manager/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c index 4c6b5a990..4088861f1 100644 --- a/examples/vm_power_manage

[dpdk-dev] [PATCH v1 4/6] examples/vm_power: allow greater than 64 cores

2018-06-07 Thread David Hunt
To facilitate more info per core, change the global_cpu_mask from a uint64_t to an array. This also removes the limit on 64 cores, allocing the aray at run-time based on the number of cores found in the system. Signed-off-by: David Hunt --- examples/vm_power_manager/power_manager.c | 115 +++

[dpdk-dev] [PATCH v1 3/6] examples/vm_power: add oob monitoring functions

2018-06-07 Thread David Hunt
This patch introduces the out-of-band (oob) core monitoring functions. The functions are similar to the channel manager functions. There are function to add and remove cores from the list of cores being monitored. There is a function to initialise the monitor setup, run the monitor thread, and exi

[dpdk-dev] [PATCH v1 2/6] examples/vm_power: add core list parameter

2018-06-07 Thread David Hunt
Add in the '-l' command line parameter (also --core-list) So the user can now pass --corelist=4,6,8-10 and it will expand out to 4,6,8,9,10 using the parse function provided in parse.c (parse_set). This list of cores is then used to enable out-of-band monitoring to scale up and down these cores ba

[dpdk-dev] [PATCH v1 0/6] examples/vm_power: 100% Busy Polling

2018-06-07 Thread David Hunt
This patch set adds the capability to do out-of-band power monitoring on a systemi by detecting when a core is doing 100% busy polling, but not handling any packets. It uses a thread to monitor the branch counters in the targeted cores, and calculates the branch ratio if the running code. If the

[dpdk-dev] [PATCH v1 1/6] examples/vm_power: add check for port count

2018-06-07 Thread David Hunt
If we don't pass any ports to the app, we don't need to create any mempools, and we don't need to init any ports. Signed-off-by: David Hunt --- examples/vm_power_manager/main.c | 81 +--- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/examples/vm_powe

[dpdk-dev] [PATCH] vhost: use SMP memory barrier before kicking guest

2018-06-07 Thread Maxime Coquelin
vhost_vring_call() used rte_mb(), which translates into mfence instruction on x86. This patch changes to use rte_smp_mb(), which changed recently to translate into a locked ADD instruction for performance reason. The measured gain is up to 3% with the testpmd benchmarks. Signed-off-by: Maxime Co

Re: [dpdk-dev] [PATCH 13/22] net/bonding: enable port detach on secondary process

2018-06-07 Thread Chas Williams
On Thu, Jun 7, 2018 at 8:38 AM, Qi Zhang wrote: > Previously, detach port on secondary process will mess primary > process and cause same device can't be attached again, by take > advantage of rte_eth_release_port_local, we can support this with > minor change. > This commit message needs some w

Re: [dpdk-dev] Why rte_pipeline.c only support forwarding to same table in different entries?

2018-06-07 Thread Shyam Shrivastav
Looking at code, another change might make this work. Make sure that default entry action of each table points to next table except for last one which normally should be drop Please look at if (lookup_miss_mask != 0) handling in rte_pipeline_run () . On Thu, Jun 7, 2018 at 12:49 PM, hongbo li

Re: [dpdk-dev] [RFC] testpmd: add ability to set tx IP and UDP parameters

2018-06-07 Thread Iremonger, Bernard
Hi Stephen, > -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Stephen Hemminger > Sent: Thursday, April 5, 2018 10:15 PM > To: dev@dpdk.org > Cc: Stephen Hemminger > Subject: [dpdk-dev] [RFC] testpmd: add ability to set tx IP and UDP parameters > > Use RFC stand

Re: [dpdk-dev] [PATCH] net/i40e: remove VF interrupt handler

2018-06-07 Thread Zhang, Qi Z
> -Original Message- > From: Xing, Beilei > Sent: Thursday, June 7, 2018 3:14 PM > To: Zhang, Qi Z > Cc: Wu, Jingjing ; Yu, De ; > dev@dpdk.org > Subject: RE: [PATCH] net/i40e: remove VF interrupt handler > > > > > -Original Message- > > From: Zhang, Qi Z > > Sent: Thursday,

[dpdk-dev] [RFC v1] ethdev: add flow metadata

2018-06-07 Thread Xueming Li
Currently, rte_flow pattern only match packet header fields. This patch adds additional data to match the packet. For example, in egress direction, to do an action depending on the VM id, the application needs to configure rte_flow rule with the new metadata pattern: pattern meta data is {

Re: [dpdk-dev] [RFC] testpmd: use RFC2544 reserved IP addresses

2018-06-07 Thread Iremonger, Bernard
Hi Stephen, > -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Stephen Hemminger > Sent: Wednesday, March 21, 2018 3:45 AM > To: dev@dpdk.org > Cc: Stephen Hemminger > Subject: [dpdk-dev] [RFC] testpmd: use RFC2544 reserved IP addresses > > Change the transmit on

[dpdk-dev] [PATCH 22/22] examples/devmgm_mp: add simple device management sample

2018-06-07 Thread Qi Zhang
The sample code demonstrate device (ethdev only) management at multi-process envrionment. User can attach/detach a device on primary process and see it is synced on secondary process automatically, also user can lock a device to prevent it be detached or unlock it to go back to default behaviour.

[dpdk-dev] [PATCH 21/22] net/vhost: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/vhost/rte_eth_vhost.c | 11 +++ 1 file cha

[dpdk-dev] [PATCH 16/22] net/null: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/null/rte_eth_null.c | 16 +++- 1 file

[dpdk-dev] [PATCH 20/22] net/tap: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/tap/rte_eth_tap.c | 17 +++-- 1 file c

[dpdk-dev] [PATCH 19/22] net/softnic: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/softnic/rte_eth_softnic.c | 19 ---

[dpdk-dev] [PATCH 18/22] net/pcap: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/pcap/rte_eth_pcap.c | 15 ++- 1 file c

[dpdk-dev] [PATCH 17/22] net/octeontx: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/octeontx/octeontx_ethdev.c | 16

[dpdk-dev] [PATCH 15/22] net/kni: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/kni/rte_eth_kni.c | 11 +++ 1 file changed

[dpdk-dev] [PATCH 12/22] net/af_packet: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/af_packet/rte_eth_af_packet.c | 11 +++ 1

[dpdk-dev] [PATCH 14/22] net/failsafe: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/failsafe/failsafe.c | 16 1 file

[dpdk-dev] [PATCH 13/22] net/bonding: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++ 1 fil

[dpdk-dev] [PATCH 11/22] net/fm10k: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/fm10k/fm10k_ethdev.c | 9 + 1 file changed

[dpdk-dev] [PATCH 10/22] net/igb: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/e1000/igb_ethdev.c | 9 + 1 file changed,

[dpdk-dev] [PATCH 09/22] net/e1000: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/e1000/em_ethdev.c | 9 + 1 file changed, 9

[dpdk-dev] [PATCH 08/22] net/ixgbe: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 12 1 file cha

[dpdk-dev] [PATCH 07/22] net/i40e: enable port detach on secondary process

2018-06-07 Thread Qi Zhang
Previously, detach port on secondary process will mess primary process and cause same device can't be attached again, by take advantage of rte_eth_release_port_local, we can support this with minor change. Signed-off-by: Qi Zhang --- drivers/net/i40e/i40e_ethdev.c| 2 ++ drivers/net/i40e/i40

[dpdk-dev] [PATCH 06/22] ethdev: support attach or detach share device from secondary

2018-06-07 Thread Qi Zhang
This patch cover the multi-process hotplug case when a share device attach/detach request be issued from secondary process, the implementation references malloc_mp.c. device attach on secondary: a) seconary send asycn request to primary and wait on a condition which will be released by matched

[dpdk-dev] [PATCH 04/22] ethdev: enable hotplug on multi-process

2018-06-07 Thread Qi Zhang
The patch introduce the solution to handle different hotplug cases in multi-process situation, it include below scenario: 1. Attach a share device from primary 2. Detach a share device from primary 3. Attach a share device from secondary 4. Detach a share device from secondary 5. Attach a private

[dpdk-dev] [PATCH 05/22] ethdev: introduce device lock

2018-06-07 Thread Qi Zhang
Introduce API rte_eth_dev_lock and rte_eth_dev_unlock to let application lock or unlock on specific ethdev, a locked device can't be detached, this help applicaiton to prevent unexpected device detaching, especially in multi-process envrionment. Aslo the new API let application to register a callb

[dpdk-dev] [PATCH 02/22] bus/vdev: enable one device scan

2018-06-07 Thread Qi Zhang
Implemented the bus ops scan_one, besides this improve the scan efficiency in hotplug case, it aslo avoid sync IPC invoke (which happens in vdev->scan on secondary process). The benifit is it removes the potiential deadlock in the case when secondary process receive a request from primary process t

[dpdk-dev] [PATCH 03/22] ethdev: add function to release port in local process

2018-06-07 Thread Qi Zhang
Add driver API rte_eth_release_port_local to support the requirement that an ethdev only be released on secondary process, so only local state be set to unused , share data will not be reset so primary process can still use it. Signed-off-by: Qi Zhang --- lib/librte_ethdev/rte_ethdev.c|

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

2018-06-07 Thread Qi Zhang
Background: === Currently secondary process will only sync ethdev from primary process at init stage, but it will not be aware if device is attached/detached on primary process at runtime. While there is the requirement from application that take primary-secondary process model. The prima

[dpdk-dev] [PATCH 01/22] eal: introduce one device scan

2018-06-07 Thread Qi Zhang
When hot plug a new device, it is not necessary to scan everything on the bus since the devname and devargs are already there. So new rte_bus ops "scan_one" is introduced, bus driver can implement this function to simply the hotplug process. Signed-off-by: Qi Zhang --- lib/librte_eal/common/eal_

[dpdk-dev] [RFC] net/tap: add queues when attaching from secondary process

2018-06-07 Thread Raslan Darawsheh
In the case where the device is created by the primary process. Currently, secondary process only contains the eth dev without being able to do any Rx/Tx. When attaching the device from secondary process this patch adds queues info got from IPC massaging. Signed-off-by: Raslan Darawsheh --- dri

Re: [dpdk-dev] [PATCH] eal: add request to map reserved physical memory

2018-06-07 Thread Burakov, Anatoly
On 06-Jun-18 1:18 AM, Scott Branden wrote: Hi Anatoly, On 18-04-27 09:49 AM, Burakov, Anatoly wrote: On 27-Apr-18 5:30 PM, Scott Branden wrote: Hi Anatoly, We'd appreciate your input so we can come to a solution of supporting the necessary memory allocations? Hi Scott, I'm currently st

[dpdk-dev] [PATCH v1] examples:power add command line args to guest app

2018-06-07 Thread David Hunt
Add new command line arguments to the guest app to make testing and validation of the policy usage easier. These arguments are mainly around setting up the power management policy that is sent from the guest vm to to the vm_power_manager in the host New command line paramet

[dpdk-dev] [PATCH v3 26/27] net/ena: store handle after memory allocation

2018-06-07 Thread Michal Krawczyk
The pointer received from rte_memzone_reserve from macro ENA_MEM_ALLOC_COHERENT_NODE was not stored anywhere, and as a result memory allocated by this macro could not been released. Signed-off-by: Michal Krawczyk --- drivers/net/ena/base/ena_plat_dpdk.h | 2 +- 1 file changed, 1 insertion(+), 1

[dpdk-dev] [PATCH] net/i40e: illagel pactket checking

2018-06-07 Thread Yanglong Wu
Some illegal packets will lead to TX/RX hang and can't recover automatically. This pacth check those illegal packets and protect TX/RX from hanging. Signed-off-by: Yanglong Wu --- drivers/net/i40e/i40e_rxtx.c | 10 ++ drivers/net/i40e/i40e_rxtx.h | 2 ++ 2 files changed, 12 insertions(+

[dpdk-dev] [PATCH v3 27/27] net/ena: set link speed as none

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik Link speed should is not limited to 10Gb/s and it shouldn't be hardcoded. They link speed is set to none instead and the applications shouldn't rely on this value when using ENA PMD. Fixes: 1173fca ("ena: add polling-mode driver") Signed-off-by: Rafal Kozik Acked-by: Michal

[dpdk-dev] [PATCH v3 25/27] net/ena: fix GENMASK_ULL macro

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik When use GENMASK_ULL(63,0) left shift by 64 bits is performed. Shifting by number greater or equal then word length is undefined operation and failed on some platforms. Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK") Signed-off-by: Rafal Kozik Acked-by: Michal K

[dpdk-dev] [PATCH v3 23/27] net/ena: check pointer before memset

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik Need to check if memory allocation succeed before using it. Using memset on NULL pointer cause segfault. Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK") Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/base/ena_plat_dpdk.h | 22

[dpdk-dev] [PATCH v3 24/27] net/ena: change memory type

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik ENA_MEM_ALLOC_NODE not need to use contiguous physical memory. Also using memset without checking if allocation succeed can cause segmentation fault. To avoid both issue use rte_zmalloc_socket. Fixes: 3d3edc265fc8 ("net/ena: make coherent memory allocation NUMA-aware") Signed

[dpdk-dev] [PATCH v3 19/27] net/ena: validate Tx req id

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik Validate Tx req id during clearing completed packets. If id is wrong, trigger NIC reset. Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/net/ena/ena_e

[dpdk-dev] [PATCH v3 20/27] net/ena: add (un)likely statements

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik Add likely and unlikely statements to increase performance. Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_et

[dpdk-dev] [PATCH v3 21/27] net/ena: adjust error checking and cleaning

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik Adjust error checking and cleaning to Linux driver: * add checking if MTU is to small, * fix error messages (mismatched Rx and Tx), * return error received from base driver or proper error code instead of -1, * in case of error release occupied resources, * in case of Rx

[dpdk-dev] [PATCH v3 22/27] net/ena: update numa node

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik During initializing tx queues update Non-Uniform Memory Access configuration in NIC firmware. Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/ne

[dpdk-dev] [PATCH v3 15/27] net/ena: linearize Tx mbuf

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik Function ena_check_and_linearize_mbuf check Tx mbuf for number of segments and linearize (defragment) it if necessary. It is called before sending each packet. Information about maximum number of segments is stored per each ring. Maximum number of segments supported by NIC is

[dpdk-dev] [PATCH v3 14/27] net/ena: add RX out of order completion

2018-06-07 Thread Michal Krawczyk
This feature allows RX packets to be cleaned up out of order. Signed-off-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 48 drivers/net/ena/ena_ethdev.h | 8 ++-- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/drivers/net

[dpdk-dev] [PATCH v3 17/27] net/ena: unimplemented handler error

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik Enable AENQ FATAL_ERROR and WARNING callbacks by setting flags in aenq_groups. They are handled by "unimplemented handler". If unimplemented handler is called, error is logged. Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 7 +--

[dpdk-dev] [PATCH v3 18/27] net/ena: rework configuration of IO queue numbers

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik Move configuration of IO queue numbers to separate function and take into consideration max number of IO completion queues. Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 21 - 1 file changed, 20 insertions(+), 1 d

[dpdk-dev] [PATCH v3 16/27] net/ena: add info about max number of Tx/Rx descriptors

2018-06-07 Thread Michal Krawczyk
From: Rafal Kozik In function ena_infos_get driver provides information about minimal and maximal number of Rx and Tx descriptors. Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/n

[dpdk-dev] [PATCH v3 09/27] net/ena: add reset routine

2018-06-07 Thread Michal Krawczyk
Reset routine can be used by the DPDK application to reset the device in case of receiving RTE_ETH_EVENT_INTR_RESET from the PMD. The reset event is not triggered by the driver, yet. It will be added in next commits to enable error recovery in case of misfunctioning of the device. Signed-off-by:

[dpdk-dev] [PATCH v3 10/27] net/ena: add lrte_timer dependency for linking

2018-06-07 Thread Michal Krawczyk
ENA PMD is required to use librte_timer. The appropriate depndency must be added ifin case the DPDK will be built as shared library. Signed-off-by: Michal Krawczyk --- drivers/net/ena/Makefile | 1 + mk/rte.app.mk| 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ena/M

[dpdk-dev] [PATCH v3 12/27] net/ena: add checking for admin queue state

2018-06-07 Thread Michal Krawczyk
The admin queue can stop responding or became inactive due to unexpected behaviour of the device. In that case, the whole device should be restarted. Signed-off-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 37 + drivers/net/ena/ena_ethdev.h | 2 ++

  1   2   >