patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2] net/mlx5: fix LAG representor probe on PF1 PCI
       [not found] <20210422072446.29455-1-xuemingl@nvidia.com>
@ 2021-05-10 13:13 ` Xueming Li
  2021-05-11  7:44   ` [dpdk-stable] [dpdk-dev] " Slava Ovsiienko
  0 siblings, 1 reply; 3+ messages in thread
From: Xueming Li @ 2021-05-10 13:13 UTC (permalink / raw)
  Cc: dev, xuemingl, stable

In case of bonding, orchestrator wants to use same devargs for LAG and
non-LAG scenario to probe representor on PF1 using PF1 PCI address
like "<DBDF_PF1>,representor=pf1vf[0-3]".

This patch changes PCI address check policy to allow PF1 PCI address for
representors on PF1.

Note: detaching PF0 device can't remove representors on PF1. It's
recommended to use primary(PF0) PCI address to probe representors on
both PFs.

Fixes: f926cce3fa94 ("net/mlx5: refactor bonding representor probing")

Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 5ac787106d..47606d292a 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1877,11 +1877,14 @@ mlx5_device_bond_pci_match(const struct ibv_device *ibv_dev,
 				tmp_str);
 			break;
 		}
-		/* Match PCI address. */
+		/* Match PCI address, allows BDF0+pfx or BDFx+pfx. */
 		if (pci_dev->domain == pci_addr.domain &&
 		    pci_dev->bus == pci_addr.bus &&
 		    pci_dev->devid == pci_addr.devid &&
-		    pci_dev->function + owner == pci_addr.function)
+		    ((pci_dev->function == 0 &&
+		      pci_dev->function + owner == pci_addr.function) ||
+		     (pci_dev->function == owner &&
+		      pci_addr.function == owner)))
 			pf = info.port_name;
 		/* Get ifindex. */
 		snprintf(tmp_str, sizeof(tmp_str),
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/mlx5: fix LAG representor probe on PF1 PCI
  2021-05-10 13:13 ` [dpdk-stable] [PATCH v2] net/mlx5: fix LAG representor probe on PF1 PCI Xueming Li
@ 2021-05-11  7:44   ` Slava Ovsiienko
  2021-05-12 10:35     ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Slava Ovsiienko @ 2021-05-11  7:44 UTC (permalink / raw)
  To: Xueming(Steven) Li; +Cc: dev, Xueming(Steven) Li, stable

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xueming Li
> Sent: Monday, May 10, 2021 16:14
> Cc: dev@dpdk.org; Xueming(Steven) Li <xuemingl@nvidia.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix LAG representor probe on PF1
> PCI
> 
> In case of bonding, orchestrator wants to use same devargs for LAG and non-
> LAG scenario to probe representor on PF1 using PF1 PCI address like
> "<DBDF_PF1>,representor=pf1vf[0-3]".
> 
> This patch changes PCI address check policy to allow PF1 PCI address for
> representors on PF1.
> 
> Note: detaching PF0 device can't remove representors on PF1. It's
> recommended to use primary(PF0) PCI address to probe representors on
> both PFs.
> 
> Fixes: f926cce3fa94 ("net/mlx5: refactor bonding representor probing")
> 
> Cc: stable@dpdk.org
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/mlx5: fix LAG representor probe on PF1 PCI
  2021-05-11  7:44   ` [dpdk-stable] [dpdk-dev] " Slava Ovsiienko
@ 2021-05-12 10:35     ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-05-12 10:35 UTC (permalink / raw)
  To: Xueming(Steven) Li; +Cc: dev, stable, Slava Ovsiienko

> > In case of bonding, orchestrator wants to use same devargs for LAG and non-
> > LAG scenario to probe representor on PF1 using PF1 PCI address like
> > "<DBDF_PF1>,representor=pf1vf[0-3]".
> > 
> > This patch changes PCI address check policy to allow PF1 PCI address for
> > representors on PF1.
> > 
> > Note: detaching PF0 device can't remove representors on PF1. It's
> > recommended to use primary(PF0) PCI address to probe representors on
> > both PFs.
> > 
> > Fixes: f926cce3fa94 ("net/mlx5: refactor bonding representor probing")
> > 
> > Cc: stable@dpdk.org
> > Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Applied to next-net-mlx, thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-12 10:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210422072446.29455-1-xuemingl@nvidia.com>
2021-05-10 13:13 ` [dpdk-stable] [PATCH v2] net/mlx5: fix LAG representor probe on PF1 PCI Xueming Li
2021-05-11  7:44   ` [dpdk-stable] [dpdk-dev] " Slava Ovsiienko
2021-05-12 10:35     ` Thomas Monjalon

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git