net/bnx2x: add support for secondary process
PATCH 1/1 net/bnx2x: add support for secondary process
Skip the device re-initialization for secondary process.
--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/bnx2x/bnx2x_ethdev.c +5 -0
@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf) eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { +PMD_DRV_LOG (ERR , sc,"Skipping device init from secondary process" ); +return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev); sc->pcie_bus = pci_dev->addr.bus;
Signature · 1 line
2.18.0
Jerin Jacob
AppliedQuoted 4 lines · Rasesh Mody
Skip the device re-initialization for secondary process.
Correct Cc: to [email protected]
Applied to dpdk-next-net-mrvl/master. Thanks
Quoted 25 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/bnx2x/bnx2x_ethdev.c +5
-1@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf) eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { +PMD_DRV_LOG (ERR , sc,"Skipping device init from secondary process" ); +return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev); sc->pcie_bus = pci_dev->addr.bus; --2.18.0
Quoted 8 lines · Jerin Jacob
Quoted 4 lines · Rasesh Mody
Skip the device re-initialization for secondary process.
Correct Cc: to [email protected]
Is it a fix, or secondary process was not intended to be supported previously? If it is a fix, please provide the Fixed commit (will save Ferruh searching for it).
Quoted 29 lines
Applied to dpdk-next-net-mrvl/master. Thanks
Quoted 25 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/bnx2x/bnx2x_ethdev.c +5
-1@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf) eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { +PMD_DRV_LOG (ERR , sc,"Skipping device init from secondary process" ); +return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev); sc->pcie_bus = pci_dev->addr.bus; --2.18.0
Hi Kevin,
Quoted 9 lines
From: Kevin Traynor <[email protected]>
Sent: Tuesday, January 14, 2020 10:52 AMQuoted 1 line · Jerin Jacob
On Sat, Dec 21, 2019 at 7:12 AM Rasesh Mody <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Skip the device re-initialization for secondary process.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Correct Cc: to [email protected]
Is it a fix, or secondary process was not intended to be supported previously? If it is a fix, please provide the Fixed commit (will save Ferruh searching for it).
Secondary process was not intended to be supported previously. So it is ok to not backport the change to all ongoing stable releases. However, the change has been tested with DPDK 19.11, I am wondering if it can be pulled in that stable tree. Please see below the fixline tag.
Thanks!
-Rasesh
Quoted 34 lines
Quoted 18 lines
Applied to dpdk-next-net-mrvl/master. Thanks
Quoted 14 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/bnx2x/bnx2x_ethdev.c +0
-0@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c bnx2x_common_dev_init(struct rte_eth_dev · line 604
Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c +2
-0eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { + PMD_DRV_LOG(ERR, sc, "Skipping device init from secondaryprocess");
Quoted 10 lines
Quoted 9 lines
drivers/net/bnx2x/bnx2x_ethdev.c +3
-0+return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev);sc->pcie_bus = pci_dev->addr.bus;--
2.18.0
Quoted 13 lines · Rasesh Mody
Hi Kevin,
Quoted 11 lines
From: Kevin Traynor <[email protected]>
Sent: Tuesday, January 14, 2020 10:52 AMQuoted 1 line · Jerin Jacob
On Sat, Dec 21, 2019 at 7:12 AM Rasesh Mody <[email protected]>
Quoted 5 lines · wrote:
Quoted 4 lines
Skip the device re-initialization for secondary process.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Correct Cc: to [email protected]
Is it a fix, or secondary process was not intended to be supported previously? If it is a fix, please provide the Fixed commit (will save Ferruh searching for it).
Secondary process was not intended to be supported previously. So it is ok to not backport the change to all ongoing stable releases.
Thanks for confirming.
Quoted 1 line
However, the change has been tested with DPDK 19.11, I am wondering if it can be pulled in that stable tree.
Cc Luca
Quoted 4 lines
Please see below the fixline tag.
Fixes 540a211084a7 ("bnx2x: driver core")
Fixes tag won't be needed now as you've confirmed the code was doing what it was intending to do.
Quoted 38 lines
Thanks!
-RaseshQuoted 34 lines
Quoted 18 lines
Applied to dpdk-next-net-mrvl/master. Thanks
Quoted 14 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/bnx2x/bnx2x_ethdev.c +0
-0@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c bnx2x_common_dev_init(struct rte_eth_dev · line 604
Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c +2
-0eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { + PMD_DRV_LOG(ERR, sc, "Skipping device init from secondaryprocess");
Quoted 10 lines
Quoted 9 lines
drivers/net/bnx2x/bnx2x_ethdev.c +3
-0+return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev);sc->pcie_bus = pci_dev->addr.bus;--
2.18.0
Quoted 28 lines · Kevin Traynor
Quoted 13 lines · Rasesh Mody
Hi Kevin,
Quoted 11 lines
From: Kevin Traynor <[email protected]>
Sent: Tuesday, January 14, 2020 10:52 AMQuoted 1 line · Jerin Jacob
On Sat, Dec 21, 2019 at 7:12 AM Rasesh Mody <[email protected]>
Quoted 5 lines · wrote:
Quoted 4 lines
Skip the device re-initialization for secondary process.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Correct Cc: to [email protected]
Is it a fix, or secondary process was not intended to be supported previously? If it is a fix, please provide the Fixed commit (will save Ferruh searching for it).
Secondary process was not intended to be supported previously. So it is ok to not backport the change to all ongoing stable releases.
Thanks for confirming.
Quoted 1 line
However, the change has been tested with DPDK 19.11, I am wondering if it can be pulled in that stable tree.
Cc Luca
Quoted 7 lines
Quoted 4 lines
Please see below the fixline tag.
Fixes 540a211084a7 ("bnx2x: driver core")Fixes tag won't be needed now as you've confirmed the code was doing what it was intending to do.
Since there is a request to backport this into 19.11, I was planning to add the fixes tag (stable tag is already there) but will it confuse the 18.11 because the commit in fixes line is older than 18.11?
Quoted 40 lines
Quoted 39 lines
Thanks!
-RaseshQuoted 34 lines
Quoted 18 lines
Applied to dpdk-next-net-mrvl/master. Thanks
Quoted 14 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/bnx2x/bnx2x_ethdev.c +0
-0@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c bnx2x_common_dev_init(struct rte_eth_dev · line 604
Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c +2
-0eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { + PMD_DRV_LOG(ERR, sc, "Skipping device init from secondaryprocess");
Quoted 10 lines
Quoted 9 lines
drivers/net/bnx2x/bnx2x_ethdev.c +3
-0+return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev);sc->pcie_bus = pci_dev->addr.bus;--
2.18.0
Quoted 34 lines · Ferruh Yigit
Quoted 33 lines · Kevin Traynor
Quoted 13 lines · Rasesh Mody
Hi Kevin,
Quoted 11 lines
From: Kevin Traynor <[email protected]>
Sent: Tuesday, January 14, 2020 10:52 AMQuoted 1 line · Jerin Jacob
On Sat, Dec 21, 2019 at 7:12 AM Rasesh Mody <[email protected]>
Quoted 5 lines · wrote:
Quoted 4 lines
Skip the device re-initialization for secondary process.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Correct Cc: to [email protected]
Is it a fix, or secondary process was not intended to be supported previously? If it is a fix, please provide the Fixed commit (will save Ferruh searching for it).
Secondary process was not intended to be supported previously. So it is ok to not backport the change to all ongoing stable releases.
Thanks for confirming.
Quoted 1 line
However, the change has been tested with DPDK 19.11, I am wondering if it can be pulled in that stable tree.
Cc Luca
Quoted 4 lines
Please see below the fixline tag.
Fixes 540a211084a7 ("bnx2x: driver core")
Quoted 7 lines
Quoted 2 lines
Fixes tag won't be needed now as you've confirmed the code was doing what it was intending to do.
Since there is a request to backport this into 19.11, I was planning to add the fixes tag (stable tag is already there) but will it confuse the 18.11 because the commit in fixes line is older than 18.11?
I think it should not have a Fixes tag. In this case there is nothing being fixed, just a new feature being added/supported. It will be picked up as a candidate for stable branches through the cc: stable, from there it can be discussed.
Quoted 41 lines
Quoted 40 lines
Quoted 39 lines
Thanks!
-RaseshQuoted 34 lines
Quoted 18 lines
Applied to dpdk-next-net-mrvl/master. Thanks
Quoted 14 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/bnx2x/bnx2x_ethdev.c +0
-0@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c bnx2x_common_dev_init(struct rte_eth_dev · line 604
Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c +2
-0eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { + PMD_DRV_LOG(ERR, sc, "Skipping device init from secondaryprocess");
Quoted 10 lines
Quoted 9 lines
drivers/net/bnx2x/bnx2x_ethdev.c +3
-0+return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev);sc->pcie_bus = pci_dev->addr.bus;--
2.18.0
Quoted 43 lines · Kevin Traynor
Quoted 34 lines · Ferruh Yigit
Quoted 33 lines · Kevin Traynor
Quoted 13 lines · Rasesh Mody
Hi Kevin,
Quoted 11 lines
From: Kevin Traynor <[email protected]>
Sent: Tuesday, January 14, 2020 10:52 AMQuoted 1 line · Jerin Jacob
On Sat, Dec 21, 2019 at 7:12 AM Rasesh Mody <[email protected]>
Quoted 5 lines · wrote:
Quoted 4 lines
Skip the device re-initialization for secondary process.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Correct Cc: to [email protected]
Is it a fix, or secondary process was not intended to be supported previously? If it is a fix, please provide the Fixed commit (will save Ferruh searching for it).
Secondary process was not intended to be supported previously. So it is ok to not backport the change to all ongoing stable releases.
Thanks for confirming.
Quoted 1 line
However, the change has been tested with DPDK 19.11, I am wondering if it can be pulled in that stable tree.
Cc Luca
Quoted 4 lines
Please see below the fixline tag.
Fixes 540a211084a7 ("bnx2x: driver core")Quoted 7 lines
Quoted 2 lines
Fixes tag won't be needed now as you've confirmed the code was doing what it was intending to do.
Since there is a request to backport this into 19.11, I was planning to add the fixes tag (stable tag is already there) but will it confuse the 18.11 because the commit in fixes line is older than 18.11?
Quoted 4 lines
I think it should not have a Fixes tag. In this case there is nothing being fixed, just a new feature being added/supported. It will be picked up as a candidate for stable branches through the cc: stable, from there it can be discussed.
OK, I am not changing anything.
But when fixes tag is missing I am not clear how you decide if the fix should go into any specific LTS or not, it should be hard to figure it out without reference point.
Quoted 43 lines
Quoted 42 lines
Quoted 41 lines
Quoted 40 lines
Thanks!
-RaseshQuoted 34 lines
Quoted 18 lines
Applied to dpdk-next-net-mrvl/master. Thanks
Quoted 14 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/bnx2x/bnx2x_ethdev.c +0
-0@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c bnx2x_common_dev_init(struct rte_eth_dev · line 604
Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c +2
-0eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { + PMD_DRV_LOG(ERR, sc, "Skipping device init from secondaryprocess");
Quoted 10 lines
Quoted 9 lines
drivers/net/bnx2x/bnx2x_ethdev.c +3
-0+return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev);sc->pcie_bus = pci_dev->addr.bus;--
2.18.0
Quoted 49 lines · Ferruh Yigit
Quoted 43 lines · Kevin Traynor
Quoted 34 lines · Ferruh Yigit
Quoted 33 lines · Kevin Traynor
Quoted 13 lines · Rasesh Mody
Hi Kevin,
Quoted 11 lines
From: Kevin Traynor <[email protected]>
Sent: Tuesday, January 14, 2020 10:52 AMQuoted 1 line · Jerin Jacob
On Sat, Dec 21, 2019 at 7:12 AM Rasesh Mody <[email protected]>
Quoted 5 lines · wrote:
Quoted 4 lines
Skip the device re-initialization for secondary process.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Correct Cc: to [email protected]
Is it a fix, or secondary process was not intended to be supported previously? If it is a fix, please provide the Fixed commit (will save Ferruh searching for it).
Secondary process was not intended to be supported previously. So it is ok to not backport the change to all ongoing stable releases.
Thanks for confirming.
Quoted 1 line
However, the change has been tested with DPDK 19.11, I am wondering if it can be pulled in that stable tree.
Cc Luca
Quoted 4 lines
Please see below the fixline tag.
Fixes 540a211084a7 ("bnx2x: driver core")Quoted 7 lines
Quoted 2 lines
Fixes tag won't be needed now as you've confirmed the code was doing what it was intending to do.
Since there is a request to backport this into 19.11, I was planning to add the fixes tag (stable tag is already there) but will it confuse the 18.11 because the commit in fixes line is older than 18.11?
Quoted 4 lines
I think it should not have a Fixes tag. In this case there is nothing being fixed, just a new feature being added/supported. It will be picked up as a candidate for stable branches through the cc: stable, from there it can be discussed.
Quoted 5 lines
OK, I am not changing anything.
But when fixes tag is missing I am not clear how you decide if the fix should go into any specific LTS or not, it should be hard to figure it out without reference point.
Yes, you are correct, for bugfixes it is important because otherwise stable maintainer have to stop, try to figure it out and start email convo with authors to discuss etc. Whereas with Fixes tags, non-relevant ones for a branch can pruned out quickly and discussion is not needed.
In this case however, where it's not really a bugfix but more a request to add/support something new, it probably needs discussion anyway and not having the Fixes tag ensures that takes place and it doesn't automatically slip in unnoticed.
Quoted 44 lines
Quoted 43 lines
Quoted 42 lines
Quoted 41 lines
Quoted 40 lines
Thanks!
-RaseshQuoted 34 lines
Quoted 18 lines
Applied to dpdk-next-net-mrvl/master. Thanks
Quoted 14 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/bnx2x/bnx2x_ethdev.c +0
-0@@ -598,6 +598,11 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c bnx2x_common_dev_init(struct rte_eth_dev · line 604
Quoted 5 lines
drivers/net/bnx2x/bnx2x_ethdev.c +2
-0eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops; +if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) { + PMD_DRV_LOG(ERR, sc, "Skipping device init from secondaryprocess");
Quoted 10 lines
Quoted 9 lines
drivers/net/bnx2x/bnx2x_ethdev.c +3
-0+return 0 ; + } +rte_eth_copy_pci_info (eth_dev, pci_dev);sc->pcie_bus = pci_dev->addr.bus;--
2.18.0