* [dpdk-dev] [PATCH 1/5] net/ena: remove lcore constraint from max queue number
2019-01-25 8:10 [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update Michal Krawczyk
@ 2019-01-25 8:10 ` Michal Krawczyk
2019-01-25 8:10 ` [dpdk-dev] [PATCH 2/5] net/ena: fix dev init for RTE_PROC_SECONDARY Michal Krawczyk
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michal Krawczyk @ 2019-01-25 8:10 UTC (permalink / raw)
To: gtzalik, mw, matua; +Cc: rk, dev, Michal Krawczyk
The number of queues was limited by number of lcores in the recent ENAv2
patch. However, some apps like symmetric_mp, are configuring multiple
queues although there is only single lcore used.
To prevent failure in that case, the lcore number constraint was
removed.
Fixes: ea93d37eb49d ("net/ena: add HW queues depth setup")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
drivers/net/ena/ena_ethdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 3022dda..fde5fa7 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1687,8 +1687,7 @@ static int ena_calc_io_queue_num(struct ena_com_dev *ena_dev,
if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV)
io_tx_sq_num = get_feat_ctx->llq.max_llq_num;
- io_queue_num = RTE_MIN(rte_lcore_count(), ENA_MAX_NUM_IO_QUEUES);
- io_queue_num = RTE_MIN(io_queue_num, io_rx_num);
+ io_queue_num = RTE_MIN(ENA_MAX_NUM_IO_QUEUES, io_rx_num);
io_queue_num = RTE_MIN(io_queue_num, io_tx_sq_num);
io_queue_num = RTE_MIN(io_queue_num, io_tx_cq_num);
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 2/5] net/ena: fix dev init for RTE_PROC_SECONDARY
2019-01-25 8:10 [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update Michal Krawczyk
2019-01-25 8:10 ` [dpdk-dev] [PATCH 1/5] net/ena: remove lcore constraint from max queue number Michal Krawczyk
@ 2019-01-25 8:10 ` Michal Krawczyk
2019-01-25 8:10 ` [dpdk-dev] [PATCH 3/5] net/ena: fix setting rte_errno to negative value Michal Krawczyk
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michal Krawczyk @ 2019-01-25 8:10 UTC (permalink / raw)
To: gtzalik, mw, matua; +Cc: rk, dev, Michal Krawczyk, stable
The check for proc type in eth_ena_dev_init() should appear before
modyfing adapter structure.
Calling memset on ena_adapter from secondary process context, was
erasing all structure information, and it was causing the crash of the
main process.
Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
drivers/net/ena/ena_ethdev.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index fde5fa7..747390b 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1715,19 +1715,20 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
static int adapters_found;
bool wd_state;
- memset(adapter, 0, sizeof(struct ena_adapter));
- ena_dev = &adapter->ena_dev;
-
eth_dev->dev_ops = &ena_dev_ops;
eth_dev->rx_pkt_burst = ð_ena_recv_pkts;
eth_dev->tx_pkt_burst = ð_ena_xmit_pkts;
eth_dev->tx_pkt_prepare = ð_ena_prep_pkts;
- adapter->rte_eth_dev_data = eth_dev->data;
- adapter->rte_dev = eth_dev;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
+ memset(adapter, 0, sizeof(struct ena_adapter));
+ ena_dev = &adapter->ena_dev;
+
+ adapter->rte_eth_dev_data = eth_dev->data;
+ adapter->rte_dev = eth_dev;
+
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
adapter->pdev = pci_dev;
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 3/5] net/ena: fix setting rte_errno to negative value
2019-01-25 8:10 [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update Michal Krawczyk
2019-01-25 8:10 ` [dpdk-dev] [PATCH 1/5] net/ena: remove lcore constraint from max queue number Michal Krawczyk
2019-01-25 8:10 ` [dpdk-dev] [PATCH 2/5] net/ena: fix dev init for RTE_PROC_SECONDARY Michal Krawczyk
@ 2019-01-25 8:10 ` Michal Krawczyk
2019-01-25 8:10 ` [dpdk-dev] [PATCH 4/5] doc: update release notes for ENA PMD Michal Krawczyk
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michal Krawczyk @ 2019-01-25 8:10 UTC (permalink / raw)
To: gtzalik, mw, matua; +Cc: rk, dev, Michal Krawczyk, stable
The rte_errno shouldn't have assigned negative error codes, so it has
to be fixed.
Fixes: b3fc5a1ae10d ("net/ena: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
drivers/net/ena/ena_ethdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 747390b..8bb05ca 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2178,14 +2178,14 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
if ((ol_flags & ENA_TX_OFFLOAD_NOTSUP_MASK) != 0 ||
(ol_flags & PKT_TX_L4_MASK) ==
PKT_TX_SCTP_CKSUM) {
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return i;
}
#ifdef RTE_LIBRTE_ETHDEV_DEBUG
ret = rte_validate_tx_offload(m);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
#endif
@@ -2198,7 +2198,7 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
ret = rte_net_intel_cksum_flags_prepare(m,
ol_flags & ~PKT_TX_TCP_SEG);
if (ret != 0) {
- rte_errno = ret;
+ rte_errno = -ret;
return i;
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 4/5] doc: update release notes for ENA PMD
2019-01-25 8:10 [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update Michal Krawczyk
` (2 preceding siblings ...)
2019-01-25 8:10 ` [dpdk-dev] [PATCH 3/5] net/ena: fix setting rte_errno to negative value Michal Krawczyk
@ 2019-01-25 8:10 ` Michal Krawczyk
2019-01-25 8:10 ` [dpdk-dev] [PATCH 5/5] doc: add instructions for enabling WC in ENAv2 PMD Michal Krawczyk
2019-01-27 22:45 ` [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update Thomas Monjalon
5 siblings, 0 replies; 7+ messages in thread
From: Michal Krawczyk @ 2019-01-25 8:10 UTC (permalink / raw)
To: gtzalik, mw, matua; +Cc: rk, dev, Michal Krawczyk
From: Rafal Kozik <rk@semihalf.com>
Add changes in ENA PMD to DPDK v19.02 release notes.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Signed-off-by: Rafal Kozik <rk@semihalf.com>
---
doc/guides/rel_notes/release_19_02.rst | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
index 57c595b..15a92d5 100644
--- a/doc/guides/rel_notes/release_19_02.rst
+++ b/doc/guides/rel_notes/release_19_02.rst
@@ -155,6 +155,25 @@ New Features
the intel_pstate kernel driver is now supported, and automatically
detected by the library.
+* **Release of the ENA PMD v2.0.0**
+
+ * Added Low Latency Queue v2 (LLQv2). This feature reduces the latency
+ of the packets by pushing the header directly through the PCI to the
+ device. This allows the NIC to start handle packet right after the doorbell
+ without waiting for DMA.
+ * Added independent configuration of HW Tx and Rx ring depths.
+ * Added support for up to 8k Rx descriptors per ring.
+ * Added additional doorbell check on Tx, to handle Tx more efficiently for big
+ bursts of packets.
+ * Added per queue statistics.
+ * Added extended statistics using xstats DPDK API.
+ * The reset routine was aligned with the DPDK API, so now it can be
+ handled as in other PMDs.
+ * Fixed out of order (OOO) completion.
+ * Fixed memory leaks due to port stops and starts in the middle of
+ traffic.
+ * Updated documentation and features list of the PMD.
+
Removed Items
-------------
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 5/5] doc: add instructions for enabling WC in ENAv2 PMD
2019-01-25 8:10 [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update Michal Krawczyk
` (3 preceding siblings ...)
2019-01-25 8:10 ` [dpdk-dev] [PATCH 4/5] doc: update release notes for ENA PMD Michal Krawczyk
@ 2019-01-25 8:10 ` Michal Krawczyk
2019-01-27 22:45 ` [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update Thomas Monjalon
5 siblings, 0 replies; 7+ messages in thread
From: Michal Krawczyk @ 2019-01-25 8:10 UTC (permalink / raw)
To: gtzalik, mw, matua; +Cc: rk, dev
From: Rafal Kozik <rk@semihalf.com>
ENAv2 hardware provides Low Latency Queue v2 (LLQv2). It needs kernel
PCI driver to support write combining (WC). This patch add information
how to use it with igb_uio and vfio-pci drivers.
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
doc/guides/nics/ena.rst | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index 9f0a650..80da4b6 100644
--- a/doc/guides/nics/ena.rst
+++ b/doc/guides/nics/ena.rst
@@ -183,10 +183,22 @@ Prerequisites
#. Prepare the system as recommended by DPDK suite. This includes environment
variables, hugepages configuration, tool-chains and configuration.
-#. ENA PMD can operate with ``vfio-pci`` or ``igb_uio`` driver.
+#. ENA PMD can operate with ``vfio-pci``(*) or ``igb_uio`` driver.
+
+ (*) ENAv2 hardware supports Low Latency Queue v2 (LLQv2). This feature
+ reduces the latency of the packets by pushing the header directly through
+ the PCI to the device, before the DMA is even triggered. For proper work
+ kernel PCI driver must support write combining (WC). In mainline version of
+ ``igb_uio`` (in DPDK repo) it must be enabled by loding module with
+ ``wc_activate=1`` flag (example below). However, mainline's vfio-pci
+ driver in kernel doesn't have WC support yet (planed to be added).
+ If vfio-pci used user should be either turn off ENAv2 (to avoid performance
+ impact) or recompile vfio-pci driver with patch provided in
+ `amzn-github <https://github.com/amzn/amzn-drivers/tree/master/userspace/dpdk/enav2-vfio-patch>`_.
#. Insert ``vfio-pci`` or ``igb_uio`` kernel module using the command
- ``modprobe vfio-pci`` or ``modprobe igb_uio`` respectively.
+ ``modprobe vfio-pci`` or ``modprobe uio; insmod igb_uio.ko wc_activate=1``
+ respectively.
#. For ``vfio-pci`` users only:
Please make sure that ``IOMMU`` is enabled in your system,
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update
2019-01-25 8:10 [dpdk-dev] [PATCH 0/5] net/ena: minor fixes and docs update Michal Krawczyk
` (4 preceding siblings ...)
2019-01-25 8:10 ` [dpdk-dev] [PATCH 5/5] doc: add instructions for enabling WC in ENAv2 PMD Michal Krawczyk
@ 2019-01-27 22:45 ` Thomas Monjalon
5 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2019-01-27 22:45 UTC (permalink / raw)
To: Michal Krawczyk; +Cc: dev, gtzalik, mw, matua, rk, ferruh.yigit
25/01/2019 09:10, Michal Krawczyk:
> Hi,
>
> we would like to push fixes for part of the bugs reported in Bug 193,
> together with docs update for ENAv2 about enabling WC support, release
> notes and fix for assigning rte_errno negative values, as requested by
> the community.
>
> Michal Krawczyk (3):
> net/ena: remove lcore constraint from max queue number
> net/ena: fix dev init for RTE_PROC_SECONDARY
> net/ena: fix setting rte_errno to negative value
>
> Rafal Kozik (2):
> doc: update release notes for ENA PMD
> doc: add instructions for enabling WC in ENAv2 PMD
>
> doc/guides/nics/ena.rst | 16 ++++++++++++++--
> doc/guides/rel_notes/release_19_02.rst | 19 +++++++++++++++++++
> drivers/net/ena/ena_ethdev.c | 20 ++++++++++----------
> 3 files changed, 43 insertions(+), 12 deletions(-)
This patchset is sent very late in the cycle.
After some thoughts (with Ferruh), I decide to merge it in 19.02.
I hope there will be no more request for ENA in this release,
and please avoid this situation in future.
^ permalink raw reply [flat|nested] 7+ messages in thread