* [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2
@ 2017-08-21 9:30 Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'ethdev: fix build with gcc 5.4.0' " Yuanhan Liu
` (63 more replies)
0 siblings, 64 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Yuanhan Liu, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6de4d8eee1aafaf8eb8316501aa87d9874cf83bc Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 7 Jul 2017 12:52:50 -0700
Subject: [PATCH] net/virtio: do not claim to support LRO
[ upstream commit 701a64622c2653c0736042d2f790081db79afdc7 ]
The current virtio supports Transmit Segmentation Offload, but
does not really support Large Receive Offload. The driver was confusing
the two offloads.
Fixes: 86d59b21468a ("net/virtio: support LRO")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 1651c59..d65667c 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1659,11 +1659,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
{
const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
struct virtio_hw *hw = dev->data->dev_private;
- uint64_t req_features;
- int ret;
PMD_INIT_LOG(DEBUG, "configure");
- req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES;
/* Virtio does L4 checksum but not L3! */
if (rxmode->hw_ip_checksum) {
@@ -1671,23 +1668,10 @@ virtio_dev_configure(struct rte_eth_dev *dev)
"virtio does not support IP checksum");
return -ENOTSUP;
}
- if (rxmode->enable_lro)
- req_features |=
- (1ULL << VIRTIO_NET_F_GUEST_TSO4) |
- (1ULL << VIRTIO_NET_F_GUEST_TSO6);
-
- /* if request features changed, reinit the device */
- if (req_features != hw->req_guest_features) {
- ret = virtio_init_device(dev, req_features);
- if (ret < 0)
- return ret;
- }
- if (rxmode->enable_lro &&
- (!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
- !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
+ if (rxmode->enable_lro) {
PMD_DRV_LOG(NOTICE,
- "lro not available on this host");
+ "virtio does not support Large Receive Offload");
return -ENOTSUP;
}
@@ -1913,8 +1897,6 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
}
tso_mask = (1ULL << VIRTIO_NET_F_GUEST_TSO4) |
(1ULL << VIRTIO_NET_F_GUEST_TSO6);
- if ((host_features & tso_mask) == tso_mask)
- dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TCP_LRO;
dev_info->tx_offload_capa = 0;
if (hw->guest_features & (1ULL << VIRTIO_NET_F_CSUM)) {
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'ethdev: fix build with gcc 5.4.0' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix build with gcc 7.1' " Yuanhan Liu
` (62 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Matan Azrad, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From bcd11232917ebd5994a2dc1225b57c98bc48b78d Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 6 Jul 2017 23:45:32 +0200
Subject: [PATCH] ethdev: fix build with gcc 5.4.0
[ upstream commit 722de4c3e7b11d20f7b0c6e68e1b0ecb91fe6c43 ]
Seen on Ubuntu 16.04 with GCC 5.4.0:
lib/librte_ether/rte_ethdev.c: In function 'get_mac_addr_index':
lib/librte_ether/rte_ethdev.c:2369:26: error:
'dev_info.max_mac_addrs' may be used uninitialized in this function
Indeed, rte_eth_dev_info_get() do not write into dev_info
if the port_id is not valid.
So we need to check the port_id and return in case of error.
This extra check should not be needed because the port_id is always
checked before calling get_mac_addr_index().
However it does not hurt.
Reported-by: Matan Azrad <matan@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Matan Azrad <matan@mellanox.com>
---
lib/librte_ether/rte_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 83898a8..2d442a9 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2351,6 +2351,7 @@ get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
struct rte_eth_dev *dev = &rte_eth_devices[port_id];
unsigned i;
+ RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
rte_eth_dev_info_get(port_id, &dev_info);
for (i = 0; i < dev_info.max_mac_addrs; i++)
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/dpaa2_sec: fix build with gcc 7.1' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'ethdev: fix build with gcc 5.4.0' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mbuf: fix VXLAN port in comment' " Yuanhan Liu
` (61 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 201516354e7648ed9412fd02f7e152e29df750ac Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 11 Jul 2017 20:25:52 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix build with gcc 7.1
[ upstream commit 6a95466d78dea1e5542bda8ba996a04331992807 ]
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/crypto/dpaa2_sec/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile
index 11c7c78..067f022 100644
--- a/drivers/crypto/dpaa2_sec/Makefile
+++ b/drivers/crypto/dpaa2_sec/Makefile
@@ -46,6 +46,10 @@ CFLAGS += $(WERROR_FLAGS)
endif
CFLAGS += -D _GNU_SOURCE
+ifeq ($(shell test $(GCC_VERSION) -gt 70 && echo 1), 1)
+CFLAGS += -Wno-implicit-fallthrough
+endif
+
CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/mc
CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'mbuf: fix VXLAN port in comment' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'ethdev: fix build with gcc 5.4.0' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix build with gcc 7.1' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'metrics: fix name string termination' " Yuanhan Liu
` (60 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Cian Ferriter; +Cc: Olivier Matz, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 25563b1b4e66450057d6aa71ffc23d87b88e196e Mon Sep 17 00:00:00 2001
From: Cian Ferriter <cian.ferriter@intel.com>
Date: Fri, 7 Jul 2017 15:17:40 +0100
Subject: [PATCH] mbuf: fix VXLAN port in comment
[ upstream commit 838d6b775bfab436859764ea734cddaf95c7b5fd ]
IANA assigns a destination port of 4789 for the VXLAN in the Service
Name and Transport Protocol Port Number Registry. This is mentioned in
RFC 7348.
Fixes: f295a00a2b44 ("mbuf: add definitions of unified packet types")
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_mbuf/rte_mbuf_ptype.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h
index a3269c4..acd70bb 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.h
+++ b/lib/librte_mbuf/rte_mbuf_ptype.h
@@ -341,11 +341,11 @@ extern "C" {
* Packet format:
* <'ether type'=0x0800
* | 'version'=4, 'protocol'=17
- * | 'destination port'=4798>
+ * | 'destination port'=4789>
* or,
* <'ether type'=0x86DD
* | 'version'=6, 'next header'=17
- * | 'destination port'=4798>
+ * | 'destination port'=4789>
*/
#define RTE_PTYPE_TUNNEL_VXLAN 0x00003000
/**
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'metrics: fix name string termination' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (2 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'mbuf: fix VXLAN port in comment' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'bus/pci: use given name as generic name' " Yuanhan Liu
` (59 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Remy Horton; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a7dd0ca5c8ba450e981892a5d40eb5126ae65b37 Mon Sep 17 00:00:00 2001
From: Remy Horton <remy.horton@intel.com>
Date: Tue, 18 Jul 2017 10:43:47 +0100
Subject: [PATCH] metrics: fix name string termination
[ upstream commit fa43ac77294a1a00b1fc30514162145ca17fa766 ]
The public API (struct rte_metric_name) includes the NULL terminator
byte in RTE_METRICS_MAX_NAME_LENGTH but the library itself internally
excludes it. This makes it possible for an application to receive an
unterminated name string. Fix be enforcing the NULL termination of all
name strings to the length that the public API expects.
Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Signed-off-by: Remy Horton <remy.horton@intel.com>
---
lib/librte_metrics/rte_metrics.c | 2 ++
lib/librte_metrics/rte_metrics.h | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c
index e9a122c..dbbad32 100644
--- a/lib/librte_metrics/rte_metrics.c
+++ b/lib/librte_metrics/rte_metrics.c
@@ -144,6 +144,8 @@ rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
entry = &stats->metadata[idx_name + stats->cnt_stats];
strncpy(entry->name, names[idx_name],
RTE_METRICS_MAX_NAME_LEN);
+ /* Enforce NULL-termination */
+ entry->name[RTE_METRICS_MAX_NAME_LEN - 1] = '\0';
memset(entry->value, 0, sizeof(entry->value));
entry->idx_next_stat = idx_name + stats->cnt_stats + 1;
}
diff --git a/lib/librte_metrics/rte_metrics.h b/lib/librte_metrics/rte_metrics.h
index 0fa3104..297300a 100644
--- a/lib/librte_metrics/rte_metrics.h
+++ b/lib/librte_metrics/rte_metrics.h
@@ -118,7 +118,8 @@ void rte_metrics_init(int socket_id);
* is required for updating said metric's value.
*
* @param name
- * Metric name
+ * Metric name. If this exceeds RTE_METRICS_MAX_NAME_LEN (including
+ * the NULL terminator), it is truncated.
*
* @return
* - Zero or positive: Success (index key of new metric)
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'bus/pci: use given name as generic name' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (3 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'metrics: fix name string termination' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-29 7:47 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/sfc: request MAC stats upload immediately on port start' " Yuanhan Liu
` (58 subsequent siblings)
63 siblings, 1 reply; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Gaetan Rivet; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From abbdc42771b8999624afe375b4d5d8e036d7ab71 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <gaetan.rivet@6wind.com>
Date: Sat, 15 Jul 2017 19:56:39 +0200
Subject: [PATCH] bus/pci: use given name as generic name
[ upstream commit 23eaa9059ec24e95e32361f333ed0686f82bea74 ]
When an application requests the use of a PCI device, it can currently
interchangeably use either the longform DomBDF format (0000:00:00.0) or
the shorter BDF format (00:00.0).
When a device is inserted via the hotplug API, it must first be scanned
and then will be identified by its name using `find_device`. The name of
the device must match the name given by the user to be found and then
probed.
A new function sets the expected name for a scanned PCI device. It was
previously generated from parsing the PCI address. This canonical name
is superseded when an rte_devargs exists describing the device. In such
case, the device takes the given name found within the rte_devargs.
As the rte_devargs is linked to the rte_pci_device during scanning, it
can be avoided during the probe. Additionally, this fixes the issue of
the rte_devargs lookup not being done within rte_pci_probe_one.
Fixes: beec692c5157 ("eal: add name field to generic device")
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
lib/librte_eal/bsdapp/eal/eal_pci.c | 4 ++--
lib/librte_eal/common/eal_common_pci.c | 29 ++++++++++++++++++++++++-----
lib/librte_eal/common/eal_private.h | 5 +++++
lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++--
4 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
index e321461..97a88ec 100644
--- a/lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
@@ -282,8 +282,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
/* FreeBSD has no NUMA support (yet) */
dev->device.numa_node = 0;
- rte_pci_device_name(&dev->addr, dev->name, sizeof(dev->name));
- dev->device.name = dev->name;
+ pci_name_set(dev);
/* FreeBSD has only one pass through driver */
dev->kdrv = RTE_KDRV_NIC_UIO;
@@ -334,6 +333,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
} else { /* already registered */
dev2->kdrv = dev->kdrv;
dev2->max_vfs = dev->max_vfs;
+ pci_name_set(dev2);
memmove(dev2->mem_resource,
dev->mem_resource,
sizeof(dev->mem_resource));
diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index b749991..8f8627e 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -113,6 +113,29 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)
return NULL;
}
+void
+pci_name_set(struct rte_pci_device *dev)
+{
+ struct rte_devargs *devargs;
+
+ /* Each device has its internal, canonical name set. */
+ rte_pci_device_name(&dev->addr,
+ dev->name, sizeof(dev->name));
+ devargs = pci_devargs_lookup(dev);
+ dev->device.devargs = devargs;
+ /* In blacklist mode, if the device is not blacklisted, no
+ * rte_devargs exists for it.
+ */
+ if (devargs != NULL)
+ /* If an rte_devargs exists, the generic rte_device uses the
+ * given name as its namea
+ */
+ dev->device.name = dev->device.devargs->name;
+ else
+ /* Otherwise, it uses the internal, canonical form. */
+ dev->device.name = dev->name;
+}
+
/* map a particular resource from a file */
void *
pci_map_resource(void *requested_addr, int fd, off_t offset, size_t size,
@@ -419,11 +442,7 @@ rte_pci_probe(void)
FOREACH_DEVICE_ON_PCIBUS(dev) {
probed++;
- /* set devargs in PCI structure */
- devargs = pci_devargs_lookup(dev);
- if (devargs != NULL)
- dev->device.devargs = devargs;
-
+ devargs = dev->device.devargs;
/* probe all or only whitelisted devices */
if (probe_all)
ret = pci_probe_all_drivers(dev);
diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h
index 6cacce0..0a1c3a7 100644
--- a/lib/librte_eal/common/eal_private.h
+++ b/lib/librte_eal/common/eal_private.h
@@ -113,6 +113,11 @@ struct rte_pci_driver;
struct rte_pci_device;
/**
+ * Find the name of a PCI device.
+ */
+void pci_name_set(struct rte_pci_device *dev);
+
+/**
* Add a PCI device to the PCI Bus (append to PCI Device list). This function
* also updates the bus references of the PCI Device (and the generic device
* object embedded within.
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 595622b..816b19d 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -324,8 +324,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
dev->device.numa_node = tmp;
}
- rte_pci_device_name(addr, dev->name, sizeof(dev->name));
- dev->device.name = dev->name;
+ pci_name_set(dev);
/* parse resources */
snprintf(filename, sizeof(filename), "%s/resource", dirname);
@@ -373,6 +372,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
} else { /* already registered */
dev2->kdrv = dev->kdrv;
dev2->max_vfs = dev->max_vfs;
+ pci_name_set(dev2);
memmove(dev2->mem_resource, dev->mem_resource,
sizeof(dev->mem_resource));
free(dev);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/sfc: request MAC stats upload immediately on port start' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (4 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'bus/pci: use given name as generic name' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix VF Tx bytes' " Yuanhan Liu
` (57 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f68f6ccbede3f6b683b9d46a4f61ead29ff15241 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Sat, 8 Jul 2017 16:16:55 +0100
Subject: [PATCH] net/sfc: request MAC stats upload immediately on port start
[ upstream commit 3b257f7e6c0fb5daa7b5f3b08e992effb45341e9 ]
If MAC stats refresh is arranged to be done by periodic DMA,
the first DMA transaction is unlikely to occur right on the
port start; if the user tries to get stats right after port
start and before the transaction occurs, bogus figures will
be collected; a one-off stats upload on port start is a fix
Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_port.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index ee96bcd..87affc9 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -242,6 +242,18 @@ sfc_port_start(struct sfc_adapter *sa)
}
}
+ if ((port->mac_stats_update_period_ms != 0) &&
+ port->mac_stats_periodic_dma_supported) {
+ /*
+ * Request an explicit MAC stats upload immediately to
+ * preclude bogus figures readback if the user decides
+ * to read stats before periodic DMA is really started
+ */
+ rc = efx_mac_stats_upload(sa->nic, &port->mac_stats_dma_mem);
+ if (rc != 0)
+ goto fail_mac_stats_upload;
+ }
+
sfc_log_init(sa, "disable MAC drain");
rc = efx_mac_drain(sa->nic, B_FALSE);
if (rc != 0)
@@ -262,6 +274,7 @@ fail_mac_drain:
(void)efx_mac_stats_periodic(sa->nic, &port->mac_stats_dma_mem,
0, B_FALSE);
+fail_mac_stats_upload:
fail_mac_stats_periodic:
fail_mcast_address_list_set:
fail_mac_filter_set:
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix VF Tx bytes' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (5 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/sfc: request MAC stats upload immediately on port start' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/ixgbe: fix LSC interrupt' " Yuanhan Liu
` (56 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Qi Zhang; +Cc: Beilei Xing, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d993d1b7a68dfeea0592ae84892968551e2aa572 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sun, 9 Jul 2017 15:54:58 -0400
Subject: [PATCH] net/i40e: fix VF Tx bytes
[ upstream commit e0b3f4cf3e53765347bdeac125048685c8c23c53 ]
Tx CRC size is not counted by VSI's stats register, so it is not necessary
excluded by driver.
Fixes: 98abce237ba7 ("net/i40e: fix VF statistics")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 6c49195..a51620c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2352,9 +2352,6 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
i40e_stat_update_48(hw, I40E_GLV_BPTCH(idx), I40E_GLV_BPTCL(idx),
vsi->offset_loaded, &oes->tx_broadcast,
&nes->tx_broadcast);
- /* exclude CRC bytes */
- nes->tx_bytes -= (nes->tx_unicast + nes->tx_multicast +
- nes->tx_broadcast) * ETHER_CRC_LEN;
/* GLV_TDPC not supported */
i40e_stat_update_32(hw, I40E_GLV_TEPC(idx), vsi->offset_loaded,
&oes->tx_errors, &nes->tx_errors);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix LSC interrupt' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (6 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix VF Tx bytes' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
` (55 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Jingjing Wu; +Cc: Wenzhuo Lu, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a2a9d8797dc4a46a5faf6811a276ae83ea176f78 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Thu, 13 Jul 2017 17:43:21 +0800
Subject: [PATCH] net/ixgbe: fix LSC interrupt
[ upstream commit 53d49d8d4717185a053953352ed4c153d63e7f4e ]
If LSC flag is changed to off at last device start, the
enable flag is not cleared in HW.
This patch fixes it.
Fixes: 0eb609239efd ("ixgbe: enable Rx queue interrupts for PF and VF")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index aeaa432..78355db 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -240,7 +240,7 @@ static int ixgbe_dev_rss_reta_query(struct rte_eth_dev *dev,
struct rte_eth_rss_reta_entry64 *reta_conf,
uint16_t reta_size);
static void ixgbe_dev_link_status_print(struct rte_eth_dev *dev);
-static int ixgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev);
+static int ixgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on);
static int ixgbe_dev_macsec_interrupt_setup(struct rte_eth_dev *dev);
static int ixgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev);
static int ixgbe_dev_interrupt_get_status(struct rte_eth_dev *dev);
@@ -2672,7 +2672,9 @@ skip_link_setup:
if (rte_intr_allow_others(intr_handle)) {
/* check if lsc interrupt is enabled */
if (dev->data->dev_conf.intr_conf.lsc != 0)
- ixgbe_dev_lsc_interrupt_setup(dev);
+ ixgbe_dev_lsc_interrupt_setup(dev, TRUE);
+ else
+ ixgbe_dev_lsc_interrupt_setup(dev, FALSE);
ixgbe_dev_macsec_interrupt_setup(dev);
} else {
rte_intr_callback_unregister(intr_handle,
@@ -3916,19 +3918,24 @@ ixgbe_dev_allmulticast_disable(struct rte_eth_dev *dev)
*
* @param dev
* Pointer to struct rte_eth_dev.
+ * @param on
+ * Enable or Disable.
*
* @return
* - On success, zero.
* - On failure, a negative value.
*/
static int
-ixgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev)
+ixgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on)
{
struct ixgbe_interrupt *intr =
IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
ixgbe_dev_link_status_print(dev);
- intr->mask |= IXGBE_EICR_LSC;
+ if (on)
+ intr->mask |= IXGBE_EICR_LSC;
+ else
+ intr->mask &= ~IXGBE_EICR_LSC;
return 0;
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix LSC interrupt' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (7 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/ixgbe: fix LSC interrupt' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/e1000: " Yuanhan Liu
` (54 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Jingjing Wu; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 310da7957ccfd856ee899c969edfe41fe880d491 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Thu, 13 Jul 2017 17:43:22 +0800
Subject: [PATCH] net/i40e: fix LSC interrupt
[ upstream commit d58244b9cf5460d0f00c3e0ecdf7b062f07f447b ]
If LSC flag is changed to off at last device start, the
enable flag is not cleared in HW.
This patch fixes it.
Fixes: f4668a33efe5 ("net/i40e: fix link status change interrupt")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a51620c..0c35fa7 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2008,7 +2008,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
if (dev->data->dev_conf.intr_conf.lsc != 0)
PMD_INIT_LOG(INFO,
"lsc won't enable because of no intr multiplex");
- } else if (dev->data->dev_conf.intr_conf.lsc != 0) {
+ } else {
ret = i40e_aq_set_phy_int_mask(hw,
~(I40E_AQ_EVENT_LINK_UPDOWN |
I40E_AQ_EVENT_MODULE_QUAL_FAIL |
@@ -2016,7 +2016,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
if (ret != I40E_SUCCESS)
PMD_DRV_LOG(WARNING, "Fail to set phy mask");
- /* Call get_link_info aq commond to enable LSE */
+ /* Call get_link_info aq commond to enable/disable LSE */
i40e_dev_link_update(dev, 0);
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/e1000: fix LSC interrupt' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (8 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix ethertype filter for new FW' " Yuanhan Liu
` (53 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Jingjing Wu; +Cc: Wenzhuo Lu, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8ce9a4b56cb535a4bb9666d9dd7a37918c650b86 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Thu, 13 Jul 2017 17:43:23 +0800
Subject: [PATCH] net/e1000: fix LSC interrupt
[ upstream commit 5ed76cd749ae90206e3e58444c76faae6aa7deae ]
If LSC flag is changed to off at last device start, the
enable flag is not cleared in HW.
This patch fixes it.
Fixes: c3cd3de0ab50 ("igb: enable Rx queue interrupts for PF")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/igb_ethdev.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index d18dd48..3474793 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -138,7 +138,7 @@ static int eth_igb_flow_ctrl_get(struct rte_eth_dev *dev,
struct rte_eth_fc_conf *fc_conf);
static int eth_igb_flow_ctrl_set(struct rte_eth_dev *dev,
struct rte_eth_fc_conf *fc_conf);
-static int eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev);
+static int eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on);
static int eth_igb_rxq_interrupt_setup(struct rte_eth_dev *dev);
static int eth_igb_interrupt_get_status(struct rte_eth_dev *dev);
static int eth_igb_interrupt_action(struct rte_eth_dev *dev,
@@ -1417,7 +1417,9 @@ eth_igb_start(struct rte_eth_dev *dev)
if (rte_intr_allow_others(intr_handle)) {
/* check if lsc interrupt is enabled */
if (dev->data->dev_conf.intr_conf.lsc != 0)
- eth_igb_lsc_interrupt_setup(dev);
+ eth_igb_lsc_interrupt_setup(dev, TRUE);
+ else
+ eth_igb_lsc_interrupt_setup(dev, FALSE);
} else {
rte_intr_callback_unregister(intr_handle,
eth_igb_interrupt_handler,
@@ -2716,18 +2718,23 @@ eth_igb_vlan_offload_set(struct rte_eth_dev *dev, int mask)
*
* @param dev
* Pointer to struct rte_eth_dev.
+ * @param on
+ * Enable or Disable
*
* @return
* - On success, zero.
* - On failure, a negative value.
*/
static int
-eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev)
+eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev, uint8_t on)
{
struct e1000_interrupt *intr =
E1000_DEV_PRIVATE_TO_INTR(dev->data->dev_private);
- intr->mask |= E1000_ICR_LSC;
+ if (on)
+ intr->mask |= E1000_ICR_LSC;
+ else
+ intr->mask &= ~E1000_ICR_LSC;
return 0;
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix ethertype filter for new FW' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (9 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/e1000: " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/ixgbe: fix Rx/Tx queue interrupt for x550 devices' " Yuanhan Liu
` (52 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Beilei Xing; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From eb4d1fc3e0f8c8112142dc93d38c911dd6ea5706 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 18 Jul 2017 11:07:07 +0800
Subject: [PATCH] net/i40e: fix ethertype filter for new FW
[ upstream commit 77370db964f7d8a58f5914b1b805e6b093107d59 ]
Previously SW workaround for GL_SWR_PRI_JOIN_MAP is added for X710
performance. As new FW version 6.0 supports ADQ,
value for GL_SWR_PRI_JOIN_MAP should be changed, otherwise
ehtertype filter will be impacted.
Fixes: 973273c7a4b7 ("i40e: workaround for X710 performance")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 0c35fa7..6702900 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9185,8 +9185,9 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
*/
/* For both X710 and XL710 */
-#define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE 0x10000200
-#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00
+#define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE_1 0x10000200
+#define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE_2 0x20000200
+#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00
#define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200
#define I40E_GL_SWR_PRI_JOIN_MAP_2 0x26CE08
@@ -9238,8 +9239,12 @@ i40e_configure_registers(struct i40e_hw *hw)
reg_table[i].val =
I40E_X722_GL_SWR_PRI_JOIN_MAP_0_VALUE;
else /* For X710/XL710/XXV710 */
- reg_table[i].val =
- I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE;
+ if (hw->aq.fw_maj_ver < 6)
+ reg_table[i].val =
+ I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE_1;
+ else
+ reg_table[i].val =
+ I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE_2;
}
if (reg_table[i].addr == I40E_GL_SWR_PRI_JOIN_MAP_2) {
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix Rx/Tx queue interrupt for x550 devices' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (10 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix ethertype filter for new FW' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'eventdev: fix memory realloc check in port config' " Yuanhan Liu
` (51 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Qiming Yang; +Cc: Wei Dai, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 336da7a69dac6511fc3a45e4487b143c0a3bd228 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Tue, 18 Jul 2017 10:28:34 +0800
Subject: [PATCH] net/ixgbe: fix Rx/Tx queue interrupt for x550 devices
[ upstream commit 9f9d2653f19673c9c5b4d2cbf3592a7256f4771d ]
x550 devices don't map interrupt vector before enabling Rx/Tx queue
interrupt.
Because of this interrupt mode is not working for x550 devices.
Fixes: d2e72774e58c ("ixgbe/base: support X550")
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 78355db..0a142ee 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5480,7 +5480,8 @@ ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t direction,
tmp |= (msix_vector << (8 * (queue & 0x3)));
IXGBE_WRITE_REG(hw, IXGBE_IVAR(idx), tmp);
} else if ((hw->mac.type == ixgbe_mac_82599EB) ||
- (hw->mac.type == ixgbe_mac_X540)) {
+ (hw->mac.type == ixgbe_mac_X540) ||
+ (hw->mac.type == ixgbe_mac_X550)) {
if (direction == -1) {
/* other causes */
idx = ((queue & 1) * 8);
@@ -5588,6 +5589,7 @@ ixgbe_configure_msix(struct rte_eth_dev *dev)
break;
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
+ case ixgbe_mac_X550:
ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID);
break;
default:
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'eventdev: fix memory realloc check in port config' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (11 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/ixgbe: fix Rx/Tx queue interrupt for x550 devices' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/scheduler: fix slave name parsing' " Yuanhan Liu
` (50 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Harry van Haaren; +Cc: Jerin Jacob, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3595ca9a6aa074cb4b08a44c9122e64af92254f7 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Mon, 17 Jul 2017 17:09:47 +0100
Subject: [PATCH] eventdev: fix memory realloc check in port config
[ upstream commit f9a96a50d8abc03f704d02defc8cb6238ff20a58 ]
This commit fixes the check to use the just reallocated
links_map variable, instead of stale dev->data->links_map.
Later the new variable is written to the dev->data->links_map,
so the stale-ness is only temporary.
Coverity issue: 143456
Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
lib/librte_eventdev/rte_eventdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index 20afc3f..755f9f7 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -301,7 +301,7 @@ rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports)
sizeof(dev->data->links_map[0]) * nb_ports *
RTE_EVENT_MAX_QUEUES_PER_DEV,
RTE_CACHE_LINE_SIZE);
- if (dev->data->links_map == NULL) {
+ if (links_map == NULL) {
dev->data->nb_ports = 0;
RTE_EDEV_LOG_ERR("failed to realloc mem for port_map,"
"nb_ports %u", nb_ports);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/scheduler: fix slave name parsing' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (12 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'eventdev: fix memory realloc check in port config' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: fix NULL authentication hang' " Yuanhan Liu
` (49 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Fan Zhang; +Cc: Pablo de Lara, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 7bd267bedca5eb17658f38b0d76b06a063c2c07f Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Fri, 7 Jul 2017 06:17:30 +0100
Subject: [PATCH] crypto/scheduler: fix slave name parsing
[ upstream commit 829d1327310be6d79ad8d6617f7abcc1ad1ad202 ]
This patch fixes the incorrect index checking in parse_slave
function.
Fixes: 503e9c5afb38 ("crypto/scheduler: register as vdev driver")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
drivers/crypto/scheduler/scheduler_pmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 0b63c20..8188484 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -277,7 +277,7 @@ parse_slave_arg(const char *key __rte_unused,
{
struct scheduler_init_params *param = extra_args;
- if (param->nb_slaves >= RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES - 1) {
+ if (param->nb_slaves >= RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES) {
CS_LOG_ERR("Too many slaves.\n");
return -ENOMEM;
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/qat: fix NULL authentication hang' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (13 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/scheduler: fix slave name parsing' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix free usage for dpsec' " Yuanhan Liu
` (48 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Arek Kusztal; +Cc: Fiona Trahe, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d45f07b03277f05c7fbf2b9960d5049dbe69d559 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Fri, 21 Apr 2017 09:11:30 +0100
Subject: [PATCH] crypto/qat: fix NULL authentication hang
[ upstream commit 426dc9e3018dcdb0db9b2c58405d9ee5f28b0b00 ]
To avoid a possible HW problem when dealing with
NULL authentication case, the state sizes
in the request descriptor are set.
Fixes: db0e952a5c01 ("crypto/qat: add NULL capability")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
drivers/crypto/qat/qat_adf/qat_algs_build_desc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
index 154e1dd..10b25ff 100644
--- a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
+++ b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
@@ -121,6 +121,9 @@ static int qat_hash_get_state1_size(enum icp_qat_hw_auth_algo qat_hash_alg)
case ICP_QAT_HW_AUTH_ALGO_KASUMI_F9:
return QAT_HW_ROUND_UP(ICP_QAT_HW_KASUMI_F9_STATE1_SZ,
QAT_HW_DEFAULT_ALIGNMENT);
+ case ICP_QAT_HW_AUTH_ALGO_NULL:
+ return QAT_HW_ROUND_UP(ICP_QAT_HW_NULL_STATE1_SZ,
+ QAT_HW_DEFAULT_ALIGNMENT);
case ICP_QAT_HW_AUTH_ALGO_DELIMITER:
/* return maximum state1 size in this case */
return QAT_HW_ROUND_UP(ICP_QAT_HW_SHA512_STATE1_SZ,
@@ -868,6 +871,9 @@ int qat_alg_aead_session_create_content_desc_auth(struct qat_session *cdesc,
state2_size = ICP_QAT_HW_MD5_STATE2_SZ;
break;
case ICP_QAT_HW_AUTH_ALGO_NULL:
+ state1_size = qat_hash_get_state1_size(
+ ICP_QAT_HW_AUTH_ALGO_NULL);
+ state2_size = ICP_QAT_HW_NULL_STATE2_SZ;
break;
case ICP_QAT_HW_AUTH_ALGO_KASUMI_F9:
state1_size = qat_hash_get_state1_size(
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/dpaa2_sec: fix free usage for dpsec' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (14 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: fix NULL authentication hang' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: fix possible crypto job leak' " Yuanhan Liu
` (47 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Akhil Goyal; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fe0ce9f7ac2f4acdbeb6251b31c4f3f6971f206f Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Wed, 12 Jul 2017 18:04:41 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix free usage for dpsec
[ upstream commit cfd829387ff8154ec4321f863370371599fc90f1 ]
dpseci is allocated using rte_calloc() but it is freed
using free(). Fixing it to use rte_free()
Fixes: e5cbdfc53765 ("crypto/dpaa2_sec: add basic operations")
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 4e01fe8..97ee64c 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1366,7 +1366,7 @@ dpaa2_sec_dev_close(struct rte_cryptodev *dev)
/*Free the allocated memory for ethernet private data and dpseci*/
priv->hw = NULL;
- free(dpseci);
+ rte_free(dpseci);
return 0;
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/aesni_mb: fix possible crypto job leak' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (15 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix free usage for dpsec' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'doc: remove incorrect limitation on AESNI-MB PMD' " Yuanhan Liu
` (46 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From e2b2c7022f07472e77b816f615420553160589c5 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 13 Jul 2017 04:35:12 +0100
Subject: [PATCH] crypto/aesni_mb: fix possible crypto job leak
[ upstream commit 7c95d47c1ead28b7ffa0fc77e33d76b014c9511e ]
When dequeueing operations from an AESNI-MB device,
crypto jobs are dequeued from the internal scheduler
in the Multi-buffer library.
If the number of jobs available to retrieve
are higher than the number of crypto operations
that are required, then an extra job is retrieved
(due to an incorrect conditional), but not used.
This leads to a job leak and the operation associated
to that job will not be ever dequeued.
Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 43e4865..9d40a9f 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -565,7 +565,7 @@ handle_completed_jobs(struct aesni_mb_qp *qp, JOB_AES_HMAC *job,
struct rte_crypto_op *op = NULL;
unsigned processed_jobs = 0;
- while (job != NULL && processed_jobs < nb_ops) {
+ while (job != NULL) {
op = post_process_mb_job(qp, job);
if (op) {
@@ -575,6 +575,8 @@ handle_completed_jobs(struct aesni_mb_qp *qp, JOB_AES_HMAC *job,
qp->stats.dequeue_err_count++;
break;
}
+ if (processed_jobs == nb_ops)
+ break;
job = (*qp->op_fns->job.get_completed_job)(&qp->mb_mgr);
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: remove incorrect limitation on AESNI-MB PMD' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (16 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: fix possible crypto job leak' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'doc: add missing algorithm in limitations for QAT' " Yuanhan Liu
` (45 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 63d612de6f8f22eedd082cecc1cdcfefca5b0482 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 13 Jul 2017 06:36:48 +0100
Subject: [PATCH] doc: remove incorrect limitation on AESNI-MB PMD
[ upstream commit 8082845f8aea8407a3741783951f182a48f2855f ]
AESNI MB PMD supports sessionless operations,
but the documentation was stating that only
operations with session were supported.
Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
doc/guides/cryptodevs/aesni_mb.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
index ecb52a1..42905c1 100644
--- a/doc/guides/cryptodevs/aesni_mb.rst
+++ b/doc/guides/cryptodevs/aesni_mb.rst
@@ -68,7 +68,7 @@ Limitations
* Chained mbufs are not supported.
* Only in-place is currently supported (destination address is the same as source address).
-* Only supports session-oriented API implementation (session-less APIs are not supported).
+
Installation
------------
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'doc: add missing algorithm in limitations for QAT' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (17 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'doc: remove incorrect limitation on AESNI-MB PMD' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: fix zero burst dequeue' " Yuanhan Liu
` (44 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c9614a447e9e775a70aa86f02196db23228c930a Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 13 Jul 2017 06:36:49 +0100
Subject: [PATCH] doc: add missing algorithm in limitations for QAT
[ upstream commit 2142e6dc71b46d1ff4cd03c12a0153e30d3a1fa3 ]
For KASUMI, SNOW3G and ZUC algorithms, offsets and lengths
of the data to cipher or authenticate is provided in bits,
but QAT does not support non-byte aligned values,
although only KASUMI and SNOW3G were mentioned.
Fixes: d9b7d5bbc845 ("crypto/qat: add ZUC EEA3/EIA3 capability")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
doc/guides/cryptodevs/qat.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 21b56fc..7ab5959 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -84,8 +84,8 @@ Limitations
* Hash only is not supported except SNOW 3G UIA2 and KASUMI F9.
* Only supports the session-oriented API implementation (session-less APIs are not supported).
-* SNOW 3G (UEA2) and KASUMI (F8) supported only if cipher length, cipher offset fields are byte-aligned.
-* SNOW 3G (UIA2) and KASUMI (F9) supported only if hash length, hash offset fields are byte-aligned.
+* SNOW 3G (UEA2), KASUMI (F8) and ZUC (EEA3) supported only if cipher length and offset fields are byte-multiple.
+* SNOW 3G (UIA2), KASUMI (F9) and ZUC (EIA3) supported only if hash length and offset fields are byte-multiple.
* No BSD support as BSD QAT kernel driver not available.
* ZUC EEA3/EIA3 is not supported by dh895xcc devices
* Maximum additional authenticated data (AAD) for GCM is 240 bytes long.
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/aesni_mb: fix zero burst dequeue' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (18 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'doc: add missing algorithm in limitations for QAT' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/scheduler: fix strings not null terminated' " Yuanhan Liu
` (43 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 438e3ff354309527f3353f5ec4dbf5eaa0a5f885 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Fri, 14 Jul 2017 07:48:47 +0100
Subject: [PATCH] crypto/aesni_mb: fix zero burst dequeue
[ upstream commit 0b4b1e1b88edab32a0cdfe706c800c0419c3a16a ]
In the unlikely scenario that an application
calls rte_cryptodev_dequeue_burst with nb_ops = 0,
there was a job leak, as a job would be created
but would not be populated, as no operation is passed.
Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 9d40a9f..06a6435 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -622,6 +622,9 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
int retval, processed_jobs = 0;
+ if (unlikely(nb_ops == 0))
+ return 0;
+
do {
/* Get next operation to process from ingress queue */
retval = rte_ring_dequeue(qp->ingress_queue, (void **)&op);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/scheduler: fix strings not null terminated' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (19 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: fix zero burst dequeue' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/crypto-perf: stop crypto devices after test' " Yuanhan Liu
` (42 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6c1033264bdc922eab8d50c2047b97cd170bb1cc Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 18 Jul 2017 02:41:15 +0100
Subject: [PATCH] crypto/scheduler: fix strings not null terminated
[ upstream commit d040aca671708ce9cb21af87a1389d2230880d91 ]
Coverity issue: 143431
Fixes: 31439ee72b2c ("crypto/scheduler: add API implementations")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
drivers/crypto/scheduler/rte_cryptodev_scheduler.c | 14 ++++++++++++++
drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 1 +
2 files changed, 15 insertions(+)
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 319dcf0..88f8fc0 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -467,8 +467,22 @@ rte_cryptodev_scheduler_load_user_scheduler(uint8_t scheduler_id,
sched_ctx = dev->data->dev_private;
+ if (strlen(scheduler->name) > RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
+ CS_LOG_ERR("Invalid name %s, should be less than "
+ "%u bytes.\n", scheduler->name,
+ RTE_CRYPTODEV_NAME_MAX_LEN);
+ return -EINVAL;
+ }
strncpy(sched_ctx->name, scheduler->name,
RTE_CRYPTODEV_SCHEDULER_NAME_MAX_LEN);
+
+ if (strlen(scheduler->description) >
+ RTE_CRYPTODEV_SCHEDULER_DESC_MAX_LEN - 1) {
+ CS_LOG_ERR("Invalid description %s, should be less than "
+ "%u bytes.\n", scheduler->description,
+ RTE_CRYPTODEV_SCHEDULER_DESC_MAX_LEN - 1);
+ return -EINVAL;
+ }
strncpy(sched_ctx->description, scheduler->description,
RTE_CRYPTODEV_SCHEDULER_DESC_MAX_LEN);
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
index 2ba6e47..b250a58 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
@@ -116,6 +116,7 @@ struct rte_cryptodev_scheduler;
* - 0 if the scheduler is successfully loaded
* - -ENOTSUP if the operation is not supported.
* - -EBUSY if device is started.
+ * - -EINVAL if input values are invalid.
*/
int
rte_cryptodev_scheduler_load_user_scheduler(uint8_t scheduler_id,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'app/crypto-perf: stop crypto devices after test' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (20 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/scheduler: fix strings not null terminated' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'cmdline: fix dynamic tokens initialization' " Yuanhan Liu
` (41 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Kirill Rybalchenko; +Cc: Pablo de Lara, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From bd7b64d5ef5ffc1988186a4a4f9ec9db0f87ad9e Mon Sep 17 00:00:00 2001
From: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Date: Wed, 14 Jun 2017 09:44:04 +0100
Subject: [PATCH] app/crypto-perf: stop crypto devices after test
[ upstream commit 9189644f8bac43979920f1c5c64900db5736649f ]
Call of rte_cryptodev_stop() function from test destructors
is added.
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/cperf_test_latency.c | 3 ++-
app/test-crypto-perf/cperf_test_throughput.c | 2 ++
app/test-crypto-perf/cperf_test_verify.c | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index e61ac97..fd974c4 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -547,6 +547,7 @@ cperf_latency_test_destructor(void *arg)
if (ctx == NULL)
return;
- cperf_latency_test_free(ctx, ctx->options->pool_sz);
+ rte_cryptodev_stop(ctx->dev_id);
+ cperf_latency_test_free(ctx, ctx->options->pool_sz);
}
diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c
index 61b27ea..be683cd 100644
--- a/app/test-crypto-perf/cperf_test_throughput.c
+++ b/app/test-crypto-perf/cperf_test_throughput.c
@@ -514,5 +514,7 @@ cperf_throughput_test_destructor(void *arg)
if (ctx == NULL)
return;
+ rte_cryptodev_stop(ctx->dev_id);
+
cperf_throughput_test_free(ctx, ctx->options->pool_sz);
}
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 454221e..a842f59 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -575,5 +575,7 @@ cperf_verify_test_destructor(void *arg)
if (ctx == NULL)
return;
+ rte_cryptodev_stop(ctx->dev_id);
+
cperf_verify_test_free(ctx, ctx->options->pool_sz);
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'cmdline: fix dynamic tokens initialization' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (21 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'app/crypto-perf: stop crypto devices after test' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'cmdline: fix dynamic tokens interface' " Yuanhan Liu
` (40 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Adrien Mazarguil
Cc: Bernard Iremonger, Olivier Matz, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c8634fa55469fbaf647f8f192aa73db32705a745 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Mon, 10 Jul 2017 14:09:34 +0200
Subject: [PATCH] cmdline: fix dynamic tokens initialization
[ upstream commit f627b65cb0706cd3eb47a57f6de312c8605e3ba8 ]
To avoid redundant calls to the token-generating function and provide it
with helpful context, a temporary fixed-size array allocated on the stack
of cmdline_parse() and cmdline_complete() keeps the address of preceding
tokens for the command instance being processed (cmdline_parse_inst_t).
Like the static tokens array in cmdline_parse_inst_t, it must be
NULL-terminated, however this is not properly enforced as it is initialized
once at the beginning of each function and a NULL terminator is never
appended once replaced with generated tokens.
When several commands rely on dynamic tokens, subsequent ones inherit an
already initialized array whose tokens are not regenerated, which causes
various issues such as mixed and repeated tokens from the first command.
Enforcing NULL termination of the dynamic tokens array and reinitializing
its first entry at each iteration solves these issues. Doing so is also
less expensive than a full memset() at each iteration.
Fixes: 4fffc05a2b2c ("cmdline: support dynamic tokens")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_cmdline/cmdline_parse.c | 78 ++++++++++++++++++--------------------
1 file changed, 36 insertions(+), 42 deletions(-)
diff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c
index b814880..67e452d 100644
--- a/lib/librte_cmdline/cmdline_parse.c
+++ b/lib/librte_cmdline/cmdline_parse.c
@@ -139,6 +139,32 @@ nb_common_chars(const char * s1, const char * s2)
return i;
}
+/** Retrieve either static or dynamic token at a given index. */
+static cmdline_parse_token_hdr_t *
+get_token(cmdline_parse_inst_t *inst,
+ unsigned int index,
+ cmdline_parse_token_hdr_t
+ *(*dyn_tokens)[CMDLINE_PARSE_DYNAMIC_TOKENS])
+{
+ /* check presence of static tokens first */
+ if (inst->tokens[0] || !inst->f)
+ return inst->tokens[index];
+ /* for dynamic tokens, make sure index does not overflow */
+ if (index >= CMDLINE_PARSE_DYNAMIC_TOKENS - 1)
+ return NULL;
+ /* in case token is already generated, return it */
+ if ((*dyn_tokens)[index])
+ return (*dyn_tokens)[index];
+ /* generate token */
+ inst->f(&(*dyn_tokens)[index], NULL, dyn_tokens);
+ /* return immediately if there are no more tokens to expect */
+ if (!(*dyn_tokens)[index])
+ return NULL;
+ /* terminate list with a NULL entry */
+ (*dyn_tokens)[index + 1] = NULL;
+ return (*dyn_tokens)[index];
+}
+
/**
* try to match the buffer with an instruction (only the first
* nb_match_token tokens if != 0). Return 0 if we match all the
@@ -156,12 +182,7 @@ match_inst(cmdline_parse_inst_t *inst, const char *buf,
int n = 0;
struct cmdline_token_hdr token_hdr;
- token_p = inst->tokens[token_num];
- if (!token_p && dyn_tokens && inst->f) {
- if (!(*dyn_tokens)[0])
- inst->f(&(*dyn_tokens)[0], NULL, dyn_tokens);
- token_p = (*dyn_tokens)[0];
- }
+ token_p = get_token(inst, token_num, dyn_tokens);
if (token_p)
memcpy(&token_hdr, token_p, sizeof(token_hdr));
@@ -203,17 +224,7 @@ match_inst(cmdline_parse_inst_t *inst, const char *buf,
buf += n;
token_num ++;
- if (!inst->tokens[0]) {
- if (token_num < (CMDLINE_PARSE_DYNAMIC_TOKENS - 1)) {
- if (!(*dyn_tokens)[token_num])
- inst->f(&(*dyn_tokens)[token_num],
- NULL,
- dyn_tokens);
- token_p = (*dyn_tokens)[token_num];
- } else
- token_p = NULL;
- } else
- token_p = inst->tokens[token_num];
+ token_p = get_token(inst, token_num, dyn_tokens);
if (token_p)
memcpy(&token_hdr, token_p, sizeof(token_hdr));
}
@@ -276,7 +287,6 @@ cmdline_parse(struct cmdline *cl, const char * buf)
return CMDLINE_PARSE_BAD_ARGS;
ctx = cl->ctx;
- memset(&dyn_tokens, 0, sizeof(dyn_tokens));
/*
* - look if the buffer contains at least one line
@@ -317,6 +327,7 @@ cmdline_parse(struct cmdline *cl, const char * buf)
/* parse it !! */
inst = ctx[inst_num];
+ dyn_tokens[0] = NULL;
while (inst) {
debug_printf("INST %d\n", inst_num);
@@ -354,6 +365,7 @@ cmdline_parse(struct cmdline *cl, const char * buf)
inst_num ++;
inst = ctx[inst_num];
+ dyn_tokens[0] = NULL;
}
/* call func */
@@ -400,7 +412,6 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
debug_printf("%s called\n", __func__);
memset(&token_hdr, 0, sizeof(token_hdr));
- memset(&dyn_tokens, 0, sizeof(dyn_tokens));
/* count the number of complete token to parse */
for (i=0 ; buf[i] ; i++) {
@@ -421,6 +432,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
nb_non_completable = 0;
inst = ctx[inst_num];
+ dyn_tokens[0] = NULL;
while (inst) {
/* parse the first tokens of the inst */
if (nb_token &&
@@ -429,18 +441,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
goto next;
debug_printf("instruction match\n");
- if (!inst->tokens[0]) {
- if (nb_token <
- (CMDLINE_PARSE_DYNAMIC_TOKENS - 1)) {
- if (!dyn_tokens[nb_token])
- inst->f(&dyn_tokens[nb_token],
- NULL,
- &dyn_tokens);
- token_p = dyn_tokens[nb_token];
- } else
- token_p = NULL;
- } else
- token_p = inst->tokens[nb_token];
+ token_p = get_token(inst, nb_token, &dyn_tokens);
if (token_p)
memcpy(&token_hdr, token_p, sizeof(token_hdr));
@@ -494,6 +495,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
debug_printf("next\n");
inst_num ++;
inst = ctx[inst_num];
+ dyn_tokens[0] = NULL;
}
debug_printf("total choices %d for this completion\n",
@@ -526,6 +528,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
inst_num = 0;
inst = ctx[inst_num];
+ dyn_tokens[0] = NULL;
while (inst) {
/* we need to redo it */
inst = ctx[inst_num];
@@ -534,17 +537,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
match_inst(inst, buf, nb_token, NULL, 0, &dyn_tokens))
goto next2;
- if (!inst->tokens[0]) {
- if (nb_token < (CMDLINE_PARSE_DYNAMIC_TOKENS - 1)) {
- if (!dyn_tokens[nb_token])
- inst->f(&dyn_tokens[nb_token],
- NULL,
- &dyn_tokens);
- token_p = dyn_tokens[nb_token];
- } else
- token_p = NULL;
- } else
- token_p = inst->tokens[nb_token];
+ token_p = get_token(inst, nb_token, &dyn_tokens);
if (token_p)
memcpy(&token_hdr, token_p, sizeof(token_hdr));
@@ -617,6 +610,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
next2:
inst_num ++;
inst = ctx[inst_num];
+ dyn_tokens[0] = NULL;
}
return 0;
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'cmdline: fix dynamic tokens interface' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (22 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'cmdline: fix dynamic tokens initialization' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/testpmd: fix token matching in flow command' " Yuanhan Liu
` (39 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: Olivier Matz, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d9663e500543c050478e9bfaef9d48f4854c8125 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Mon, 10 Jul 2017 14:09:35 +0200
Subject: [PATCH] cmdline: fix dynamic tokens interface
[ upstream commit a9510e11ad2de08ba9a56b5f8fca4745fe6c72ca ]
Support for dynamic tokens was added in order to implement the flow command
in testpmd, for which static tokens were not versatile enough due to the
large number of possible parameter combinations.
However, due to its reliance on a temporary array to store dynamic tokens,
this interface suffers from various limitations that need to be addressed
in order to implement more commands in the future:
- The maximum number of dynamic tokens is determined at compilation time
(CMDLINE_PARSE_DYNAMIC_TOKENS). The larger this value, the more stack
space is wasted (one pointer per potential token, i.e. 1kB of stack space
on 64-bit architectures with the default value).
- This temporary array is actually a cache in which entries already present
are not regenerated. This behavior is not documented, which makes dynamic
tokens practically unusable by applications as they do not know which
token is current.
- The cache does not really reduce the number of function calls needed to
retrieve tokens, it was mainly deemed useful to provide context about
other tokens to the generator callback.
- Like testpmd, most users will likely use repeated pointers to a fixed
token header structure (cmdline_token_hdr_t), with internal context-aware
callbacks that do not need to look at other entries; knowing the index of
the current token is enough.
Getting rid of the temporary array and properly documenting usage of the
token generator callback greatly simplifies this interface.
Fixes: 4fffc05a2b2c ("cmdline: support dynamic tokens")
Fixes: 19c90af6285c ("app/testpmd: add flow command")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
app/test-pmd/cmdline_flow.c | 15 ++-------
lib/librte_cmdline/cmdline_parse.c | 63 +++++++++++---------------------------
lib/librte_cmdline/cmdline_parse.h | 50 ++++++++++++++++++++++++------
3 files changed, 60 insertions(+), 68 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 0fd69f9..dfff8be 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -220,7 +220,6 @@ struct context {
enum index prev; /**< Index of the last token seen. */
int next_num; /**< Number of entries in next[]. */
int args_num; /**< Number of entries in args[]. */
- uint32_t reparse:1; /**< Start over from the beginning. */
uint32_t eol:1; /**< EOL has been detected. */
uint32_t last:1; /**< No more arguments. */
uint16_t port; /**< Current port ID (for completions). */
@@ -2534,7 +2533,6 @@ cmd_flow_context_init(struct context *ctx)
ctx->prev = ZERO;
ctx->next_num = 0;
ctx->args_num = 0;
- ctx->reparse = 0;
ctx->eol = 0;
ctx->last = 0;
ctx->port = 0;
@@ -2555,9 +2553,6 @@ cmd_flow_parse(cmdline_parse_token_hdr_t *hdr, const char *src, void *result,
int i;
(void)hdr;
- /* Restart as requested. */
- if (ctx->reparse)
- cmd_flow_context_init(ctx);
token = &token_list[ctx->curr];
/* Check argument length. */
ctx->eol = 0;
@@ -2633,8 +2628,6 @@ cmd_flow_complete_get_nb(cmdline_parse_token_hdr_t *hdr)
int i;
(void)hdr;
- /* Tell cmd_flow_parse() that context must be reinitialized. */
- ctx->reparse = 1;
/* Count number of tokens in current list. */
if (ctx->next_num)
list = ctx->next[ctx->next_num - 1];
@@ -2668,8 +2661,6 @@ cmd_flow_complete_get_elt(cmdline_parse_token_hdr_t *hdr, int index,
int i;
(void)hdr;
- /* Tell cmd_flow_parse() that context must be reinitialized. */
- ctx->reparse = 1;
/* Count number of tokens in current list. */
if (ctx->next_num)
list = ctx->next[ctx->next_num - 1];
@@ -2704,8 +2695,6 @@ cmd_flow_get_help(cmdline_parse_token_hdr_t *hdr, char *dst, unsigned int size)
const struct token *token = &token_list[ctx->prev];
(void)hdr;
- /* Tell cmd_flow_parse() that context must be reinitialized. */
- ctx->reparse = 1;
if (!size)
return -1;
/* Set token type and update global help with details. */
@@ -2731,12 +2720,12 @@ static struct cmdline_token_hdr cmd_flow_token_hdr = {
/** Populate the next dynamic token. */
static void
cmd_flow_tok(cmdline_parse_token_hdr_t **hdr,
- cmdline_parse_token_hdr_t *(*hdrs)[])
+ cmdline_parse_token_hdr_t **hdr_inst)
{
struct context *ctx = &cmd_flow_context;
/* Always reinitialize context before requesting the first token. */
- if (!(hdr - *hdrs))
+ if (!(hdr_inst - cmd_flow.tokens))
cmd_flow_context_init(ctx);
/* Return NULL when no more tokens are expected. */
if (!ctx->next_num && ctx->curr) {
diff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c
index 67e452d..56491ea 100644
--- a/lib/librte_cmdline/cmdline_parse.c
+++ b/lib/librte_cmdline/cmdline_parse.c
@@ -141,28 +141,17 @@ nb_common_chars(const char * s1, const char * s2)
/** Retrieve either static or dynamic token at a given index. */
static cmdline_parse_token_hdr_t *
-get_token(cmdline_parse_inst_t *inst,
- unsigned int index,
- cmdline_parse_token_hdr_t
- *(*dyn_tokens)[CMDLINE_PARSE_DYNAMIC_TOKENS])
+get_token(cmdline_parse_inst_t *inst, unsigned int index)
{
+ cmdline_parse_token_hdr_t *token_p;
+
/* check presence of static tokens first */
if (inst->tokens[0] || !inst->f)
return inst->tokens[index];
- /* for dynamic tokens, make sure index does not overflow */
- if (index >= CMDLINE_PARSE_DYNAMIC_TOKENS - 1)
- return NULL;
- /* in case token is already generated, return it */
- if ((*dyn_tokens)[index])
- return (*dyn_tokens)[index];
- /* generate token */
- inst->f(&(*dyn_tokens)[index], NULL, dyn_tokens);
- /* return immediately if there are no more tokens to expect */
- if (!(*dyn_tokens)[index])
- return NULL;
- /* terminate list with a NULL entry */
- (*dyn_tokens)[index + 1] = NULL;
- return (*dyn_tokens)[index];
+ /* generate dynamic token */
+ token_p = NULL;
+ inst->f(&token_p, NULL, &inst->tokens[index]);
+ return token_p;
}
/**
@@ -172,22 +161,20 @@ get_token(cmdline_parse_inst_t *inst,
*/
static int
match_inst(cmdline_parse_inst_t *inst, const char *buf,
- unsigned int nb_match_token, void *resbuf, unsigned resbuf_size,
- cmdline_parse_token_hdr_t
- *(*dyn_tokens)[CMDLINE_PARSE_DYNAMIC_TOKENS])
+ unsigned int nb_match_token, void *resbuf, unsigned resbuf_size)
{
- unsigned int token_num=0;
cmdline_parse_token_hdr_t * token_p;
unsigned int i=0;
int n = 0;
struct cmdline_token_hdr token_hdr;
- token_p = get_token(inst, token_num, dyn_tokens);
- if (token_p)
+ /* check if we match all tokens of inst */
+ while (!nb_match_token || i < nb_match_token) {
+ token_p = get_token(inst, i);
+ if (!token_p)
+ break;
memcpy(&token_hdr, token_p, sizeof(token_hdr));
- /* check if we match all tokens of inst */
- while (token_p && (!nb_match_token || i<nb_match_token)) {
debug_printf("TK\n");
/* skip spaces */
while (isblank2(*buf)) {
@@ -222,11 +209,6 @@ match_inst(cmdline_parse_inst_t *inst, const char *buf,
debug_printf("TK parsed (len=%d)\n", n);
i++;
buf += n;
-
- token_num ++;
- token_p = get_token(inst, token_num, dyn_tokens);
- if (token_p)
- memcpy(&token_hdr, token_p, sizeof(token_hdr));
}
/* does not match */
@@ -270,7 +252,6 @@ cmdline_parse(struct cmdline *cl, const char * buf)
char buf[CMDLINE_PARSE_RESULT_BUFSIZE];
long double align; /* strong alignment constraint for buf */
} result, tmp_result;
- cmdline_parse_token_hdr_t *dyn_tokens[CMDLINE_PARSE_DYNAMIC_TOKENS];
void (*f)(void *, struct cmdline *, void *) = NULL;
void *data = NULL;
int comment = 0;
@@ -327,13 +308,12 @@ cmdline_parse(struct cmdline *cl, const char * buf)
/* parse it !! */
inst = ctx[inst_num];
- dyn_tokens[0] = NULL;
while (inst) {
debug_printf("INST %d\n", inst_num);
/* fully parsed */
tok = match_inst(inst, buf, 0, tmp_result.buf,
- sizeof(tmp_result.buf), &dyn_tokens);
+ sizeof(tmp_result.buf));
if (tok > 0) /* we matched at least one token */
err = CMDLINE_PARSE_BAD_ARGS;
@@ -365,7 +345,6 @@ cmdline_parse(struct cmdline *cl, const char * buf)
inst_num ++;
inst = ctx[inst_num];
- dyn_tokens[0] = NULL;
}
/* call func */
@@ -392,7 +371,6 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
cmdline_parse_token_hdr_t *token_p;
struct cmdline_token_hdr token_hdr;
char tmpbuf[CMDLINE_BUFFER_SIZE], comp_buf[CMDLINE_BUFFER_SIZE];
- cmdline_parse_token_hdr_t *dyn_tokens[CMDLINE_PARSE_DYNAMIC_TOKENS];
unsigned int partial_tok_len;
int comp_len = -1;
int tmp_len = -1;
@@ -432,16 +410,14 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
nb_non_completable = 0;
inst = ctx[inst_num];
- dyn_tokens[0] = NULL;
while (inst) {
/* parse the first tokens of the inst */
if (nb_token &&
- match_inst(inst, buf, nb_token, NULL, 0,
- &dyn_tokens))
+ match_inst(inst, buf, nb_token, NULL, 0))
goto next;
debug_printf("instruction match\n");
- token_p = get_token(inst, nb_token, &dyn_tokens);
+ token_p = get_token(inst, nb_token);
if (token_p)
memcpy(&token_hdr, token_p, sizeof(token_hdr));
@@ -495,7 +471,6 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
debug_printf("next\n");
inst_num ++;
inst = ctx[inst_num];
- dyn_tokens[0] = NULL;
}
debug_printf("total choices %d for this completion\n",
@@ -528,16 +503,15 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
inst_num = 0;
inst = ctx[inst_num];
- dyn_tokens[0] = NULL;
while (inst) {
/* we need to redo it */
inst = ctx[inst_num];
if (nb_token &&
- match_inst(inst, buf, nb_token, NULL, 0, &dyn_tokens))
+ match_inst(inst, buf, nb_token, NULL, 0))
goto next2;
- token_p = get_token(inst, nb_token, &dyn_tokens);
+ token_p = get_token(inst, nb_token);
if (token_p)
memcpy(&token_hdr, token_p, sizeof(token_hdr));
@@ -610,7 +584,6 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
next2:
inst_num ++;
inst = ctx[inst_num];
- dyn_tokens[0] = NULL;
}
return 0;
}
diff --git a/lib/librte_cmdline/cmdline_parse.h b/lib/librte_cmdline/cmdline_parse.h
index 65b18d4..13e086f 100644
--- a/lib/librte_cmdline/cmdline_parse.h
+++ b/lib/librte_cmdline/cmdline_parse.h
@@ -83,9 +83,6 @@ extern "C" {
/* maximum buffer size for parsed result */
#define CMDLINE_PARSE_RESULT_BUFSIZE 8192
-/* maximum number of dynamic tokens */
-#define CMDLINE_PARSE_DYNAMIC_TOKENS 128
-
/**
* Stores a pointer to the ops struct, and the offset: the place to
* write the parsed result in the destination structure.
@@ -137,20 +134,53 @@ struct cmdline;
* When no tokens are defined (tokens[0] == NULL), they are retrieved
* dynamically by calling f() as follows:
*
- * f((struct cmdline_token_hdr **)&token_hdr,
- * NULL,
- * (struct cmdline_token_hdr *[])tokens));
+ * @code
+ *
+ * f((struct cmdline_token_hdr **)&token_p,
+ * NULL,
+ * (struct cmdline_token_hdr **)&inst->tokens[num]);
+ *
+ * @endcode
*
* The address of the resulting token is expected at the location pointed by
* the first argument. Can be set to NULL to end the list.
*
* The cmdline argument (struct cmdline *) is always NULL.
*
- * The last argument points to the NULL-terminated list of dynamic tokens
- * defined so far. Since token_hdr points to an index of that list, the
- * current index can be derived as follows:
+ * The last argument points to the inst->tokens[] entry to retrieve, which
+ * is not necessarily inside allocated memory and should neither be read nor
+ * written. Its sole purpose is to deduce the token entry index of interest
+ * as described in the example below.
+ *
+ * Note about constraints:
+ *
+ * - Only the address of these tokens is dynamic, their storage should be
+ * static like normal tokens.
+ * - Dynamic token lists that need to maintain an internal context (e.g. in
+ * order to determine the next token) must store it statically also. This
+ * context must be reinitialized when the first token is requested, that
+ * is, when &inst->tokens[0] is provided as the third argument.
+ * - Dynamic token lists must be NULL-terminated to generate usable
+ * commands.
+ *
+ * @code
+ *
+ * // Assuming first and third arguments are respectively named "token_p"
+ * // and "token":
+ *
+ * int index = token - inst->tokens;
+ *
+ * if (!index) {
+ * [...] // Clean up internal context if any.
+ * }
+ * [...] // Then set up dyn_token according to index.
+ *
+ * if (no_more_tokens)
+ * *token_p = NULL;
+ * else
+ * *token_p = &dyn_token;
*
- * int index = token_hdr - &(*tokens)[0];
+ * @endcode
*/
struct cmdline_inst {
/* f(parsed_struct, data) */
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix token matching in flow command' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (23 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'cmdline: fix dynamic tokens interface' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mempool/dpaa2: fix error code for allocation failure' " Yuanhan Liu
` (38 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 41d56fcb8454e9d6151998fcd5ebdaa432019200 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Mon, 10 Jul 2017 14:09:36 +0200
Subject: [PATCH] app/testpmd: fix token matching in flow command
[ upstream commit a00cbb4586bdff936c81a9179a93b869c52e9b0c ]
While matching user input against a token name or any other fixed string,
comparison stops at the end of user input if shorter (e.g. "foo" matches
token name "foobar").
Although the unintended consequence of this behavior allows users to
abbreviate command names and various parameters yet generate valid
commands, the parser was not designed to support this and does not prevent
ambiguous tokens.
For instance, entering "i" for a pattern item matches "ipv4", "ipv6" and
"icmp" then defaults to one of them in an unspecified manner.
Prevent this behavior by taking the length of fixed strings into account.
Fixes: 19c90af6285c ("app/testpmd: add flow command")
Fixes: 5ac3502ed1be ("app/testpmd: add flow query command")
Fixes: abc3d81aca1b ("app/testpmd: add item raw to flow command")
Fixes: 05d34c6e9d2c ("app/testpmd: add queue actions to flow command")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
app/test-pmd/cmdline_flow.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index dfff8be..4d47e79 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -1573,6 +1573,19 @@ arg_entry_bf_fill(void *dst, uintmax_t val, const struct arg *arg)
return len;
}
+/** Compare a string with a partial one of a given length. */
+static int
+strcmp_partial(const char *full, const char *partial, size_t partial_len)
+{
+ int r = strncmp(full, partial, partial_len);
+
+ if (r)
+ return r;
+ if (strlen(full) <= partial_len)
+ return 0;
+ return full[partial_len];
+}
+
/**
* Parse a prefix length and generate a bit-mask.
*
@@ -1655,7 +1668,7 @@ parse_default(struct context *ctx, const struct token *token,
(void)ctx;
(void)buf;
(void)size;
- if (strncmp(str, token->name, len))
+ if (strcmp_partial(token->name, str, len))
return -1;
return len;
}
@@ -1898,7 +1911,7 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
if (ctx->curr != ACTION_RSS_QUEUE)
return -1;
i = ctx->objdata >> 16;
- if (!strncmp(str, "end", len)) {
+ if (!strcmp_partial("end", str, len)) {
ctx->objdata &= 0xffff;
return len;
}
@@ -2033,7 +2046,7 @@ parse_action(struct context *ctx, const struct token *token,
const struct parse_action_priv *priv;
token = &token_list[next_action[i]];
- if (strncmp(token->name, str, len))
+ if (strcmp_partial(token->name, str, len))
continue;
priv = token->priv;
if (!priv)
@@ -2373,7 +2386,7 @@ parse_boolean(struct context *ctx, const struct token *token,
if (!arg)
return -1;
for (i = 0; boolean_name[i]; ++i)
- if (!strncmp(str, boolean_name[i], len))
+ if (!strcmp_partial(boolean_name[i], str, len))
break;
/* Process token as integer. */
if (boolean_name[i])
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'mempool/dpaa2: fix error code for allocation failure' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (24 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'app/testpmd: fix token matching in flow command' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mempool/dpaa2: fix freeing bp list' " Yuanhan Liu
` (37 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: Olivier Matz, Shreyansh Jain, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From be4873a932957865acc00346712f113959eb2e3f Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 22 Jun 2017 18:18:07 +0530
Subject: [PATCH] mempool/dpaa2: fix error code for allocation failure
[ upstream commit 6ed4390e5e16ddc836279946591618527cd69544 ]
In case the alloc api is not able to allocate the required
number of buffer, it can return '0', which will not indicate
the failure to the calling function.
This patch fix the return value to indicate the failure.
Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 5a5d6aa..27ed5a9 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -294,7 +294,7 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
/* Releasing all buffers allocated */
rte_dpaa2_mbuf_release(pool, obj_table, bpid,
bp_info->meta_data_size, n);
- return ret;
+ return -ENOBUFS;
}
/* assigning mbuf from the acquired objects */
for (i = 0; (i < ret) && bufs[i]; i++) {
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'mempool/dpaa2: fix freeing bp list' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (25 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'mempool/dpaa2: fix error code for allocation failure' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'examples/qos_sched: fix build for less lcores' " Yuanhan Liu
` (36 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: Olivier Matz, Shreyansh Jain, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From e1a1d19c4db47255121ebc7f99e3d2f7d742e3e5 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 22 Jun 2017 18:18:08 +0530
Subject: [PATCH] mempool/dpaa2: fix freeing bp list
[ upstream commit f31f7288835afc06171ae43164ffb6e43d263f52 ]
The dpaa2_bp_list is being allocated using "rte_malloc",
but the free is done using "free". Fixing it to use
"rte_free".
Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 27ed5a9..62a2d25 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -161,7 +161,7 @@ rte_hw_mbuf_free_pool(struct rte_mempool *mp)
while (temp) {
if (temp == bp) {
prev->next = temp->next;
- free(bp);
+ rte_free(bp);
break;
}
prev = temp;
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'examples/qos_sched: fix build for less lcores' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (26 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'mempool/dpaa2: fix freeing bp list' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix HMAC supported key sizes' " Yuanhan Liu
` (35 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From e7abf0e8de18bb922d6c6beae2483bb576678361 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 19 Jul 2017 13:43:10 +0530
Subject: [PATCH] examples/qos_sched: fix build for less lcores
[ upstream commit e481ebfd622c23a1d854cb4655a3534d68d322af ]
APP_MAX_LCORES is hardcoded as 64.
This will cause build err when RTE_MAX_LCORE is less then 64.
"args.c:127:22: error: iteration 8 invokes undefined behavior
[-Werror=aggressive-loop-optimizations]
if (cfg->lcore_role[i] == ROLE_RTE)
~~~~~~~~~~~~~~~^~~
args.c:126:2: note: within this loop
for (i = 0; i < APP_MAX_LCORE; i++) {"
Fixes: d52b5e735aa3 ("examples/qos_sched: fix lcore limit")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
examples/qos_sched/main.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index c7490c6..8d02e1a 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -69,8 +69,13 @@ extern "C" {
#define BURST_TX_DRAIN_US 100
#ifndef APP_MAX_LCORE
+#if (RTE_MAX_LCORE > 64)
#define APP_MAX_LCORE 64
+#else
+#define APP_MAX_LCORE RTE_MAX_LCORE
+#endif
#endif
+
#define MAX_DATA_STREAMS (APP_MAX_LCORE/2)
#define MAX_SCHED_SUBPORTS 8
#define MAX_SCHED_PIPES 4096
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/dpaa2_sec: fix HMAC supported key sizes' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (27 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'examples/qos_sched: fix build for less lcores' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: " Yuanhan Liu
` (34 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Akhil Goyal; +Cc: Hemant Agrawal, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a197e599bc72625ea03dd0356c6643f5db5074dd Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Thu, 27 Jul 2017 17:24:08 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix HMAC supported key sizes
[ upstream commit f947fd77185fef15e6c8471c11c9beb2f1c3a018 ]
For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported
key sizes are not a fixed value, but a range between
1 and the block size.
Fixes: 623326dded3a ("crypto/dpaa2_sec: introduce poll mode driver")
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
index f5c6169..e02bf72 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
@@ -204,9 +204,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_MD5_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 16,
@@ -225,9 +225,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 20,
@@ -246,9 +246,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA224_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 28,
@@ -267,9 +267,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 32,
@@ -288,9 +288,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
.block_size = 128,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 48,
@@ -309,9 +309,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA512_HMAC,
.block_size = 128,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 64,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/aesni_mb: fix HMAC supported key sizes' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (28 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix HMAC supported key sizes' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/openssl: " Yuanhan Liu
` (33 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From b1efe1da73a5f25011258938257e63587fd59f6a Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 25 Jul 2017 06:24:55 +0100
Subject: [PATCH] crypto/aesni_mb: fix HMAC supported key sizes
[ upstream commit cefa431162fcef7f1ef0804beb25d7a9883fc54a ]
For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported
key sizes are not a fixed value, but a range between
1 and the block size.
Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index d1bc28e..cb2893a 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -48,9 +48,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_MD5_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 12,
@@ -69,9 +69,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 12,
@@ -90,9 +90,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA224_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 14,
@@ -111,9 +111,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 16,
@@ -132,9 +132,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
.block_size = 128,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 24,
@@ -153,9 +153,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA512_HMAC,
.block_size = 128,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 32,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/openssl: fix HMAC supported key sizes' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (29 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: " Yuanhan Liu
` (32 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 62ead17e5dfac54f2d3d783dfa7241148e584113 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 25 Jul 2017 06:24:56 +0100
Subject: [PATCH] crypto/openssl: fix HMAC supported key sizes
[ upstream commit e5e7bc712601f8eefe15997cc46265cdc0ace0ce ]
For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported
key sizes are not a fixed value, but a range between
1 and the block size.
Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 22a6873..d6f1ce3 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -48,9 +48,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_MD5_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 16,
@@ -90,9 +90,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 20,
@@ -132,9 +132,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA224_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 28,
@@ -174,9 +174,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 32,
@@ -216,9 +216,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
.block_size = 128,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 48,
@@ -258,9 +258,9 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA512_HMAC,
.block_size = 128,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 64,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/qat: fix HMAC supported key sizes' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (30 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/openssl: " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: fix SHA384-HMAC block size' " Yuanhan Liu
` (31 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Fiona Trahe, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fb82da7b5683847419b8e381baac2e4c79264a56 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 25 Jul 2017 06:24:57 +0100
Subject: [PATCH] crypto/qat: fix HMAC supported key sizes
[ upstream commit 5668da1eb5897a96b672ac3b610bd3542e3e5cbe ]
For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported
key sizes are not a fixed value, but a range between
1 and the block size.
Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
drivers/crypto/qat/qat_crypto_capabilities.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/qat/qat_crypto_capabilities.h b/drivers/crypto/qat/qat_crypto_capabilities.h
index 1294f24..05dfcae 100644
--- a/drivers/crypto/qat/qat_crypto_capabilities.h
+++ b/drivers/crypto/qat/qat_crypto_capabilities.h
@@ -43,9 +43,9 @@
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 64, \
+ .min = 1, \
.max = 64, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 20, \
@@ -64,9 +64,9 @@
.algo = RTE_CRYPTO_AUTH_SHA224_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 64, \
+ .min = 1, \
.max = 64, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 28, \
@@ -85,9 +85,9 @@
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 64, \
+ .min = 1, \
.max = 64, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 32, \
@@ -106,9 +106,9 @@
.algo = RTE_CRYPTO_AUTH_SHA384_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 128, \
+ .min = 1, \
.max = 128, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 48, \
@@ -127,9 +127,9 @@
.algo = RTE_CRYPTO_AUTH_SHA512_HMAC, \
.block_size = 128, \
.key_size = { \
- .min = 128, \
+ .min = 1, \
.max = 128, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 64, \
@@ -148,9 +148,9 @@
.algo = RTE_CRYPTO_AUTH_MD5_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 8, \
+ .min = 1, \
.max = 64, \
- .increment = 8 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 16, \
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/qat: fix SHA384-HMAC block size' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (31 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output' " Yuanhan Liu
` (30 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Fiona Trahe, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 975c7395b57c100cb817180f78778ae503a3d707 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 25 Jul 2017 07:33:32 +0100
Subject: [PATCH] crypto/qat: fix SHA384-HMAC block size
[ upstream commit b5b047aa441adf5c13d25f0a5d3eb76787080903 ]
Block size of SHA384-HMAC algorithm is 128 bytes,
and not 64 bytes.
Fixes: d905ee32d0dc ("crypto/qat: add aes-sha384-hmac capability")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
drivers/crypto/qat/qat_crypto_capabilities.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_crypto_capabilities.h b/drivers/crypto/qat/qat_crypto_capabilities.h
index 05dfcae..42ede7b 100644
--- a/drivers/crypto/qat/qat_crypto_capabilities.h
+++ b/drivers/crypto/qat/qat_crypto_capabilities.h
@@ -104,7 +104,7 @@
.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, \
{.auth = { \
.algo = RTE_CRYPTO_AUTH_SHA384_HMAC, \
- .block_size = 64, \
+ .block_size = 128, \
.key_size = { \
.min = 1, \
.max = 128, \
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'app/crypto-perf: fix CSV output' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (32 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: fix SHA384-HMAC block size' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/armv8: fix authentication session configuration' " Yuanhan Liu
` (29 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0188ce308fee81accc31cc04cda139d1655d7774 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Fri, 28 Jul 2017 00:33:13 +0100
Subject: [PATCH] app/crypto-perf: fix CSV output
[ upstream commit 49ff67d0d90f411713e81ef12ca8720a1974ecb6 ]
When using CSV, the output of the throughput performance numbers
was not correct, representing decimal numbers incorrectly.
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/cperf_test_throughput.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c
index be683cd..73cee65 100644
--- a/app/test-crypto-perf/cperf_test_throughput.c
+++ b/app/test-crypto-perf/cperf_test_throughput.c
@@ -471,14 +471,14 @@ cperf_throughput_test_runner(void *test_ctx)
cycles_per_packet);
} else {
if (!only_once)
- printf("# lcore id, Buffer Size(B),"
+ printf("#lcore id,Buffer Size(B),"
"Burst Size,Enqueued,Dequeued,Failed Enq,"
"Failed Deq,Ops(Millions),Throughput(Gbps),"
"Cycles/Buf\n\n");
only_once = 1;
- printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
- "%.f3;%.f3;%.f3\n",
+ printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
+ "%.3f;%.3f;%.3f\n",
ctx->lcore_id,
ctx->options->test_buffer_size,
test_burst_size,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/armv8: fix authentication session configuration' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (33 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/armv8: fix HMAC supported key sizes' " Yuanhan Liu
` (28 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Srisivasubramanian S; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From bcb44e17f90bfd38cc258751f2785e647d3963c2 Mon Sep 17 00:00:00 2001
From: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Date: Sun, 30 Jul 2017 16:53:00 +0530
Subject: [PATCH] crypto/armv8: fix authentication session configuration
[ upstream commit 473174a7da555ec26751c89b56255192586cb0aa ]
For key sizes greater than digest length, pad with zero rather than
computing hash of the key itself.
Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
---
drivers/crypto/armv8/rte_armv8_pmd.c | 58 ++++++++--------------------
drivers/crypto/armv8/rte_armv8_pmd_private.h | 4 +-
2 files changed, 18 insertions(+), 44 deletions(-)
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 3d603a5..8371245 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -288,27 +288,14 @@ auth_set_prerequisites(struct armv8_crypto_session *sess,
* Generate authentication key, i_key_pad and o_key_pad.
*/
/* Zero memory under key */
- memset(sess->auth.hmac.key, 0, SHA1_AUTH_KEY_LENGTH);
-
- if (xform->auth.key.length > SHA1_AUTH_KEY_LENGTH) {
- /*
- * In case the key is longer than 160 bits
- * the algorithm will use SHA1(key) instead.
- */
- error = sha1_block(NULL, xform->auth.key.data,
- sess->auth.hmac.key, xform->auth.key.length);
- if (error != 0)
- return -1;
- } else {
- /*
- * Now copy the given authentication key to the session
- * key assuming that the session key is zeroed there is
- * no need for additional zero padding if the key is
- * shorter than SHA1_AUTH_KEY_LENGTH.
- */
- rte_memcpy(sess->auth.hmac.key, xform->auth.key.data,
- xform->auth.key.length);
- }
+ memset(sess->auth.hmac.key, 0, SHA1_BLOCK_SIZE);
+
+ /*
+ * Now copy the given authentication key to the session
+ * key.
+ */
+ rte_memcpy(sess->auth.hmac.key, xform->auth.key.data,
+ xform->auth.key.length);
/* Prepare HMAC padding: key|pattern */
auth_hmac_pad_prepare(sess, xform);
@@ -334,27 +321,14 @@ auth_set_prerequisites(struct armv8_crypto_session *sess,
* Generate authentication key, i_key_pad and o_key_pad.
*/
/* Zero memory under key */
- memset(sess->auth.hmac.key, 0, SHA256_AUTH_KEY_LENGTH);
-
- if (xform->auth.key.length > SHA256_AUTH_KEY_LENGTH) {
- /*
- * In case the key is longer than 256 bits
- * the algorithm will use SHA256(key) instead.
- */
- error = sha256_block(NULL, xform->auth.key.data,
- sess->auth.hmac.key, xform->auth.key.length);
- if (error != 0)
- return -1;
- } else {
- /*
- * Now copy the given authentication key to the session
- * key assuming that the session key is zeroed there is
- * no need for additional zero padding if the key is
- * shorter than SHA256_AUTH_KEY_LENGTH.
- */
- rte_memcpy(sess->auth.hmac.key, xform->auth.key.data,
- xform->auth.key.length);
- }
+ memset(sess->auth.hmac.key, 0, SHA256_BLOCK_SIZE);
+
+ /*
+ * Now copy the given authentication key to the session
+ * key.
+ */
+ rte_memcpy(sess->auth.hmac.key, xform->auth.key.data,
+ xform->auth.key.length);
/* Prepare HMAC padding: key|pattern */
auth_hmac_pad_prepare(sess, xform);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
index b75107f..34ab9de 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
+++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
@@ -192,8 +192,8 @@ struct armv8_crypto_session {
uint8_t o_key_pad[SHA_BLOCK_MAX]
__rte_cache_aligned;
/**< outer pad (max supported block length) */
- uint8_t key[SHA_AUTH_KEY_MAX];
- /**< HMAC key (max supported length)*/
+ uint8_t key[SHA_BLOCK_MAX];
+ /**< HMAC key (max supported block length)*/
} hmac;
};
} auth;
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/armv8: fix HMAC supported key sizes' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (34 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/armv8: fix authentication session configuration' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/testpmd: fix flow rule copy functions' " Yuanhan Liu
` (27 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Srisivasubramanian S; +Cc: Jerin Jacob, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 2f578a0fb234e994f35425d083329ffa222c04d2 Mon Sep 17 00:00:00 2001
From: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Date: Sun, 30 Jul 2017 16:53:01 +0530
Subject: [PATCH] crypto/armv8: fix HMAC supported key sizes
[ upstream commit 0f89def76127d694f946d1cf9bd960ebb0323ac2 ]
For HMAC algorithms (SHAx-HMAC), the supported
key sizes are not a fixed value, but a range between
1 and the block size.
Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 4d9ccbf..d171069 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -50,9 +50,9 @@ static const struct rte_cryptodev_capabilities
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.block_size = 64,
.key_size = {
- .min = 16,
- .max = 128,
- .increment = 0
+ .min = 1,
+ .max = 64,
+ .increment = 1
},
.digest_size = {
.min = 20,
@@ -71,9 +71,9 @@ static const struct rte_cryptodev_capabilities
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC,
.block_size = 64,
.key_size = {
- .min = 16,
- .max = 128,
- .increment = 0
+ .min = 1,
+ .max = 64,
+ .increment = 1
},
.digest_size = {
.min = 32,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix flow rule copy functions' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (35 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/armv8: fix HMAC supported key sizes' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mbuf: fix doxygen comment of bulk alloc' " Yuanhan Liu
` (26 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Matan Azrad; +Cc: Adrien Mazarguil, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f39999c13215f15a6de5156a8365b94e801ec71e Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 24 Jul 2017 16:47:32 +0300
Subject: [PATCH] app/testpmd: fix flow rule copy functions
[ upstream commit 79bf388493b5c4be104c6c17fd98aa293dafa42d ]
The corrupted code checks only RAW flow item type special case for
returning its size but doesn't deal with any other flow item type
and returns 0 for all the others.
This bug leaves the flow descriptor empty for non RAW types.
The fix takes the correct size to any regular types from appropriate
array.
The same issue, with a similar fix, is in flow action size method which
deals only with RSS special type.
Fixes: 938a184a1870 ("app/testpmd: implement basic support for flow API")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
app/test-pmd/config.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 83a8f52..1c20661 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -979,8 +979,10 @@ static void
flow_item_spec_size(const struct rte_flow_item *item,
size_t *size, size_t *pad)
{
- if (!item->spec)
+ if (!item->spec) {
+ *size = 0;
goto empty;
+ }
switch (item->type) {
union {
const struct rte_flow_item_raw *raw;
@@ -992,10 +994,10 @@ flow_item_spec_size(const struct rte_flow_item *item,
spec.raw->length * sizeof(*spec.raw->pattern);
break;
default:
-empty:
- *size = 0;
+ *size = flow_item[item->type].size;
break;
}
+empty:
*pad = RTE_ALIGN_CEIL(*size, sizeof(double)) - *size;
}
@@ -1030,8 +1032,10 @@ static void
flow_action_conf_size(const struct rte_flow_action *action,
size_t *size, size_t *pad)
{
- if (!action->conf)
+ if (!action->conf) {
+ *size = 0;
goto empty;
+ }
switch (action->type) {
union {
const struct rte_flow_action_rss *rss;
@@ -1043,10 +1047,10 @@ flow_action_conf_size(const struct rte_flow_action *action,
conf.rss->num * sizeof(*conf.rss->queue);
break;
default:
-empty:
- *size = 0;
+ *size = flow_action[action->type].size;
break;
}
+empty:
*pad = RTE_ALIGN_CEIL(*size, sizeof(double)) - *size;
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'mbuf: fix doxygen comment of bulk alloc' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (36 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'app/testpmd: fix flow rule copy functions' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/virtio: fix MAC address read' " Yuanhan Liu
` (25 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 066ebbc9cfac0e1fe62a2660bb901df18077f127 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 26 Jul 2017 05:20:05 +0100
Subject: [PATCH] mbuf: fix doxygen comment of bulk alloc
[ upstream commit c0bad56ef8b84a2e03bff1f5739a52248d22aedd ]
When calling rte_pktmbuf_alloc_bulk, if there are
not enough objects in the mempool, it returns
a negative value, which should be reflected
in the Doxygen comments.
Fixes: 9ec201f5d6e7 ("mbuf: provide bulk allocation")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
lib/librte_mbuf/rte_mbuf.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 706f99a..1276b3c 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1136,6 +1136,7 @@ static inline struct rte_mbuf *rte_pktmbuf_alloc(struct rte_mempool *mp)
* Array size
* @return
* - 0: Success
+ * - -ENOENT: Not enough entries in the mempool; no mbufs are retrieved.
*/
static inline int rte_pktmbuf_alloc_bulk(struct rte_mempool *pool,
struct rte_mbuf **mbufs, unsigned count)
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix MAC address read' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (37 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'mbuf: fix doxygen comment of bulk alloc' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/virtio: fix Rx interrupt setup' " Yuanhan Liu
` (24 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Jianfeng Tan; +Cc: Vipin Varghese, Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6107ef3772656e42b831ee68f07ebfdda792c84c Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Fri, 28 Jul 2017 23:01:14 +0000
Subject: [PATCH] net/virtio: fix MAC address read
[ upstream commit cb482cb3a305f96d8155bbeb052344dde66ad8f2 ]
When virtio-net devices are bound to uio_pci_generic, we get
the wrong mac addr by virtio PMD. The wrong mac addr is a
addr that is 4-byte left shift of the correct addr.
It's a regression bug introduced by the cleanup patch below.
The condition of if we set use_msix should be if msix is
actually enabled. Only to check if there is a capability list
is not enough. For example, binding a transitional device
to uio_pci_device would trigger the wrong assignment of use_msix.
To correct that, we also check the flags of msix capability to
make sure it's enabled.
Fixes: ee1843bd8907 ("net/virtio: remove redundant MSI-X detection")
Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_pci.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index b7b3d61..f91ecb4 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -579,6 +579,8 @@ get_cfg_addr(struct rte_pci_device *dev, struct virtio_pci_cap *cap)
return base + offset;
}
+#define PCI_MSIX_ENABLE 0x8000
+
static int
virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
{
@@ -605,8 +607,17 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
break;
}
- if (cap.cap_vndr == PCI_CAP_ID_MSIX)
- hw->use_msix = 1;
+ if (cap.cap_vndr == PCI_CAP_ID_MSIX) {
+ /* Transitional devices would also have this capability,
+ * that's why we also check if msix is enabled.
+ * 1st byte is cap ID; 2nd byte is the position of next
+ * cap; next two bytes are the flags.
+ */
+ uint16_t flags = ((uint16_t *)&cap)[1];
+
+ if (flags & PCI_MSIX_ENABLE)
+ hw->use_msix = 1;
+ }
if (cap.cap_vndr != PCI_CAP_ID_VNDR) {
PMD_INIT_LOG(DEBUG,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix Rx interrupt setup' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (38 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/virtio: fix MAC address read' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix link down and negotiation' " Yuanhan Liu
` (23 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Jiayu Hu; +Cc: Maxime Coquelin, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ff844d0a054a1c8cc17b7b3eb2d6e716a6bd7ef0 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Mon, 31 Jul 2017 15:56:44 +0800
Subject: [PATCH] net/virtio: fix Rx interrupt setup
[ upstream commit e7b9d1d2806c6bb8f30922c3cd6736b3076b7ec2 ]
When use rte_eth_dev_configure() to enable rx queue interrupt for virtio
devices, virtio_init_device() isn't called to set up the interrupt
environment, which causes rx queue interrupt setup failed. This patch is
to fix this issue.
Fixes: 26b683b4f7d0 ("net/virtio: setup Rx queue interrupts")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d65667c..2e40a08 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1659,9 +1659,16 @@ virtio_dev_configure(struct rte_eth_dev *dev)
{
const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
struct virtio_hw *hw = dev->data->dev_private;
+ int ret;
PMD_INIT_LOG(DEBUG, "configure");
+ if (dev->data->dev_conf.intr_conf.rxq) {
+ ret = virtio_init_device(dev, hw->req_guest_features);
+ if (ret < 0)
+ return ret;
+ }
+
/* Virtio does L4 checksum but not L3! */
if (rxmode->hw_ip_checksum) {
PMD_DRV_LOG(NOTICE,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix link down and negotiation' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (39 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/virtio: fix Rx interrupt setup' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: fix set link config' " Yuanhan Liu
` (22 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Jeff Guo; +Cc: Jingjing Wu, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 5b970ecc66bc9e29cc96dca71a921ba721335282 Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Fri, 21 Jul 2017 11:07:04 +0800
Subject: [PATCH] net/i40e: fix link down and negotiation
[ upstream commit 1bb8f661168d942927cb65e355ec64d4ab195281 ]
Enable the functions set link down and set link up in i40e by check
phy_type, and fix the issue of auto negotiation failed in XXV710 when
bind kernel driver after unbind from DPDK driver by modify the speed
setting distinguish from set link up and down. With this fix, if unbind
DPDK to bind kernel driver, no need to set auto negotiation and ifconfig
up anymore, remove the part from doc.
Fixes: ca7e599d4506 ("net/i40e: fix link management")
Fixes: 2f1e22817420 ("i40e: skip link control as firmware workaround")
Fixes: 6e145fcc754b ("i40e: support autoneg or force link speed")
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
doc/guides/nics/i40e.rst | 10 ----------
drivers/net/i40e/i40e_ethdev.c | 34 ++++++++++++++++++++++------------
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 4d3c7ca..387a588 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -404,16 +404,6 @@ is used as the VF driver, DPDK cannot choose 16 byte receive descriptor. That
is to say, user should keep ``CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n`` in
config file.
-Link down with i40e kernel driver after DPDK application exit
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-After DPDK application quit, and the device is bound back to Linux i40e
-kernel driver, the link cannot be up after ``ifconfig <dev> up``.
-To work around this issue, ``ethtool -s <dev> autoneg on`` should be
-set first and then the link can be brought up through ``ifconfig <dev> up``.
-
-NOTE: requires Linux kernel i40e driver version >= 1.4.X
-
Receive packets with Ethertype 0x88A8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 6702900..223f2d8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1806,11 +1806,15 @@ i40e_parse_link_speeds(uint16_t link_speeds)
static int
i40e_phy_conf_link(struct i40e_hw *hw,
uint8_t abilities,
- uint8_t force_speed)
+ uint8_t force_speed,
+ bool is_up)
{
enum i40e_status_code status;
struct i40e_aq_get_phy_abilities_resp phy_ab;
struct i40e_aq_set_phy_config phy_conf;
+ enum i40e_aq_phy_type cnt;
+ uint32_t phy_type_mask = 0;
+
const uint8_t mask = I40E_AQ_PHY_FLAG_PAUSE_TX |
I40E_AQ_PHY_FLAG_PAUSE_RX |
I40E_AQ_PHY_FLAG_PAUSE_RX |
@@ -1828,6 +1832,10 @@ i40e_phy_conf_link(struct i40e_hw *hw,
if (status)
return ret;
+ /* If link already up, no need to set up again */
+ if (is_up && phy_ab.phy_type != 0)
+ return I40E_SUCCESS;
+
memset(&phy_conf, 0, sizeof(phy_conf));
/* bits 0-2 use the values from get_phy_abilities_resp */
@@ -1838,13 +1846,21 @@ i40e_phy_conf_link(struct i40e_hw *hw,
if (abilities & I40E_AQ_PHY_AN_ENABLED)
phy_conf.link_speed = advt;
else
- phy_conf.link_speed = force_speed;
+ phy_conf.link_speed = is_up ? force_speed : phy_ab.link_speed;
phy_conf.abilities = abilities;
+
+
+ /* To enable link, phy_type mask needs to include each type */
+ for (cnt = I40E_PHY_TYPE_SGMII; cnt < I40E_PHY_TYPE_MAX; cnt++)
+ phy_type_mask |= 1 << cnt;
+
/* use get_phy_abilities_resp value for the rest */
- phy_conf.phy_type = phy_ab.phy_type;
- phy_conf.phy_type_ext = phy_ab.phy_type_ext;
+ phy_conf.phy_type = is_up ? cpu_to_le32(phy_type_mask) : 0;
+ phy_conf.phy_type_ext = is_up ? (I40E_AQ_PHY_TYPE_EXT_25G_KR |
+ I40E_AQ_PHY_TYPE_EXT_25G_CR | I40E_AQ_PHY_TYPE_EXT_25G_SR |
+ I40E_AQ_PHY_TYPE_EXT_25G_LR) : 0;
phy_conf.fec_config = phy_ab.fec_cfg_curr_mod_ext_info;
phy_conf.eee_capability = phy_ab.eee_capability;
phy_conf.eeer = phy_ab.eeer_val;
@@ -1876,13 +1892,7 @@ i40e_apply_link_speed(struct rte_eth_dev *dev)
abilities |= I40E_AQ_PHY_AN_ENABLED;
abilities |= I40E_AQ_PHY_LINK_ENABLED;
- /* Skip changing speed on 40G interfaces, FW does not support */
- if (I40E_PHY_TYPE_SUPPORT_40G(hw->phy.phy_types)) {
- speed = I40E_LINK_SPEED_UNKNOWN;
- abilities |= I40E_AQ_PHY_AN_ENABLED;
- }
-
- return i40e_phy_conf_link(hw, abilities, speed);
+ return i40e_phy_conf_link(hw, abilities, speed, true);
}
static int
@@ -2225,7 +2235,7 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev)
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
- return i40e_phy_conf_link(hw, abilities, speed);
+ return i40e_phy_conf_link(hw, abilities, speed, false);
}
int
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix set link config' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (40 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix link down and negotiation' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: check invalid L2 filter id' " Yuanhan Liu
` (21 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6a2509984bfd855f760a4349d8325ba08b536d7a Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 20 Jul 2017 22:22:29 -0500
Subject: [PATCH] net/bnxt: fix set link config
[ upstream commit 645ad4d586e1bf4d58ef75dee3e734f0003e9f38 ]
remove the unnecessary rte_delay in bnxt_set_hwrm_link_config
Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 4dca599..eec29b3 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1503,7 +1503,6 @@ port_phy_cfg:
"Set link config failed with rc %d\n", rc);
}
- rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
error:
return rc;
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/bnxt: check invalid L2 filter id' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (41 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: fix set link config' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: free filter before reusing it' " Yuanhan Liu
` (20 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d0b303549548ed0947cd7fb97780178d8299e749 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 20 Jul 2017 22:22:32 -0500
Subject: [PATCH] net/bnxt: check invalid L2 filter id
[ upstream commit 778f6209bc3b39339f2969a57ffb46f2cd396f15 ]
Add code to check for invalid filter_id in bnxt_hwrm_clear_filter
Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index eec29b3..6a5159c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -196,6 +196,9 @@ int bnxt_hwrm_clear_filter(struct bnxt *bp,
struct hwrm_cfa_l2_filter_free_input req = {.req_type = 0 };
struct hwrm_cfa_l2_filter_free_output *resp = bp->hwrm_cmd_resp_addr;
+ if (filter->fw_l2_filter_id == UINT64_MAX)
+ return 0;
+
HWRM_PREP(req, CFA_L2_FILTER_FREE, -1, resp);
req.l2_filter_id = rte_cpu_to_le_64(filter->fw_l2_filter_id);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/bnxt: free filter before reusing it' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (42 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: check invalid L2 filter id' " Yuanhan Liu
@ 2017-08-21 9:30 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/ixgbe: fix mirror rule index overflow' " Yuanhan Liu
` (19 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:30 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a4b95d1c86492c1a4eeaa9cd9027c6a6960b475d Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 20 Jul 2017 22:22:33 -0500
Subject: [PATCH] net/bnxt: free filter before reusing it
[ upstream commit 4cddfcb71b1edeed845aff0b19c9ea73622f79c6 ]
This patch sends the HWRM command to free a filter in the hardware,
before using it again.
Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6a5159c..f64cb80 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -221,6 +221,9 @@ int bnxt_hwrm_set_filter(struct bnxt *bp,
struct hwrm_cfa_l2_filter_alloc_output *resp = bp->hwrm_cmd_resp_addr;
uint32_t enables = 0;
+ if (filter->fw_l2_filter_id != UINT64_MAX)
+ bnxt_hwrm_clear_filter(bp, filter);
+
HWRM_PREP(req, CFA_L2_FILTER_ALLOC, -1, resp);
req.flags = rte_cpu_to_le_32(filter->flags);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix mirror rule index overflow' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (43 preceding siblings ...)
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: free filter before reusing it' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx5: fix inconsistent link status query' " Yuanhan Liu
` (18 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Qi Zhang; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 74f9c28c49a74fe98da5569fa38131150a07ed56 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Fri, 21 Jul 2017 16:56:37 +0800
Subject: [PATCH] net/ixgbe: fix mirror rule index overflow
[ upstream commit 9b2df1083aab703e73f6d76e8f41afacb463afe9 ]
Mirror rule id should not exceed the boundary defined by
IXGBE_MAX_MIRROR_RULES.
Fixes: fe3a45fd4104 ("ixgbe: add VMDq support")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 0a142ee..626c5ee 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5323,6 +5323,9 @@ ixgbe_mirror_rule_reset(struct rte_eth_dev *dev, uint8_t rule_id)
if (ixgbe_vt_check(hw) < 0)
return -ENOTSUP;
+ if (rule_id >= IXGBE_MAX_MIRROR_RULES)
+ return -EINVAL;
+
memset(&mr_info->mr_conf[rule_id], 0,
sizeof(struct rte_eth_mirror_conf));
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix inconsistent link status query' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (44 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/ixgbe: fix mirror rule index overflow' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix parsing QinQ pattern' " Yuanhan Liu
` (17 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Nelio Laranjeiro, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 74df3a1d5a0e540a0c75c44ebbb1c7b38d348521 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Date: Tue, 25 Jul 2017 19:08:07 +0530
Subject: [PATCH] net/mlx5: fix inconsistent link status query
[ upstream commit ef09a7fc762073d9980b93bbd6fcf83e6e6b4abf ]
ETHTOOL_GLINKSETTINGS ioctl call in mlx5 pmd returns inconsistent
link status due to which any application relying on it would not
function correctly.
Fixes: 188408719888 ("net/mlx5: fix support for newer link speeds")
Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_ethdev.c | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 3fd22cb..27ec3ef 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -119,6 +119,7 @@ struct ethtool_link_settings {
#define ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT 38
#define ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT 39
#endif
+#define ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32 (SCHAR_MAX)
/**
* Return private structure associated with an Ethernet device.
@@ -806,9 +807,12 @@ static int
mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
{
struct priv *priv = mlx5_get_priv(dev);
- struct ethtool_link_settings edata = {
- .cmd = ETHTOOL_GLINKSETTINGS,
- };
+ __extension__ struct {
+ struct ethtool_link_settings edata;
+ uint32_t link_mode_data[3 *
+ ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
+ } ecmd;
+
struct ifreq ifr;
struct rte_eth_link dev_link;
uint64_t sc;
@@ -821,15 +825,23 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
memset(&dev_link, 0, sizeof(dev_link));
dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
(ifr.ifr_flags & IFF_RUNNING));
- ifr.ifr_data = (void *)&edata;
+ memset(&ecmd, 0, sizeof(ecmd));
+ ecmd.edata.cmd = ETHTOOL_GLINKSETTINGS;
+ ifr.ifr_data = (void *)&ecmd;
if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) {
DEBUG("ioctl(SIOCETHTOOL, ETHTOOL_GLINKSETTINGS) failed: %s",
strerror(errno));
return -1;
}
- dev_link.link_speed = edata.speed;
- sc = edata.link_mode_masks[0] |
- ((uint64_t)edata.link_mode_masks[1] << 32);
+ ecmd.edata.link_mode_masks_nwords = -ecmd.edata.link_mode_masks_nwords;
+ if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) {
+ DEBUG("ioctl(SIOCETHTOOL, ETHTOOL_GLINKSETTINGS) failed: %s",
+ strerror(errno));
+ return -1;
+ }
+ dev_link.link_speed = ecmd.edata.speed;
+ sc = ecmd.edata.link_mode_masks[0] |
+ ((uint64_t)ecmd.edata.link_mode_masks[1] << 32);
priv->link_speed_capa = 0;
if (sc & ETHTOOL_LINK_MODE_Autoneg_BIT)
priv->link_speed_capa |= ETH_LINK_SPEED_AUTONEG;
@@ -865,7 +877,7 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT |
ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT))
priv->link_speed_capa |= ETH_LINK_SPEED_100G;
- dev_link.link_duplex = ((edata.duplex == DUPLEX_HALF) ?
+ dev_link.link_duplex = ((ecmd.edata.duplex == DUPLEX_HALF) ?
ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);
dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
ETH_LINK_SPEED_FIXED);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix parsing QinQ pattern' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (45 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx5: fix inconsistent link status query' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix PF notify when VF is not up' " Yuanhan Liu
` (16 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Kuba Kozak; +Cc: Jingjing Wu, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fde5ad1665fb5fd99ed640719e5e069552031ba7 Mon Sep 17 00:00:00 2001
From: Kuba Kozak <kubax.kozak@intel.com>
Date: Thu, 27 Jul 2017 09:28:22 +0200
Subject: [PATCH] net/i40e: fix parsing QinQ pattern
[ upstream commit c2be7f9b232fd6730dcec83555af050941c7805f ]
Add check if o_vlan_mask and i_vlan_mask are not a NULL pointer.
Coverity issue: 143448
Coverity issue: 143449
Fixes: d37705068ee8 ("net/i40e: parse QinQ pattern")
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_flow.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 24e1c65..c1dac38 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -1821,8 +1821,10 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev,
}
/* Get filter specification */
- if ((o_vlan_mask->tci == rte_cpu_to_be_16(I40E_TCI_MASK)) &&
- (i_vlan_mask->tci == rte_cpu_to_be_16(I40E_TCI_MASK))) {
+ if ((o_vlan_mask != NULL) && (o_vlan_mask->tci ==
+ rte_cpu_to_be_16(I40E_TCI_MASK)) &&
+ (i_vlan_mask != NULL) &&
+ (i_vlan_mask->tci == rte_cpu_to_be_16(I40E_TCI_MASK))) {
filter->outer_vlan = rte_be_to_cpu_16(o_vlan_spec->tci)
& I40E_TCI_MASK;
filter->inner_vlan = rte_be_to_cpu_16(i_vlan_spec->tci)
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix PF notify when VF is not up' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (46 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix parsing QinQ pattern' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix memory corruptions' " Yuanhan Liu
` (15 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Jingjing Wu, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 2fb170db88f88bf8e010272c48b0f8935c5ac020 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Fri, 28 Jul 2017 23:48:11 +0800
Subject: [PATCH] net/i40e: fix PF notify when VF is not up
[ upstream commit 035a8cf88f010c82de3040c895c801ce0849b065 ]
This patch stops PF from sending messages to inactive VF
and modifies VF state to active when VF reset is completed.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_pf.c | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 0758503..65d93a8 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -152,22 +152,22 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)
val |= I40E_VPGEN_VFRTRIG_VFSWR_MASK;
I40E_WRITE_REG(hw, I40E_VPGEN_VFRTRIG(vf_id), val);
I40E_WRITE_FLUSH(hw);
- }
#define VFRESET_MAX_WAIT_CNT 100
- /* Wait until VF reset is done */
- for (i = 0; i < VFRESET_MAX_WAIT_CNT; i++) {
- rte_delay_us(10);
- val = I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id));
- if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK)
- break;
- }
+ /* Wait until VF reset is done */
+ for (i = 0; i < VFRESET_MAX_WAIT_CNT; i++) {
+ rte_delay_us(10);
+ val = I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id));
+ if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK)
+ break;
+ }
- if (i >= VFRESET_MAX_WAIT_CNT) {
- PMD_DRV_LOG(ERR, "VF reset timeout");
- return -ETIMEDOUT;
+ if (i >= VFRESET_MAX_WAIT_CNT) {
+ PMD_DRV_LOG(ERR, "VF reset timeout");
+ return -ETIMEDOUT;
+ }
+ vf->state = I40E_VF_ACTIVE;
}
-
/* This is not first time to do reset, do cleanup job first */
if (vf->vsi) {
/* Disable queues */
@@ -262,7 +262,10 @@ i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf,
{
struct i40e_hw *hw = I40E_PF_TO_HW(vf->pf);
uint16_t abs_vf_id = hw->func_caps.vf_base_id + vf->vf_idx;
- int ret;
+ int ret = I40E_ERR_ADMIN_QUEUE_ERROR;
+
+ if (vf->state == I40E_VF_INACTIVE)
+ return ret;
ret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval,
msg, msglen, NULL);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'test/bonding: fix memory corruptions' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (47 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix PF notify when VF is not up' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix parameters of a balance Tx' " Yuanhan Liu
` (14 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Herbert Guan; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 06dff7045bc57d15010c4734803b89b600c5fe84 Mon Sep 17 00:00:00 2001
From: Herbert Guan <herbert.guan@arm.com>
Date: Mon, 10 Jul 2017 19:13:46 +0800
Subject: [PATCH] test/bonding: fix memory corruptions
[ upstream commit 8d3708efece06212bde6b1e10b2251931e1e9961 ]
There were double-free problems in some test cases, which will cause
a duplicated mbuf will be added into mempool. After double-free,
some new allocated mbuf will hold a same address and thus cause the
memory corruption.
Another minor issue is that in some test cases, allocated mbuf will
not be released after test case exits. Hopefully these leaked mbuf
will be released by the next test case in its setup phase when
stopping the virtual pmd ports, while this do is a memory leak of
the exited test case.
To fix above 2 issues, this patch will do:
1) Release virtual pmd ports' tx queue in the clean up function
remove_slaves_and_stop_bonded_device() of each test cases.
2) Do not release allocated mbufs for test bursts. These mbufs
will be released in remove_slaves_and_stop_bonded_device() when
test case exits.
Fixes: 92073ef961ee ("bond: unit tests")
Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
test/test/test_link_bonding.c | 64 ++++++-------------------------------------
1 file changed, 9 insertions(+), 55 deletions(-)
diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index 52d2d05..aeb234f 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -221,6 +221,10 @@ static struct rte_eth_txconf tx_conf_default = {
};
+static void free_virtualpmd_tx_queue(void);
+
+
+
static int
configure_ethdev(uint8_t port_id, uint8_t start, uint8_t en_isr)
{
@@ -684,6 +688,7 @@ static int
remove_slaves_and_stop_bonded_device(void)
{
/* Clean up and remove slaves from bonded device */
+ free_virtualpmd_tx_queue();
while (test_params->bonded_slave_count > 0)
TEST_ASSERT_SUCCESS(test_remove_slave_from_bonded_device(),
"test_remove_slave_from_bonded_device failed");
@@ -1617,9 +1622,6 @@ test_roundrobin_rx_burst_on_single_slave(void)
/* free mbufs */
for (i = 0; i < MAX_PKT_BURST; i++) {
- if (gen_pkt_burst[i] != NULL)
- rte_pktmbuf_free(gen_pkt_burst[i]);
-
if (rx_pkt_burst[i] != NULL)
rte_pktmbuf_free(rx_pkt_burst[i]);
}
@@ -1966,12 +1968,6 @@ test_roundrobin_verify_slave_link_status_change_behaviour(void)
for (i = 0; i < MAX_PKT_BURST; i++) {
if (rx_pkt_burst[i] != NULL)
rte_pktmbuf_free(rx_pkt_burst[i]);
-
- if (gen_pkt_burst[1][i] != NULL)
- rte_pktmbuf_free(gen_pkt_burst[1][i]);
-
- if (gen_pkt_burst[3][i] != NULL)
- rte_pktmbuf_free(gen_pkt_burst[1][i]);
}
/* Clean up and remove slaves from bonded device */
@@ -2410,7 +2406,7 @@ test_activebackup_verify_slave_link_status_change_failover(void)
uint8_t slaves[RTE_MAX_ETHPORTS];
- int i, j, burst_size, slave_count, primary_port;
+ int i, burst_size, slave_count, primary_port;
burst_size = 21;
@@ -2543,16 +2539,6 @@ test_activebackup_verify_slave_link_status_change_failover(void)
"(%d) port_stats.opackets not as expected",
test_params->slave_port_ids[3]);
- /* free mbufs */
- for (i = 0; i < TEST_ACTIVE_BACKUP_RX_BURST_SLAVE_COUNT; i++) {
- for (j = 0; j < MAX_PKT_BURST; j++) {
- if (pkt_burst[i][j] != NULL) {
- rte_pktmbuf_free(pkt_burst[i][j]);
- pkt_burst[i][j] = NULL;
- }
- }
- }
-
/* Clean up and remove slaves from bonded device */
return remove_slaves_and_stop_bonded_device();
}
@@ -3314,7 +3300,7 @@ test_balance_verify_slave_link_status_change_behaviour(void)
uint8_t slaves[RTE_MAX_ETHPORTS];
- int i, j, burst_size, slave_count;
+ int i, burst_size, slave_count;
memset(pkt_burst, 0, sizeof(pkt_burst));
@@ -3452,16 +3438,6 @@ test_balance_verify_slave_link_status_change_behaviour(void)
test_params->bonded_port_id, (int)port_stats.ipackets,
burst_size * 3);
- /* free mbufs allocate for rx testing */
- for (i = 0; i < TEST_BALANCE_RX_BURST_SLAVE_COUNT; i++) {
- for (j = 0; j < MAX_PKT_BURST; j++) {
- if (pkt_burst[i][j] != NULL) {
- rte_pktmbuf_free(pkt_burst[i][j]);
- pkt_burst[i][j] = NULL;
- }
- }
- }
-
/* Clean up and remove slaves from bonded device */
return remove_slaves_and_stop_bonded_device();
}
@@ -3883,7 +3859,7 @@ test_broadcast_verify_slave_link_status_change_behaviour(void)
uint8_t slaves[RTE_MAX_ETHPORTS];
- int i, j, burst_size, slave_count;
+ int i, burst_size, slave_count;
memset(pkt_burst, 0, sizeof(pkt_burst));
@@ -3980,16 +3956,6 @@ test_broadcast_verify_slave_link_status_change_behaviour(void)
"(%d) port_stats.ipackets not as expected\n",
test_params->bonded_port_id);
- /* free mbufs allocate for rx testing */
- for (i = 0; i < BROADCAST_LINK_STATUS_NUM_OF_SLAVES; i++) {
- for (j = 0; j < MAX_PKT_BURST; j++) {
- if (pkt_burst[i][j] != NULL) {
- rte_pktmbuf_free(pkt_burst[i][j]);
- pkt_burst[i][j] = NULL;
- }
- }
- }
-
/* Clean up and remove slaves from bonded device */
return remove_slaves_and_stop_bonded_device();
}
@@ -4405,7 +4371,7 @@ test_tlb_verify_slave_link_status_change_failover(void)
uint8_t slaves[RTE_MAX_ETHPORTS];
- int i, j, burst_size, slave_count, primary_port;
+ int i, burst_size, slave_count, primary_port;
burst_size = 21;
@@ -4523,18 +4489,6 @@ test_tlb_verify_slave_link_status_change_failover(void)
"(%d) port_stats.ipackets not as expected\n",
test_params->bonded_port_id);
- /* free mbufs */
-
- for (i = 0; i < TEST_ADAPTIVE_TRANSMIT_LOAD_BALANCING_RX_BURST_SLAVE_COUNT; i++) {
- for (j = 0; j < MAX_PKT_BURST; j++) {
- if (pkt_burst[i][j] != NULL) {
- rte_pktmbuf_free(pkt_burst[i][j]);
- pkt_burst[i][j] = NULL;
- }
- }
- }
-
-
/* Clean up and remove slaves from bonded device */
return remove_slaves_and_stop_bonded_device();
}
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'test/bonding: fix parameters of a balance Tx' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (48 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix memory corruptions' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix namespace of the RSS tests' " Yuanhan Liu
` (13 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Herbert Guan; +Cc: Jianbo Liu, Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 7d8fb8581719640c8a2dce64ff1c937b6a42ccb8 Mon Sep 17 00:00:00 2001
From: Herbert Guan <herbert.guan@arm.com>
Date: Thu, 13 Jul 2017 16:00:36 +0800
Subject: [PATCH] test/bonding: fix parameters of a balance Tx
[ upstream commit a048bde9b116f6eb27281e5640d0a4961e90c8f7 ]
When test case "test_balance_l23_tx_burst_ipv4_toggle_ip_addr" is
calling balance_l23_tx_burst(), the ip_addr instead of mac_addr
should be toggled according to the test name.
Fixes: 92073ef961ee ("bond: unit tests")
Signed-off-by: Herbert Guan <herbert.guan@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
test/test/test_link_bonding.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index aeb234f..2bbf6b5 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -2771,7 +2771,7 @@ balance_l23_tx_burst(uint8_t vlan_enabled, uint8_t ipv4,
static int
test_balance_l23_tx_burst_ipv4_toggle_ip_addr(void)
{
- return balance_l23_tx_burst(0, 1, 1, 0);
+ return balance_l23_tx_burst(0, 1, 0, 1);
}
static int
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'test/bonding: fix namespace of the RSS tests' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (49 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix parameters of a balance Tx' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix device name' " Yuanhan Liu
` (12 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Daniel Mrzyglod; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 811b9003a810b9f81051f4e9d9a1712e32159133 Mon Sep 17 00:00:00 2001
From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Date: Wed, 26 Jul 2017 17:44:03 +0200
Subject: [PATCH] test/bonding: fix namespace of the RSS tests
[ upstream commit 347ab0a3007e95c86eb9263d19f714bd6ccad4d5 ]
Drivers are looking by name of the device so change namespace to proper
one.
Fixes: 43b630244e7e ("app/test: add dynamic bonding RSS configuration")
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index d28db7d..9073d4a 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -60,7 +60,7 @@
#define RXTX_RING_SIZE 1024
#define RXTX_QUEUE_COUNT 4
-#define BONDED_DEV_NAME ("rssconf_bond_dev")
+#define BONDED_DEV_NAME ("net_bonding_rss")
#define SLAVE_DEV_NAME_FMT ("rssconf_slave%d")
#define SLAVE_RXTX_QUEUE_FMT ("rssconf_slave%d_q%d")
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'test/bonding: fix device name' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (50 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix namespace of the RSS tests' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx5: fix missing packet type calculation' " Yuanhan Liu
` (11 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Tomasz Kulasek; +Cc: Declan Doherty, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From bcba06d3b6260376e82d67702a4f77b3fe77b911 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Wed, 26 Jul 2017 17:48:29 +0200
Subject: [PATCH] test/bonding: fix device name
[ upstream commit 7377abce1065a61b487e86dfeff70ae2ccd8d43a ]
Bonding devices name must start with "net_bonding" prefix.
Fixes: 9bf4901d1a11 ("bus/vdev: remove probe with driver name option")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
test/test/test_link_bonding.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index 2bbf6b5..7c3d5a9 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -83,7 +83,7 @@
#define MAX_PKT_BURST (512)
#define DEF_PKT_BURST (16)
-#define BONDED_DEV_NAME ("unit_test_bond_dev")
+#define BONDED_DEV_NAME ("net_bonding_ut")
#define INVALID_SOCKET_ID (-1)
#define INVALID_PORT_ID (-1)
@@ -944,7 +944,7 @@ test_set_bonded_port_initialization_mac_assignment(void)
/*
* 1. a - Create / configure bonded / slave ethdevs
*/
- bonded_port_id = rte_eth_bond_create("ethdev_bond_mac_ass_test",
+ bonded_port_id = rte_eth_bond_create("net_bonding_mac_ass_test",
BONDING_MODE_ACTIVE_BACKUP, rte_socket_id());
TEST_ASSERT(bonded_port_id > 0, "failed to create bonded device");
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix missing packet type calculation' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (51 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix device name' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx4: fix flow creation before start' " Yuanhan Liu
` (10 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Yongseok Koh; +Cc: Sagi Grimberg, Adrien Mazarguil, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 23c80bfeed25139c971d4cbb2dae7c8a9f645802 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Wed, 26 Jul 2017 12:29:32 -0700
Subject: [PATCH] net/mlx5: fix missing packet type calculation
[ upstream commit 48dfc20f1e456a69ec3f7c7a06319107d0f78e8e ]
Calculation of packet type is currently enabled only when HW checksum is
enabled.
This isn't related to HW checksum offload. Enable it regardless.
Fixes: 081f7eae242e ("mlx5: process offload flags only when requested")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index db5a8ee..c416009 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2020,7 +2020,7 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
pkt = seg;
assert(len >= (rxq->crc_present << 2));
/* Update packet information. */
- pkt->packet_type = 0;
+ pkt->packet_type = rxq_cq_to_pkt_type(cqe);
pkt->ol_flags = 0;
if (rss_hash_res && rxq->rss_hash) {
pkt->hash.rss = rss_hash_res;
@@ -2038,10 +2038,8 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
mlx5_flow_mark_get(mark);
}
}
- if (rxq->csum | rxq->csum_l2tun) {
- pkt->packet_type = rxq_cq_to_pkt_type(cqe);
+ if (rxq->csum | rxq->csum_l2tun)
pkt->ol_flags |= rxq_cq_to_ol_flags(rxq, cqe);
- }
if (rxq->vlan_strip &&
(cqe->hdr_type_etc &
htons(MLX5_CQE_VLAN_STRIPPED))) {
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx4: fix flow creation before start' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (52 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx5: fix missing packet type calculation' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx4: fix probe failure report' " Yuanhan Liu
` (9 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Matan Azrad; +Cc: Adrien Mazarguil, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3f666ca92676cfca2e2ee87d9874e3ad4a15fdf7 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Thu, 27 Jul 2017 13:27:24 +0300
Subject: [PATCH] net/mlx4: fix flow creation before start
[ upstream commit f3b10f1d2474dfa6774ec31e1a8dc14c76b3ac53 ]
The corrupted code causes segmentation fault when user creates
flow with drop action before device starting.
For example, failsafe PMD recreates all the flows before calling
dev_start in plug-in sequence and mlx4 allocated its flow drop
queue in dev_start.
Hence, when failsafe created flow with drop action after plug-in
event, mlx4 tried to dereference flow drop queue which was
uninitialized.
The fix added check to the drop qp accessible and conditioned the
ibv_create_flow calling on device starting.
Fixes: 642fe56a1ba5 ("net/mlx4: use a single drop queue for all drop flows")
Fixes: 46d5736a7049 ("net/mlx4: support basic flow items and actions")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx4/mlx4_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index edfac03..b9a024b 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -829,7 +829,7 @@ priv_flow_create_action_queue(struct priv *priv,
return NULL;
}
if (action->drop) {
- qp = priv->flow_drop_queue->qp;
+ qp = priv->flow_drop_queue ? priv->flow_drop_queue->qp : NULL;
} else {
struct rxq *rxq = (*priv->rxqs)[action->queue_id];
@@ -837,6 +837,8 @@ priv_flow_create_action_queue(struct priv *priv,
rte_flow->qp = qp;
}
rte_flow->ibv_attr = ibv_attr;
+ if (!priv->started)
+ return rte_flow;
rte_flow->ibv_flow = ibv_create_flow(qp, rte_flow->ibv_attr);
if (!rte_flow->ibv_flow) {
rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/mlx4: fix probe failure report' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (53 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx4: fix flow creation before start' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/qede: fix chip details print' " Yuanhan Liu
` (8 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Matan Azrad; +Cc: Adrien Mazarguil, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8873f35f344b4ae5377265469d810dc923c3c19e Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 31 Jul 2017 17:30:29 +0300
Subject: [PATCH] net/mlx4: fix probe failure report
[ upstream commit 8d0f80167d43949bd24374bcf294a149246dfd1c ]
The corrupted code doesn't return error when probe function
fails due to error in device mac address getting.
By this way, the probe function may return success even if the
ETH dev is not allocated.
Hence, the probe caller, for example failsafe PMD, fails when it
tries to get ETH dev after the device was plugged out while mlx4
was probing it.
The fix adds error report to the probe caller when priv_get_mac fails
and in all other failure options which are missing it.
By this way, it prevents the unexpected behavior to miss ETH device
after the device was probed successfully.
Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")
Fixes: 001a520e419f ("net/mlx4: add port parameter")
Fixes: 7b0661539229 ("mlx4: check if port is configured for ethernet")
Fixes: fec3608673e6 ("mlx4: query netdevice to get initial MAC address")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx4/mlx4.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index c983bc8..02e5a1f 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5767,12 +5767,15 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
ibv_dev = list[i];
DEBUG("device opened");
- if (ibv_query_device(attr_ctx, &device_attr))
+ if (ibv_query_device(attr_ctx, &device_attr)) {
+ err = ENODEV;
goto error;
+ }
INFO("%u port(s) detected", device_attr.phys_port_cnt);
if (mlx4_args(pci_dev->device.devargs, &conf)) {
ERROR("failed to process device arguments");
+ err = EINVAL;
goto error;
}
/* Use all ports when none are defined */
@@ -5806,19 +5809,23 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
DEBUG("using port %u (%08" PRIx32 ")", port, test);
ctx = ibv_open_device(ibv_dev);
- if (ctx == NULL)
+ if (ctx == NULL) {
+ err = ENODEV;
goto port_error;
+ }
/* Check port status. */
err = ibv_query_port(ctx, port, &port_attr);
if (err) {
ERROR("port query failed: %s", strerror(err));
+ err = ENODEV;
goto port_error;
}
if (port_attr.link_layer != IBV_LINK_LAYER_ETHERNET) {
ERROR("port %d is not configured in Ethernet mode",
port);
+ err = EINVAL;
goto port_error;
}
@@ -5855,6 +5862,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
#ifdef HAVE_EXP_QUERY_DEVICE
if (ibv_exp_query_device(ctx, &exp_device_attr)) {
ERROR("ibv_exp_query_device() failed");
+ err = ENODEV;
goto port_error;
}
#ifdef RSS_SUPPORT
@@ -5930,6 +5938,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
if (priv_get_mac(priv, &mac.addr_bytes)) {
ERROR("cannot get MAC address, is mlx4_en loaded?"
" (errno: %s)", strerror(errno));
+ err = ENODEV;
goto port_error;
}
INFO("port %u MAC address is %02x:%02x:%02x:%02x:%02x:%02x",
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/qede: fix chip details print' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (54 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx4: fix probe failure report' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/vmxnet3: fix filtering on promiscuous disabling' " Yuanhan Liu
` (7 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 94468e6bb59a16529d84840c49e0d51937eb1eec Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Mon, 24 Jul 2017 03:19:07 -0700
Subject: [PATCH] net/qede: fix chip details print
[ upstream commit 3818ac224fd7ff536b233d711ba6e9654186ab09 ]
Fix chip details printed as part of print adapter info
Fixes: 2ea6f76aff40 ("qede: add core driver")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/qede/qede_ethdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 9fae40b..bf3c2c8 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -308,9 +308,10 @@ static void qede_print_adapter_info(struct qede_dev *qdev)
DP_INFO(edev, "*********************************\n");
DP_INFO(edev, " DPDK version:%s\n", rte_version());
- DP_INFO(edev, " Chip details : %s%d\n",
+ DP_INFO(edev, " Chip details : %s %c%d\n",
ECORE_IS_BB(edev) ? "BB" : "AH",
- CHIP_REV_IS_A0(edev) ? 0 : 1);
+ 'A' + edev->chip_rev,
+ (int)edev->chip_metal);
snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%d.%d.%d.%d",
info->fw_major, info->fw_minor, info->fw_rev, info->fw_eng);
snprintf(drv_ver, QEDE_PMD_DRV_VER_STR_SIZE, "%s_%s",
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/vmxnet3: fix filtering on promiscuous disabling' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (55 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/qede: fix chip details print' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix Rx data segment buffer length' " Yuanhan Liu
` (6 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Chas Williams; +Cc: Shrikrishna Khare, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c45359611428a30e6a58e297eb791683b7401cde Mon Sep 17 00:00:00 2001
From: Chas Williams <ciwillia@brocade.com>
Date: Mon, 24 Jul 2017 10:22:42 -0400
Subject: [PATCH] net/vmxnet3: fix filtering on promiscuous disabling
[ upstream commit c1f7b53c83f37dcaf373b58e281ef16dc804bc14 ]
We should only restore shadow_vfta when hw_vlan_filter is active.
Otherwise, we should restore the previous filtering behavior.
Fixes: f003fc383487 ("vmxnet3: enable vlan filtering")
Signed-off-by: Chas Williams <ciwillia@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_ethdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 2b8092d..723a336 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -995,7 +995,10 @@ vmxnet3_dev_promiscuous_disable(struct rte_eth_dev *dev)
struct vmxnet3_hw *hw = dev->data->dev_private;
uint32_t *vf_table = hw->shared->devRead.rxFilterConf.vfTable;
- memcpy(vf_table, hw->shadow_vfta, VMXNET3_VFT_TABLE_SIZE);
+ if (dev->data->dev_conf.rxmode.hw_vlan_filter)
+ memcpy(vf_table, hw->shadow_vfta, VMXNET3_VFT_TABLE_SIZE);
+ else
+ memset(vf_table, 0xff, VMXNET3_VFT_TABLE_SIZE);
vmxnet3_dev_set_rxmode(hw, VMXNET3_RXM_PROMISC, 0);
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
VMXNET3_CMD_UPDATE_VLAN_FILTERS);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix Rx data segment buffer length' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (56 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/vmxnet3: fix filtering on promiscuous disabling' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/enic: fix crash when freeing 0 packet to mempool' " Yuanhan Liu
` (5 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Qi Zhang; +Cc: Jianfeng Tan, Mark Kavanagh, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f338a398860e4190d1519e0c1ed1aa33860c614b Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 2 Aug 2017 15:22:09 +0800
Subject: [PATCH] net/i40e: fix Rx data segment buffer length
[ upstream commit 1ff8e79591a6cc99c475a50e87adb30d9b20569a ]
Buffer length be configured for each data segment should not exceed
the requested value, or device may fill data that exceed the boundary
of memory that be reserved.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
Tested-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 351cb94..07b09b2 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2474,7 +2474,7 @@ i40e_rx_queue_config(struct i40e_rx_queue *rxq)
case I40E_FLAG_HEADER_SPLIT_DISABLED:
default:
rxq->rx_hdr_len = 0;
- rxq->rx_buf_len = RTE_ALIGN(buf_size,
+ rxq->rx_buf_len = RTE_ALIGN_FLOOR(buf_size,
(1 << I40E_RXQ_CTX_DBUFF_SHIFT));
rxq->hs_mode = i40e_header_split_none;
break;
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/enic: fix crash when freeing 0 packet to mempool' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (57 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix Rx data segment buffer length' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/ixgbe: fix mask flag on flow rule creation' " Yuanhan Liu
` (4 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Aaron Conole; +Cc: Vincent S . Cojot, John Daley, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 370cc76578a3c61aaec3b91ef91d8ae3fcf95632 Mon Sep 17 00:00:00 2001
From: Aaron Conole <aconole@redhat.com>
Date: Wed, 2 Aug 2017 14:02:13 -0400
Subject: [PATCH] net/enic: fix crash when freeing 0 packet to mempool
[ upstream commit f7a58af502e08368a267886535367f205d4a5de6 ]
Occasionally, the amount of packets to free from the work queue ends
perfectly on a boundary to have nb_free = 0 and pool = 0. This causes
a segfault as follows:
(gdb) bt
#0 rte_mempool_default_cache
#1 rte_mempool_put_bulk (n=0, obj_table=0x7f10deff2530, mp=0x0)
#2 enic_free_wq_bufs (wq=wq@entry=0x7efabffcd5b0,
completed_index=completed_index@entry=33)
#3 0x00007f11e9c86e17 in enic_cleanup_wq (enic=<optimized out>,
wq=wq@entry=0x7efabffcd5b0)
at /usr/src/debug/openvswitch-2.6.1/dpdk-16.11/drivers/net/enic/enic_rxtx.c:442
#4 0x00007f11e9c86e5f in enic_xmit_pkts (tx_queue=0x7efabffcd5b0,
tx_pkts=0x7f10deffb1a8, nb_pkts=<optimized out>)
at /usr/src/debug/openvswitch-2.6.1/dpdk-16.11/drivers/net/enic/enic_rxtx.c:470
#5 0x00007f11e9e147ad in rte_eth_tx_burst (nb_pkts=<optimized out>,
tx_pkts=0x7f10deffb1a8, queue_id=0, port_id=<optimized out>)
This commit makes the enic wq driver match other drivers who call the
bulk free, by checking that there are actual packets to free.
Fixes: 36935afbc53c ("net/enic: refactor Tx mbuf recycling")
Reported-by: Vincent S. Cojot <vcojot@redhat.com>
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1468631
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
drivers/net/enic/enic_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index ba0cfd0..2862205 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -491,7 +491,8 @@ static inline void enic_free_wq_bufs(struct vnic_wq *wq, u16 completed_index)
tail_idx = enic_ring_incr(desc_count, tail_idx);
}
- rte_mempool_put_bulk(pool, (void **)free, nb_free);
+ if (nb_free > 0)
+ rte_mempool_put_bulk(pool, (void **)free, nb_free);
wq->tail_idx = tail_idx;
wq->ring.desc_avail += nb_to_free;
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix mask flag on flow rule creation' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (58 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/enic: fix crash when freeing 0 packet to mempool' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: revert fix of PF notify when VF not up' " Yuanhan Liu
` (3 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Qi Zhang; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ea84aaf2625f062b8eabed15b084822e84dda8d1 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 3 Aug 2017 05:38:09 +0800
Subject: [PATCH] net/ixgbe: fix mask flag on flow rule creation
[ upstream commit d769655450ac31842b78837ddf9849a3aee707c6 ]
After fail to create a flow and if this is the first flow, the
mask_added flag should be reset, or it will prevent a new flow
which require different mask be created, since the mask config
remains impact.
Fixes: 72c135a89f8 ("net/ixgbe: create consistent filter")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ixgbe/ixgbe_flow.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 9aeb71e..3a5f979 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -2414,6 +2414,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
struct ixgbe_eth_l2_tunnel_conf_ele *l2_tn_filter_ptr;
struct ixgbe_fdir_rule_ele *fdir_rule_ptr;
struct ixgbe_flow_mem *ixgbe_flow_mem_ptr;
+ uint8_t first_mask = FALSE;
flow = rte_zmalloc("ixgbe_rte_flow", sizeof(struct rte_flow), 0);
if (!flow) {
@@ -2510,6 +2511,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
goto out;
fdir_info->mask_added = TRUE;
+ first_mask = TRUE;
} else {
/**
* Only support one global mask,
@@ -2540,8 +2542,15 @@ ixgbe_flow_create(struct rte_eth_dev *dev,
return flow;
}
- if (ret)
+ if (ret) {
+ /**
+ * clean the mask_added flag if fail to
+ * program
+ **/
+ if (first_mask)
+ fdir_info->mask_added = FALSE;
goto out;
+ }
}
goto out;
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'net/i40e: revert fix of PF notify when VF not up' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (59 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/ixgbe: fix mask flag on flow rule creation' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'examples/l3fwd: fix IPv6 packet type parse' " Yuanhan Liu
` (2 subsequent siblings)
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Beilei Xing, dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 59ec4917824f6f923c220d602b057a23bf139a45 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Fri, 4 Aug 2017 23:50:06 +0800
Subject: [PATCH] net/i40e: revert fix of PF notify when VF not up
[ upstream commit f0adeebde0eff52674f28c4dd240030381c391e9 ]
This reverts commit 035a8cf88f010c82de3040c895c801ce0849b065.
Don't send messages to inactive VF will cause DPDK PF failing
to send messages to kernel VF.
With this revert, this issue will be solved.
Fixes: 035a8cf88f01 ("net/i40e: fix PF notify when VF is not up")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_pf.c | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 65d93a8..2011461 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -152,21 +152,20 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)
val |= I40E_VPGEN_VFRTRIG_VFSWR_MASK;
I40E_WRITE_REG(hw, I40E_VPGEN_VFRTRIG(vf_id), val);
I40E_WRITE_FLUSH(hw);
+ }
#define VFRESET_MAX_WAIT_CNT 100
- /* Wait until VF reset is done */
- for (i = 0; i < VFRESET_MAX_WAIT_CNT; i++) {
- rte_delay_us(10);
- val = I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id));
- if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK)
- break;
- }
+ /* Wait until VF reset is done */
+ for (i = 0; i < VFRESET_MAX_WAIT_CNT; i++) {
+ rte_delay_us(10);
+ val = I40E_READ_REG(hw, I40E_VPGEN_VFRSTAT(vf_id));
+ if (val & I40E_VPGEN_VFRSTAT_VFRD_MASK)
+ break;
+ }
- if (i >= VFRESET_MAX_WAIT_CNT) {
- PMD_DRV_LOG(ERR, "VF reset timeout");
- return -ETIMEDOUT;
- }
- vf->state = I40E_VF_ACTIVE;
+ if (i >= VFRESET_MAX_WAIT_CNT) {
+ PMD_DRV_LOG(ERR, "VF reset timeout");
+ return -ETIMEDOUT;
}
/* This is not first time to do reset, do cleanup job first */
if (vf->vsi) {
@@ -262,10 +261,7 @@ i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf,
{
struct i40e_hw *hw = I40E_PF_TO_HW(vf->pf);
uint16_t abs_vf_id = hw->func_caps.vf_base_id + vf->vf_idx;
- int ret = I40E_ERR_ADMIN_QUEUE_ERROR;
-
- if (vf->state == I40E_VF_INACTIVE)
- return ret;
+ int ret;
ret = i40e_aq_send_msg_to_vf(hw, abs_vf_id, opcode, retval,
msg, msglen, NULL);
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'examples/l3fwd: fix IPv6 packet type parse' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (60 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: revert fix of PF notify when VF not up' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix the return of supported API' " Yuanhan Liu
2017-08-29 9:27 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Qi Zhang; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From e866f2e82857a02ad00736f20c2d17479b248fe2 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Fri, 4 Aug 2017 15:52:06 +0800
Subject: [PATCH] examples/l3fwd: fix IPv6 packet type parse
[ upstream commit 5b9b65b14e05c106bb8229c0fe0b347315da7d00 ]
Fix a typo that cause IPv6 packet type not be parsed.
Fixes: 71a7e2424e07 ("examples/l3fwd: fix using packet type blindly")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
examples/l3fwd/l3fwd_em.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 9cc4460..46b327e 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -614,7 +614,7 @@ em_parse_ptype(struct rte_mbuf *m)
packet_type |= RTE_PTYPE_L4_UDP;
} else
packet_type |= RTE_PTYPE_L3_IPV4_EXT;
- } else if (ether_type == rte_cpu_to_be_16(ETHER_TYPE_IPv4)) {
+ } else if (ether_type == rte_cpu_to_be_16(ETHER_TYPE_IPv6)) {
ipv6_hdr = (struct ipv6_hdr *)l3;
if (ipv6_hdr->proto == IPPROTO_TCP)
packet_type |= RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP;
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* [dpdk-stable] patch 'crypto/dpaa2_sec: fix the return of supported API' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (61 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'examples/l3fwd: fix IPv6 packet type parse' " Yuanhan Liu
@ 2017-08-21 9:31 ` Yuanhan Liu
2017-08-29 9:27 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
63 siblings, 0 replies; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-21 9:31 UTC (permalink / raw)
To: Akhil Goyal; +Cc: dpdk stable, Yuanhan Liu
Hi,
FYI, your patch has been queued to stable release 17.05.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 55d2b20d3b35cb364d29171193287b75481919aa Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Tue, 18 Jul 2017 13:03:56 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix the return of supported API
call to dpaa2_sec_dev_configure() is made mandatory,
but dpaa2_sec_pmd returns a ENOTSUP which results in
device not getting configured.
dpaa2_sec PMD does not need any further configuration
to be done in dpaa2_sec_dev_configure, hence returning 0
Fixes: e5cbdfc53765 ("crypto/dpaa2_sec: add basic operations")
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 97ee64c..18a141a 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1263,7 +1263,7 @@ dpaa2_sec_dev_configure(struct rte_cryptodev *dev __rte_unused,
{
PMD_INIT_FUNC_TRACE();
- return -ENOTSUP;
+ return 0;
}
static int
--
2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* Re: [dpdk-stable] patch 'bus/pci: use given name as generic name' has been queued to stable release 17.05.2
2017-08-21 9:30 ` [dpdk-stable] patch 'bus/pci: use given name as generic name' " Yuanhan Liu
@ 2017-08-29 7:47 ` Yuanhan Liu
2017-08-29 7:59 ` Gaëtan Rivet
0 siblings, 1 reply; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-29 7:47 UTC (permalink / raw)
To: Gaetan Rivet; +Cc: dpdk stable
On Mon, Aug 21, 2017 at 05:30:20PM +0800, Yuanhan Liu wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 17.05.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 08/24/17. So please
> shout if anyone has objections.
There is a build error:
lib/librte_eal/common/eal_common_pci.c:133:41: error: ‘struct rte_devargs’ has no member named ‘name’
dev->device.name = dev->device.devargs->name;
I usually will do a build test before sending this out. Not quite sure
why I missed that this time :/
So I will drop it in this release. Let me know if you think a backport
is needed.
Sorry for that!
--yliu
>
> ---
> >From abbdc42771b8999624afe375b4d5d8e036d7ab71 Mon Sep 17 00:00:00 2001
> From: Gaetan Rivet <gaetan.rivet@6wind.com>
> Date: Sat, 15 Jul 2017 19:56:39 +0200
> Subject: [PATCH] bus/pci: use given name as generic name
>
> [ upstream commit 23eaa9059ec24e95e32361f333ed0686f82bea74 ]
>
> When an application requests the use of a PCI device, it can currently
> interchangeably use either the longform DomBDF format (0000:00:00.0) or
> the shorter BDF format (00:00.0).
>
> When a device is inserted via the hotplug API, it must first be scanned
> and then will be identified by its name using `find_device`. The name of
> the device must match the name given by the user to be found and then
> probed.
>
> A new function sets the expected name for a scanned PCI device. It was
> previously generated from parsing the PCI address. This canonical name
> is superseded when an rte_devargs exists describing the device. In such
> case, the device takes the given name found within the rte_devargs.
>
> As the rte_devargs is linked to the rte_pci_device during scanning, it
> can be avoided during the probe. Additionally, this fixes the issue of
> the rte_devargs lookup not being done within rte_pci_probe_one.
>
> Fixes: beec692c5157 ("eal: add name field to generic device")
>
> Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> ---
> lib/librte_eal/bsdapp/eal/eal_pci.c | 4 ++--
> lib/librte_eal/common/eal_common_pci.c | 29 ++++++++++++++++++++++++-----
> lib/librte_eal/common/eal_private.h | 5 +++++
> lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++--
> 4 files changed, 33 insertions(+), 9 deletions(-)
>
> diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
> index e321461..97a88ec 100644
> --- a/lib/librte_eal/bsdapp/eal/eal_pci.c
> +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
> @@ -282,8 +282,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
> /* FreeBSD has no NUMA support (yet) */
> dev->device.numa_node = 0;
>
> - rte_pci_device_name(&dev->addr, dev->name, sizeof(dev->name));
> - dev->device.name = dev->name;
> + pci_name_set(dev);
>
> /* FreeBSD has only one pass through driver */
> dev->kdrv = RTE_KDRV_NIC_UIO;
> @@ -334,6 +333,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
> } else { /* already registered */
> dev2->kdrv = dev->kdrv;
> dev2->max_vfs = dev->max_vfs;
> + pci_name_set(dev2);
> memmove(dev2->mem_resource,
> dev->mem_resource,
> sizeof(dev->mem_resource));
> diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
> index b749991..8f8627e 100644
> --- a/lib/librte_eal/common/eal_common_pci.c
> +++ b/lib/librte_eal/common/eal_common_pci.c
> @@ -113,6 +113,29 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)
> return NULL;
> }
>
> +void
> +pci_name_set(struct rte_pci_device *dev)
> +{
> + struct rte_devargs *devargs;
> +
> + /* Each device has its internal, canonical name set. */
> + rte_pci_device_name(&dev->addr,
> + dev->name, sizeof(dev->name));
> + devargs = pci_devargs_lookup(dev);
> + dev->device.devargs = devargs;
> + /* In blacklist mode, if the device is not blacklisted, no
> + * rte_devargs exists for it.
> + */
> + if (devargs != NULL)
> + /* If an rte_devargs exists, the generic rte_device uses the
> + * given name as its namea
> + */
> + dev->device.name = dev->device.devargs->name;
> + else
> + /* Otherwise, it uses the internal, canonical form. */
> + dev->device.name = dev->name;
> +}
> +
> /* map a particular resource from a file */
> void *
> pci_map_resource(void *requested_addr, int fd, off_t offset, size_t size,
> @@ -419,11 +442,7 @@ rte_pci_probe(void)
> FOREACH_DEVICE_ON_PCIBUS(dev) {
> probed++;
>
> - /* set devargs in PCI structure */
> - devargs = pci_devargs_lookup(dev);
> - if (devargs != NULL)
> - dev->device.devargs = devargs;
> -
> + devargs = dev->device.devargs;
> /* probe all or only whitelisted devices */
> if (probe_all)
> ret = pci_probe_all_drivers(dev);
> diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h
> index 6cacce0..0a1c3a7 100644
> --- a/lib/librte_eal/common/eal_private.h
> +++ b/lib/librte_eal/common/eal_private.h
> @@ -113,6 +113,11 @@ struct rte_pci_driver;
> struct rte_pci_device;
>
> /**
> + * Find the name of a PCI device.
> + */
> +void pci_name_set(struct rte_pci_device *dev);
> +
> +/**
> * Add a PCI device to the PCI Bus (append to PCI Device list). This function
> * also updates the bus references of the PCI Device (and the generic device
> * object embedded within.
> diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
> index 595622b..816b19d 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_pci.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
> @@ -324,8 +324,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
> dev->device.numa_node = tmp;
> }
>
> - rte_pci_device_name(addr, dev->name, sizeof(dev->name));
> - dev->device.name = dev->name;
> + pci_name_set(dev);
>
> /* parse resources */
> snprintf(filename, sizeof(filename), "%s/resource", dirname);
> @@ -373,6 +372,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
> } else { /* already registered */
> dev2->kdrv = dev->kdrv;
> dev2->max_vfs = dev->max_vfs;
> + pci_name_set(dev2);
> memmove(dev2->mem_resource, dev->mem_resource,
> sizeof(dev->mem_resource));
> free(dev);
> --
> 2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* Re: [dpdk-stable] patch 'bus/pci: use given name as generic name' has been queued to stable release 17.05.2
2017-08-29 7:47 ` Yuanhan Liu
@ 2017-08-29 7:59 ` Gaëtan Rivet
0 siblings, 0 replies; 68+ messages in thread
From: Gaëtan Rivet @ 2017-08-29 7:59 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: dpdk stable
Hi,
On Tue, Aug 29, 2017 at 03:47:28PM +0800, Yuanhan Liu wrote:
> On Mon, Aug 21, 2017 at 05:30:20PM +0800, Yuanhan Liu wrote:
> > Hi,
> >
> > FYI, your patch has been queued to stable release 17.05.2
> >
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 08/24/17. So please
> > shout if anyone has objections.
>
> There is a build error:
>
> lib/librte_eal/common/eal_common_pci.c:133:41: error: ‘struct rte_devargs’ has no member named ‘name’
> dev->device.name = dev->device.devargs->name;
>
> I usually will do a build test before sending this out. Not quite sure
> why I missed that this time :/
>
> So I will drop it in this release. Let me know if you think a backport
> is needed.
>
> Sorry for that!
>
No, it's my fault I think.
I referenced a commit to fix, however it is dependent on rte_devargs
evolutions made in the meantime.
I think it's safe to drop this patch completely from a stable branch for
17.05, as those rte_devargs evolutions are not meant to be backported I
think.
Moreover, the bug fixed with this commit only makes sense in light of
these rte_devargs evolutions (meaning: rte_devargs now holds the
"user-given" name of a device, and only once this name is defined does
it make sense to distinguish the generated name of a PCI device from its
"user-given" one.).
> --yliu
> >
> > ---
> > >From abbdc42771b8999624afe375b4d5d8e036d7ab71 Mon Sep 17 00:00:00 2001
> > From: Gaetan Rivet <gaetan.rivet@6wind.com>
> > Date: Sat, 15 Jul 2017 19:56:39 +0200
> > Subject: [PATCH] bus/pci: use given name as generic name
> >
> > [ upstream commit 23eaa9059ec24e95e32361f333ed0686f82bea74 ]
> >
> > When an application requests the use of a PCI device, it can currently
> > interchangeably use either the longform DomBDF format (0000:00:00.0) or
> > the shorter BDF format (00:00.0).
> >
> > When a device is inserted via the hotplug API, it must first be scanned
> > and then will be identified by its name using `find_device`. The name of
> > the device must match the name given by the user to be found and then
> > probed.
> >
> > A new function sets the expected name for a scanned PCI device. It was
> > previously generated from parsing the PCI address. This canonical name
> > is superseded when an rte_devargs exists describing the device. In such
> > case, the device takes the given name found within the rte_devargs.
> >
> > As the rte_devargs is linked to the rte_pci_device during scanning, it
> > can be avoided during the probe. Additionally, this fixes the issue of
> > the rte_devargs lookup not being done within rte_pci_probe_one.
> >
> > Fixes: beec692c5157 ("eal: add name field to generic device")
> >
> > Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> > ---
> > lib/librte_eal/bsdapp/eal/eal_pci.c | 4 ++--
> > lib/librte_eal/common/eal_common_pci.c | 29 ++++++++++++++++++++++++-----
> > lib/librte_eal/common/eal_private.h | 5 +++++
> > lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++--
> > 4 files changed, 33 insertions(+), 9 deletions(-)
> >
> > diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
> > index e321461..97a88ec 100644
> > --- a/lib/librte_eal/bsdapp/eal/eal_pci.c
> > +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
> > @@ -282,8 +282,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
> > /* FreeBSD has no NUMA support (yet) */
> > dev->device.numa_node = 0;
> >
> > - rte_pci_device_name(&dev->addr, dev->name, sizeof(dev->name));
> > - dev->device.name = dev->name;
> > + pci_name_set(dev);
> >
> > /* FreeBSD has only one pass through driver */
> > dev->kdrv = RTE_KDRV_NIC_UIO;
> > @@ -334,6 +333,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
> > } else { /* already registered */
> > dev2->kdrv = dev->kdrv;
> > dev2->max_vfs = dev->max_vfs;
> > + pci_name_set(dev2);
> > memmove(dev2->mem_resource,
> > dev->mem_resource,
> > sizeof(dev->mem_resource));
> > diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
> > index b749991..8f8627e 100644
> > --- a/lib/librte_eal/common/eal_common_pci.c
> > +++ b/lib/librte_eal/common/eal_common_pci.c
> > @@ -113,6 +113,29 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)
> > return NULL;
> > }
> >
> > +void
> > +pci_name_set(struct rte_pci_device *dev)
> > +{
> > + struct rte_devargs *devargs;
> > +
> > + /* Each device has its internal, canonical name set. */
> > + rte_pci_device_name(&dev->addr,
> > + dev->name, sizeof(dev->name));
> > + devargs = pci_devargs_lookup(dev);
> > + dev->device.devargs = devargs;
> > + /* In blacklist mode, if the device is not blacklisted, no
> > + * rte_devargs exists for it.
> > + */
> > + if (devargs != NULL)
> > + /* If an rte_devargs exists, the generic rte_device uses the
> > + * given name as its namea
> > + */
> > + dev->device.name = dev->device.devargs->name;
> > + else
> > + /* Otherwise, it uses the internal, canonical form. */
> > + dev->device.name = dev->name;
> > +}
> > +
> > /* map a particular resource from a file */
> > void *
> > pci_map_resource(void *requested_addr, int fd, off_t offset, size_t size,
> > @@ -419,11 +442,7 @@ rte_pci_probe(void)
> > FOREACH_DEVICE_ON_PCIBUS(dev) {
> > probed++;
> >
> > - /* set devargs in PCI structure */
> > - devargs = pci_devargs_lookup(dev);
> > - if (devargs != NULL)
> > - dev->device.devargs = devargs;
> > -
> > + devargs = dev->device.devargs;
> > /* probe all or only whitelisted devices */
> > if (probe_all)
> > ret = pci_probe_all_drivers(dev);
> > diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h
> > index 6cacce0..0a1c3a7 100644
> > --- a/lib/librte_eal/common/eal_private.h
> > +++ b/lib/librte_eal/common/eal_private.h
> > @@ -113,6 +113,11 @@ struct rte_pci_driver;
> > struct rte_pci_device;
> >
> > /**
> > + * Find the name of a PCI device.
> > + */
> > +void pci_name_set(struct rte_pci_device *dev);
> > +
> > +/**
> > * Add a PCI device to the PCI Bus (append to PCI Device list). This function
> > * also updates the bus references of the PCI Device (and the generic device
> > * object embedded within.
> > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
> > index 595622b..816b19d 100644
> > --- a/lib/librte_eal/linuxapp/eal/eal_pci.c
> > +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
> > @@ -324,8 +324,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
> > dev->device.numa_node = tmp;
> > }
> >
> > - rte_pci_device_name(addr, dev->name, sizeof(dev->name));
> > - dev->device.name = dev->name;
> > + pci_name_set(dev);
> >
> > /* parse resources */
> > snprintf(filename, sizeof(filename), "%s/resource", dirname);
> > @@ -373,6 +372,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
> > } else { /* already registered */
> > dev2->kdrv = dev->kdrv;
> > dev2->max_vfs = dev->max_vfs;
> > + pci_name_set(dev2);
> > memmove(dev2->mem_resource, dev->mem_resource,
> > sizeof(dev->mem_resource));
> > free(dev);
> > --
> > 2.7.4
--
Gaëtan Rivet
6WIND
^ permalink raw reply [flat|nested] 68+ messages in thread
* Re: [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
` (62 preceding siblings ...)
2017-08-21 9:31 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix the return of supported API' " Yuanhan Liu
@ 2017-08-29 9:27 ` Yuanhan Liu
2017-08-30 15:57 ` Stephen Hemminger
63 siblings, 1 reply; 68+ messages in thread
From: Yuanhan Liu @ 2017-08-29 9:27 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
On Mon, Aug 21, 2017 at 05:30:15PM +0800, Yuanhan Liu wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 17.05.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 08/24/17. So please
> shout if anyone has objections.
According to following discussions, I'd like to drop this one and another
one ("net/virtio: do not falsely claim to do IP checksum").
http://dpdk.org/ml/archives/dev/2017-August/073341.html
--yliu
>
> ---
> >From 6de4d8eee1aafaf8eb8316501aa87d9874cf83bc Mon Sep 17 00:00:00 2001
> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Fri, 7 Jul 2017 12:52:50 -0700
> Subject: [PATCH] net/virtio: do not claim to support LRO
>
> [ upstream commit 701a64622c2653c0736042d2f790081db79afdc7 ]
>
> The current virtio supports Transmit Segmentation Offload, but
> does not really support Large Receive Offload. The driver was confusing
> the two offloads.
>
> Fixes: 86d59b21468a ("net/virtio: support LRO")
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> ---
> drivers/net/virtio/virtio_ethdev.c | 22 ++--------------------
> 1 file changed, 2 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 1651c59..d65667c 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1659,11 +1659,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
> {
> const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
> struct virtio_hw *hw = dev->data->dev_private;
> - uint64_t req_features;
> - int ret;
>
> PMD_INIT_LOG(DEBUG, "configure");
> - req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES;
>
> /* Virtio does L4 checksum but not L3! */
> if (rxmode->hw_ip_checksum) {
> @@ -1671,23 +1668,10 @@ virtio_dev_configure(struct rte_eth_dev *dev)
> "virtio does not support IP checksum");
> return -ENOTSUP;
> }
> - if (rxmode->enable_lro)
> - req_features |=
> - (1ULL << VIRTIO_NET_F_GUEST_TSO4) |
> - (1ULL << VIRTIO_NET_F_GUEST_TSO6);
> -
> - /* if request features changed, reinit the device */
> - if (req_features != hw->req_guest_features) {
> - ret = virtio_init_device(dev, req_features);
> - if (ret < 0)
> - return ret;
> - }
>
> - if (rxmode->enable_lro &&
> - (!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
> - !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
> + if (rxmode->enable_lro) {
> PMD_DRV_LOG(NOTICE,
> - "lro not available on this host");
> + "virtio does not support Large Receive Offload");
> return -ENOTSUP;
> }
>
> @@ -1913,8 +1897,6 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
> }
> tso_mask = (1ULL << VIRTIO_NET_F_GUEST_TSO4) |
> (1ULL << VIRTIO_NET_F_GUEST_TSO6);
> - if ((host_features & tso_mask) == tso_mask)
> - dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TCP_LRO;
>
> dev_info->tx_offload_capa = 0;
> if (hw->guest_features & (1ULL << VIRTIO_NET_F_CSUM)) {
> --
> 2.7.4
^ permalink raw reply [flat|nested] 68+ messages in thread
* Re: [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2
2017-08-29 9:27 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
@ 2017-08-30 15:57 ` Stephen Hemminger
0 siblings, 0 replies; 68+ messages in thread
From: Stephen Hemminger @ 2017-08-30 15:57 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: dpdk stable
On Tue, 29 Aug 2017 17:27:57 +0800
Yuanhan Liu <yliu@fridaylinux.org> wrote:
> On Mon, Aug 21, 2017 at 05:30:15PM +0800, Yuanhan Liu wrote:
> > Hi,
> >
> > FYI, your patch has been queued to stable release 17.05.2
> >
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 08/24/17. So please
> > shout if anyone has objections.
>
> According to following discussions, I'd like to drop this one and another
> one ("net/virtio: do not falsely claim to do IP checksum").
>
> http://dpdk.org/ml/archives/dev/2017-August/073341.html
>
> --yliu
yes, drop them
^ permalink raw reply [flat|nested] 68+ messages in thread
end of thread, other threads:[~2017-08-30 15:57 UTC | newest]
Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21 9:30 [dpdk-stable] patch 'net/virtio: do not claim to support LRO' has been queued to stable release 17.05.2 Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'ethdev: fix build with gcc 5.4.0' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix build with gcc 7.1' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mbuf: fix VXLAN port in comment' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'metrics: fix name string termination' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'bus/pci: use given name as generic name' " Yuanhan Liu
2017-08-29 7:47 ` Yuanhan Liu
2017-08-29 7:59 ` Gaëtan Rivet
2017-08-21 9:30 ` [dpdk-stable] patch 'net/sfc: request MAC stats upload immediately on port start' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix VF Tx bytes' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/ixgbe: fix LSC interrupt' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/e1000: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix ethertype filter for new FW' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/ixgbe: fix Rx/Tx queue interrupt for x550 devices' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'eventdev: fix memory realloc check in port config' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/scheduler: fix slave name parsing' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: fix NULL authentication hang' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix free usage for dpsec' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: fix possible crypto job leak' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'doc: remove incorrect limitation on AESNI-MB PMD' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'doc: add missing algorithm in limitations for QAT' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: fix zero burst dequeue' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/scheduler: fix strings not null terminated' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/crypto-perf: stop crypto devices after test' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'cmdline: fix dynamic tokens initialization' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'cmdline: fix dynamic tokens interface' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/testpmd: fix token matching in flow command' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mempool/dpaa2: fix error code for allocation failure' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mempool/dpaa2: fix freeing bp list' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'examples/qos_sched: fix build for less lcores' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix HMAC supported key sizes' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/aesni_mb: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/openssl: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/qat: fix SHA384-HMAC block size' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/crypto-perf: fix CSV output' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/armv8: fix authentication session configuration' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'crypto/armv8: fix HMAC supported key sizes' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'app/testpmd: fix flow rule copy functions' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'mbuf: fix doxygen comment of bulk alloc' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/virtio: fix MAC address read' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/virtio: fix Rx interrupt setup' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/i40e: fix link down and negotiation' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: fix set link config' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: check invalid L2 filter id' " Yuanhan Liu
2017-08-21 9:30 ` [dpdk-stable] patch 'net/bnxt: free filter before reusing it' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/ixgbe: fix mirror rule index overflow' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx5: fix inconsistent link status query' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix parsing QinQ pattern' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix PF notify when VF is not up' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix memory corruptions' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix parameters of a balance Tx' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix namespace of the RSS tests' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'test/bonding: fix device name' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx5: fix missing packet type calculation' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx4: fix flow creation before start' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/mlx4: fix probe failure report' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/qede: fix chip details print' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/vmxnet3: fix filtering on promiscuous disabling' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: fix Rx data segment buffer length' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/enic: fix crash when freeing 0 packet to mempool' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/ixgbe: fix mask flag on flow rule creation' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'net/i40e: revert fix of PF notify when VF not up' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'examples/l3fwd: fix IPv6 packet type parse' " Yuanhan Liu
2017-08-21 9:31 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix the return of supported API' " Yuanhan Liu
2017-08-29 9:27 ` [dpdk-stable] patch 'net/virtio: do not claim to support LRO' " Yuanhan Liu
2017-08-30 15:57 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).