* [dpdk-stable] please help backporting some patches to LTS release 16.11.3
@ 2017-08-14 12:18 Yuanhan Liu
2017-08-31 9:44 ` [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable Adrien Mazarguil
0 siblings, 1 reply; 5+ messages in thread
From: Yuanhan Liu @ 2017-08-14 12:18 UTC (permalink / raw)
To: dpdk stable
Cc: Adrien Mazarguil, Ajit Khaparde, Jeff Guo, Jingjing Wu,
Matan Azrad, Mike Stolarchuk, Nelio Laranjeiro, Pablo de Lara,
Yongseok Koh, Yuanhan Liu
Hi commit authors (and maintainers),
I didn't manage to apply following commits from upstream to stable branch
16.11: conflict happens. I'm wondering can the authors check the following
list and backport those patches belong to you?
FYI, branch 16.11 is located at tree:
git://dpdk.org/dpdk-stable
It'd be great if you could do that before the end of this week. Any thing
later than that will be missed in this release and be candidates for next
LTS release.
Please add a heading line like below before the commit log body while
backporting:
[ backported from upstream commit full_commit_hash ]
Example: http://dpdk.org/browse/dpdk-stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e
Please let me know if you have any comments. And please send it to
"stable@dpdk.org", but not "dev@dpdk.org".
Thanks.
-yliu
---
2d449f7 Adrien Mazarguil net/mlx4: fix assertion failure on link update
28eef5e Ajit Khaparde net/bnxt: enable default VNIC allocation
2bda4ec Ajit Khaparde net/bnxt: fix vnic cleanup
1bb8f66 Jeff Guo net/i40e: fix link down and negotiation
1859934 Jeff Guo net/i40e: fix VF add/del MAC
d58244b Jingjing Wu net/i40e: fix LSC interrupt
53d49d8 Jingjing Wu net/ixgbe: fix LSC interrupt
8d0f801 Matan Azrad net/mlx4: fix probe failure report
61d04ef Mike Stolarchuk hash: fix lock release on add
a0edafe Nelio Laranjeiro net/mlx5: fix MTU update
5668da1 Pablo de Lara crypto/qat: fix HMAC supported key sizes
b5b047a Pablo de Lara crypto/qat: fix SHA384-HMAC block size
8082845 Pablo de Lara doc: remove incorrect limitation on AESNI-MB PMD
de938b7 Pablo de Lara doc: remove incorrect limitation on QAT PMD
f2522ce Pablo de Lara test/crypto: fix wrong AAD setting
48dfc20 Yongseok Koh net/mlx5: fix missing packet type calculation
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable
2017-08-14 12:18 [dpdk-stable] please help backporting some patches to LTS release 16.11.3 Yuanhan Liu
@ 2017-08-31 9:44 ` Adrien Mazarguil
2017-08-31 9:44 ` [dpdk-stable] [PATCH 1/2] net/mlx: remove link update lock Adrien Mazarguil
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Adrien Mazarguil @ 2017-08-31 9:44 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: stable
Turns out the original fix ("fix assertion failure on link update") relies on
another commit which was never scheduled for stable inclusion.
Adrien Mazarguil (1):
net/mlx4: fix assertion failure on link update
Matthieu Ternisien d'Ouville (1):
net/mlx: remove link update lock
drivers/net/mlx4/mlx4.c | 51 ++++++++++++-------------------------
drivers/net/mlx5/mlx5.c | 2 +-
drivers/net/mlx5/mlx5.h | 1 -
drivers/net/mlx5/mlx5_ethdev.c | 28 ++++----------------
4 files changed, 22 insertions(+), 60 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-stable] [PATCH 1/2] net/mlx: remove link update lock
2017-08-31 9:44 ` [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable Adrien Mazarguil
@ 2017-08-31 9:44 ` Adrien Mazarguil
2017-08-31 9:44 ` [dpdk-stable] [PATCH 2/2] net/mlx4: fix assertion failure on link update Adrien Mazarguil
2017-09-01 2:00 ` [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable Yuanhan Liu
2 siblings, 0 replies; 5+ messages in thread
From: Adrien Mazarguil @ 2017-08-31 9:44 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: stable
From: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
[ backported from upstream commit 2c960a5116d05cc7c93d00df707655d72d73d230 ]
Retrieving link status information through the link update callback should
be quick and non-blocking.
Mellanox PMDs retrieve this information through ioctl() calls on the
related kernel netdevice. This appears to take a long time to
complete and may cause significant slowdowns in applications.
While these system calls cannot be accelerated, removing the lock on the
private structure allows applications to perform other control operations
from separate threads in the meantime. This function remains safe without
locking as it does not write the private structure, it is only used to
retrieve the name of the netdevice.
Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx4/mlx4.c | 32 ++++++--------------------------
drivers/net/mlx5/mlx5.c | 2 +-
drivers/net/mlx5/mlx5.h | 1 -
drivers/net/mlx5/mlx5_ethdev.c | 28 +++++-----------------------
4 files changed, 12 insertions(+), 51 deletions(-)
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 4a03d34..22af742 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -4836,7 +4836,7 @@ mlx4_allmulticast_disable(struct rte_eth_dev *dev)
}
/**
- * DPDK callback to retrieve physical link information (unlocked version).
+ * DPDK callback to retrieve physical link information.
*
* @param dev
* Pointer to Ethernet device structure.
@@ -4844,9 +4844,9 @@ mlx4_allmulticast_disable(struct rte_eth_dev *dev)
* Wait for request completion (ignored).
*/
static int
-mlx4_link_update_unlocked(struct rte_eth_dev *dev, int wait_to_complete)
+mlx4_link_update(struct rte_eth_dev *dev, int wait_to_complete)
{
- struct priv *priv = mlx4_get_priv(dev);
+ const struct priv *priv = mlx4_get_priv(dev);
struct ethtool_cmd edata = {
.cmd = ETHTOOL_GSET
};
@@ -4854,6 +4854,8 @@ mlx4_link_update_unlocked(struct rte_eth_dev *dev, int wait_to_complete)
struct rte_eth_link dev_link;
int link_speed = 0;
+ /* priv_lock() is not taken to allow concurrent calls. */
+
if (priv == NULL)
return -EINVAL;
(void)wait_to_complete;
@@ -4889,28 +4891,6 @@ mlx4_link_update_unlocked(struct rte_eth_dev *dev, int wait_to_complete)
}
/**
- * DPDK callback to retrieve physical link information.
- *
- * @param dev
- * Pointer to Ethernet device structure.
- * @param wait_to_complete
- * Wait for request completion (ignored).
- */
-static int
-mlx4_link_update(struct rte_eth_dev *dev, int wait_to_complete)
-{
- struct priv *priv = mlx4_get_priv(dev);
- int ret;
-
- if (priv == NULL)
- return -EINVAL;
- priv_lock(priv);
- ret = mlx4_link_update_unlocked(dev, wait_to_complete);
- priv_unlock(priv);
- return ret;
-}
-
-/**
* DPDK callback to change the MTU.
*
* Setting the MTU affects hardware MRU (packets larger than the MTU cannot be
@@ -5426,7 +5406,7 @@ priv_dev_link_status_handler(struct priv *priv, struct rte_eth_dev *dev)
struct rte_eth_link *link = &dev->data->dev_link;
priv->pending_alarm = 0;
- mlx4_link_update_unlocked(dev, 0);
+ mlx4_link_update(dev, 0);
if (((link->link_speed == 0) && link->link_status) ||
((link->link_speed != 0) && !link->link_status)) {
/* Inconsistent status, check again later. */
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index aa9d2dc..6f74e6d 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -668,7 +668,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
/* Bring Ethernet device up. */
DEBUG("forcing Ethernet interface up");
priv_set_flags(priv, ~IFF_UP, IFF_UP);
- mlx5_link_update_unlocked(priv->dev, 1);
+ mlx5_link_update(priv->dev, 1);
continue;
port_error:
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 79b7a60..adb9d79 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -188,7 +188,6 @@ int priv_set_flags(struct priv *, unsigned int, unsigned int);
int mlx5_dev_configure(struct rte_eth_dev *);
void mlx5_dev_infos_get(struct rte_eth_dev *, struct rte_eth_dev_info *);
const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev);
-int mlx5_link_update_unlocked(struct rte_eth_dev *, int);
int mlx5_link_update(struct rte_eth_dev *, int);
int mlx5_dev_set_mtu(struct rte_eth_dev *, uint16_t);
int mlx5_dev_get_flow_ctrl(struct rte_eth_dev *, struct rte_eth_fc_conf *);
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index ca981a5..279f6d8 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -680,7 +680,7 @@ mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev)
}
/**
- * Retrieve physical link information (unlocked version using legacy ioctl).
+ * DPDK callback to retrieve physical link information.
*
* @param dev
* Pointer to Ethernet device structure.
@@ -698,6 +698,8 @@ mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev, int wait_to_complete)
struct rte_eth_link dev_link;
int link_speed = 0;
+ /* priv_lock() is not taken to allow concurrent calls. */
+
(void)wait_to_complete;
if (priv_ifreq(priv, SIOCGIFFLAGS, &ifr)) {
WARN("ioctl(SIOCGIFFLAGS) failed: %s", strerror(errno));
@@ -839,7 +841,7 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
}
/**
- * DPDK callback to retrieve physical link information (unlocked version).
+ * DPDK callback to retrieve physical link information.
*
* @param dev
* Pointer to Ethernet device structure.
@@ -847,7 +849,7 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
* Wait for request completion (ignored).
*/
int
-mlx5_link_update_unlocked(struct rte_eth_dev *dev, int wait_to_complete)
+mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
{
struct utsname utsname;
int ver[3];
@@ -861,26 +863,6 @@ mlx5_link_update_unlocked(struct rte_eth_dev *dev, int wait_to_complete)
}
/**
- * DPDK callback to retrieve physical link information.
- *
- * @param dev
- * Pointer to Ethernet device structure.
- * @param wait_to_complete
- * Wait for request completion (ignored).
- */
-int
-mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
-{
- struct priv *priv = mlx5_get_priv(dev);
- int ret;
-
- priv_lock(priv);
- ret = mlx5_link_update_unlocked(dev, wait_to_complete);
- priv_unlock(priv);
- return ret;
-}
-
-/**
* DPDK callback to change the MTU.
*
* Setting the MTU affects hardware MRU (packets larger than the MTU cannot be
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-stable] [PATCH 2/2] net/mlx4: fix assertion failure on link update
2017-08-31 9:44 ` [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable Adrien Mazarguil
2017-08-31 9:44 ` [dpdk-stable] [PATCH 1/2] net/mlx: remove link update lock Adrien Mazarguil
@ 2017-08-31 9:44 ` Adrien Mazarguil
2017-09-01 2:00 ` [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable Yuanhan Liu
2 siblings, 0 replies; 5+ messages in thread
From: Adrien Mazarguil @ 2017-08-31 9:44 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: stable
[ backported from upstream commit 2d449f7c52de93a5978b03ea541e454fe87f801b ]
The interrupt handler can sometimes be triggered for reasons other than a
link status event. An assertion failure happen when such events occur while
an asynchronous link status update is already scheduled.
Address this issue using the same approach as its mlx5 counterpart,
commit a9f2fbc42f0c ("net/mlx5: fix inconsistent link status")
Fixes: c4da6caa426d ("mlx4: handle link status interrupts")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx4/mlx4.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 22af742..e17d371 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5386,6 +5386,7 @@ priv_dev_link_status_handler(struct priv *priv, struct rte_eth_dev *dev)
{
struct ibv_async_event event;
int port_change = 0;
+ struct rte_eth_link *link = &dev->data->dev_link;
int ret = 0;
/* Read all message and acknowledge them. */
@@ -5401,21 +5402,20 @@ priv_dev_link_status_handler(struct priv *priv, struct rte_eth_dev *dev)
event.event_type, event.element.port_num);
ibv_ack_async_event(&event);
}
-
- if (port_change ^ priv->pending_alarm) {
- struct rte_eth_link *link = &dev->data->dev_link;
-
- priv->pending_alarm = 0;
- mlx4_link_update(dev, 0);
- if (((link->link_speed == 0) && link->link_status) ||
- ((link->link_speed != 0) && !link->link_status)) {
+ if (!port_change)
+ return ret;
+ mlx4_link_update(dev, 0);
+ if (((link->link_speed == 0) && link->link_status) ||
+ ((link->link_speed != 0) && !link->link_status)) {
+ if (!priv->pending_alarm) {
/* Inconsistent status, check again later. */
priv->pending_alarm = 1;
rte_eal_alarm_set(MLX4_ALARM_TIMEOUT_US,
mlx4_dev_link_status_handler,
dev);
- } else
- ret = 1;
+ }
+ } else {
+ ret = 1;
}
return ret;
}
@@ -5435,6 +5435,7 @@ mlx4_dev_link_status_handler(void *arg)
priv_lock(priv);
assert(priv->pending_alarm == 1);
+ priv->pending_alarm = 0;
ret = priv_dev_link_status_handler(priv, dev);
priv_unlock(priv);
if (ret)
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable
2017-08-31 9:44 ` [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable Adrien Mazarguil
2017-08-31 9:44 ` [dpdk-stable] [PATCH 1/2] net/mlx: remove link update lock Adrien Mazarguil
2017-08-31 9:44 ` [dpdk-stable] [PATCH 2/2] net/mlx4: fix assertion failure on link update Adrien Mazarguil
@ 2017-09-01 2:00 ` Yuanhan Liu
2 siblings, 0 replies; 5+ messages in thread
From: Yuanhan Liu @ 2017-09-01 2:00 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: stable
On Thu, Aug 31, 2017 at 11:44:52AM +0200, Adrien Mazarguil wrote:
> Turns out the original fix ("fix assertion failure on link update") relies on
> another commit which was never scheduled for stable inclusion.
Thank you, Adrien.
The two have been queued for 16.11.4 release.
--yliu
>
> Adrien Mazarguil (1):
> net/mlx4: fix assertion failure on link update
>
> Matthieu Ternisien d'Ouville (1):
> net/mlx: remove link update lock
>
> drivers/net/mlx4/mlx4.c | 51 ++++++++++++-------------------------
> drivers/net/mlx5/mlx5.c | 2 +-
> drivers/net/mlx5/mlx5.h | 1 -
> drivers/net/mlx5/mlx5_ethdev.c | 28 ++++----------------
> 4 files changed, 22 insertions(+), 60 deletions(-)
>
> --
> 2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-01 2:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-14 12:18 [dpdk-stable] please help backporting some patches to LTS release 16.11.3 Yuanhan Liu
2017-08-31 9:44 ` [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable Adrien Mazarguil
2017-08-31 9:44 ` [dpdk-stable] [PATCH 1/2] net/mlx: remove link update lock Adrien Mazarguil
2017-08-31 9:44 ` [dpdk-stable] [PATCH 2/2] net/mlx4: fix assertion failure on link update Adrien Mazarguil
2017-09-01 2:00 ` [dpdk-stable] [PATCH 0/2] back-ported Mellanox fixes for stable Yuanhan Liu
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).