From: Alejandro Lucero <alejandro.lucero@netronome.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/nfp: fix device start/stop for VFs
Date: Wed, 2 Jan 2019 15:21:49 +0000 [thread overview]
Message-ID: <20190102152149.25501-1-alejandro.lucero@netronome.com> (raw)
Previous commit adding multiprocess support broke VF support.
When VFs, the PMD does not set the link up or down.
Fixes: ef28aa96e53b ("net/nfp: support multiprocess")
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
drivers/net/nfp/nfp_net.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index ffef97d80..05a44a2a9 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -766,12 +766,14 @@ nfp_net_start(struct rte_eth_dev *dev)
goto error;
}
- if (hw->is_pf && rte_eal_process_type() == RTE_PROC_PRIMARY)
- /* Configure the physical port up */
- nfp_eth_set_configured(hw->cpp, hw->pf_port_idx, 1);
- else
- nfp_eth_set_configured(dev->process_private,
- hw->pf_port_idx, 1);
+ if (hw->is_pf) {
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ /* Configure the physical port up */
+ nfp_eth_set_configured(hw->cpp, hw->pf_port_idx, 1);
+ else
+ nfp_eth_set_configured(dev->process_private,
+ hw->pf_port_idx, 1);
+ }
hw->ctrl = new_ctrl;
@@ -820,12 +822,14 @@ nfp_net_stop(struct rte_eth_dev *dev)
(struct nfp_net_rxq *)dev->data->rx_queues[i]);
}
- if (hw->is_pf && rte_eal_process_type() == RTE_PROC_PRIMARY)
- /* Configure the physical port down */
- nfp_eth_set_configured(hw->cpp, hw->pf_port_idx, 0);
- else
- nfp_eth_set_configured(dev->process_private,
- hw->pf_port_idx, 0);
+ if (hw->is_pf) {
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ /* Configure the physical port down */
+ nfp_eth_set_configured(hw->cpp, hw->pf_port_idx, 0);
+ else
+ nfp_eth_set_configured(dev->process_private,
+ hw->pf_port_idx, 0);
+ }
}
/* Reset and stop device. The device can not be restarted. */
--
2.17.1
next reply other threads:[~2019-01-02 15:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-02 15:21 Alejandro Lucero [this message]
2019-01-08 15:46 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190102152149.25501-1-alejandro.lucero@netronome.com \
--to=alejandro.lucero@netronome.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).